You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/03/22 23:54:42 UTC
[15/21] git commit: [#4299] ticket:281 Open dropdown on input click
[#4299] ticket:281 Open dropdown on input click
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a41db539
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a41db539
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a41db539
Branch: refs/heads/master
Commit: a41db539cf4f314592b249dab006c86d55fd87b2
Parents: bf11c62
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Mar 5 10:05:11 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Fri Mar 22 21:55:16 2013 +0000
----------------------------------------------------------------------
Allura/allura/lib/widgets/resources/js/combobox.js | 22 ++++++++-------
1 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a41db539/Allura/allura/lib/widgets/resources/js/combobox.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/combobox.js b/Allura/allura/lib/widgets/resources/js/combobox.js
index 462c2c3..557a14e 100644
--- a/Allura/allura/lib/widgets/resources/js/combobox.js
+++ b/Allura/allura/lib/widgets/resources/js/combobox.js
@@ -109,21 +109,23 @@
.appendTo(ul);
};
+ function openDropdown() {
+ wasOpen = input.autocomplete('widget').is(':visible');
+ input.focus();
+ if (wasOpen) {
+ return;
+ }
+ input.autocomplete('search', '');
+ }
+
+ input.click(openDropdown);
+
$('<span>▼</span>')
.attr('tabIndex', -1)
.attr('title', 'Show all options')
.appendTo(wrapper)
.addClass('ui-combobox-toggle')
- .mousedown(function() {
- wasOpen = input.autocomplete('widget').is(':visible');
- })
- .click(function() {
- input.focus();
- if (wasOpen) {
- return;
- }
- input.autocomplete('search', '');
- });
+ .click(openDropdown);
},
_destroy: function() {