1
0
mirror of synced 2024-11-22 21:16:10 +03:00

compress getContainerWidth(), add missing semicolon.

This commit is contained in:
Justin DuJardin 2012-03-28 10:33:53 -07:00
parent 55a257ddba
commit 1fff4788eb

View File

@ -341,14 +341,14 @@
// if text is not a function we assume it to be a key name // if text is not a function we assume it to be a key name
if (!$.isFunction(text)) text = function (item) { return item[data.text]; }; if (!$.isFunction(text)) text = function (item) { return item[data.text]; };
data = data.results; data = data.results;
} }
return function (query) { return function (query) {
var t = query.term.toUpperCase(), filtered = {}; var t = query.term.toUpperCase(), filtered = {};
if (t === "") { if (t === "") {
query.callback({results: data}); query.callback({results: data});
return; return;
} }
filtered.result = $(data) filtered.result = $(data)
.filter(function () {return text(this).toUpperCase().indexOf(t) >= 0;}) .filter(function () {return text(this).toUpperCase().indexOf(t) >= 0;})
.get(); .get();
@ -609,13 +609,11 @@
for (var i = 0; i < attrs.length; i++) { for (var i = 0; i < attrs.length; i++) {
var matches = attrs[i].replace(/\s/g,'') var matches = attrs[i].replace(/\s/g,'')
.match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/); .match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);
if(matches == null || matches.length < 1) if(matches != null && matches.length >= 1)
continue;
return matches[1]; return matches[1];
} }
return this.opts.element.width(); return this.opts.element.width();
} };
function SingleSelect2() { function SingleSelect2() {