summaryrefslogtreecommitdiff
path: root/www/js/jingles.js
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2016-03-24 15:10:12 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2016-03-24 15:10:12 (GMT)
commit3c584d7ee53ecfb35f32a2182971dfbc30009590 (patch)
tree77716fe1ce3ad70659536b667e9c5cbf3a707bcf /www/js/jingles.js
parent71b2740e35ca72b547ec70bd44579b6fc98ce3f5 (diff)
refactor rdxportjs (breaks stuff)
Diffstat (limited to 'www/js/jingles.js')
-rw-r--r--www/js/jingles.js50
1 files changed, 25 insertions, 25 deletions
diff --git a/www/js/jingles.js b/www/js/jingles.js
index 4748df8..72522c4 100644
--- a/www/js/jingles.js
+++ b/www/js/jingles.js
@@ -22,13 +22,13 @@
'use strict';
-var Rivendell = Rivendell || {};
+var Rdxport = Rdxport || {};
var jingleGroupListView = null;
function jingles_init() {
- var groupList = new Rivendell.GroupList();
- jingleGroupListView = new Rivendell.JingleGroupListView(groupList);
+ var groupList = new Rdxport.GroupList();
+ jingleGroupListView = new Rdxport.JingleGroupListView(groupList);
}
function jingles_cleanup() {
@@ -39,7 +39,7 @@ function jingles_cleanup() {
}
}
-Rivendell.JingleGroupListView = function(model) {
+Rdxport.JingleGroupListView = function(model) {
this.model = model;
this.jingleGroupViews = [];
@@ -49,13 +49,13 @@ Rivendell.JingleGroupListView = function(model) {
var self = this;
$(this.model).on('update', function() {
$(self.model.groups).each(function(index, group) {
- self.jingleGroupViews.push(new Rivendell.JingleGroupView(group));
+ self.jingleGroupViews.push(new Rdxport.JingleGroupView(group));
});
});
this.model.fetch('jingle');
};
-Rivendell.JingleGroupListView.prototype.destroy = function() {
+Rdxport.JingleGroupListView.prototype.destroy = function() {
var self = this;
$(this.jingleGroupViews).each(function(index, groupView) {
groupView.destroy();
@@ -63,19 +63,19 @@ Rivendell.JingleGroupListView.prototype.destroy = function() {
this.jingleGroupViews = [];
};
-Rivendell.JingleGroup = function(groupName, description, lowcart, highcart, normlevel, trimlevel, title) {
+Rdxport.JingleGroup = function(groupName, description, lowcart, highcart, normlevel, trimlevel, title) {
if (arguments.length = 1) {
- Rivendell.Group.call(this, groupName);
+ Rdxport.Group.call(this, groupName);
this.title = $('jingle-title', this.xml).text();
} else {
- Rivendell.Group.call(this, groupName, description, lowcart, highcart, normlevel, trimlevel);
+ Rdxport.Group.call(this, groupName, description, lowcart, highcart, normlevel, trimlevel);
this.title = title;
}
};
-Rivendell.JingleGroup.prototype = Object.create(Rivendell.Group.prototype);
-Rivendell.JingleGroup.prototype.constructor = Rivendell.JingleGroup;
+Rdxport.JingleGroup.prototype = Object.create(Rdxport.Group.prototype);
+Rdxport.JingleGroup.prototype.constructor = Rdxport.JingleGroup;
-Rivendell.JingleGroupView = function(model) {
+Rdxport.JingleGroupView = function(model) {
this.model = model;
this.mainCartView = null;
@@ -90,16 +90,16 @@ Rivendell.JingleGroupView = function(model) {
$('table > tbody', self.$el).html('');
self.model.mainCart = self.model.carts[0];
- self.mainCartView = new Rivendell.JingleCartView(self.model.mainCart, self, true);
+ self.mainCartView = new Rdxport.JingleCartView(self.model.mainCart, self, true);
self.model.deactivateCart = self.model.carts[1];
- self.deactivateCartView = new Rivendell.JingleCartView(self.model.deactivateCart, self, false);
+ self.deactivateCartView = new Rdxport.JingleCartView(self.model.deactivateCart, self, false);
});
this.model.fetchCarts();
};
-Rivendell.JingleGroupView.prototype.render = function() {
+Rdxport.JingleGroupView.prototype.render = function() {
var self = this;
this.$el = $('#hiddenTemplates .jingleGroupTemplate').clone().removeClass('jingleGroupTemplate');
@@ -113,11 +113,11 @@ Rivendell.JingleGroupView.prototype.render = function() {
});
};
-Rivendell.JingleGroupView.prototype.destroy = function() {
+Rdxport.JingleGroupView.prototype.destroy = function() {
$('table > tbody', this.$el).html('');
};
-Rivendell.JingleGroupView.prototype.uploadProgress = function(upload, file) {
+Rdxport.JingleGroupView.prototype.uploadProgress = function(upload, file) {
if (!file.cartNumber || !file.cutNumber) {
return;
}
@@ -147,7 +147,7 @@ Rivendell.JingleGroupView.prototype.uploadProgress = function(upload, file) {
}
};
-Rivendell.JingleGroupView.prototype.uploadError = function(upload, file, msg, xhr, acknowledge) {
+Rdxport.JingleGroupView.prototype.uploadError = function(upload, file, msg, xhr, acknowledge) {
if (!file.cartNumber || !file.cutNumber) {
return;
}
@@ -182,7 +182,7 @@ Rivendell.JingleGroupView.prototype.uploadError = function(upload, file, msg, xh
$('#jingle-' + file.cartNumber + '-' + file.cutNumber).replaceWith($errorRow);
};
-Rivendell.JingleCartView = function(model, groupView, active) {
+Rdxport.JingleCartView = function(model, groupView, active) {
this.model = model;
this.groupView = groupView;
this.active = active;
@@ -194,7 +194,7 @@ Rivendell.JingleCartView = function(model, groupView, active) {
$(this.model.cuts).each(function(index, cut) {
cut.active = self.active;
- var cutView = new Rivendell.JingleCutView(cut);
+ var cutView = new Rdxport.JingleCutView(cut);
self.cutViews.push(cutView);
$('table > tbody', self.groupView.$el).append(cutView.$el);
@@ -202,7 +202,7 @@ Rivendell.JingleCartView = function(model, groupView, active) {
}
};
-Rivendell.JingleCutView = function(model) {
+Rdxport.JingleCutView = function(model) {
this.model = model;
this.$spinner = null;
@@ -211,7 +211,7 @@ Rivendell.JingleCutView = function(model) {
this.render();
};
-Rivendell.JingleCutView.prototype.render = function() {
+Rdxport.JingleCutView.prototype.render = function() {
var status = $('<span class="label"></span>');
var moveButton = $('<button class="btn btn-info btn-xs"><span class="glyphicon glyphicon-transfer"></span>&nbsp;&nbsp;Verschieben</button>');
var activateButton;
@@ -259,7 +259,7 @@ Rivendell.JingleCutView.prototype.render = function() {
);
};
-Rivendell.JingleCutView.prototype.move = function() {
+Rdxport.JingleCutView.prototype.move = function() {
this.$el.find('td:first').html(this.$spinner);
var self = this;
var destinationCart = this.model.cartNumber;
@@ -288,7 +288,7 @@ Rivendell.JingleCutView.prototype.move = function() {
});
};
-Rivendell.JingleCutView.prototype.toggleActive = function() {
+Rdxport.JingleCutView.prototype.toggleActive = function() {
this.$el.find('td:first').html(this.$spinner);
var destinationCart = this.model.cartNumber;
if (this.model.active) {
@@ -302,7 +302,7 @@ Rivendell.JingleCutView.prototype.toggleActive = function() {
});
};
-Rivendell.JingleCutView.prototype.delete = function() {
+Rdxport.JingleCutView.prototype.delete = function() {
this.$el.find('td:first').html(this.$spinner);
var self = this;
rdxport.removeCut(this.model.cartNumber, this.model.number, function() {