|
|
@ -401,9 +401,14 @@ Group.prototype.remove = function(item) { |
|
|
|
|
|
|
|
if(item.data.subgroup !== undefined){ |
|
|
|
var subgroup = this.subgroups[item.data.subgroup]; |
|
|
|
if(subgroup){ |
|
|
|
if (subgroup){ |
|
|
|
var itemIndex = subgroup.items.indexOf(item); |
|
|
|
subgroup.items.splice(itemIndex,1); |
|
|
|
if (!subgroup.items.length){ |
|
|
|
delete this.subgroups[item.data.subgroup]; |
|
|
|
this.subgroupIndex--; |
|
|
|
} |
|
|
|
this.orderSubgroups(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|