From c3bffe3e2114268659672715a0d73d6aacfdfafc Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Mon, 15 Oct 2012 13:04:06 -0400 Subject: [PATCH 1/2] update name in unit location pane whenever display name is changed --- cms/static/coffee/src/views/unit.coffee | 1 + cms/templates/widgets/units.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cms/static/coffee/src/views/unit.coffee b/cms/static/coffee/src/views/unit.coffee index 416e3204fd..6f9b939af2 100644 --- a/cms/static/coffee/src/views/unit.coffee +++ b/cms/static/coffee/src/views/unit.coffee @@ -185,6 +185,7 @@ class CMS.Views.UnitEdit.NameEdit extends Backbone.View # Treat the metadata dictionary as immutable metadata = $.extend({}, @model.get('metadata')) metadata.display_name = @$('.unit-display-name-input').val() + $('.unit-location .editing .unit-name').html(metadata.display_name) @model.set('metadata', metadata) class CMS.Views.UnitEdit.LocationState extends Backbone.View diff --git a/cms/templates/widgets/units.html b/cms/templates/widgets/units.html index 13bf73fec6..fe955baafe 100644 --- a/cms/templates/widgets/units.html +++ b/cms/templates/widgets/units.html @@ -18,7 +18,7 @@ This def will enumerate through a passed in subsection and list all of the units
- ${unit.display_name} + ${unit.display_name} % if actions:
From 83b32987e62181bf33135d553db77cca02aaaf06 Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Mon, 15 Oct 2012 13:07:53 -0400 Subject: [PATCH 2/2] removed extra ol element from unit location pane --- cms/templates/unit.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cms/templates/unit.html b/cms/templates/unit.html index 0f4f999599..3a184d65ba 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -108,9 +108,7 @@ ${subsection.display_name} -
    - ${units.enum_units(subsection, actions=False, selected=unit.location)} -
+ ${units.enum_units(subsection, actions=False, selected=unit.location)}