add menu for entering hidden share
This commit is contained in:
@@ -72,6 +72,13 @@ tr:nth-child(even) {
|
|||||||
margin-left: 5em;
|
margin-left: 5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#index_menu {
|
||||||
|
float:right;
|
||||||
|
padding: 8px;
|
||||||
|
border: 4px solid lightslategray;
|
||||||
|
background-color: #f3f3fb;
|
||||||
|
}
|
||||||
|
|
||||||
#index_table {
|
#index_table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
|
|||||||
12
code/static/js/scripts.js
Normal file
12
code/static/js/scripts.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
function index_form_enter(event) {
|
||||||
|
if (event.which || event.keyCode) {
|
||||||
|
if ((event.which == 13) || (event.keyCode == 13)) {
|
||||||
|
index_form_submit();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function index_form_submit() {
|
||||||
|
window.location = window.location + "/list/" + document.getElementById("index_form_name").value;
|
||||||
|
}
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div id=index_title><h1>Flees</h1></div>
|
<div id=index_title><h1>Flees</h1></div>
|
||||||
|
<div id=index_menu>
|
||||||
|
<div id=index_enter>
|
||||||
|
<input id="index_form_name" type=text name=name title="Hidden share name"
|
||||||
|
onkeydown="index_form_enter(event)">
|
||||||
|
<input type=submit value=Go onclick="index_form_submit()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class=clear></div>
|
<div class=clear></div>
|
||||||
<table id=index_table>
|
<table id=index_table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -13,8 +20,6 @@
|
|||||||
<td><a href="{{ url_for('list_view',name=entry.name) }}">{{ entry.name }}</a>
|
<td><a href="{{ url_for('list_view',name=entry.name) }}">{{ entry.name }}</a>
|
||||||
<td class=td_right>{% if entry.expire %}{{ entry.expire|safe }}{% else %}-{% endif %}
|
<td class=td_right>{% if entry.expire %}{{ entry.expire|safe }}{% else %}-{% endif %}
|
||||||
<td class=td_right>{% if entry.upload %}yes{% else %}no{% endif %}
|
<td class=td_right>{% if entry.upload %}yes{% else %}no{% endif %}
|
||||||
{% else %}
|
|
||||||
<li>no shares
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<title>Flees</title>
|
<title>Flees</title>
|
||||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/styles.css') }}">
|
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/styles.css') }}">
|
||||||
<script src="{{ url_for('static', filename='js/tablesort.js') }}" type="text/javascript"></script>
|
<script src="{{ url_for('static', filename='js/tablesort.js') }}" type="text/javascript"></script>
|
||||||
|
<script src="{{ url_for('static', filename='js/scripts.js') }}" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class=page>
|
<div class=page>
|
||||||
|
|||||||
Reference in New Issue
Block a user