diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 03:57:25 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 03:57:25 +0100 |
commit | 2c67177f74ff8bd8817b8f4967d1b25682beaaf1 (patch) | |
tree | 0f04fa65381b37341aa831d34d404a0e53c01dce /pyload/webui/themes/bright/js/render/admin.coffee | |
parent | Partially revert acc46fc3497a66a427b795b4a22c6e71d69185a1 (diff) | |
download | pyload-2c67177f74ff8bd8817b8f4967d1b25682beaaf1.tar.xz |
Improve theme structure a bit
Diffstat (limited to 'pyload/webui/themes/bright/js/render/admin.coffee')
-rw-r--r-- | pyload/webui/themes/bright/js/render/admin.coffee | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/pyload/webui/themes/bright/js/render/admin.coffee b/pyload/webui/themes/bright/js/render/admin.coffee deleted file mode 100644 index 5afbcbb66..000000000 --- a/pyload/webui/themes/bright/js/render/admin.coffee +++ /dev/null @@ -1,58 +0,0 @@ -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() |