fix a bug where selecting a list and immediately deleting it would open a confirmation dialog with list name 'undefined'

This commit is contained in:
rolux 2011-11-11 18:20:01 +00:00
parent 1211302b73
commit d2b770eff1
2 changed files with 3 additions and 3 deletions

View file

@ -2,9 +2,9 @@
'use strict'; 'use strict';
pandora.ui.deleteListDialog = function() { pandora.ui.deleteListDialog = function(list) {
var listData = pandora.getListData(), var listData = pandora.getListData(list),
$folderList = pandora.$ui.folderList[listData.folder], $folderList = pandora.$ui.folderList[listData.folder],
that = Ox.Dialog({ that = Ox.Dialog({
buttons: [ buttons: [

View file

@ -313,7 +313,7 @@ pandora.ui.folderList = function(id) {
}, },
'delete': function(data) { 'delete': function(data) {
if (id == 'personal') { if (id == 'personal') {
pandora.ui.deleteListDialog().open(); pandora.ui.deleteListDialog(data.ids[0]).open();
} else if (id == 'favorite') { } else if (id == 'favorite') {
that.options({selected: []}); that.options({selected: []});
pandora.api.unsubscribeFromList({ pandora.api.unsubscribeFromList({