LSP: bugfix - deletion of stream limits

This commit is contained in:
cat 2014-01-22 10:13:36 +01:00 committed by Thulinma
parent e324b24cd9
commit 6d4a870fb2

View file

@ -697,8 +697,9 @@ function showTab(tabName,streamName) {
}) })
).append( ).append(
$('<button>').text('Delete').click(function(){ $('<button>').text('Delete').click(function(){
if (confirmDelete('Are you sure you want to delete the limit "Stream "'+stream+'": '+limitShortToLong(settings.settings.streams[stream].limits[index].name)+'"')) { var which = $(this).parent().parent().data('limit');
var which = $(this).parent().parent().data('limit') var stream = which[0].replace('stream-','');
if (confirmDelete('Are you sure you want to delete the limit "Stream "'+stream+'": '+limitShortToLong(settings.settings.streams[stream].limits[which[1]].name)+'"')) {
delete settings.settings.streams[stream].limits[which[1]]; delete settings.settings.streams[stream].limits[which[1]];
saveAndReload('limits'); saveAndReload('limits');
} }