modify navbar + decompress file password

This commit is contained in:
Terrtia 2018-06-11 10:21:11 +02:00
parent c64588f60e
commit 8522d50308
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
6 changed files with 95 additions and 92 deletions

View file

@ -226,7 +226,7 @@ if __name__ == "__main__":
#print(files.children) #print(files.children)
else: else:
try: try:
files = unpack(file_full_path.encode(), password) files = unpack(file_full_path.encode(), password=password.encode())
#print(files.children) #print(files.children)
except sflock.exception.IncorrectUsageException: except sflock.exception.IncorrectUsageException:
abord_file_submission(uuid, "Wrong Password") abord_file_submission(uuid, "Wrong Password")

View file

@ -19,104 +19,104 @@
<script src="{{ url_for('static', filename='js/jquery.flot.js') }}"></script> <script src="{{ url_for('static', filename='js/jquery.flot.js') }}"></script>
<script src="{{ url_for('static', filename='js/jquery.flot.pie.js') }}"></script> <script src="{{ url_for('static', filename='js/jquery.flot.pie.js') }}"></script>
<script src="{{ url_for('static', filename='js/jquery.flot.time.js') }}"></script> <script src="{{ url_for('static', filename='js/jquery.flot.time.js') }}"></script>
<script src="/static//js/bootstrap.min.js"></script>
<script src="{{ url_for('static', filename='js/tags.js') }}"></script> <script src="{{ url_for('static', filename='js/tags.js') }}"></script>
</head> </head>
<body> <body>
{% include 'navbar.html' %} {% include 'navbar.html' %}
<div id="page-wrapper"> <div id="page-wrapper">
<div class="row"> <div class="row">
<!-- /.col-lg-12 --> <!-- /.col-lg-12 -->
<form action="/PasteSubmit/submit" id="pasteSubmitForm" method="post" enctype=multipart/form-data onsubmit="submitPaste()"> <form action="/PasteSubmit/submit" id="pasteSubmitForm" method="post" enctype=multipart/form-data onsubmit="submitPaste()">
<input type="hidden" id="tags_taxonomies" name="tags_taxonomies" value="test"> <input type="hidden" id="tags_taxonomies" name="tags_taxonomies" value="test">
<input type="hidden" id="tags_galaxies" name="tags_galaxies" value="test"> <input type="hidden" id="tags_galaxies" name="tags_galaxies" value="test">
<div class="panel panel-primary pull-left" style="width: 40%;"> <div class="panel panel-primary pull-left" style="width: 40%;">
<div class="panel-heading">Files submission <div class="panel-heading">Files submission
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="form-group"> <div class="form-group">
<label for="file">Submit a file</label> <label for="file">Submit a file</label>
<input type="file" class="form-control-file" id="file" name="file"> <input type="file" class="form-control-file" id="file" name="file">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="paste_name">Archive Password</label> <label for="paste_name">Archive Password</label>
<input type="password" class="form-control" id="password" name="password" placeholder="Optionnal"> <input type="password" class="form-control" id="password" name="password" placeholder="Optionnal">
</div> </div>
</div> </div>
</div> </div>
<div class="panel panel-info pull-right" style="width: auto;"> <div class="panel panel-info pull-right" style="width: auto;">
<div class="panel-heading"> Tags : <div class="panel-heading"> Tags :
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item"> <li class="list-group-item">
<div class="form-group input-group" > <div class="form-group input-group" >
<input id="ltags" style="width:450%;" type="text"> <input id="ltags" style="width:450%;" type="text">
</div>
<div class="btn-group btn-block">
<button type="button" class="btn btn-primary dropdown-toggle btn-block" data-toggle="dropdown">Taxonomie Selection
<i class="fa fa-chevron-down"></i>
</button>
<ul class="dropdown-menu scrollable-menu" role="menu">
<li><a href="#" id="all-tags-taxonomies">All Tags <i class="fa fa-tags"></i></a></li>
<li role="separator" class="divider"></li>
{% for taxo in active_taxonomies %}
<li><a href="#" id="{{ taxo }}-id{{ loop.index0 }}">{{ taxo }}</a></li>
{% endfor %}
</ul>
</div>
</li>
<li class="list-group-item">
<div class="form-group input-group" >
<input id="ltagsgalaxies" style="width:450%;" type="text">
</div>
<div class="btn-group btn-block">
<button type="button" class="btn btn-primary dropdown-toggle btn-block" data-toggle="dropdown">Galaxy Selection
<i class="fa fa-chevron-down"></i>
</button>
<ul class="dropdown-menu scrollable-menu" role="menu">
<li><a href="#" id="all-tags-galaxies">All Tags <i class="fa fa-tags"></i></a></li>
<li role="separator" class="divider"></li>
{% for galaxy in active_galaxies %}
<li><a href="#" id="{{ galaxy }}-idgalax{{ loop.index0 }}">{{ galaxy }}</a></li>
{% endfor %}
</ul>
</div>
</li>
</ul>
</div>
</div> </div>
<div> <div class="btn-group btn-block">
<button type="button" class="btn btn-primary dropdown-toggle btn-block" data-toggle="dropdown">Taxonomie Selection
<i class="fa fa-chevron-down"></i>
</button>
<ul class="dropdown-menu scrollable-menu" role="menu">
<li><a href="#" id="all-tags-taxonomies">All Tags <i class="fa fa-tags"></i></a></li>
<li role="separator" class="divider"></li>
{% for taxo in active_taxonomies %}
<li><a href="#" id="{{ taxo }}-id{{ loop.index0 }}">{{ taxo }}</a></li>
{% endfor %}
</ul>
</div>
<div class="form-group"> </li>
<textarea class="form-control" id="paste_content" name="paste_content" rows="25"></textarea> <li class="list-group-item">
</div>
<div class="form-group"> <div class="form-group input-group" >
<button class="btn btn-primary " name="submit" type="submit">Submit this paste</button> <input id="ltagsgalaxies" style="width:450%;" type="text">
</div> </div>
<div class="btn-group btn-block">
<button type="button" class="btn btn-primary dropdown-toggle btn-block" data-toggle="dropdown">Galaxy Selection
<i class="fa fa-chevron-down"></i>
</button>
<ul class="dropdown-menu scrollable-menu" role="menu">
<li><a href="#" id="all-tags-galaxies">All Tags <i class="fa fa-tags"></i></a></li>
<li role="separator" class="divider"></li>
{% for galaxy in active_galaxies %}
<li><a href="#" id="{{ galaxy }}-idgalax{{ loop.index0 }}">{{ galaxy }}</a></li>
{% endfor %}
</ul>
</div>
</li>
</ul>
</div>
</div>
<div>
<div class="form-group">
<textarea class="form-control" id="paste_content" name="paste_content" rows="25"></textarea>
</div>
<div class="form-group">
<button class="btn btn-primary " name="submit" type="submit">Submit this paste</button>
</div>
</form> </form>
<div>
</div>
<!-- /.row --> <!-- /.row -->
</div> </div>
<!-- /#page-wrapper --> <!-- /#page-wrapper -->
</div>
</body> </body>
@ -125,9 +125,6 @@
var ltagsgalaxies var ltagsgalaxies
$(document).ready(function(){ $(document).ready(function(){
activePage = "page-PasteSubmit"
$("#"+activePage).addClass("active");
$.getJSON('/Tags/get_all_tags_taxonomies', $.getJSON('/Tags/get_all_tags_taxonomies',
function(data) { function(data) {
@ -147,6 +144,11 @@
name: 'ltagsgalaxies' name: 'ltagsgalaxies'
}); });
}); });
activePage = "page-PasteSubmit"
$("#"+activePage).addClass("active");
$('#modalsubmit').modal({backdrop: 'static'})
}); });
</script> </script>
@ -195,5 +197,4 @@ function submitPaste(){
{% endfor %} {% endfor %}
</script> </script>
</html> </html>

View file

@ -1 +1 @@
<li id='page-PasteSubmit'><a href="{{ url_for('PasteSubmit.PasteSubmit_page') }}"><i class="glyphicon glyphicon-new-window"></i> PasteSubmit </a></li> <li id='page-PasteSubmit'><a href="{{ url_for('PasteSubmit.PasteSubmit_page') }}"><i class="glyphicon glyphicon-new-window white"></i> PasteSubmit </a></li>

View file

@ -36,7 +36,7 @@
<body> <body>
<div id="wrapper"> <div id="wrapper">
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0"> <nav class="navbar navbar-inverse navbar-static-top nav">
{% include 'header.html' %} {% include 'header.html' %}
<!-- /.navbar-top-links --> <!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation"> <div class="navbar-default sidebar" role="navigation">

View file

@ -1,11 +1,13 @@
<div class="navbar-header"> <div class="navbar-header">
<ul class="nav navbar-nav"> <div class="nav navbar-nav">
<!--dashboard--> <!--dashboard-->
<!--trendingcharts--> <!--PasteSubmit-->
<!--trendingmodules--> <!--Tags-->
<!--browsepastes--> <!--terms-->
<!--sentiment--> <!--browsepastes-->
<!--terms--> <!--trendingcharts-->
<!--insert here--> <!--trendingmodules-->
</ul> <!--sentiment-->
<!--insert here-->
</div>
</div> </div>

View file

@ -1,5 +1,5 @@
<div id="wrapper"> <div id="wrapper">
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0"> <div class="navbar navbar-inverse navbar-static-top nav">
{% include 'header.html' %} {% include 'header.html' %}
<!-- /.navbar-top-links --> <!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation"> <div class="navbar-default sidebar" role="navigation">
@ -15,5 +15,5 @@
<a href="{{ url_for('dashboard.index') }}"><img src="{{ url_for('static', filename='image/AIL.png') }}" /></a> <a href="{{ url_for('dashboard.index') }}"><img src="{{ url_for('static', filename='image/AIL.png') }}" /></a>
</div> </div>
<!-- /.navbar-static-side --> <!-- /.navbar-static-side -->
</nav> </div>
</div> </div>