|
@ -869,7 +869,8 @@ ItemSet.prototype.getGroups = function() { |
|
|
*/ |
|
|
*/ |
|
|
ItemSet.prototype.removeItem = function(id) { |
|
|
ItemSet.prototype.removeItem = function(id) { |
|
|
var item = this.itemsData.get(id), |
|
|
var item = this.itemsData.get(id), |
|
|
dataset = this.itemsData.getDataSet(); |
|
|
|
|
|
|
|
|
dataset = this.itemsData.getDataSet(), |
|
|
|
|
|
itemObj = this.items[id]; |
|
|
|
|
|
|
|
|
if (item) { |
|
|
if (item) { |
|
|
// confirm deletion
|
|
|
// confirm deletion
|
|
@ -878,6 +879,12 @@ ItemSet.prototype.removeItem = function(id) { |
|
|
// remove by id here, it is possible that an item has no id defined
|
|
|
// remove by id here, it is possible that an item has no id defined
|
|
|
// itself, so better not delete by the item itself
|
|
|
// itself, so better not delete by the item itself
|
|
|
dataset.remove(id); |
|
|
dataset.remove(id); |
|
|
|
|
|
|
|
|
|
|
|
// Remove it's popup
|
|
|
|
|
|
if (itemObj.popup) { |
|
|
|
|
|
itemObj.popup.destroy(); |
|
|
|
|
|
itemObj.popup = null; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|