diff options
author | Peter Grassberger <petertheone@gmail.com> | 2016-02-01 15:55:49 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2016-02-01 15:55:49 (GMT) |
commit | ada31015e989d062ac68d58c94701e2df253b21e (patch) | |
tree | acb26e71e525656c7b24d4f30f1888df8c81c29d /www/js/rivendell.js | |
parent | 59fc2787322aea11bd2a09fc2254ebb26161b729 (diff) |
musicpools: add delete button to carts
Diffstat (limited to 'www/js/rivendell.js')
-rw-r--r-- | www/js/rivendell.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/www/js/rivendell.js b/www/js/rivendell.js index 1a00f07..0f4bcda 100644 --- a/www/js/rivendell.js +++ b/www/js/rivendell.js @@ -380,6 +380,19 @@ Rivendell.Group = function(groupName, description, lowcart, highcart, normlevel, this.carts = []; }; +Rivendell.Group.prototype.addCart = function(cart) { + this.carts.push(cart); +}; + +Rivendell.Group.prototype.removeCart = function(cart) { + var self = this; + $.each(this.carts, function(index, currentCart){ + if(currentCart === cart) { + self.carts.splice(index, 1); + } + }); +}; + Rivendell.Group.prototype.fetchCarts = function() { var self = this; rivendell.listCarts(this.groupName, 1, function(cartsXml, status, req) { |