diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-07-25 09:25:31 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-07-25 09:25:31 -0600 |
commit | eca46d76a7832f771d377edb3939ea1aded2fac9 (patch) | |
tree | d4f0323202c7eb6eab60ff6e14f9905b625e349b /modules/tag/js | |
parent | 63511316be51f193d37c4f3b9dd3455a9ab60de8 (diff) | |
parent | 50d6cc0150b930d79d3e8b90956ffa9655fcc9c5 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/tag/js')
-rw-r--r-- | modules/tag/js/tag.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index a1eaeecd..bbf44166 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -7,7 +7,7 @@ function ajaxify_tag_form() { dataType: "json", success: function(data) { if (data.result == "success") { - $.get($("#gTagCloud").attr("src"), function(data, textStatus) { + $.get($("#gTagCloud").attr("title"), function(data, textStatus) { $("#gTagCloud").html(data); }); } @@ -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]; + } +} |