diff options
Diffstat (limited to 'module/web/templates')
-rw-r--r-- | module/web/templates/default/base.html | 6 | ||||
-rw-r--r-- | module/web/templates/default/settings.html | 101 |
2 files changed, 69 insertions, 38 deletions
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html index 112875cc0..fd18aee84 100644 --- a/module/web/templates/default/base.html +++ b/module/web/templates/default/base.html @@ -263,14 +263,14 @@ function AddBox() <li id="action_play"><a href="#" class="action play" accesskey="o" rel="nofollow">{% trans "Play" %}</a></li>
<li id="action_cancel"><a href="#" class="action cancel" accesskey="o" rel="nofollow">{% trans "Cancel" %}</a></li>
<li id="action_stop"><a href="#" class="action stop" accesskey="o" rel="nofollow">{% trans "Stop" %}</a></li>
- <li id="action_add"><a href="javascript:AddBox();" class="action stop" accesskey="o" rel="nofollow" >{% trans "Add" %}</a></li>
+ <li id="action_add"><a href="javascript:AddBox();" class="action add" accesskey="o" rel="nofollow" >{% trans "Add" %}</a></li>
</ul>
{% endif %}
{% if perms.pyload.can_see_dl %}
<ul id="page-actions">
- <li><a class="time">{% trans "Download:" %}<a id="time" style=" background-color: {% if status.download %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.download %}{% trans "on" %}{% else %}{% trans "off" %}{% endif %}</a></a></li>
- <li><a class="reconnect">{% trans "Reconnect:" %}<a id="reconnect" style=" background-color: {% if status.reconnect %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.reconnect %}{% trans "on" %}{% else %}{% trans "off" %}{% endif %}</a></a></li>
+ <li><span class="time">{% trans "Download:" %}</span><a id="time" style=" background-color: {% if status.download %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.download %}{% trans "on" %}{% else %}{% trans "off" %}{% endif %}</a></li>
+ <li><span class="reconnect">{% trans "Reconnect:" %}</span><a id="reconnect" style=" background-color: {% if status.reconnect %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.reconnect %}{% trans "on" %}{% else %}{% trans "off" %}{% endif %}</a></li>
<li><a class="action backlink">{% trans "Speed:" %} <b id="speed">{{ status.speed }}</b> kb/s</a></li>
<li><a class="action cog">{% trans "Active:" %} <b id="aktiv">{{ status.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b></a></li>
<li><a href="" class="action revisions" accesskey="o" rel="nofollow">{% trans "Reload page" %}</a></li>
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html index 48ae85170..02ded19a4 100644 --- a/module/web/templates/default/settings.html +++ b/module/web/templates/default/settings.html @@ -5,6 +5,30 @@ {% block title %}{% trans "Config" %} - {{block.super}} {% endblock %} {% block subtitle %}{% trans "Config" %}{% endblock %} +{% block head %} +<script type="text/javascript"> + window.addEvent('domready', function() + { + $$('#tabs a').addEvent('click', function(e) + { + $$('#tabs a').removeProperty('class'); + e.target.set('class', 'selected'); + + $$('div.tabContent').set('class', 'tabContent hide'); + $(e.target.get('href').substring(1)).set('class', 'tabContent'); + return false; + }); + + $$('#tabs a')[0].set('class', 'selected'); + $$('div.tabContent').set('class', 'tabContent hide'); + $$('div.tabContent')[0].set('class', 'tabContent'); + }); + + +</script> + +{% endblock %} + {% block menu %} <li> <a href="/" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> {% trans "Home" %}</a> @@ -31,47 +55,54 @@ {% for message in errors %} <b>{{message}}</b><br> {% endfor %} - -<form id="horizontalForm" action="" method="POST"> +{% if conf|length > 0 %} +<div class="setfield"> + <div id="tabsback"> + <ul id="tabs"> + {% for skey, section in conf.iteritems %} + <li><a href="#{{skey}}">{{section.desc}}</a></li> + {% endfor %} + </ul> + </div> + <form id="horizontalForm" action="" method="POST"> {% for skey, section in conf.iteritems %} - - <h2>{{section.desc}}</h2> - - {% for okey, option in section.items %} - - {% ifnotequal okey "desc" %} - - <label for="{{skey}}|{{okey}}" style="color:#424242;"> - {{option.desc}} - {% ifequal option.type "bool" %} - <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"> - <option {% if option.value %} selected="selected" {% endif %}value="True">{% trans "on" %}</option> - <option {% if not option.value %} selected="selected" {% endif %}value="False">{% trans "off" %}</option> - </select> - {% else %} - {% if option.type|contains:";" %} - <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"> - {% for entry in option.list %} - <option {% ifequal option.value entry %} selected="selected" {% endifequal %}>{{entry}}</option> + <div class="tabContent" id="{{skey}}"> + <table class="settable"> + {% for okey, option in section.items %} + {% ifnotequal okey "desc" %} + <tr> + <td><label for="{{skey}}|{{okey}}" style="color:#424242;">{{option.desc}}:</label></td> + <td> + {% ifequal option.type "bool" %} + <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"> + <option {% if option.value %} selected="selected" {% endif %}value="True">{% trans "on" %}</option> + <option {% if not option.value %} selected="selected" {% endif %}value="False">{% trans "off" %}</option> + </select> + {% else %} + {% if option.type|contains:";" %} + <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"> + {% for entry in option.list %} + <option {% ifequal option.value entry %} selected="selected" {% endifequal %}>{{entry}}</option> + {% endfor %} + </select> + {% else %} + <input id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}" type="text" value="{{option.value}}"/> + {% endif %} + {% endifequal %} + </td> + </tr> + {% endifnotequal %} {% endfor %} - </select> - {% else %} - <input id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}" type="text" value="{{option.value}}"/> - {% endif %} - {% endifequal %} - </label> - - {% endifnotequal %} - - {% endfor %} - <br /><br /><br /><br /> + </table> + </div> {% endfor %} + {% if conf %} <input class="submit" type="submit" value="{% trans "Submit" %}" /> - <div class="clearer"></div> {% endif %} -</form> - + </form> +</div> +{% endif %} {% endblock %} |