itemsByValue method

This commit is contained in:
vitalets
2012-12-28 18:05:09 +04:00
parent 5f3f820312
commit d4d2bf930a
7 changed files with 47 additions and 28 deletions

View File

@@ -236,20 +236,7 @@ List - abstract class for inputs that have source option loaded from js array or
});
}
return result;
},
//search for item by particular value
itemByVal: function(val) {
if($.isArray(this.sourceData)) {
for(var i=0; i<this.sourceData.length; i++){
/*jshint eqeqeq: false*/
if(this.sourceData[i].value == val) {
/*jshint eqeqeq: true*/
return this.sourceData[i];
}
}
}
}
}
});