Refactoring

This commit is contained in:
Julia Radzhabova 2019-08-30 16:24:15 +03:00
parent 2bce4a8971
commit 23db6a35c6
4 changed files with 4 additions and 8 deletions

View file

@ -716,7 +716,6 @@ define([
data[index].set('imageUrl', template.asc_getImage());
});
} else {
self.cmbTableTemplate.menuPicker.store.reset([]);
var arr = [];
_.each(Templates, function(template){
arr.push({
@ -726,7 +725,7 @@ define([
tip : template.asc_getDisplayName()
});
});
self.cmbTableTemplate.menuPicker.store.add(arr);
self.cmbTableTemplate.menuPicker.store.reset(arr);
}
},

View file

@ -685,7 +685,6 @@ define([
data[index].set('imageUrl', template.asc_getImage());
});
} else {
self.cmbTableTemplate.menuPicker.store.reset([]);
var arr = [];
_.each(Templates, function(template){
arr.push({
@ -695,7 +694,7 @@ define([
tip : template.asc_getDisplayName()
});
});
self.cmbTableTemplate.menuPicker.store.add(arr);
self.cmbTableTemplate.menuPicker.store.reset(arr);
}
},

View file

@ -1631,8 +1631,7 @@ define([
});
});
store.reset();
store.add(templates);
store.reset(templates);
}
this.fillTableTemplates();

View file

@ -456,7 +456,6 @@ define([
data[index].set('imageUrl', template.asc_getImage());
});
} else {
self.cmbTableTemplate.menuPicker.store.reset([]);
var arr = [];
_.each(Templates, function(template){
arr.push({
@ -470,7 +469,7 @@ define([
tip : template.asc_getDisplayName()
});
});
self.cmbTableTemplate.menuPicker.store.add(arr);
self.cmbTableTemplate.menuPicker.store.reset(arr);
}
},