diff --git a/gui/slick/js/configNotifications.js b/gui/slick/js/configNotifications.js index 9676d862..b35c840c 100644 --- a/gui/slick/js/configNotifications.js +++ b/gui/slick/js/configNotifications.js @@ -426,20 +426,25 @@ $(document).ready(function(){ return false; } - var current_pushbullet_device = $("#pushbullet_device").val(); $.get(sbRoot + "/home/getPushbulletDevices", {'api': pushbullet_api}, function (data) { var devices = jQuery.parseJSON(data).devices; + var current_pushbullet_device = $("#pushbullet_device").val(); $("#pushbullet_device_list").html(''); for (var i = 0; i < devices.length; i++) { if(devices[i].active == true) { if(current_pushbullet_device == devices[i].iden) { - $("#pushbullet_device_list").append('') + $("#pushbullet_device_list").append(''); } else { - $("#pushbullet_device_list").append('') + $("#pushbullet_device_list").append(''); } } } + if (current_pushbullet_device == "") { + $("#pushbullet_device_list").prepend(''); + } else { + $("#pushbullet_device_list").prepend(''); + } if(msg) { $('#testPushbullet-result').html(msg); }