bug: source loaded twice if sourceCache = true
This commit is contained in:
@@ -32,6 +32,9 @@ $(function(){
|
||||
$.extend(Checklist.prototype, {
|
||||
renderList: function() {
|
||||
var $label, $div;
|
||||
|
||||
this.$tpl.empty();
|
||||
|
||||
if(!$.isArray(this.sourceData)) {
|
||||
return;
|
||||
}
|
||||
|
@@ -17,8 +17,6 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
var deferred = $.Deferred();
|
||||
|
||||
this.error = null;
|
||||
this.sourceData = null;
|
||||
this.prependData = null;
|
||||
this.onSourceReady(function () {
|
||||
this.renderList();
|
||||
deferred.resolve();
|
||||
|
@@ -30,12 +30,14 @@ $(function(){
|
||||
|
||||
$.extend(Select.prototype, {
|
||||
renderList: function() {
|
||||
this.$input.empty();
|
||||
|
||||
if(!$.isArray(this.sourceData)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(var i=0; i<this.sourceData.length; i++) {
|
||||
this.$tpl.append($('<option>', {value: this.sourceData[i].value}).text(this.sourceData[i].text));
|
||||
this.$input.append($('<option>', {value: this.sourceData[i].value}).text(this.sourceData[i].text));
|
||||
}
|
||||
|
||||
this.setClass();
|
||||
|
Reference in New Issue
Block a user