From a5f665f504dc544b4a03f2ee81da6c44555415e5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 17 Feb 2015 19:35:35 +0100 Subject: Update webui --- pyload/webui/themes/Next/css/MooDialog.css | 92 ++++++ pyload/webui/themes/Next/css/log.css | 72 +++++ pyload/webui/themes/Next/css/pathchooser.css | 68 ++++ pyload/webui/themes/Next/css/window.css | 73 +++++ pyload/webui/themes/Next/img/add_folder.png | Bin 0 -> 571 bytes pyload/webui/themes/Next/img/ajax-loader.gif | Bin 0 -> 404 bytes pyload/webui/themes/Next/img/arrow_refresh.png | Bin 0 -> 685 bytes pyload/webui/themes/Next/img/button.png | Bin 0 -> 569 bytes pyload/webui/themes/Next/img/control_cancel.png | Bin 0 -> 3349 bytes pyload/webui/themes/Next/img/delete.png | Bin 0 -> 715 bytes pyload/webui/themes/Next/img/package_go.png | Bin 0 -> 898 bytes pyload/webui/themes/Next/img/pencil.png | Bin 0 -> 450 bytes pyload/webui/themes/Next/img/pyload-logo.png | Bin 0 -> 8457 bytes pyload/webui/themes/Next/js/admin.coffee | 58 ++++ pyload/webui/themes/Next/js/admin.js | 3 + pyload/webui/themes/Next/js/base.coffee | 173 +++++++++++ pyload/webui/themes/Next/js/base.js | 3 + pyload/webui/themes/Next/js/filemanager.js | 291 +++++++++++++++++ pyload/webui/themes/Next/js/package.js | 397 ++++++++++++++++++++++++ pyload/webui/themes/Next/js/settings.coffee | 107 +++++++ pyload/webui/themes/Next/js/settings.js | 3 + pyload/webui/themes/Next/tml/admin.html | 100 ++++++ pyload/webui/themes/Next/tml/base.html | 199 ++++++++++++ pyload/webui/themes/Next/tml/captcha.html | 40 +++ pyload/webui/themes/Next/tml/downloads.html | 29 ++ pyload/webui/themes/Next/tml/filemanager.html | 80 +++++ pyload/webui/themes/Next/tml/folder.html | 15 + pyload/webui/themes/Next/tml/home.html | 277 +++++++++++++++++ pyload/webui/themes/Next/tml/info.html | 81 +++++ pyload/webui/themes/Next/tml/login.html | 36 +++ pyload/webui/themes/Next/tml/logout.html | 9 + pyload/webui/themes/Next/tml/logs.html | 41 +++ pyload/webui/themes/Next/tml/pathchooser.html | 76 +++++ pyload/webui/themes/Next/tml/queue.html | 109 +++++++ pyload/webui/themes/Next/tml/settings.html | 217 +++++++++++++ pyload/webui/themes/Next/tml/settings_item.html | 50 +++ pyload/webui/themes/Next/tml/window.html | 46 +++ 37 files changed, 2745 insertions(+) create mode 100644 pyload/webui/themes/Next/css/MooDialog.css create mode 100644 pyload/webui/themes/Next/css/log.css create mode 100644 pyload/webui/themes/Next/css/pathchooser.css create mode 100644 pyload/webui/themes/Next/css/window.css create mode 100644 pyload/webui/themes/Next/img/add_folder.png create mode 100644 pyload/webui/themes/Next/img/ajax-loader.gif create mode 100644 pyload/webui/themes/Next/img/arrow_refresh.png create mode 100644 pyload/webui/themes/Next/img/button.png create mode 100644 pyload/webui/themes/Next/img/control_cancel.png create mode 100644 pyload/webui/themes/Next/img/delete.png create mode 100644 pyload/webui/themes/Next/img/package_go.png create mode 100644 pyload/webui/themes/Next/img/pencil.png create mode 100644 pyload/webui/themes/Next/img/pyload-logo.png create mode 100644 pyload/webui/themes/Next/js/admin.coffee create mode 100644 pyload/webui/themes/Next/js/admin.js create mode 100644 pyload/webui/themes/Next/js/base.coffee create mode 100644 pyload/webui/themes/Next/js/base.js create mode 100644 pyload/webui/themes/Next/js/filemanager.js create mode 100644 pyload/webui/themes/Next/js/package.js create mode 100644 pyload/webui/themes/Next/js/settings.coffee create mode 100644 pyload/webui/themes/Next/js/settings.js create mode 100644 pyload/webui/themes/Next/tml/admin.html create mode 100644 pyload/webui/themes/Next/tml/base.html create mode 100644 pyload/webui/themes/Next/tml/captcha.html create mode 100644 pyload/webui/themes/Next/tml/downloads.html create mode 100644 pyload/webui/themes/Next/tml/filemanager.html create mode 100644 pyload/webui/themes/Next/tml/folder.html create mode 100644 pyload/webui/themes/Next/tml/home.html create mode 100644 pyload/webui/themes/Next/tml/info.html create mode 100644 pyload/webui/themes/Next/tml/login.html create mode 100644 pyload/webui/themes/Next/tml/logout.html create mode 100644 pyload/webui/themes/Next/tml/logs.html create mode 100644 pyload/webui/themes/Next/tml/pathchooser.html create mode 100644 pyload/webui/themes/Next/tml/queue.html create mode 100644 pyload/webui/themes/Next/tml/settings.html create mode 100644 pyload/webui/themes/Next/tml/settings_item.html create mode 100644 pyload/webui/themes/Next/tml/window.html (limited to 'pyload/webui/themes/Next') diff --git a/pyload/webui/themes/Next/css/MooDialog.css b/pyload/webui/themes/Next/css/MooDialog.css new file mode 100644 index 000000000..ad2583b4b --- /dev/null +++ b/pyload/webui/themes/Next/css/MooDialog.css @@ -0,0 +1,92 @@ +/* Created by Arian Stolwijk */ + +.MooDialog { +/* position: fixed;*/ + margin: 0 auto 0 -350px; + width:600px; + padding:14px; + left:50%; + top: 100px; + + position: absolute; + left: 50%; + z-index: 50000; + + background: #fff; + color: black; + border-radius: 7px; + -moz-border-radius: 7px; + -webkit-border-radius: 7px; + border-radius: 7px; + -moz-box-shadow: 1px 1px 5px rgba(0,0,0,0.8); + -webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.8); + box-shadow: 1px 1px 5px rgba(0,0,0,0.8); +} + +.MooDialogTitle { + padding-top: 30px; +} + +.MooDialog .title { + position: absolute; + top: 0; + left: 0; + right: 0; + padding: 3px 20px; + background: #b7c4dc; + border-bottom: 1px solid #a1aec5; + font-weight: bold; + text-shadow: 1px 1px 0 #fff; + color: black; + border-radius: 7px; + -moz-border-radius: 7px; + -webkit-border-radius: 7px; +} + +.MooDialog .close { + background: url(../lib/MooTools/MooDialog/css/dialog-close.png) no-repeat; + width: 16px; + height: 16px; + display: block; + cursor: pointer; + top: -5px; + left: -5px; + position: absolute; +} + +.MooDialog .buttons { + text-align: right; + margin: 0; + padding: 0; + border: 0; + background: none; +} + +.MooDialog .iframe { + width: 100%; + height: 100%; +} + +.MooDialog .textInput { + width: 200px; + float: left; +} + +.MooDialog .MooDialogAlert, +.MooDialog .MooDialogConfirm, +.MooDialog .MooDialogPrompt, +.MooDialog .MooDialogError { + background: url(../lib/MooTools/MooDialog/css/dialog-warning.png) no-repeat; + padding-left: 40px; + min-height: 40px; +} + +.MooDialog .MooDialogConfirm, +.MooDialog .MooDialogPromt { + background: url(../lib/MooTools/MooDialog/css/dialog-question.png) no-repeat; +} + +.MooDialog .MooDialogError { + background: url(../lib/MooTools/MooDialog/css/dialog-error.png) no-repeat; +} + diff --git a/pyload/webui/themes/Next/css/log.css b/pyload/webui/themes/Next/css/log.css new file mode 100644 index 000000000..af2ea4fe8 --- /dev/null +++ b/pyload/webui/themes/Next/css/log.css @@ -0,0 +1,72 @@ + +html, body, #content +{ + height: 100%; +} +#body-wrapper +{ + height: 70%; +} +.logdiv +{ + height: 90%; + width: 100%; + overflow: auto; + border: 2px solid #CCC; + outline: 1px solid #666; + background-color: #FFE; + margin-right: auto; + margin-left: auto; +} +.logform +{ + display: table; + margin: 0 auto 0 auto; + padding-top: 5px; +} +.logtable +{ + + margin: 0px; +} +.logtable td +{ + border: none; + white-space: nowrap; + + + font-family: monospace; + font-size: 16px; + margin: 0px; + padding: 0px 10px 0px 10px; + line-height: 110%; +} +td.logline +{ + background-color: #EEE; + text-align:right; + padding: 0px 5px 0px 5px; +} +td.loglevel +{ + text-align:right; +} +.logperpage +{ + float: right; + padding-bottom: 8px; +} +.logpaginator +{ + float: left; + padding-top: 5px; +} +.logpaginator a +{ + padding: 0px 8px 0px 8px; +} +.logwarn +{ + text-align: center; + color: red; +} \ No newline at end of file diff --git a/pyload/webui/themes/Next/css/pathchooser.css b/pyload/webui/themes/Next/css/pathchooser.css new file mode 100644 index 000000000..bfd84b19b --- /dev/null +++ b/pyload/webui/themes/Next/css/pathchooser.css @@ -0,0 +1,68 @@ +table { + width: 90%; + border: 1px dotted #888888; + font-family: sans-serif; + font-size: 10pt; +} + +th { + background-color: #525252; + color: #E0E0E0; +} + +table, tr, td { + background-color: #fff; +} + +a, a:visited { + text-decoration: none; + font-weight: bold; +} + +#paths { + width: 90%; + text-align: left; +} + +.file_directory { + color: #c0c0c0; +} +.path_directory { + color: #3c3c3c; +} +.file_file { + color: #3c3c3c; +} +.path_file { + color: #c0c0c0; +} + +.parentdir { + color: #000000; + font-size: 10pt; +} +.name { + text-align: left; +} +.size { + text-align: right; +} +.type { + text-align: left; +} +.mtime { + text-align: center; +} + +.path_abs_rel { + color: #3c3c3c; + text-decoration: none; + font-weight: bold; + font-family: sans-serif; + font-size: 10pt; +} + +.path_abs_rel a { + color: #3c3c3c; + font-style: italic; +} diff --git a/pyload/webui/themes/Next/css/window.css b/pyload/webui/themes/Next/css/window.css new file mode 100644 index 000000000..12829868b --- /dev/null +++ b/pyload/webui/themes/Next/css/window.css @@ -0,0 +1,73 @@ +/* ----------- stylized ----------- */ +.window_box h1{ + font-size:14px; + font-weight:bold; + margin-bottom:8px; +} +.window_box p{ + font-size:11px; + color:#666666; + margin-bottom:20px; + border-bottom:solid 1px #b7ddf2; + padding-bottom:10px; +} +.window_box label{ + display:block; + font-weight:bold; + text-align:right; + width:240px; + float:left; +} +.window_box .small{ + color:#666666; + display:block; + font-size:11px; + font-weight:normal; + text-align:right; + width:240px; +} +.window_box select, .window_box input{ + float:left; + font-size:12px; + padding:4px 2px; + border:solid 1px #aacfe4; + width:300px; + margin:2px 0 20px 10px; +} +.window_box .cont{ + float:left; + font-size:12px; + padding: 0px 10px 15px 0px; + width:300px; + margin:0px 0px 0px 10px; +} +.window_box .cont input{ + float: none; + margin: 0px 15px 0px 1px; +} +.window_box textarea{ + float:left; + font-size:12px; + padding:4px 2px; + border:solid 1px #aacfe4; + width:300px; + margin:2px 0 20px 10px; +} +.window_box button, .styled_button{ + clear:both; + margin-left:150px; + width:125px; + height:31px; + background:#666666 url(../img/button.png) no-repeat; + text-align:center; + line-height:31px; + color:#FFFFFF; + font-size:11px; + font-weight:bold; + border: 0px; +} + +.styled_button { + margin-left: 15px; + cursor: pointer; +} diff --git a/pyload/webui/themes/Next/img/add_folder.png b/pyload/webui/themes/Next/img/add_folder.png new file mode 100644 index 000000000..8acbc411b Binary files /dev/null and b/pyload/webui/themes/Next/img/add_folder.png differ diff --git a/pyload/webui/themes/Next/img/ajax-loader.gif b/pyload/webui/themes/Next/img/ajax-loader.gif new file mode 100644 index 000000000..2fd8e0737 Binary files /dev/null and b/pyload/webui/themes/Next/img/ajax-loader.gif differ diff --git a/pyload/webui/themes/Next/img/arrow_refresh.png b/pyload/webui/themes/Next/img/arrow_refresh.png new file mode 100644 index 000000000..0de26566d Binary files /dev/null and b/pyload/webui/themes/Next/img/arrow_refresh.png differ diff --git a/pyload/webui/themes/Next/img/button.png b/pyload/webui/themes/Next/img/button.png new file mode 100644 index 000000000..bb408a7d6 Binary files /dev/null and b/pyload/webui/themes/Next/img/button.png differ diff --git a/pyload/webui/themes/Next/img/control_cancel.png b/pyload/webui/themes/Next/img/control_cancel.png new file mode 100644 index 000000000..7b9bc3fba Binary files /dev/null and b/pyload/webui/themes/Next/img/control_cancel.png differ diff --git a/pyload/webui/themes/Next/img/delete.png b/pyload/webui/themes/Next/img/delete.png new file mode 100644 index 000000000..08f249365 Binary files /dev/null and b/pyload/webui/themes/Next/img/delete.png differ diff --git a/pyload/webui/themes/Next/img/package_go.png b/pyload/webui/themes/Next/img/package_go.png new file mode 100644 index 000000000..aace63ad6 Binary files /dev/null and b/pyload/webui/themes/Next/img/package_go.png differ diff --git a/pyload/webui/themes/Next/img/pencil.png b/pyload/webui/themes/Next/img/pencil.png new file mode 100644 index 000000000..0bfecd50e Binary files /dev/null and b/pyload/webui/themes/Next/img/pencil.png differ diff --git a/pyload/webui/themes/Next/img/pyload-logo.png b/pyload/webui/themes/Next/img/pyload-logo.png new file mode 100644 index 000000000..2443cd8b1 Binary files /dev/null and b/pyload/webui/themes/Next/img/pyload-logo.png differ diff --git a/pyload/webui/themes/Next/js/admin.coffee b/pyload/webui/themes/Next/js/admin.coffee new file mode 100644 index 000000000..82b0dd3ec --- /dev/null +++ b/pyload/webui/themes/Next/js/admin.coffee @@ -0,0 +1,58 @@ +root = this + +window.addEvent "domready", -> + + root.passwordDialog = new MooDialog {destroyOnHide: false} + root.passwordDialog.setContent $ 'password_box' + + $("login_password_reset").addEvent "click", (e) -> root.passwordDialog.close() + $("login_password_button").addEvent "click", (e) -> + + newpw = $("login_new_password").get("value") + newpw2 = $("login_new_password2").get("value") + + if newpw is newpw2 + form = $("password_form") + form.set "send", { + onSuccess: (data) -> + root.notify.alert "Success", { + 'className': 'success' + } + onFailure: (data) -> + root.notify.alert "Error", { + 'className': 'error' + } + } + + form.send() + + root.passwordDialog.close() + else + alert '{{_("Passwords did not match.")}}' + + e.stop() + + for item in $$(".change_password") + id = item.get("id") + user = id.split("|")[1] + $("user_login").set("value", user) + item.addEvent "click", (e) -> root.passwordDialog.open() + + $('quit-pyload').addEvent "click", (e) -> + new MooDialog.Confirm "{{_('You are really sure you want to quit pyLoad?')}}", -> + new Request.JSON({ + url: '/api/kill' + method: 'get' + }).send() + , -> + e.stop() + + $('restart-pyload').addEvent "click", (e) -> + new MooDialog.Confirm "{{_('Are you sure you want to restart pyLoad?')}}", -> + new Request.JSON({ + url: '/api/restart' + method: 'get' + onSuccess: (data) -> alert "{{_('pyLoad restarted')}}" + }).send() + , -> + e.stop() \ No newline at end of file diff --git a/pyload/webui/themes/Next/js/admin.js b/pyload/webui/themes/Next/js/admin.js new file mode 100644 index 000000000..d34d310a0 --- /dev/null +++ b/pyload/webui/themes/Next/js/admin.js @@ -0,0 +1,3 @@ +{% autoescape true %} +var root;root=this;window.addEvent("domready",function(){var f,c,b,e,a,d;root.passwordDialog=new MooDialog({destroyOnHide:false});root.passwordDialog.setContent($("password_box"));$("login_password_reset").addEvent("click",function(g){return root.passwordDialog.close()});$("login_password_button").addEvent("click",function(j){var h,i,g;i=$("login_new_password").get("value");g=$("login_new_password2").get("value");if(i===g){h=$("password_form");h.set("send",{onSuccess:function(k){return root.notify.alert("Success",{className:"success"})},onFailure:function(k){return root.notify.alert("Error",{className:"error"})}});h.send();root.passwordDialog.close()}else{alert('{{_("Passwords did not match.")}}')}return j.stop()});d=$$(".change_password");for(e=0,a=d.length;e + filesizename = new Array("B", "KiB", "MiB", "GiB", "TiB", "PiB") + loga = Math.log(size) / Math.log(1024) + i = Math.floor(loga) + a = Math.pow(1024, i) + if size is 0 then "0 B" else (Math.round(size * 100 / a) / 100 + " " + filesizename[i]) + +parseUri = () -> + oldString = $("add_links").value + regxp = new RegExp('(ht|f)tp(s?):\/\/[a-zA-Z0-9\-\.\/\?=_&%#]+[<| |\"|\'|\r|\n|\t]{1}', 'g') + resu = oldString.match regxp + return if resu == null + res = ""; + + for part in resu + if part.indexOf(" ") != -1 + res = res + part.replace(" ", " \n") + else if part.indexOf("\t") != -1 + res = res + part.replace("\t", " \n") + else if part.indexOf("\r") != -1 + res = res + part.replace("\r", " \n") + else if part.indexOf("\"") != -1 + res = res + part.replace("\"", " \n") + else if part.indexOf("<") != -1 + res = res + part.replace("<", " \n") + else if part.indexOf("'") != -1 + res = res + part.replace("'", " \n") + else + res = res + part.replace("\n", " \n") + + $("add_links").value = res; + + +Array::remove = (from, to) -> + rest = this.slice((to || from) + 1 || this.length) + this.length = from < 0 ? this.length + from : from + return [] if this.length == 0 + return this.push.apply(this, rest) + + +document.addEvent "domready", -> + + # global notification + root.notify = new Purr { + 'mode': 'top' + 'position': 'center' + } + + root.captchaBox = new MooDialog {destroyOnHide: false} + root.captchaBox.setContent $ 'cap_box' + + root.addBox = new MooDialog {destroyOnHide: false} + root.addBox.setContent $ 'add_box' + + $('add_form').onsubmit = -> + $('add_form').target = 'upload_target' + if $('add_name').value is "" and $('add_file').value is "" + alert '{{_("Please Enter a packagename.")}}' + return false + else + root.addBox.close() + return true + + $('add_reset').addEvent 'click', -> root.addBox.close() + + $('action_add').addEvent 'click', -> $("add_form").reset(); root.addBox.open() + $('action_play').addEvent 'click', -> new Request({method: 'get', url: '/api/unpauseServer'}).send() + $('action_cancel').addEvent 'click', -> new Request({method: 'get', url: '/api/stopAllDownloads'}).send() + $('action_stop').addEvent 'click', -> new Request({method: 'get', url: '/api/pauseServer'}).send() + + + # captcha events + + $('cap_info').addEvent 'click', -> + load_captcha "get", "" + root.captchaBox.open() + $('cap_reset').addEvent 'click', -> root.captchaBox.close() + $('cap_form').addEvent 'submit', (e) -> + submit_captcha() + e.stop() + + $('cap_positional').addEvent 'click', on_captcha_click + + new Request.JSON({ + url: "/json/status" + onSuccess: LoadJsonToContent + secure: false + async: true + initialDelay: 0 + delay: 4000 + limit: 3000 + }).startTimer() + +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' + root.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" + + return null + + +set_captcha = (data) -> + $('cap_id').set 'value', data.id + if (data.result_type is 'textual') + $('cap_textual_img').set 'src', data.src + $('cap_title').set 'text', '{{_("Please read the text on the captcha.")}}' + $('cap_submit').setStyle 'display', 'inline' + $('cap_textual').setStyle 'display', 'block' + $('cap_positional').setStyle 'display', 'none' + + else if (data.result_type == 'positional') + $('cap_positional_img').set('src', data.src) + $('cap_title').set('text', '{{_("Please click on the right captcha position.")}}') + $('cap_submit').setStyle('display', 'none') + $('cap_textual').setStyle('display', 'none') + + +load_captcha = (method, post) -> + new Request.JSON({ + url: "/json/set_captcha" + onSuccess: (data) -> set_captcha(data) if data.captcha else clear_captcha() + secure: false + async: true + method: method + }).send(post) + +clear_captcha = -> + $('cap_textual').setStyle 'display', 'none' + $('cap_textual_img').set 'src', '' + $('cap_positional').setStyle 'display', 'none' + $('cap_positional_img').set 'src', '' + $('cap_title').set 'text', '{{_("No Captchas to read.")}}' + +submit_captcha = -> + load_captcha("post", "cap_id=" + $('cap_id').get('value') + "&cap_result=" + $('cap_result').get('value') ); + $('cap_result').set('value', '') + false + +on_captcha_click = (e) -> + position = e.target.getPosition() + x = e.page.x - position.x + y = e.page.y - position.y + $('cap_result').value = x + "," + y + submit_captcha() \ No newline at end of file diff --git a/pyload/webui/themes/Next/js/base.js b/pyload/webui/themes/Next/js/base.js new file mode 100644 index 000000000..c68b1047a --- /dev/null +++ b/pyload/webui/themes/Next/js/base.js @@ -0,0 +1,3 @@ +{% autoescape true %} +var LoadJsonToContent,clear_captcha,humanFileSize,load_captcha,on_captcha_click,parseUri,root,set_captcha,submit_captcha;root=this;humanFileSize=function(f){var c,d,e,b;d=new Array("B","KiB","MiB","GiB","TiB","PiB");b=Math.log(f)/Math.log(1024);e=Math.floor(b);c=Math.pow(1024,e);if(f===0){return"0 B"}else{return Math.round(f*100/c)/100+" "+d[e]}};parseUri=function(){var b,c,g,e,d,f,a;b=$("add_links").value;g=new RegExp("(ht|f)tp(s?)://[a-zA-Z0-9-./?=_&%#]+[<| |\"|'|\r|\n|\t]{1}","g");d=b.match(g);if(d===null){return}e="";for(f=0,a=d.length;f 0) + { + uls[0].getChildren("li.folder").each(function(fld) { + var path = fld.getElements("input.path")[0].get("value"); + var name = fld.getElements("input.name")[0].get("value"); + this.directories.push(new Item(this, path, name, fld)); + }.bind(this)); + uls[0].getChildren("li.file").each(function(fld) { + var path = fld.getElements("input.path")[0].get("value"); + var name = fld.getElements("input.name")[0].get("value"); + this.files.push(new Item(this, path, name, fld)); + }.bind(this)); + } + }, + + reorderElements: function() { + //TODO sort the main ul again (to keep data ordered after renaming something) + }, + + del: function(event) { + $("confirm_form").removeEvents("submit"); + $("confirm_form").addEvent("submit", this.deleteDirectory.bind(this)); + + $$("#confirm_form p").set('html', '{{_(("Are you sure you want to delete the selected item?"))}}'); + + show_confirm_box(); + event.stop(); + }, + + deleteDirectory: function(event) { + hide_confirm_box(); + new Request.JSON({ + method: 'POST', + url: "/json/filemanager/delete", + data: {"path": this.path, "name": this.name}, + onSuccess: function(data) { + if(data.response == "success") + { + new Fx.Tween(this.ele).start('opacity', 0); + var ul = this.ele.parentNode; + this.ele.dispose(); + //if this was the only child, add a "empty folder" div + if(!ul.getChildren('li')[0]) + { + var div = new Element("div", { 'html': '{{ _("Folder is empty") }}' }); + div.replaces(ul); + } + + indicateSuccess(); + } else + { + //error from json code... + indicateFail(); + } + }.bind(this), + onFailure: indicateFail + }).send(); + + event.stop(); + }, + + rename: function(event) { + $("rename_form").removeEvents("submit"); + $("rename_form").addEvent("submit", this.renameDirectory.bind(this)); + + $("path").set("value", this.path); + $("old_name").set("value", this.name); + $("new_name").set("value", this.name); + + show_rename_box(); + event.stop(); + }, + + renameDirectory: function(event) { + hide_rename_box(); + new Request.JSON({ + method: 'POST', + url: "/json/filemanager/rename", + onSuccess: function(data) { + if(data.response == "success") + { + this.name = $("new_name").get("value"); + this.ele.getElements("b")[0].set('html', $("new_name").get("value")); + this.reorderElements(); + indicateSuccess(); + } else + { + //error from json code... + indicateFail(); + } + }.bind(this), + onFailure: indicateFail + }).send($("rename_form").toQueryString()); + + event.stop(); + }, + + mkdir: function(event) { + new Request.JSON({ + method: 'POST', + url: "/json/filemanager/mkdir", + data: {"path": this.path + "/" + this.name, "name": '{{_("New folder")}}'}, + onSuccess: function(data) { + if(data.response == "success") + { + new Request.HTML({ + method: 'POST', + url: "/filemanager/get_dir", + data: {"path": data.path, "name": data.name}, + onSuccess: function(li) { + //add node as first child of ul + var ul = this.ele.getChildren('ul')[0]; + if(!ul) + { + //remove the "Folder Empty" div + this.ele.getChildren('div').dispose(); + + //create new ul to contain subfolder + ul = new Element("ul"); + ul.inject(this.ele, 'bottom'); + } + li[0].inject(ul, 'top'); + + //add directory as a subdirectory of the current item + this.directories.push(new Item(this.ui, data.path, data.name, ul.firstChild)); + }.bind(this), + onFailure: indicateFail + }).send(); + indicateSuccess(); + } else + { + //error from json code... + indicateFail(); + } + }.bind(this), + onFailure: indicateFail + }).send(); + + event.stop(); + }, + + toggle: function() { + var child = this.ele.getElement('ul'); + if(child == null) + child = this.ele.getElement('div'); + + if(child != null) + { + if (child.getStyle('display') == "block") { + child.dissolve(); + } else { + child.reveal(); + } + } + } +}); diff --git a/pyload/webui/themes/Next/js/package.js b/pyload/webui/themes/Next/js/package.js new file mode 100644 index 000000000..384207882 --- /dev/null +++ b/pyload/webui/themes/Next/js/package.js @@ -0,0 +1,397 @@ +var root = this; + +document.addEvent("domready", function() { + root.load = new Fx.Tween($("load-indicator"), {link: "cancel"}); + root.load.set("opacity", 0); + + + root.packageBox = new MooDialog({destroyOnHide: false}); + root.packageBox.setContent($('pack_box')); + + $('pack_reset').addEvent('click', function() { + $('pack_form').reset(); + root.packageBox.close(); + }); +}); + +function indicateLoad() { + //$("load-indicator").reveal(); + root.load.start("opacity", 1) +} + +function indicateFinish() { + root.load.start("opacity", 0) +} + +function indicateSuccess() { + indicateFinish(); + root.notify.alert('{{_("Success")}}.', { + 'className': 'success' + }); +} + +function indicateFail() { + indicateFinish(); + root.notify.alert('{{_("Failed")}}.', { + 'className': 'error' + }); +} + +var PackageUI = new Class({ + initialize: function(url, type) { + this.url = url; + this.type = type; + this.packages = []; + this.parsePackages(); + + this.sorts = new Sortables($("package-list"), { + constrain: false, + clone: true, + revert: true, + opacity: 0.4, + handle: ".package_drag", + onComplete: this.saveSort.bind(this) + }); + + $("del_finished").addEvent("click", this.deleteFinished.bind(this)); + $("restart_failed").addEvent("click", this.restartFailed.bind(this)); + + }, + + parsePackages: function() { + $("package-list").getChildren("li").each(function(ele) { + var id = ele.getFirst().get("id").match(/[0-9]+/); + this.packages.push(new Package(this, id, ele)) + }.bind(this)) + }, + + loadPackages: function() { + }, + + deleteFinished: function() { + indicateLoad(); + new Request.JSON({ + method: 'get', + url: '/api/deleteFinished', + onSuccess: function(data) { + if (data.length > 0) { + window.location.reload() + } else { + this.packages.each(function(pack) { + pack.close(); + }); + indicateSuccess(); + } + }.bind(this), + onFailure: indicateFail + }).send(); + }, + + restartFailed: function() { + indicateLoad(); + new Request.JSON({ + method: 'get', + url: '/api/restartFailed', + onSuccess: function(data) { + this.packages.each(function(pack) { + pack.close(); + }); + indicateSuccess(); + }.bind(this), + onFailure: indicateFail + }).send(); + }, + + startSort: function(ele, copy) { + }, + + saveSort: function(ele, copy) { + var order = []; + this.sorts.serialize(function(li, pos) { + if (li == ele && ele.retrieve("order") != pos) { + order.push(ele.retrieve("pid") + "|" + pos) + } + li.store("order", pos) + }); + if (order.length > 0) { + indicateLoad(); + new Request.JSON({ + method: 'get', + url: '/json/package_order/' + order[0], + onSuccess: indicateFinish, + onFailure: indicateFail + }).send(); + } + } + +}); + +var Package = new Class({ + initialize: function(ui, id, ele, data) { + this.ui = ui; + this.id = id; + this.linksLoaded = false; + + if (!ele) { + this.createElement(data); + } else { + this.ele = ele; + this.order = ele.getElements("div.order")[0].get("html"); + this.ele.store("order", this.order); + this.ele.store("pid", this.id); + this.parseElement(); + } + + var pname = this.ele.getElements(".packagename")[0]; + this.buttons = new Fx.Tween(this.ele.getElements(".buttons")[0], {link: "cancel"}); + this.buttons.set("opacity", 0); + + pname.addEvent("mouseenter", function(e) { + this.buttons.start("opacity", 1) + }.bind(this)); + + pname.addEvent("mouseleave", function(e) { + this.buttons.start("opacity", 0) + }.bind(this)); + + + }, + + createElement: function() { + alert("create") + }, + + parseElement: function() { + var imgs = this.ele.getElements('span'); + + this.name = this.ele.getElements('.name')[0]; + this.folder = this.ele.getElements('.folder')[0]; + this.password = this.ele.getElements('.password')[0]; + + imgs[3].addEvent('click', this.deletePackage.bind(this)); + imgs[4].addEvent('click', this.restartPackage.bind(this)); + imgs[5].addEvent('click', this.editPackage.bind(this)); + imgs[6].addEvent('click', this.movePackage.bind(this)); + + this.ele.getElement('.packagename').addEvent('click', this.toggle.bind(this)); + + }, + + loadLinks: function() { + indicateLoad(); + new Request.JSON({ + method: 'get', + url: '/json/package/' + this.id, + onSuccess: this.createLinks.bind(this), + onFailure: indicateFail + }).send(); + }, + + createLinks: function(data) { + var ul = $("sort_children_{id}".substitute({"id": this.id})); + ul.set("html", ""); + data.links.each(function(link) { + link.id = link.fid; + var li = new Element("li", { + "style": { + "margin-left": 0 + } + }); + + if (link.icon == 'arrow_right.png'){ + link.icon = 'glyphicon glyphicon-arrow-right'; + } + if (link.icon == 'status_downloading.png'){ + link.icon = 'glyphicon glyphicon-cloud-download'; + } + if (link.icon == 'status_failed.png'){ + link.icon = 'glyphicon glyphicon-exclamation-sign'; + } + if (link.icon == 'status_finished.png'){ + link.icon = 'glyphicon glyphicon-ok'; + } + if (link.statusmsg == 'queued'){ + link.icon = 'glyphicon glyphicon-time'; + } + if (link.icon == 'status_offline.png'){ + link.icon = 'glyphicon glyphicon-ban-circle'; + } + + + var html = "\n".substitute({"icon": link.icon}); + html += "{name}
".substitute({"name": link.name}); + html += "{statusmsg}{error} ".substitute({"statusmsg": link.statusmsg, "error":link.error}); + html += "{format_size}".substitute({"format_size": link.format_size}); + html += " {plugin}  ".substitute({"plugin": link.plugin}); + html += "  "; + html += "
"; + + var div = new Element("div", { + "id": "file_" + link.id, + "class": "child", + "html": html + }); + + li.store("order", link.order); + li.store("lid", link.id); + + li.adopt(div); + ul.adopt(li); + }); + this.sorts = new Sortables(ul, { + constrain: false, + clone: true, + revert: true, + opacity: 0.4, + handle: ".sorthandle", + onComplete: this.saveSort.bind(this) + }); + this.registerLinkEvents(); + this.linksLoaded = true; + indicateFinish(); + this.toggle(); + }, + + registerLinkEvents: function() { + this.ele.getElements('.child').each(function(child) { + var lid = child.get('id').match(/[0-9]+/); + var imgs = child.getElements('.child_secrow span'); + imgs[3].addEvent('click', function(e) { + new Request({ + method: 'get', + url: '/api/deleteFiles/[' + this + "]", + onSuccess: function() { + $('file_' + this).nix() + }.bind(this), + onFailure: indicateFail + }).send(); + }.bind(lid)); + + imgs[4].addEvent('click', function(e) { + new Request({ + method: 'get', + url: '/api/restartFile/' + this, + onSuccess: function() { + var ele = $('file_' + this); + var imgs = ele.getElements(".glyphicon"); + imgs[0].set("class", "glyphicon glyphicon-time"); + var spans = ele.getElements(".child_status"); + spans[1].set("html", "queued"); + indicateSuccess(); + }.bind(this), + onFailure: indicateFail + }).send(); + }.bind(lid)); + }); + }, + + toggle: function() { + var child = this.ele.getElement('.children'); + if (child.getStyle('display') == "block") { + child.dissolve(); + } else { + if (!this.linksLoaded) { + this.loadLinks(); + } else { + child.reveal(); + } + } + }, + + + deletePackage: function(event) { + indicateLoad(); + new Request({ + method: 'get', + url: '/api/deletePackages/[' + this.id + "]", + onSuccess: function() { + this.ele.nix(); + indicateFinish(); + }.bind(this), + onFailure: indicateFail + }).send(); + //hide_pack(); + event.stop(); + }, + + restartPackage: function(event) { + indicateLoad(); + new Request({ + method: 'get', + url: '/api/restartPackage/' + this.id, + onSuccess: function() { + this.close(); + indicateSuccess(); + }.bind(this), + onFailure: indicateFail + }).send(); + event.stop(); + }, + + close: function() { + var child = this.ele.getElement('.children'); + if (child.getStyle('display') == "block") { + child.dissolve(); + } + var ul = $("sort_children_{id}".substitute({"id": this.id})); + ul.erase("html"); + this.linksLoaded = false; + }, + + movePackage: function(event) { + indicateLoad(); + new Request({ + method: 'get', + url: '/json/move_package/' + ((this.ui.type + 1) % 2) + "/" + this.id, + onSuccess: function() { + this.ele.nix(); + indicateFinish(); + }.bind(this), + onFailure: indicateFail + }).send(); + event.stop(); + }, + + editPackage: function(event) { + $("pack_form").removeEvents("submit"); + $("pack_form").addEvent("submit", this.savePackage.bind(this)); + + $("pack_id").set("value", this.id); + $("pack_name").set("value", this.name.get("text")); + $("pack_folder").set("value", this.folder.get("text")); + $("pack_pws").set("value", this.password.get("text")); + + root.packageBox.open(); + event.stop(); + }, + + savePackage: function(event) { + $("pack_form").send(); + this.name.set("text", $("pack_name").get("value")); + this.folder.set("text", $("pack_folder").get("value")); + this.password.set("text", $("pack_pws").get("value")); + root.packageBox.close(); + event.stop(); + }, + + saveSort: function(ele, copy) { + var order = []; + this.sorts.serialize(function(li, pos) { + if (li == ele && ele.retrieve("order") != pos) { + order.push(ele.retrieve("lid") + "|" + pos) + } + li.store("order", pos) + }); + if (order.length > 0) { + indicateLoad(); + new Request.JSON({ + method: 'get', + url: '/json/link_order/' + order[0], + onSuccess: indicateFinish, + onFailure: indicateFail + }).send(); + } + } + +}); + diff --git a/pyload/webui/themes/Next/js/settings.coffee b/pyload/webui/themes/Next/js/settings.coffee new file mode 100644 index 000000000..9205233e3 --- /dev/null +++ b/pyload/webui/themes/Next/js/settings.coffee @@ -0,0 +1,107 @@ +root = this + +window.addEvent 'domready', -> + root.accountDialog = new MooDialog {destroyOnHide: false} + root.accountDialog.setContent $ 'account_box' + + new TinyTab $$('#toptabs li a'), $$('#tabs-body > span') + + $$('ul.nav').each (nav) -> + new MooDropMenu nav, { + onOpen: (el) -> el.fade 'in' + onClose: (el) -> el.fade 'out' + onInitialize: (el) -> el.fade('hide').set 'tween', {duration:500} + } + + new SettingsUI() + + +class SettingsUI + constructor: -> + @menu = $$ "#general-menu li" + @menu.append $$ "#plugin-menu li" + + @name = $ "tabsback" + @general = $ "general_form_content" + @plugin = $ "plugin_form_content" + + el.addEvent 'click', @menuClick.bind(this) for el in @menu + + $("general|submit").addEvent "click", @configSubmit.bind(this) + $("plugin|submit").addEvent "click", @configSubmit.bind(this) + + $("account_add").addEvent "click", (e) -> + root.accountDialog.open() + e.stop() + + $("account_reset").addEvent "click", (e) -> + root.accountDialog.close() + + $("account_add_button").addEvent "click", @addAccount.bind(this) + $("account_submit").addEvent "click", @submitAccounts.bind(this) + + + menuClick: (e) -> + [category, section] = e.target.get("id").split("|") + name = e.target.get "text" + + + target = if category is "general" then @general else @plugin + target.dissolve() + + new Request({ + "method" : "get" + "url" : "/json/load_config/#{category}/#{section}" + "onSuccess": (data) => + target.set "html", data + target.reveal() + this.name.set "text", name + }).send() + + + configSubmit: (e) -> + category = e.target.get("id").split("|")[0]; + form = $("#{category}_form"); + + form.set "send", { + "method": "post" + "url": "/json/save_config/#{category}" + "onSuccess" : -> + root.notify.alert '{{ _("Settings saved.")}}', { + 'className': 'success' + } + "onFailure": -> + root.notify.alert '{{ _("Error occured.")}}', { + 'className': 'error' + } + } + form.send() + e.stop() + + addAccount: (e) -> + form = $ "add_account_form" + form.set "send", { + "method": "post" + "onSuccess" : -> window.location.reload() + "onFailure": -> + root.notify.alert '{{_("Error occured.")}}', { + 'className': 'error' + } + } + + form.send() + e.stop() + + submitAccounts: (e) -> + form = $ "account_form" + form.set "send", { + "method": "post", + "onSuccess" : -> window.location.reload() + "onFailure": -> + root.notify.alert('{{ _("Error occured.") }}', { + 'className': 'error' + }); + } + + form.send() + e.stop() \ No newline at end of file diff --git a/pyload/webui/themes/Next/js/settings.js b/pyload/webui/themes/Next/js/settings.js new file mode 100644 index 000000000..be694d365 --- /dev/null +++ b/pyload/webui/themes/Next/js/settings.js @@ -0,0 +1,3 @@ +{% autoescape true %} +var SettingsUI,root;var __bind=function(a,b){return function(){return a.apply(b,arguments)}};root=this;window.addEvent("domready",function(){root.accountDialog=new MooDialog({destroyOnHide:false});root.accountDialog.setContent($("account_box"));new TinyTab($$("#toptabs li"),$$("#tabs-body > span"));$$("ul.nav").each(function(a){return new MooDropMenu(a,{onOpen:function(b){return b.fade("in")},onClose:function(b){return b.fade("out")},onInitialize:function(b){return b.fade("show").set("tween",{duration:500})}})});return new SettingsUI()});SettingsUI=(function(){function a(){var c,e,b,d;this.menu=$$("#general-menu li");this.menu.append($$("#plugin-menu li"));this.name=$("tabsback");this.general=$("general_form_content");this.plugin=$("plugin_form_content");d=this.menu;for(e=0,b=d.length;e +{% endblock %} + + +{% block title %}{{ _("Administrate") }} - {{ super() }} {% endblock %} +{% block subtitle %}{{ _("Administrate") }}{% endblock %} + +{% block content %} + +
+
+ + {{ _("To add user or change passwords use:") }} python pyLoadCore.py -u
+ {{ _("Important: Admin user have always all permissions!") }} +
+
+
+ + + + + + + + + {% for name, data in users.iteritems() %} + + + + + + + {% endfor %} + + +
+ {{ _("Name") }} + + {{ _("Change Password") }} + + {{ _("Admin") }} + + {{ _("Permissions") }} +
{{ name }} {{ _("change") }} + +
+ + +
+{% endblock %} +{% block hidden %} +
+
+

