allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [09/21] git commit: [#4299] ticket:281 Select user if username is typed in combobox and not selected from the list
Date Fri, 22 Mar 2013 22:54:36 GMT
[#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 <jetmind2@gmail.com>
Authored: Fri Mar 1 13:51:21 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@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;
           }
         });


Mime
View raw message