diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 824d2119f1..cf870b1edf 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -682,6 +682,7 @@ def save_item(request): del existing_item._model_data[metadata_key] del posted_metadata[metadata_key] else: + # TODO, in here check if value is the same before setting. existing_item._model_data[metadata_key] = value # commit to datastore diff --git a/cms/static/coffee/src/views/module_edit.coffee b/cms/static/coffee/src/views/module_edit.coffee index 3cb3b1703f..1b849d1f55 100644 --- a/cms/static/coffee/src/views/module_edit.coffee +++ b/cms/static/coffee/src/views/module_edit.coffee @@ -35,6 +35,8 @@ class CMS.Views.ModuleEdit extends Backbone.View return _metadata + getMetadata: -> + cloneTemplate: (parent, template) -> $.post("/clone_item", { parent_location: parent diff --git a/cms/static/js/base.js b/cms/static/js/base.js index 3a51d797ec..4f3dab4857 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -845,15 +845,15 @@ 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 format = gettext('Will Release: %(date)s at $(time)s UTC'); var willReleaseAt = interpolate(format, [input_date, input_time], true); $thisSection.find('.section-published-date').html( - '' + willReleaseAt + '' + - '' + - gettext('Edit') + ''); + '' + willReleaseAt + '' + + '' + + gettext('Edit') + ''); $thisSection.find('.section-published-date').animate({ 'background-color': 'rgb(182,37,104)' }, 300).animate({ diff --git a/cms/templates/base.html b/cms/templates/base.html index 3f286c2582..f1a87d6424 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -30,7 +30,7 @@
<%include file="courseware_vendor_js.html"/> - + diff --git a/cms/templates/widgets/metadata-edit.html b/cms/templates/widgets/metadata-edit.html index b351b5c344..4eb43da896 100644 --- a/cms/templates/widgets/metadata-edit.html +++ b/cms/templates/widgets/metadata-edit.html @@ -1,5 +1,6 @@ <% import hashlib + from xmodule.fields import StringyInteger, StringyFloat hlskey = hashlib.md5(module.location.url()).hexdigest() %>