fix a bug where after moving items, there number would be subtracted from the lists totals twice
This commit is contained in:
parent
434d3e3738
commit
8b9088481d
2 changed files with 5 additions and 11 deletions
|
@ -181,7 +181,9 @@ pandora.reloadList = function() {
|
|||
});
|
||||
pandora.$ui.list.bindEvent({
|
||||
init: function(event, data) {
|
||||
var folder = listData.status == 'private' ? 'personal' : listData.status;
|
||||
// fixme: this will not work for lists in the favorites folder
|
||||
// (but then it's also unlikely they'll have to be reloaded)
|
||||
var folder = listData.status != 'featured' ? 'personal' : 'featured';
|
||||
pandora.$ui.folderList[folder].value(listData.id, 'items', data.items);
|
||||
}
|
||||
})
|
||||
|
|
|
@ -702,16 +702,8 @@ pandora.ui.list = function() { // fixme: remove view argument
|
|||
operator: ''
|
||||
}
|
||||
}, function(result) {
|
||||
var folder;
|
||||
if (drag.action == 'move') {
|
||||
folder = drag.source.status != 'featured' ? 'personal' : 'featured';
|
||||
pandora.$ui.folderList[folder].value(
|
||||
drag.source.id, 'items',
|
||||
pandora.$ui.folderList[folder].value(drag.source.id, 'items') - data.ids.length
|
||||
);
|
||||
}
|
||||
folder = drag.target.status != 'featured' ? 'personal' : 'featured';
|
||||
Ox.print(drag.source.status, '//////', drag.target.status)
|
||||
var folder = drag.target.status != 'featured' ? 'personal' : 'featured';
|
||||
//Ox.print(drag.source.status, '//////', drag.target.status)
|
||||
pandora.$ui.folderList[folder].value(
|
||||
drag.target.id, 'items',
|
||||
result.data.items
|
||||
|
|
Loading…
Reference in a new issue