change source of select, fixes #61

This commit is contained in:
vitalets
2013-01-08 14:23:38 +04:00
parent f06b5c4d01
commit 939e0dba51
6 changed files with 65 additions and 3 deletions

View File

@@ -151,11 +151,16 @@ To create your own input you can inherit from this class.
this.$input.addClass(this.options.inputclass);
}
},
setAttr: function(attr) {
if (this.options[attr]) {
this.$input.attr(attr, this.options[attr]);
}
}
},
option: function(key, value) {
this.options[key] = value;
}
};

View File

@@ -234,7 +234,17 @@ List - abstract class for inputs that have source option loaded from js array or
});
}
return result;
}
},
option: function(key, value) {
this.options[key] = value;
if(key === 'source') {
this.sourceData = null;
}
if(key === 'prepend') {
this.prependData = null;
}
}
});