fix parenthesis mismatches
This commit is contained in:
parent
c12a9d5e9c
commit
7d8409393c
16
select2.js
16
select2.js
@ -1432,7 +1432,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
// single
|
// single
|
||||||
|
|
||||||
createContainer: function () {
|
createContainer: function () {
|
||||||
var container = $(document.createElement("div").attr({
|
var container = $(document.createElement("div")).attr({
|
||||||
"class": "select2-container"
|
"class": "select2-container"
|
||||||
}).html([
|
}).html([
|
||||||
" <a href='javascript:void(0)' onclick='return false;' class='select2-choice'>",
|
" <a href='javascript:void(0)' onclick='return false;' class='select2-choice'>",
|
||||||
@ -1445,7 +1445,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
" </div>" ,
|
" </div>" ,
|
||||||
" <ul class='select2-results'>" ,
|
" <ul class='select2-results'>" ,
|
||||||
" </ul>" ,
|
" </ul>" ,
|
||||||
"</div>"].join("")));
|
"</div>"].join(""));
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1667,11 +1667,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
// install default initSelection when applied to hidden input and data is local
|
// install default initSelection when applied to hidden input and data is local
|
||||||
opts.initSelection = opts.initSelection || function (element, callback) {
|
opts.initSelection = opts.initSelection || function (element, callback) {
|
||||||
var id = element.val();
|
var id = element.val();
|
||||||
//search in data by id
|
//search in data by id
|
||||||
opts.query({
|
opts.query({
|
||||||
matcher: function(term, text, el){
|
matcher: function(term, text, el){
|
||||||
return equal(id, opts.id(el));
|
return equal(id, opts.id(el));
|
||||||
},
|
},
|
||||||
callback: !$.isFunction(callback) ? $.noop : function(filtered) {
|
callback: !$.isFunction(callback) ? $.noop : function(filtered) {
|
||||||
callback(filtered.results.length ? filtered.results[0] : null);
|
callback(filtered.results.length ? filtered.results[0] : null);
|
||||||
}
|
}
|
||||||
@ -1830,7 +1830,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
|
|
||||||
// multi
|
// multi
|
||||||
createContainer: function () {
|
createContainer: function () {
|
||||||
var container = $(document.createElement("div").attr({
|
var container = $(document.createElement("div")).attr({
|
||||||
"class": "select2-container select2-container-multi"
|
"class": "select2-container select2-container-multi"
|
||||||
}).html([
|
}).html([
|
||||||
" <ul class='select2-choices'>",
|
" <ul class='select2-choices'>",
|
||||||
@ -1842,7 +1842,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
"<div class='select2-drop select2-drop-multi' style='display:none;'>" ,
|
"<div class='select2-drop select2-drop-multi' style='display:none;'>" ,
|
||||||
" <ul class='select2-results'>" ,
|
" <ul class='select2-results'>" ,
|
||||||
" </ul>" ,
|
" </ul>" ,
|
||||||
"</div>"].join("")));
|
"</div>"].join(""));
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1871,10 +1871,10 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
//search in data by array of ids
|
//search in data by array of ids
|
||||||
opts.query({
|
opts.query({
|
||||||
matcher: function(term, text, el){
|
matcher: function(term, text, el){
|
||||||
return $.grep(ids, function(id) {
|
return $.grep(ids, function(id) {
|
||||||
return equal(id, opts.id(el));
|
return equal(id, opts.id(el));
|
||||||
}).length;
|
}).length;
|
||||||
},
|
},
|
||||||
callback: !$.isFunction(callback) ? $.noop : function(filtered) {
|
callback: !$.isFunction(callback) ? $.noop : function(filtered) {
|
||||||
callback(filtered.results);
|
callback(filtered.results);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user