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:36 UTC

[09/21] git commit: [#4299] ticket:281 Select user if username is typed in combobox and not selected from the list

[#4299] ticket:281 Select user if username is typed in combobox and not selected from the list


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4662ab4f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4662ab4f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4662ab4f

Branch: refs/heads/master
Commit: 4662ab4f1318cb7dcec985092780ab102278daa8
Parents: 180eab4
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Mar 1 13:51:21 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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4662ab4f/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 6948b01..a1c59d3 100644
--- a/Allura/allura/lib/widgets/resources/js/combobox.js
+++ b/Allura/allura/lib/widgets/resources/js/combobox.js
@@ -37,8 +37,9 @@
             matcher = new RegExp('^' + $.ui.autocomplete.escapeRegex(value) + '$'),
             valid = false;
         select.children('option').each(function() {
-          if ($(this).text().match(matcher)) {
+          if ($(this).val().match(matcher)) {
             this.selected = valid = true;
+            input.val(this.text);
             return false;
           }
         });