summaryrefslogtreecommitdiff
path: root/www/js/rivendell.rh.js
diff options
context:
space:
mode:
authorPeterTheOne <petertheone@gmail.com>2016-01-29 00:09:17 (GMT)
committerPeterTheOne <petertheone@gmail.com>2016-01-29 00:09:17 (GMT)
commite0ad0c1481387e73b1d2b00c0c35d7ef85db2dff (patch)
tree2eadd8af2046166e42caf7bee97459da3dd97a90 /www/js/rivendell.rh.js
parent1ef5a5a1aac0e562c0b3b81c0cb7eb5997b02bd5 (diff)
jingles: use Rivendell.Cart and Cut classes with Views, etc.
validate html, move rivendell.js init to apps.js, cleanup importer, add update event to fetch functions instead of success callback.
Diffstat (limited to 'www/js/rivendell.rh.js')
-rw-r--r--www/js/rivendell.rh.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/www/js/rivendell.rh.js b/www/js/rivendell.rh.js
index 5268cc1..bc8252e 100644
--- a/www/js/rivendell.rh.js
+++ b/www/js/rivendell.rh.js
@@ -72,7 +72,7 @@ Rivendell.Rivendell.prototype.setMusicgrid = function(dow, hour, name, success)
return $.post(this.musicgridEndpoint, command, success, "xml");
};
-Rivendell.GroupList.prototype.fetch = function(type, success) {
+Rivendell.GroupList.prototype.fetch = function(type) {
this.groups = [];
var self = this;
@@ -100,9 +100,7 @@ Rivendell.GroupList.prototype.fetch = function(type, success) {
}
});
- if (success) {
- success();
- }
+ $(self).trigger('update');
});
};
@@ -110,7 +108,7 @@ Rivendell.Musicgrid = function() {
this.clocks = [];
};
-Rivendell.Musicgrid.prototype.fetch = function(success) {
+Rivendell.Musicgrid.prototype.fetch = function() {
this.clocks = [];
var self = this;
@@ -119,9 +117,7 @@ Rivendell.Musicgrid.prototype.fetch = function(success) {
dbs.each(function(index, clockXml) {
self.clocks.push(new Rivendell.MusicgridClock(clockXml));
});
- if (success) {
- success();
- }
+ $(self).trigger('update');
});
};