[ckan-changes] [okfn/ckan] 550a10: Adds options to autocomplete module for mapping ke...
GitHub
noreply at github.com
Thu Feb 28 14:05:30 UTC 2013
Branch: refs/heads/master
Home: https://github.com/okfn/ckan
Commit: 550a10d31add800c181f0039e989128bca285710
https://github.com/okfn/ckan/commit/550a10d31add800c181f0039e989128bca285710
Author: John Martin <me at johnmart.in>
Date: 2013-02-28 (Thu, 28 Feb 2013)
Changed paths:
M ckan/public/base/javascript/client.js
M ckan/public/base/javascript/modules/autocomplete.js
Log Message:
-----------
Adds options to autocomplete module for mapping key/value pairs
The autocomplete module now has `data-module-key` and `data-module-label`
options which map on the JSON response like this. Example JSON AJAX response:
[
{ "a": 1, "b": 2, "c": 3 },
{ "a": 4, "b": 5, "c": 6 }
]
So, let's say the input needs to have `a` as a value but wants to use `c` as
a label within the dropdown.
Therefore: `data-module-key="a" data-module-value="c"`
:boom:
Commit: b91080978b6b8e82114a51df55b3b2642073059e
https://github.com/okfn/ckan/commit/b91080978b6b8e82114a51df55b3b2642073059e
Author: John Martin <me at johnmart.in>
Date: 2013-02-28 (Thu, 28 Feb 2013)
Changed paths:
M ckan/templates/package/snippets/package_metadata_fields.html
Log Message:
-----------
Fixes dataset edit template and adds options for key/value pairs in autocomplete
Compare: https://github.com/okfn/ckan/compare/5b6dc3c300de...b91080978b6b
More information about the ckan-changes
mailing list