properly enable/disable options in personal lists menu (fixes #746)
This commit is contained in:
parent
82e75fa10c
commit
2b3f487c4c
1 changed files with 12 additions and 12 deletions
|
@ -28,10 +28,10 @@ pandora.ui.folders = function() {
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
extras = [
|
extras = [
|
||||||
pandora.$ui.personalListsSelect = Ox.MenuButton({
|
pandora.$ui.personalListsMenu = Ox.MenuButton({
|
||||||
items: [
|
items: [
|
||||||
{ id: 'newlist', title: 'New List' },
|
{ id: 'newlist', title: 'New List' },
|
||||||
{ id: 'newlistfromselection', title: 'New List from Selection...', disabled: ui.listSelection.length == 0 },
|
{ id: 'newlistfromselection', title: 'New List from Selection', disabled: ui.listSelection.length == 0 },
|
||||||
{ id: 'newsmartlist', title: 'New Smart List' },
|
{ id: 'newsmartlist', title: 'New Smart List' },
|
||||||
{ id: 'newsmartlistfromresults', title: 'New Smart List from Results' },
|
{ id: 'newsmartlistfromresults', title: 'New Smart List from Results' },
|
||||||
{},
|
{},
|
||||||
|
@ -60,21 +60,21 @@ pandora.ui.folders = function() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pandora_find: function() {
|
pandora_find: function() {
|
||||||
/*
|
|
||||||
var action = ui._list
|
var action = ui._list
|
||||||
&& pandora.getListData(ui._list).user == pandora.user.username
|
&& pandora.getListData(ui._list).user == pandora.user.username
|
||||||
? 'enableItem' : 'disableItem';
|
? 'enableItem' : 'disableItem';
|
||||||
pandora.$ui.personalListsSelect[action]('editlist');
|
// fixme: duplicated
|
||||||
pandora.$ui.personalListsSelect[action]('duplicatelist');
|
pandora.$ui.personalListsMenu[action]('editlist');
|
||||||
pandora.$ui.personalListsSelect[action]('deletelist');
|
pandora.$ui.personalListsMenu[action]('duplicatelist');
|
||||||
pandora.$ui.personalListsSelect[ui.listSelection.length ? 'enableItem' : 'disableItem']('newlistfromselection');
|
pandora.$ui.personalListsMenu[action]('deletelist');
|
||||||
*/
|
pandora.$ui.personalListsMenu[
|
||||||
|
ui.listSelection.length ? 'enableItem' : 'disableItem'
|
||||||
|
]('newlistfromselection');
|
||||||
},
|
},
|
||||||
pandora_listselection: function(data) {
|
pandora_listselection: function(data) {
|
||||||
/*
|
pandora.$ui.personalListsMenu[
|
||||||
Ox.Log('', 'pandora_listselection', data.value.length)
|
data.value.length ? 'enableItem' : 'disableItem'
|
||||||
pandora.$ui.personalListsSelect[data.value.length ? 'enableItem' : 'disableItem']('newlistfromselection');
|
]('newlistfromselection');
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue