make smart list query editable
This commit is contained in:
parent
ad6e6eaea2
commit
878352617f
2 changed files with 24 additions and 2 deletions
|
@ -21,7 +21,29 @@ pandora.ui.filter = function(list) {
|
|||
sortKeys: pandora.site.sortKeys,
|
||||
viewKeys: pandora.site.listViews
|
||||
})
|
||||
.css({padding: '16px'});
|
||||
.css({padding: '16px'})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
if (list) {
|
||||
pandora.api.editList({
|
||||
id: list.id,
|
||||
query: data.query
|
||||
}, function(result) {
|
||||
Ox.Request.clearCache(); // fixme: remove later
|
||||
pandora.$ui.list
|
||||
.bindEventOnce({
|
||||
init: function(data) {
|
||||
Ox.print('NUMBER OF ITEMS:', data.items);
|
||||
pandora.$ui.folderList[
|
||||
pandora.getListData().folder
|
||||
].value(list.id, 'items', data.items);
|
||||
}
|
||||
})
|
||||
.reloadList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pandora.ui.listDialog = function(list, section) {
|
|||
} else if (id == 'icon') {
|
||||
return pandora.ui.listIconPanel(list);
|
||||
} else if (id == 'query') {
|
||||
return pandora.$ui.filter = pandora.ui.filter();
|
||||
return pandora.$ui.filter = pandora.ui.filter(list);
|
||||
}
|
||||
},
|
||||
tabs: tabs
|
||||
|
|
Loading…
Reference in a new issue