Refactoring table templates rendering
This commit is contained in:
parent
17521b6a47
commit
e436fe3876
|
@ -240,6 +240,8 @@ define([
|
|||
createDelayedControls: function() {
|
||||
var me = this;
|
||||
|
||||
this._tableTemplates && this._onInitTemplates(this._tableTemplates);
|
||||
|
||||
this.chHeader = new Common.UI.CheckBox({
|
||||
el: $('#table-checkbox-header'),
|
||||
labelText: this.textHeader,
|
||||
|
@ -729,6 +731,11 @@ define([
|
|||
},
|
||||
|
||||
_onInitTemplates: function(Templates){
|
||||
if (this._initSettings) {
|
||||
this._tableTemplates = Templates;
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
this._isTemplatesChanged = true;
|
||||
|
||||
|
|
|
@ -227,6 +227,8 @@ define([
|
|||
createDelayedControls: function() {
|
||||
var me = this;
|
||||
|
||||
this._tableTemplates && this._onInitTemplates(this._tableTemplates);
|
||||
|
||||
this.chHeader = new Common.UI.CheckBox({
|
||||
el: $('#table-checkbox-header'),
|
||||
labelText: this.textHeader,
|
||||
|
@ -670,6 +672,11 @@ define([
|
|||
},
|
||||
|
||||
_onInitTemplates: function(Templates){
|
||||
if (this._initSettings) {
|
||||
this._tableTemplates = Templates;
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
this._isTemplatesChanged = true;
|
||||
|
||||
|
|
|
@ -685,7 +685,8 @@ define([
|
|||
allowScrollbar: false,
|
||||
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getSparkGroupData()),
|
||||
store: new Common.UI.DataViewStore(Common.define.chartData.getSparkData()),
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>'),
|
||||
delayRenderTips: true
|
||||
});
|
||||
});
|
||||
this.btnSparkType.render($('#spark-button-type'));
|
||||
|
|
Loading…
Reference in a new issue