projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a59650
)
Fixed a few issues with editable item lists in JS
author
Alexander Ebert
<ebert@woltlab.com>
Sun, 20 May 2012 23:36:26 +0000
(
01:36
+0200)
committer
Alexander Ebert
<ebert@woltlab.com>
Sun, 20 May 2012 23:36:26 +0000
(
01:36
+0200)
wcfsetup/install/files/js/WCF.js
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/js/WCF.js
b/wcfsetup/install/files/js/WCF.js
index a24b7a8d0a96f2962691b42ab187dbff553b3843..93a9e3b3efac22a7e11a398d177723425f414584 100644
(file)
--- a/
wcfsetup/install/files/js/WCF.js
+++ b/
wcfsetup/install/files/js/WCF.js
@@
-5564,6
+5564,9
@@
WCF.EditableItemList = Class.extend({
label: self._searchInput.val()
});
+ // reset input
+ $(this).val('');
+
event.stopPropagation();
return false;
}
@@
-5627,7
+5630,9
@@
WCF.EditableItemList = Class.extend({
*/
addItem: function(data) {
if (this._data[data.objectID]) {
- return true;
+ if (!(data.objectID === 0 && this._allowCustomInput)) {
+ return true;
+ }
}
var $listItem = $('<li class="badge">' + data.label + '</li>').data('objectID', data.objectID).data('label', data.label).appendTo(this._itemList);