summaryrefslogtreecommitdiffstats
path: root/module/web/templates/default/base.html
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/templates/default/base.html')
-rw-r--r--module/web/templates/default/base.html174
1 files changed, 14 insertions, 160 deletions
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index c7014e6b6..dfc61339d 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -6,168 +6,18 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="/media/default/css/default.css"/>
-
<link rel="stylesheet" type="text/css" href="/media/default/css/window.css"/>
+<link rel="stylesheet" type="text/css" href="/media/default/css/MooDialog.css"/>
-<script type="text/javascript" src="/media/default/js/funktions.js"></script>
-<script type="text/javascript" src="/media/default/js/mootools-core-1.3.1.js"></script>
-<script type="text/javascript" src="/media/default/js/mootools-more-1.3.1.1.js"></script>
+<script type="text/javascript" src="/media/js/mootools-core-1.4.1.js"></script>
+<script type="text/javascript" src="/media/js/mootools-more-1.4.0.1.js"></script>
+<script type="text/javascript" src="/media/js/MooDialog_static.js"></script>
+<script type="text/javascript" src="/media/js/purr_static.js"></script>
-<script type="text/javascript" src="/media/default/js/purr.js"></script>
-<title>{% block title %}pyLoad {{_("Webinterface")}}{% endblock %}</title>
+<script type="text/javascript" src="/media/js/base.js"></script>
-<script type="text/javascript">
-
-var add_bg, add_box, cap_box, cap_info, notify;
-document.addEvent("domready", function(){
-
- notify = new Purr({
- 'mode': 'top',
- 'position': 'center'
- });
-
- add_bg = new Fx.Tween($('add_bg'));
- add_box = new Fx.Tween($('add_box'));
- cap_box = new Fx.Tween($('cap_box'));
-
- add_bg.set("opacity", 0);
- add_box.set("opacity", 0);
- cap_box.set("opacity", 0);
-
-
- $('add_form').onsubmit=function() {
- $('add_form').target = 'upload_target';
- if ($('add_name').value == "" && $('add_file').value == ""){
- alert("{{_("Please Enter a packagename.")}}");
- return false;
- } else {
- out();
- }
- };
-
- $('add_reset').addEvent('click', function(){
- out();
- });
-
- var jsonStatus = new Request.JSON({
- url: "/json/status",
- onSuccess: LoadJsonToContent,
- secure: false,
- async: true,
- initialDelay: 0,
- delay: 4000,
- limit: 30000
- });
-
- $('action_play').addEvent('click', function(){
- new Request({method: 'get', url: '/json/unpause'}).send();
- });
-
-
- $('action_cancel').addEvent('click', function(){
- new Request({method: 'get', url: '/json/cancel'}).send();
- });
-
-
- $('action_stop').addEvent('click', function(){
- new Request({method: 'get', url: '/json/pause'}).send();
- });
-
- $('cap_info').addEvent('click', function(){
- load_cap("get", "");
- show_cap();
- });
-
- jsonStatus.startTimer();
-
-});
-
-function LoadJsonToContent(data)
-{
- $("speed").set('text', humanFileSize(data.speed)+"/s");
- $("aktiv").set('text', data.active);
- $("aktiv_from").set('text', data.queue);
- $("aktiv_total").set('text', data.total);
-
- if (data.captcha){
- if($("cap_info").getStyle("display") != "inline"){
- $("cap_info").setStyle('display', 'inline');
- notify.alert('{{_("New Captcha Request")}}', {
- 'className': 'notify'
- });
- }
- }else{
- $("cap_info").setStyle('display', 'none');
- }
-
- if (data.download) {
- $("time").set('text', " {{_("on")}}");
- $("time").setStyle('background-color', "#8ffc25");
-
- }else{
- $("time").set('text', " {{_("off")}}");
- $("time").setStyle('background-color', "#fc6e26");
- }
-
- if (data.reconnect){
- $("reconnect").set('text', " {{_("on")}}");
- $("reconnect").setStyle('background-color', "#8ffc25");
- }
- else{
- $("reconnect").set('text', " {{_("off")}}");
- $("reconnect").setStyle('background-color', "#fc6e26");
- }
-}
-
-function bg_show(){
- $("add_bg").setStyle('display', 'block');
- add_bg.start('opacity',0.8);
-}
-
-function bg_hide(){
- add_bg.start('opacity',0).chain(function(){
- $('add_bg').setStyle('display', 'none');
- });
-}
-
-function show(){
- bg_show();
- $("add_form").reset();
- $("add_box").setStyle('display', 'block');
- add_box.start('opacity',1)
-}
-
-function out(){
- bg_hide();
- add_box.start('opacity',0).chain(function(){
- $('add_box').setStyle('display', 'none');
- });
-}
-
-function show_cap(){
- bg_show();
- $("cap_box").setStyle('display', 'block');
- cap_box.start('opacity',1).chain(function(){
- $('cap_result').focus();
- });
-}
-
-function hide_cap(){
- bg_hide();
- cap_box.start('opacity',0).chain(function(){
- $('cap_box').setStyle('display', 'none');
- });
-}
-
-function AddBox(){
- if ($("add_box").getStyle("display") == "hidden" || $("add_box").getStyle("display") == "none" || $("add_box").getStyle("opacity" == 0))
- show();
- else
- out();
-}
-
-</script>
+<title>{% block title %}pyLoad {{_("Webinterface")}}{% endblock %}</title>
{% block head %}
{% endblock %}
@@ -264,7 +114,7 @@ function AddBox(){
<li id="action_play"><a href="#" class="action play" accesskey="o" rel="nofollow">{{_("Start")}}</a></li>
<li id="action_stop"><a href="#" class="action stop" accesskey="o" rel="nofollow">{{_("Stop")}}</a></li>
<li id="action_cancel"><a href="#" class="action cancel" accesskey="o" rel="nofollow">{{_("Cancel")}}</a></li>
- <li id="action_add"><a href="javascript:AddBox();" class="action add" accesskey="o" rel="nofollow" >{{_("Add")}}</a></li>
+ <li id="action_add"><a href="#" class="action add" accesskey="o" rel="nofollow" >{{_("Add")}}</a></li>
</ul>
{% endif %}
@@ -320,7 +170,11 @@ function AddBox(){
</div>
</div>
-{% include "default/window.html" %}
-{% include "default/captcha.html" %}
+<div style="display: none;">
+ {% include "default/window.html" %}
+ {% include "default/captcha.html" %}
+ {% block hidden %}
+ {% endblock %}
+</div>
</body>
</html>