Commit 06d31548 by cahrens

Set "editing" name.

parent a1674069
......@@ -34,6 +34,7 @@ class CMS.Views.ModuleEdit extends Backbone.View
@selectMode(@editorMode)
else
@hideDataEditor()
@$el.find('.component-name').html('<em>Editing:</em> ' + @metadataEditor.getDisplayName())
changedMetadata: ->
return @metadataEditor.getModifiedMetadataValues()
......
......@@ -54,6 +54,12 @@ CMS.Views.Metadata.Editor = Backbone.View.extend({
}
);
return modified_values;
},
getDisplayName: function () {
// It is possible that there is no display name set. In that case, return empty string.
var displayNameValue = this.model.get('display_name').value;
return displayNameValue ? displayNameValue : '';
}
});
......
<div class="wrapper wrapper-component-editor">
<div class="component-editor">
<div class="component-edit-header">
<span class="component-name"><em>Editing:</em> Component</span>
<span class="component-name"></span>
<ul class="nav-edit-modes">
<li id="editor-mode" class="mode active-mode" aria-controls="editor-tab" role="tab">
<a href="#">Editor</a>
......
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