{{ _("Change Password") }}

+

{{ _("Enter your current and desired Password.") }}

+ +
+ + +

{{ _("Your username.") }}

+
+
+ + +

{{ _("The password for this account.") }}

+
+
+ + +

{{ _("The new password.") }}

+
+
+ + +

{{ _("Please repeat the new password.") }}

+
+ + + + + +
+
+ +
+{% endblock %} diff --git a/pyload/webui/themes/Next/tml/base.html b/pyload/webui/themes/Next/tml/base.html new file mode 100644 index 000000000..b8365361e --- /dev/null +++ b/pyload/webui/themes/Next/tml/base.html @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + +{% block title %}pyLoad {{_("Webinterface")}}{% endblock %} + +{% block head %} +{% endblock %} + + + + +
+ + +
+ {% block headpanel %} + + {% if user.is_authenticated %} + + +{% if update %} + +{{_("pyLoad Update available!")}} + +{% endif %} + + +{% if plugins %} + +{{_("Plugins updated, please restart!")}} + +{% endif %} + + + + + + +{% else %} + {{_("Please Login!")}} +{% endif %} + + {% endblock %} +
+ +
+ +
+ + +{% if perms.STATUS %} +
+ + + + +
+ + +{% endif %} + + + + + +{% if perms.LIST %} + +
+ + + + +
+ +{% endif %} + +{% block pageactions %} +{% endblock %} +
+ +
+ +
+ +

