diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-07-23 22:08:29 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-07-23 22:08:29 -0700 |
| commit | 50d6cc0150b930d79d3e8b90956ffa9655fcc9c5 (patch) | |
| tree | d2a90c14bb7d5e807037909b6005f4b7a9aeab73 /modules/tag/js | |
| parent | 5c8a2a750ccc16b5e8b0dd97ff21dbfb9860d856 (diff) | |
| parent | 078c77a62b623322956457bfd7bfbdaf56203b00 (diff) | |
Merge branch 'master' of git@github.com:/gallery/gallery3
Diffstat (limited to 'modules/tag/js')
| -rw-r--r-- | modules/tag/js/tag.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index a5aaa3f8..bbf44166 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -66,3 +66,18 @@ function editInPlace(element) { }; ajaxify_editInPlaceForm(); } + +function formatTagAutoCompleteResult(row) { + var text = $(".ac_loading").val(); + if (/[\s,;]/.test(text)) { + for (var i= text.length - 1; i >= 0; i--) { + var chr = text.charAt(i); + if (chr == " " || chr == "," || chr == ";") { + break; + } + } + return text.substr(0, i + 1) + row[0]; + } else { + return row[0]; + } +} |
