[pe] Refactorig

Delete asc_CChartStyle. Use CStyleImage. asc_getImageUrl -> asc_getImage, asc_getStyle -> asc_getName
This commit is contained in:
Alexander.Trofimov 2019-06-11 18:24:00 +03:00
parent 8ce8178389
commit c67a8647b7
2 changed files with 6 additions and 6 deletions

View file

@ -415,16 +415,16 @@ define([
if (count>0 && count==styles.length) { if (count>0 && count==styles.length) {
var data = stylesStore.models; var data = stylesStore.models;
_.each(styles, function(style, index){ _.each(styles, function(style, index){
data[index].set('imageUrl', style.asc_getImageUrl()); data[index].set('imageUrl', style.asc_getImage());
}); });
} else { } else {
var stylearray = [], var stylearray = [],
selectedIdx = -1; selectedIdx = -1;
_.each(styles, function(item, index){ _.each(styles, function(item, index){
stylearray.push({ stylearray.push({
imageUrl: item.asc_getImageUrl(), imageUrl: item.asc_getImage(),
data : item.asc_getStyle(), data : item.asc_getName(),
tip : me.textStyle + ' ' + item.asc_getStyle() tip : me.textStyle + ' ' + item.asc_getName()
}); });
}); });
stylesStore.reset(stylearray, {silent: false}); stylesStore.reset(stylearray, {silent: false});

View file

@ -205,8 +205,8 @@ define([
'<% _.each(styles, function(row) { %>', '<% _.each(styles, function(row) { %>',
'<ul class="row">', '<ul class="row">',
'<% _.each(row, function(style) { %>', '<% _.each(row, function(style) { %>',
'<li data-type="<%= style.asc_getStyle() %>">', '<li data-type="<%= style.asc_getName() %>">',
'<img src="<%= style.asc_getImageUrl() %>" width="50px" height="50px">', '<img src="<%= style.asc_getImage() %>" width="50px" height="50px">',
'</li>', '</li>',
'<% }); %>', '<% }); %>',
'</ul>', '</ul>',