{% block subtitle %}pyLoad - {{_("Webinterface")}}{% endblock %}

+ +{% block statusbar %} +{% endblock %} +{% for message in messages %} +

{{message}}

+{% endfor %} + +
+ + {{_("loading")}} +
+ +{% block content %} +{% endblock content %} + +
+ + +
+
+ +
+ {% include "/tml/window.html" %} + {% include "/tml/captcha.html" %} + {% block hidden %} + {% endblock %} +
+ + + diff --git a/pyload/webui/themes/Next/tml/captcha.html b/pyload/webui/themes/Next/tml/captcha.html new file mode 100644 index 000000000..5a5893b72 --- /dev/null +++ b/pyload/webui/themes/Next/tml/captcha.html @@ -0,0 +1,40 @@ + +
+ +
+ +

{{_("Captcha reading")}}

+

{{_("Please read the text on the captcha.")}}

+ +
+ + + +
+ +
+ +
+
+
+ + +

{{_("Input the text on the captcha.")}}

+
+ +
+ +
+ +
+ + + + +
+ +
+ + + +
\ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/downloads.html b/pyload/webui/themes/Next/tml/downloads.html new file mode 100644 index 000000000..295fbf670 --- /dev/null +++ b/pyload/webui/themes/Next/tml/downloads.html @@ -0,0 +1,29 @@ +{% extends '/tml/base.html' %} + +{% block title %}Downloads - {{super()}} {% endblock %} + +{% block subtitle %} +{{_("Downloads")}} +{% endblock %} + +{% block content %} + +
    + {% for folder in files.folder %} +
  • + {{ folder.name }} +
      + {% for file in folder.files %} +
    • {{file}}
    • + {% endfor %} +
    +
  • + {% endfor %} + + {% for file in files.files %} +
  • {{ file }}
  • + {% endfor %} + +
