summaryrefslogtreecommitdiff
path: root/modules/tag/js
diff options
context:
space:
mode:
authorRomain LE DISEZ <romain.git@ledisez.net>2009-07-25 13:59:04 +0200
committerRomain LE DISEZ <romain.git@ledisez.net>2009-07-25 13:59:04 +0200
commit0aa3ec3ae90a101b2bfc1b395a1749551da22287 (patch)
tree02702942bc27e0e4e7b634a56cd35b71cb35fecc /modules/tag/js
parentb181707c1651af8737c2e6ff550fd20f480b781b (diff)
parent50d6cc0150b930d79d3e8b90956ffa9655fcc9c5 (diff)
Merge commit 'upstream/master'
Diffstat (limited to 'modules/tag/js')
-rw-r--r--modules/tag/js/tag.js15
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];
+ }
+}