From 7c972ebf6e6dd22ca3dfd78d07975491544a69b3 Mon Sep 17 00:00:00 2001 From: Steve Strassmann Date: Thu, 2 May 2013 09:29:27 -0400 Subject: [PATCH 1/3] fix date interpolation --- cms/static/js/base.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index 3a51d797ec..49a70a87fd 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -845,8 +845,11 @@ function saveSetSectionScheduleDate(e) { data: JSON.stringify({ 'id': id, 'metadata': {'start': start}}) }).success(function () { var $thisSection = $('.courseware-section[data-id="' + id + '"]'); - var format = gettext('Will Release: %(date)s at $(time)s UTC'); - var willReleaseAt = interpolate(format, [input_date, input_time], true); + var format = gettext('Will Release: %(date)s at %(time)s UTC'); + var willReleaseAt = interpolate(format, + {'date': input_date, + 'time': input_time}, + true); $thisSection.find('.section-published-date').html( '' + willReleaseAt + '' + ' Date: Thu, 2 May 2013 09:31:53 -0400 Subject: [PATCH 2/3] tabbing --- cms/static/js/base.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index 49a70a87fd..4aae7fc2af 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -843,19 +843,19 @@ function saveSetSectionScheduleDate(e) { dataType: "json", contentType: "application/json", data: JSON.stringify({ 'id': id, 'metadata': {'start': start}}) - }).success(function () { + }).success(function () { var $thisSection = $('.courseware-section[data-id="' + id + '"]'); var format = gettext('Will Release: %(date)s at %(time)s UTC'); - var willReleaseAt = interpolate(format, - {'date': input_date, + var willReleaseAt = interpolate(format, + {'date': input_date, 'time': input_time}, - true); + true); $thisSection.find('.section-published-date').html( - '' + willReleaseAt + '' + - '' + + '' + willReleaseAt + '' + + '' + gettext('Edit') + ''); $thisSection.find('.section-published-date').animate({ 'background-color': 'rgb(182,37,104)' From c9a80ded2511a33177a3b28d0fdbfb50699f386f Mon Sep 17 00:00:00 2001 From: Steve Strassmann Date: Thu, 2 May 2013 10:59:02 -0400 Subject: [PATCH 3/3] formatted using sublime/formatjs --- cms/static/js/base.js | 264 +++++++++++++++++++++++------------------- 1 file changed, 145 insertions(+), 119 deletions(-) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index 4aae7fc2af..ad81963b0f 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -10,7 +10,7 @@ var $newComponentTypePicker; var $newComponentTemplatePickers; var $newComponentButton; -$(document).ready(function () { +$(document).ready(function() { $body = $('body'); $modal = $('.history-modal'); $modalCover = $('