Commit 53f40e8d by Chris Dodge

on AWS instances, base.js gets wrapped into a single JS file, but it's in a…

on AWS instances, base.js gets wrapped into a single JS file, but it's in a different scope. So to reference one of the globals in base.js, we have to reference it as window.XXXXXX.
parent 79e48dde
...@@ -83,8 +83,8 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({ ...@@ -83,8 +83,8 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
$newForm.addClass('editing'); $newForm.addClass('editing');
this.$currentPost = $newForm.closest('li'); this.$currentPost = $newForm.closest('li');
$modalCover.show(); window.$modalCover.show();
$modalCover.bind('click', function() { window.$modalCover.bind('click', function() {
self.closeEditor(self, true); self.closeEditor(self, true);
}); });
...@@ -123,9 +123,9 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({ ...@@ -123,9 +123,9 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
}); });
} }
$modalCover.show(); window.$modalCover.show();
var targetModel = this.eventModel(event); var targetModel = this.eventModel(event);
$modalCover.bind('click', function() { window.$modalCover.bind('click', function() {
self.closeEditor(self); self.closeEditor(self);
}); });
}, },
...@@ -156,8 +156,8 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({ ...@@ -156,8 +156,8 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
self.$currentPost.find('.update-contents').html(targetModel.get('content')); self.$currentPost.find('.update-contents').html(targetModel.get('content'));
self.$currentPost.find('.new-update-content').val(targetModel.get('content')); self.$currentPost.find('.new-update-content').val(targetModel.get('content'));
self.$currentPost.find('form').hide(); self.$currentPost.find('form').hide();
$modalCover.unbind('click'); window.$modalCover.unbind('click');
$modalCover.hide(); window.$modalCover.hide();
}, },
// Dereferencing from events to screen elements // Dereferencing from events to screen elements
...@@ -248,8 +248,8 @@ CMS.Views.ClassInfoHandoutsView = Backbone.View.extend({ ...@@ -248,8 +248,8 @@ CMS.Views.ClassInfoHandoutsView = Backbone.View.extend({
lineWrapping: true, lineWrapping: true,
}); });
} }
$modalCover.show(); window.$modalCover.show();
$modalCover.bind('click', function() { window.$modalCover.bind('click', function() {
self.closeEditor(self); self.closeEditor(self);
}); });
}, },
...@@ -269,7 +269,7 @@ CMS.Views.ClassInfoHandoutsView = Backbone.View.extend({ ...@@ -269,7 +269,7 @@ CMS.Views.ClassInfoHandoutsView = Backbone.View.extend({
closeEditor: function(self) { closeEditor: function(self) {
this.$form.hide(); this.$form.hide();
$modalCover.unbind('click'); window.$modalCover.unbind('click');
$modalCover.hide(); window.$modalCover.hide();
} }
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment