From 53f40e8d85b39c198c224cc21b4ea0cef652151a Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Mon, 10 Dec 2012 11:25:25 -0500 Subject: [PATCH] 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. --- cms/static/js/views/course_info_edit.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cms/static/js/views/course_info_edit.js b/cms/static/js/views/course_info_edit.js index 7f8d9f3e16..69ae933f5b 100644 --- a/cms/static/js/views/course_info_edit.js +++ b/cms/static/js/views/course_info_edit.js @@ -83,8 +83,8 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({ $newForm.addClass('editing'); this.$currentPost = $newForm.closest('li'); - $modalCover.show(); - $modalCover.bind('click', function() { + window.$modalCover.show(); + window.$modalCover.bind('click', function() { self.closeEditor(self, true); }); @@ -123,9 +123,9 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({ }); } - $modalCover.show(); + window.$modalCover.show(); var targetModel = this.eventModel(event); - $modalCover.bind('click', function() { + window.$modalCover.bind('click', function() { self.closeEditor(self); }); }, @@ -156,8 +156,8 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({ self.$currentPost.find('.update-contents').html(targetModel.get('content')); self.$currentPost.find('.new-update-content').val(targetModel.get('content')); self.$currentPost.find('form').hide(); - $modalCover.unbind('click'); - $modalCover.hide(); + window.$modalCover.unbind('click'); + window.$modalCover.hide(); }, // Dereferencing from events to screen elements @@ -248,8 +248,8 @@ CMS.Views.ClassInfoHandoutsView = Backbone.View.extend({ lineWrapping: true, }); } - $modalCover.show(); - $modalCover.bind('click', function() { + window.$modalCover.show(); + window.$modalCover.bind('click', function() { self.closeEditor(self); }); }, @@ -269,7 +269,7 @@ CMS.Views.ClassInfoHandoutsView = Backbone.View.extend({ closeEditor: function(self) { this.$form.hide(); - $modalCover.unbind('click'); - $modalCover.hide(); + window.$modalCover.unbind('click'); + window.$modalCover.hide(); } }); \ No newline at end of file