diff options
author | Git <git@what.cd> | 2014-01-20 08:01:21 +0000 |
---|---|---|
committer | Git <git@what.cd> | 2014-01-20 08:01:21 +0000 |
commit | 043144bb961960dc86a80f7c8e84c0f1e142c5d8 (patch) | |
tree | d94974fca3a54e7394dbf1e1036a28117a4d7f3d /static/functions/user_settings.js | |
parent | 92416668b226d6d64ab9871b31bb0715cfd5c99b (diff) | |
download | Gazelle-043144bb961960dc86a80f7c8e84c0f1e142c5d8.zip Gazelle-043144bb961960dc86a80f7c8e84c0f1e142c5d8.tar.gz Gazelle-043144bb961960dc86a80f7c8e84c0f1e142c5d8.tar.bz2 |
Empty commit
Diffstat (limited to 'static/functions/user_settings.js')
-rw-r--r-- | static/functions/user_settings.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/static/functions/user_settings.js b/static/functions/user_settings.js index ee8d464..ab0d617 100644 --- a/static/functions/user_settings.js +++ b/static/functions/user_settings.js @@ -1,3 +1,6 @@ +var PUSHOVER = 5; +var TOASTY = 4; + $(document).ready(function() { var top = $('#settings_sections').offset().top - parseFloat($('#settings_sections').css('marginTop').replace(/auto/, 0)); $(window).scroll(function (event) { @@ -54,6 +57,25 @@ $(document).ready(function() { $("#notifications_Torrents_popup").click(function() { $("#notifications_Torrents_traditional").prop('checked', false); }); + + if ($("#pushservice").val() > 0) { + $('#pushsettings').show(); + } + $("#pushservice").change(function() { + if ($(this).val() > 0) { + $('#pushsettings').show(500); + + if ($(this).val() == TOASTY) { + $('#pushservice_title').text("Device ID"); + } else if ($(this).val() == PUSHOVER) { + $('#pushservice_title').text("User Key"); + } else { + $('#pushservice_title').text("API Key"); + } + } else { + $('#pushsettings').hide(500); + } + }); }); function fuzzyMatch(str, pattern){ |