Skip to content
Snippets Groups Projects
Commit e6445cea authored by Chris Dodge's avatar Chris Dodge
Browse files

adjust implementation to reflect feedback from Calen. Also limit the jQuery...

adjust implementation to reflect feedback from Calen. Also limit the jQuery selection to be within the metadata-edit region, just to avoid picking up other elements decorated with that attribute
parent a3bf3fb1
No related merge requests found
......@@ -23,6 +23,6 @@ class CMS.Models.Module extends Backbone.Model
_metadata = {}
# walk through the set of elments which have the 'xmetadata_name' attribute and
# build up a object to pass back to the server on the subsequent POST
_metadata[el.getAttribute("xmetadata_name")]=el.value for el in $('[xmetadata_name]')
_metadata[$(el).data("metadata-name")]=el.value for el in $('[data-metadata-name]', @metadata_elt)
@set(metadata: _metadata)
super(args...)
......@@ -3,7 +3,7 @@
<h3>Metadata</h3>
<ul>
% for keyname in metadata.keys():
<li>${keyname}: <input type='text' xmetadata_name='${keyname}' value='${metadata[keyname]}' size='60' /></li>
<li>${keyname}: <input type='text' data-metadata-name='${keyname}' value='${metadata[keyname]}' size='60' /></li>
% endfor
</ul>
</section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment