diff options
Diffstat (limited to 'www/js/jingles.js')
-rw-r--r-- | www/js/jingles.js | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/www/js/jingles.js b/www/js/jingles.js index 7910b97..02070ae 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; } @@ -138,7 +138,7 @@ Rivendell.JingleGroupView.prototype.uploadProgress = function(upload, file) { updateProgressBar($cut, upload); }; -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; } @@ -173,7 +173,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; @@ -185,7 +185,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); @@ -193,7 +193,7 @@ Rivendell.JingleCartView = function(model, groupView, active) { } }; -Rivendell.JingleCutView = function(model) { +Rdxport.JingleCutView = function(model) { this.model = model; this.$spinner = null; @@ -207,7 +207,7 @@ Rivendell.JingleCutView = function(model) { } }; -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> Verschieben</button>'); var activateButton; @@ -255,7 +255,7 @@ Rivendell.JingleCutView.prototype.render = function() { ); }; -Rivendell.JingleCutView.prototype.renderUploading = function(upload) { +Rdxport.JingleCutView.prototype.renderUploading = function(upload) { var $progressBar = $('.progressBarTemplate.jingles').clone().removeClass('progressBarTemplate'); $('.file-name', $progressBar).text(this.model.name); $('.cart-number', $progressBar).text(this.model.number); @@ -272,7 +272,7 @@ Rivendell.JingleCutView.prototype.renderUploading = function(upload) { updateProgressBar(this.$el, upload); }; -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; @@ -301,7 +301,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) { @@ -315,7 +315,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() { |