From 01ede40b03d97ade4dcc322d4f03e58cb15d0ede Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 2 May 2013 09:43:03 -0400 Subject: [PATCH] Switching branches --- cms/djangoapps/contentstore/views.py | 1 + cms/static/coffee/src/views/module_edit.coffee | 2 ++ cms/static/js/base.js | 14 +++++++------- cms/templates/base.html | 2 +- cms/templates/widgets/metadata-edit.html | 14 ++++++++++++-- cms/templates/widgets/source-edit.html | 2 +- .../xmodule/xmodule/templates/problem/empty.yaml | 2 -- 7 files changed, 24 insertions(+), 13 deletions(-) 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() %>
@@ -12,8 +13,17 @@ % endif % else: - - % if False: + + ## Change to True to see all the information being passed through. + % if True: diff --git a/cms/templates/widgets/source-edit.html b/cms/templates/widgets/source-edit.html index 883190d6b3..b7ee6c9db9 100644 --- a/cms/templates/widgets/source-edit.html +++ b/cms/templates/widgets/source-edit.html @@ -12,7 +12,7 @@
- +
diff --git a/common/lib/xmodule/xmodule/templates/problem/empty.yaml b/common/lib/xmodule/xmodule/templates/problem/empty.yaml index 39c9e7671c..b63d106d7c 100644 --- a/common/lib/xmodule/xmodule/templates/problem/empty.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/empty.yaml @@ -1,10 +1,8 @@ --- metadata: display_name: Blank Common Problem - rerandomize: never showanswer: always markdown: "" - weight: "" empty: True attempts: "" data: |