From 5e2dba6bada2d22da725091211ea914e80f80081 Mon Sep 17 00:00:00 2001 From: Don Mitchell Date: Tue, 27 Nov 2012 13:22:44 -0500 Subject: [PATCH] Minor cache to pull talbott's changes --- cms/static/js/views/settings/main_settings_view.js | 6 ++++++ cms/templates/settings.html | 14 -------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/cms/static/js/views/settings/main_settings_view.js b/cms/static/js/views/settings/main_settings_view.js index b4019e12ea..d957024e7d 100644 --- a/cms/static/js/views/settings/main_settings_view.js +++ b/cms/static/js/views/settings/main_settings_view.js @@ -20,6 +20,12 @@ CMS.Views.Settings.Main = Backbone.View.extend({ this.$el.find("#course-name").val(this.model.get('courseLocation').get('name')); this.$el.find("#course-organization").val(this.model.get('courseLocation').get('org')); this.$el.find("#course-number").val(this.model.get('courseLocation').get('course')); + this.$el.find('.set-date').datepicker({ 'dateFormat': 'm/d/yy' }); + this.$el.find(":input, textarea").focus(function() { + $("label[for='" + this.id + "']").addClass("is-focused"); + }).blur(function() { + $("label").removeClass("is-focused"); + }); this.render(); }, diff --git a/cms/templates/settings.html b/cms/templates/settings.html index 47bbe23e21..d49db21598 100644 --- a/cms/templates/settings.html +++ b/cms/templates/settings.html @@ -33,13 +33,6 @@ from contentstore import utils model : settingsModel }); - $('.set-date').datepicker({ 'dateFormat': 'm/d/yy' }); - - $(":input, textarea").focus(function() { - $("label[for='" + this.id + "']").addClass("is-focused"); - }).blur(function() { - $("label").removeClass("is-focused"); - }); editor.render(); }); @@ -52,13 +45,6 @@ from contentstore import utils var gradeThresholds; var GRADES = ['A', 'B', 'C', 'D', 'F']; - // FIXME move into view class - $(" :input, textarea").focus(function() { - $("label[for='" + this.id + "']").addClass("is-focused"); - }).blur(function() { - $("label").removeClass("is-focused"); - }); - (function() { $body = $('body'); $gradeBar = $('.grade-bar');