
Merge branch 'issue-1018' of dlab/hive
from pull-request 1357 * refs/heads/issue-1018: add "minLength" option in yobi.ui.Typeahead Reviewed-by: 채수원
@d668863747e76fcaec2cce4f91141edd06943cc7
--- public/javascripts/common/yobi.ui.Typeahead.js
+++ public/javascripts/common/yobi.ui.Typeahead.js
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 |
function _initElement(sQuery){ |
76 | 76 |
try { |
77 | 77 |
htElement.welInput = $(sQuery); |
78 |
- htElement.welInput.typeahead({ minLength: 0 }); |
|
78 |
+ htElement.welInput.typeahead({ minLength: htVar.htData.minLength || 0 }); |
|
79 | 79 |
htData = htElement.welInput.data('typeahead'); |
80 | 80 |
htData.items = htVar.htData.limit || 8; |
81 | 81 |
htData.source = htVar.htData.source || _onTypeAhead; |
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 |
htData.render = htVar.htData.render; |
89 | 89 |
} |
90 | 90 |
|
91 |
- htData.minLength = 0; |
|
91 |
+ htData.minLength = htVar.htData.minLength || 0; |
|
92 | 92 |
} catch (err){ |
93 | 93 |
if(typeof console == "object") { |
94 | 94 |
console.log(err); |
--- public/javascripts/service/yobi.organization.Member.js
+++ public/javascripts/service/yobi.organization.Member.js
... | ... | @@ -45,6 +45,7 @@ |
45 | 45 |
|
46 | 46 |
htVar.oTypeahead = new yobi.ui.Typeahead("#loginId", { |
47 | 47 |
"htData" : { |
48 |
+ "minLength" : 1, |
|
48 | 49 |
"updater" : _updater, |
49 | 50 |
"source" : _source, |
50 | 51 |
"render" : _render |
--- public/javascripts/service/yobi.project.Member.js
+++ public/javascripts/service/yobi.project.Member.js
... | ... | @@ -47,6 +47,7 @@ |
47 | 47 |
|
48 | 48 |
htVar.oTypeahead = new yobi.ui.Typeahead("#loginId", { |
49 | 49 |
"htData" : { |
50 |
+ "minLength" : 1, |
|
50 | 51 |
"updater" : _updater, |
51 | 52 |
"source" : _source, |
52 | 53 |
"render" : _render |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?