plugins/tasklist
Aleksander Machniak
machniak at kolabsys.com
Thu Dec 20 11:12:14 CET 2012
plugins/tasklist/jquery.tagedit.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 1c22cb542fe1a4362b6fb013a031f11f62ed9fab
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Thu Dec 20 11:11:54 2012 +0100
Fix tags autocompletion (#1329)
diff --git a/plugins/tasklist/jquery.tagedit.js b/plugins/tasklist/jquery.tagedit.js
index a9ffd77..7c3a5e6 100755
--- a/plugins/tasklist/jquery.tagedit.js
+++ b/plugins/tasklist/jquery.tagedit.js
@@ -176,9 +176,9 @@
var checkAutocomplete = oldValue == true? false : true;
// check if the Value ist new
var isNewResult = isNew($(this).val(), checkAutocomplete);
- if(isNewResult[0] === true || (isNewResult[0] === false && typeof isNewResult[1] == 'string')) {
+ if(isNewResult[0] === true || isNewResult[1] != null) {
- if(oldValue == false && typeof isNewResult[1] == 'string') {
+ if(oldValue == false && isNewResult[1] != null) {
oldValue = true;
id = isNewResult[1];
}
@@ -451,7 +451,7 @@
}
});
}
-
+
// If there is an entry for that already in the autocomplete, don't use it (Check could be case sensitive or not)
for (var i = 0; i < result.length; i++) {
var label = typeof result[i] == 'string' ? result[i] : result[i].label;
@@ -459,7 +459,7 @@
label = label.toLowerCase();
if (label == compareValue) {
isNew = false;
- autoCompleteId = result[i].id;
+ autoCompleteId = typeof result[i] == 'string' ? i : result[i].id;
break;
}
}
More information about the commits
mailing list