Only send itemView 'remove' notifictions for items if they're actually deleted from the DB, not if they're just removed from a collection

This commit is contained in:
Dan Stillman 2006-06-08 20:02:26 +00:00
parent 01f50b9e4b
commit 7c9b1f785c

View File

@ -1279,10 +1279,10 @@ Scholar.Collection.prototype.erase = function(deleteItems){
if (deleteItems){
// Delete items from DB
Scholar.Items.get(descendents[i]['id']).erase();
}
items.push(descendents[i]['id']);
}
}
}
// Remove item associations for all descendent collections
Scholar.DB.query('DELETE FROM collectionItems WHERE collectionID IN ('
@ -1298,8 +1298,10 @@ Scholar.Collection.prototype.erase = function(deleteItems){
Scholar.Collections.unload(collections);
Scholar.Notifier.trigger('remove', 'collection', collections);
if (items.length){
Scholar.Notifier.trigger('remove', 'item', items);
}
}
Scholar.Collection.prototype.isCollection = function(){