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

@@ -94,11 +94,8 @@ $(function(){
//collect text of checked boxes
value2htmlFinal: function(value, element) {
var html = [],
/*jslint eqeq: true*/
checked = $.grep(this.sourceData, function(o){
return $.grep(value, function(v){ return v == o.value; }).length;
});
/*jslint eqeq: false*/
checked = $.fn.editableutils.itemsByValue(value, this.sourceData);
if(checked.length) {
$.each(checked, function(i, v) { html.push($.fn.editableutils.escape(v.text)); });
$(element).html(html.join('<br>'));