summaryrefslogtreecommitdiff
path: root/www/js/apps.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/apps.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/apps.js')
-rw-r--r--www/js/apps.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/www/js/apps.js b/www/js/apps.js
index 12aba8f..6bdf3d6 100644
--- a/www/js/apps.js
+++ b/www/js/apps.js
@@ -25,6 +25,7 @@
var Rivendell = Rivendell || {};
var apps_current = null;
+var rivendell = null;
function apps_select(app) {
$('.container').removeClass('fullWidth');
@@ -96,6 +97,10 @@ function apps_init() {
apps_current = locationHrefValue();
if(auth_token && auth_username) {
+ rivendell = new Rivendell.Rivendell(auth_username, auth_token, '/rd-bin/rdxport.cgi');
+ rivendell.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi');
+ rivendell.setMusicgridEndpoint('/rh-bin/musicgrid.cgi');
+
apps_select(apps_current);
}
@@ -121,5 +126,6 @@ function apps_cleanup() {
$(window).off('popstate');
+ rivendell = null;
apps_current = null;
}