From 5940daa53d7dc7a6e2866d8eb268e1f56ff41ec1 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 5 Aug 2017 17:59:25 +0200 Subject: [PATCH] fixed left menue active selection, fix remove entry when deleting favorite station --- js/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 972ec4f..e80a5a7 100644 --- a/js/main.js +++ b/js/main.js @@ -36,7 +36,9 @@ $(function(){ url: baseUrl + '/stations/' + data[station]["id"], method: 'DELETE' }).done(function(){ - alert('delete row pls'); + if ($('li.nav-favorites').hasClass('active')){ + $( "tr[data-id='"+data[station]["stationid"]+"']" ).remove(); + }; }); }; }; @@ -152,7 +154,7 @@ $(function(){ radio_query(2); break; case 2: - $('li.nav-favorite').addClass('active'); + $('li.nav-favorites').addClass('active'); action_load_favorites(); break; }