Gazelle/static/functions/push_settings.js

29 lines
602 B
JavaScript
Raw Normal View History

2012-10-27 08:00:09 +00:00
(function ($) {
2013-02-23 08:00:22 +00:00
var PUSHOVER = 5;
var TOASTY = 4;
2012-10-27 08:00:09 +00:00
$(document).ready(function() {
if($("#pushservice").val() > 0) {
$('#pushsettings').show();
}
$("#pushservice").change(function() {
if($(this).val() > 0) {
$('#pushsettings').show(500);
2012-12-05 08:00:19 +00:00
2013-02-23 08:00:22 +00:00
if($(this).val() == TOASTY) {
2012-12-05 08:00:19 +00:00
$('#pushservice_title').text("Device ID");
}
2013-02-23 08:00:22 +00:00
else if($(this).val() == PUSHOVER) {
2013-02-25 08:00:45 +00:00
$('#pushservice_title').text("User Key");
2013-02-23 08:00:22 +00:00
}
2012-12-05 08:00:19 +00:00
else {
$('#pushservice_title').text("API Key");
}
2012-10-27 08:00:09 +00:00
}
else {
$('#pushsettings').hide(500);
}
});
});
}(jQuery));