summaryrefslogtreecommitdiff
path: root/www/js/rivendell.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/rivendell.js')
-rw-r--r--www/js/rivendell.js13
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) {