Commit c3bffe3e by Tom Giannattasio

update name in unit location pane whenever display name is changed

parent 54176bfd
......@@ -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
......
......@@ -18,7 +18,7 @@ This def will enumerate through a passed in subsection and list all of the units
<div class="section-item ${selected_class}">
<a href="${reverse('edit_unit', args=[unit.location])}" class="${unit_state}-item">
<span class="${unit.category}-icon"></span>
${unit.display_name}
<span class="unit-name">${unit.display_name}</span>
</a>
% if actions:
<div class="item-actions">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment