[ckan-changes] [okfn/ckan] 635bc5: Adds options to autocomplete module for mapping ke...
GitHub
noreply at github.com
Thu Feb 28 14:31:04 UTC 2013
Branch: refs/heads/release-v2.0
Home: https://github.com/okfn/ckan
Commit: 635bc5fb2e58c57fc6f50885cdeb6f71c508ec98
https://github.com/okfn/ckan/commit/635bc5fb2e58c57fc6f50885cdeb6f71c508ec98
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: 7393926b5d91399a976589c7d14a12f38f0b9254
https://github.com/okfn/ckan/commit/7393926b5d91399a976589c7d14a12f38f0b9254
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/dd6eefd77f87...7393926b5d91
More information about the ckan-changes
mailing list