summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/jingles.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/www/js/jingles.js b/www/js/jingles.js
index fb36934..86c1553 100644
--- a/www/js/jingles.js
+++ b/www/js/jingles.js
@@ -164,6 +164,7 @@ Rivendell.JingleCartView = function(model, groupView, active) {
Rivendell.JingleCutView = function(model) {
this.model = model;
+ this.$spinner = null;
this.$el = null;
this.render();
@@ -193,6 +194,9 @@ Rivendell.JingleCutView.prototype.render = function() {
self.delete();
});
+ this.$spinner = $('#hiddenTemplates .spinnerTemplate').clone().removeClass('spinnerTemplate');
+
+
this.$el = $('<tr>')
.attr('id', 'jingle-' + this.model.cartNumber + '-' + this.model.number)
.append($('<td>').append(status))
@@ -209,7 +213,7 @@ Rivendell.JingleCutView.prototype.render = function() {
};
Rivendell.JingleCutView.prototype.move = function() {
- this.$el.find('td:first').html('<span class="label label-default"><span class="glyphicon glyphicon-repeat spin"></span></span>')
+ this.$el.find('td:first').html(this.$spinner);
var self = this;
var destinationCart = this.model.cartNumber;
@@ -238,7 +242,7 @@ Rivendell.JingleCutView.prototype.move = function() {
};
Rivendell.JingleCutView.prototype.toggleActive = function() {
- this.$el.find('td:first').html('<span class="label label-default"><span class="glyphicon glyphicon-repeat spin"></span></span>')
+ this.$el.find('td:first').html(this.$spinner);
var destinationCart = this.model.cartNumber;
if (this.model.active) {
destinationCart++;
@@ -252,7 +256,7 @@ Rivendell.JingleCutView.prototype.toggleActive = function() {
};
Rivendell.JingleCutView.prototype.delete = function() {
- this.$el.find('td:first').html('<span class="label label-default"><span class="glyphicon glyphicon-repeat spin"></span></span>')
+ this.$el.find('td:first').html(this.$spinner);
var self = this;
rivendell.removeCut(this.model.cartNumber, this.model.number, function() {
self.model.cart.removeCut(self.model);