+ +{% endblock %} \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/filemanager.html b/pyload/webui/themes/Next/tml/filemanager.html new file mode 100644 index 000000000..9d3aded8f --- /dev/null +++ b/pyload/webui/themes/Next/tml/filemanager.html @@ -0,0 +1,80 @@ +{% extends '/tml/base.html' %} + +{% block head %} + + + + +{% endblock %} + +{% block title %}Downloads - {{super()}} {% endblock %} + + +{% block subtitle %} +{{_("FileManager")}} +{% endblock %} + +{% macro display_file(file) %} +
  • + + + + {{ file.name }} + + +    + + + +
  • +{%- endmacro %} + +{% macro display_folder(fld, open = false) -%} +
  • + + + + {{ fld.name }} + + +    + +    + + + + {% if (fld.folders|length + fld.files|length) > 0 %} + {% if open %} +
      + {% else %} +
        + {% endif %} + {% for child in fld.folders %} + {{ display_folder(child) }} + {% endfor %} + {% for child in fld.files %} + {{ display_file(child) }} + {% endfor %} +
      + {% else %} +
      {{ _("Folder is empty") }}
      + {% endif %} + +{%- endmacro %} + +{% block content %} + +
      + +
        +{{ display_folder(root, true) }} +
      + +{% include "/tml/rename_directory.html" %} + +{% endblock %} diff --git a/pyload/webui/themes/Next/tml/folder.html b/pyload/webui/themes/Next/tml/folder.html new file mode 100644 index 000000000..9a87ffddc --- /dev/null +++ b/pyload/webui/themes/Next/tml/folder.html @@ -0,0 +1,15 @@ +
    • + + + + {{ name }} + + +    + +    + + + +
      {{ _("Folder is empty") }}
      +
    • \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/home.html b/pyload/webui/themes/Next/tml/home.html new file mode 100644 index 000000000..57d442bd1 --- /dev/null +++ b/pyload/webui/themes/Next/tml/home.html @@ -0,0 +1,277 @@ +{% extends '/tml/base.html' %} +{% block head %} + + +{% endblock %} + +{% block subtitle %}{{_("Active Downloads")}}{% endblock %} +{% block content %} + + + + + + + + + + +
      + + + {% for link in content %} + + + + + + + + + + + {% endfor %} + + +
      {{_("Status")}}{{_("Name")}}{{_("Information")}}{{_("Size")}}{{_("Progress")}}
      +
  • +{% endblock %} diff --git a/pyload/webui/themes/Next/tml/info.html b/pyload/webui/themes/Next/tml/info.html new file mode 100644 index 000000000..053ec8210 --- /dev/null +++ b/pyload/webui/themes/Next/tml/info.html @@ -0,0 +1,81 @@ +{% extends '/tml/base.html' %} + +{% block head %} + +{% endblock %} + +{% block title %}{{ _("Information") }} - {{ super() }} {% endblock %} +{% block subtitle %}{{ _("Information") }}{% endblock %} + +{% block content %} +

    {{ _("News") }}

    +
    + +

    {{ _("Support") }}

    + + + +

    {{ _("System") }}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {{ _("Python:") }}{{ python }}
    {{ _("OS:") }}{{ os }}
    {{ _("pyLoad version:") }}{{ version }}
    {{ _("Installation Folder:") }}{{ folder }}
    {{ _("Config Folder:") }}{{ config }}
    {{ _("Download Folder:") }}{{ download }}
    {{ _("Free Space:") }}{{ freespace }}
    {{ _("Language:") }}{{ language }}
    {{ _("Webinterface Port:") }}{{ webif }}
    {{ _("Remote Interface Port:") }}{{ remote }}
    + +{% endblock %} \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/login.html b/pyload/webui/themes/Next/tml/login.html new file mode 100644 index 000000000..93d50d64d --- /dev/null +++ b/pyload/webui/themes/Next/tml/login.html @@ -0,0 +1,36 @@ +{% extends '/tml/base.html' %} + +{% block title %}{{_("Login")}} - {{super()}} {% endblock %} + +{% block content %} + +
    +
    +
    + +
    + Login + +
    + +
    + +
    +
    +
    + +{% if errors %} +

    {{_("Your username and password didn't match. Please try again.")}}

    + {{ _("To reset your login data or add an user run:") }} python pyLoadCore.py -u +{% endif %} + +
    +
    + +{% endblock %} diff --git a/pyload/webui/themes/Next/tml/logout.html b/pyload/webui/themes/Next/tml/logout.html new file mode 100644 index 000000000..e711b2a42 --- /dev/null +++ b/pyload/webui/themes/Next/tml/logout.html @@ -0,0 +1,9 @@ +{% extends '/tml/base.html' %} + +{% block head %} + +{% endblock %} + +{% block content %} +

    {{_("You were successfully logged out.")}}

    +{% endblock %} \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/logs.html b/pyload/webui/themes/Next/tml/logs.html new file mode 100644 index 000000000..ddbe12980 --- /dev/null +++ b/pyload/webui/themes/Next/tml/logs.html @@ -0,0 +1,41 @@ +{% extends '/tml/base.html' %} + +{% block title %}{{_("Logs")}} - {{super()}} {% endblock %} +{% block subtitle %}{{_("Logs")}}{% endblock %} +{% block head %} + +{% endblock %} + +{% block content %} +
    + +
    +
    +
    + +   + + +
    +
    +
    {{warning}}
    +
    +
    + + {% for line in log %} + + {% endfor %} +
    {{line.line}}{{line.date}}{{line.level}}{{line.message}}
    +
    +
    +
    + + +
    +
    +
     
    +{% endblock %} \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/pathchooser.html b/pyload/webui/themes/Next/tml/pathchooser.html new file mode 100644 index 000000000..6dcc4314d --- /dev/null +++ b/pyload/webui/themes/Next/tml/pathchooser.html @@ -0,0 +1,76 @@ + + + + + + +
    +
    +
    + + +
    + + {% if type == 'folder' %} + {{_("Path")}}: {{_("absolute")}} | {{_("relative")}} + {% else %} + {{_("Path")}}: {{_("absolute")}} | {{_("relative")}} + {% endif %} +
    + + + + + + + + {% if parentdir %} + + + + {% endif %} +{% for file in files %} + + {% if type == 'folder' %} + + {% else %} + + {% endif %} + + + + + +{% endfor %} +
    {{_("name")}}{{_("size")}}{{_("type")}}{{_("last modified")}}
    + {{_("parent directory")}} +
    {% if file.type == 'dir' %}{{ file.name|truncate(25) }}{% else %}{{ file.name|truncate(25) }}{% endif %}{% if file.type == 'dir' %}{{ file.name|truncate(25) }}{% else %}{{ file.name|truncate(25) }}{% endif %}{{ file.size|float|filesizeformat }}{% if file.type == 'dir' %}directory{% else %}{{ file.ext|default("file") }}{% endif %}{{ file.modified|date("d.m.Y - H:i:s") }}
    +
    + + \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/queue.html b/pyload/webui/themes/Next/tml/queue.html new file mode 100644 index 000000000..41feb2739 --- /dev/null +++ b/pyload/webui/themes/Next/tml/queue.html @@ -0,0 +1,109 @@ +{% extends '/tml/base.html' %} +{% block head %} + + + + +{% endblock %} + +{% if target %} + {% set name = _("Queue") %} +{% else %} + {% set name = _("Collector") %} +{% endif %} + +{% block pageactions %} +
    + + +
    +{% endblock %} + +{% block title %}{{name}} - {{super()}} {% endblock %} +{% block subtitle %}{{name}}{% endblock %} + +{% block content %} +{% autoescape true %} + +
      +{% for package in content %} +
    • +
      + + +
      + + {{package.name }} +    + + +    + +    + +    + + +
      + {% set progress = (package.linksdone * 100) / package.linkstotal %} + +
      +
      + +
      + +
      +
      + + +
      +
    • +{% endfor %} +
    +{% endautoescape %} +{% endblock %} + +{% block hidden %} +
    +
    +

    {{_("Edit Package")}}

    +

    {{_("Edit the package detais below.")}}

    + + + +
    + + +

    {{_("The name of the package.")}}

    +
    +
    + + +

    {{_("Name of subfolder for these downloads.")}}

    +
    +
    + + +

    {{_("List of passwords used for unrar.")}}

    +
    + + + + +
    + +
    + +
    +{% endblock %} \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/settings.html b/pyload/webui/themes/Next/tml/settings.html new file mode 100644 index 000000000..6d097f49d --- /dev/null +++ b/pyload/webui/themes/Next/tml/settings.html @@ -0,0 +1,217 @@ +{% extends '/tml/base.html' %} + +{% block title %}{{ _("Config") }} - {{ super() }} {% endblock %} +{% block subtitle %}{{ _("Config") }}{% endblock %} + +{% block head %} + + + + +{% endblock %} + +{% block content %} + + + +
    + +
    + + + + + + +
    + +
    +

       {{ _("Choose a section from the menu") }}

    +
    +
    + + +
    +
    + + + + + + +
    + + +
    +

       {{ _("Choose a section from the menu") }}

    +
    +
    + +
    + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + {% for account in conf.accs %} + {% set plugin = account.type %} + + + + + + + + + + + + + + {% endfor %} +
    {{ _("Plugin") }}{{ _("Name") }}{{ _("Password") }}{{ _("Status") }}{{ _("Premium") }}{{ _("Valid until") }}{{ _("Traffic left") }}{{ _("Time") }}{{ _("Max Parallel") }}{{ _("Delete?") }}
    + {{ plugin }} + + + + {% if account.valid %} + + {{ _("valid") }} + {% else %} + + {{ _("not valid") }} + {% endif %} + + + {% if account.premium %} + + {{ _("yes") }} + {% else %} + + {{ _("no") }} + {% endif %} + + + + {{ account.validuntil }} + + + + {{ account.trafficleft }} + + + + + + + +
    + + + + +
    +
    +
    +{% endblock %} +{% block hidden %} +
    +
    +

    {{_("Add Account")}}

    +

    {{_("Enter your account data to use premium features.")}}

    + +
    + + +

    {{_("Your username.")}}

    +
    +
    + + +

    {{_("The password for this account.")}}

    +
    +
    + +

    {{_("Choose the hoster for your account.")}}

    +
    +
    + +
    + + +
    + +
    + +
    +{% endblock %} \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/settings_item.html b/pyload/webui/themes/Next/tml/settings_item.html new file mode 100644 index 000000000..048ff897b --- /dev/null +++ b/pyload/webui/themes/Next/tml/settings_item.html @@ -0,0 +1,50 @@ + + + {% if section.outline %} + + {% endif %} + {% for okey, option in section.iteritems() %} + {% if okey not in ("desc","outline") %} + + + + + {% endif %} + {% endfor %} + +
    {{ section.outline }}
    + {% if option.type == "bool" %} + + {% elif ";" in option.type %} + + {% elif option.type == "folder" %} + + + {% elif option.type == "file" %} + + + {% elif option.type == "password" %} + + {% else %} + + {% endif %} +
    \ No newline at end of file diff --git a/pyload/webui/themes/Next/tml/window.html b/pyload/webui/themes/Next/tml/window.html new file mode 100644 index 000000000..290d40be6 --- /dev/null +++ b/pyload/webui/themes/Next/tml/window.html @@ -0,0 +1,46 @@ + + +
    +
    +

    {{_("Add Package")}}

    +

    {{_("Paste your links or upload a container.")}}

    +
    + + +

    {{_("The name of the new package.")}}

    +
    +
    + +
    +
    + +
    +
    +

    {{_("The name of the new package.")}} {{ _("Filter urls") }}

    +
    +
    + + +

    {{_("Password for RAR-Archive")}}

    +
    +
    + + +

    {{_("Upload a container.")}}

    +
    +
    + + + {{_("Queue")}} + + {{_("Collector")}} + + +
    + + +
    + + + +
    \ No newline at end of file -- cgit v1.2.3