From 7f69e45b9e12e9f355853ce6836710f03abd5a2b Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Wed, 8 May 2013 09:21:16 -0400 Subject: [PATCH] whitespace changes --- cms/static/js/base.js | 2 +- cms/static/js/hesitate.js | 12 ++--- cms/static/js/main.js | 2 +- cms/static/js/models/course_info.js | 16 +++---- cms/static/js/models/course_relative.js | 6 +-- cms/static/js/models/module_info.js | 4 +- cms/static/js/models/settings/advanced.js | 4 +- .../js/models/settings/course_details.js | 2 +- .../models/settings/course_grading_policy.js | 8 ++-- cms/static/js/views/checklists_view.js | 2 +- cms/static/js/views/course_info_edit.js | 48 +++++++++---------- cms/static/js/views/grader-select-view.js | 12 ++--- cms/static/js/views/overview.js | 40 ++++++++-------- cms/static/js/views/server_error.js | 2 +- cms/static/js/views/validating_view.js | 6 +-- 15 files changed, 83 insertions(+), 83 deletions(-) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index ad81963b0f..c8371fcf64 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -895,4 +895,4 @@ function saveSetSectionScheduleDate(e) { hideModal(); }); -} \ No newline at end of file +} diff --git a/cms/static/js/hesitate.js b/cms/static/js/hesitate.js index c5848a6c0c..8609562220 100644 --- a/cms/static/js/hesitate.js +++ b/cms/static/js/hesitate.js @@ -2,13 +2,13 @@ * Create a HesitateEvent and assign it as the event to execute: * $(el).on('mouseEnter', CMS.HesitateEvent( expand, 'mouseLeave').trigger); * It calls the executeOnTimeOut function with the event.currentTarget after the configurable timeout IFF the cancelSelector event - * did not occur on the event.currentTarget. - * - * More specifically, when trigger is called (triggered by the event you bound it to), it starts a timer + * did not occur on the event.currentTarget. + * + * More specifically, when trigger is called (triggered by the event you bound it to), it starts a timer * which the cancelSelector event will cancel or if the timer finished, it executes the executeOnTimeOut function * passing it the original event (whose currentTarget s/b the specific ele). It never accumulates events; however, it doesn't hurt for your * code to minimize invocations of trigger by binding to mouseEnter v mouseOver and such. - * + * * NOTE: if something outside of this wants to cancel the event, invoke cachedhesitation.untrigger(null | anything); */ @@ -25,7 +25,7 @@ CMS.HesitateEvent.DURATION = 800; CMS.HesitateEvent.prototype.trigger = function(event) { if (event.data.timeoutEventId == null) { event.data.timeoutEventId = window.setTimeout( - function() { event.data.fireEvent(event); }, + function() { event.data.fireEvent(event); }, CMS.HesitateEvent.DURATION); event.data.originalEvent = event; $(event.data.originalEvent.delegateTarget).on(event.data.cancelSelector, event.data, event.data.untrigger); @@ -45,4 +45,4 @@ CMS.HesitateEvent.prototype.untrigger = function(event) { $(event.data.originalEvent.delegateTarget).off(event.data.cancelSelector, event.data.untrigger); } event.data.timeoutEventId = null; -}; \ No newline at end of file +}; diff --git a/cms/static/js/main.js b/cms/static/js/main.js index 4a9b5d2374..2d72edc4bf 100644 --- a/cms/static/js/main.js +++ b/cms/static/js/main.js @@ -80,6 +80,6 @@ $(document).ready(function(){ $('section.problem-edit').show(); return false; }); - + }); diff --git a/cms/static/js/models/course_info.js b/cms/static/js/models/course_info.js index 8cb5a654cb..3bd7ffa97a 100644 --- a/cms/static/js/models/course_info.js +++ b/cms/static/js/models/course_info.js @@ -1,17 +1,17 @@ -// single per course holds the updates and handouts +// single per course holds the updates and handouts CMS.Models.CourseInfo = Backbone.Model.extend({ // This model class is not suited for restful operations and is considered just a server side initialized container url: '', - + defaults: { "courseId": "", // the location url "updates" : null, // UpdateCollection "handouts": null // HandoutCollection }, - + idAttribute : "courseId" }); - + // course update -- biggest kludge here is the lack of a real id to map updates to originals CMS.Models.CourseUpdate = Backbone.Model.extend({ defaults: { @@ -26,11 +26,11 @@ CMS.Models.CourseUpdate = Backbone.Model.extend({ */ CMS.Models.CourseUpdateCollection = Backbone.Collection.extend({ url : function() {return this.urlbase + "course_info/updates/";}, - + model : CMS.Models.CourseUpdate }); - - - \ No newline at end of file + + + diff --git a/cms/static/js/models/course_relative.js b/cms/static/js/models/course_relative.js index 99bb1c6d77..6608f92a4f 100644 --- a/cms/static/js/models/course_relative.js +++ b/cms/static/js/models/course_relative.js @@ -16,7 +16,7 @@ CMS.Models.Location = Backbone.Model.extend({ }, _tagPattern : /[^:]+/g, _fieldPattern : new RegExp('[^/]+','g'), - + parse: function(payload) { if (_.isArray(payload)) { return { @@ -25,7 +25,7 @@ CMS.Models.Location = Backbone.Model.extend({ course: payload[2], category: payload[3], name: payload[4] - } + }; } else if (_.isString(payload)) { this._tagPattern.lastIndex = 0; // odd regex behavior requires this to be reset sometimes @@ -65,4 +65,4 @@ CMS.Models.CourseRelative = Backbone.Model.extend({ CMS.Models.CourseRelativeCollection = Backbone.Collection.extend({ model : CMS.Models.CourseRelative -}); \ No newline at end of file +}); diff --git a/cms/static/js/models/module_info.js b/cms/static/js/models/module_info.js index 6a593372c4..529d155aba 100644 --- a/cms/static/js/models/module_info.js +++ b/cms/static/js/models/module_info.js @@ -6,5 +6,5 @@ CMS.Models.ModuleInfo = Backbone.Model.extend({ "data": null, "metadata" : null, "children" : null - }, -}); \ No newline at end of file + } +}); diff --git a/cms/static/js/models/settings/advanced.js b/cms/static/js/models/settings/advanced.js index adc259239d..c074b12067 100644 --- a/cms/static/js/models/settings/advanced.js +++ b/cms/static/js/models/settings/advanced.js @@ -11,7 +11,7 @@ CMS.Models.Settings.Advanced = Backbone.Model.extend({ validate: function (attrs) { // Keys can no longer be edited. We are currently not validating values. }, - + save : function (attrs, options) { // wraps the save call w/ the deletion of the removed keys after we know the saved ones worked options = options ? _.clone(options) : {}; @@ -23,7 +23,7 @@ CMS.Models.Settings.Advanced = Backbone.Model.extend({ }; Backbone.Model.prototype.save.call(this, attrs, options); }, - + afterSave : function(self) { // remove deleted attrs if (!_.isEmpty(self.deleteKeys)) { diff --git a/cms/static/js/models/settings/course_details.js b/cms/static/js/models/settings/course_details.js index d41545cca9..b71b4e2ab2 100644 --- a/cms/static/js/models/settings/course_details.js +++ b/cms/static/js/models/settings/course_details.js @@ -66,7 +66,7 @@ CMS.Models.Settings.CourseDetails = Backbone.Model.extend({ save_videosource: function(newsource) { // newsource either is