[de] 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:23:43 +03:00
parent 94e17d2d3a
commit 8ce8178389
2 changed files with 6 additions and 6 deletions

View file

@ -486,16 +486,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

@ -198,8 +198,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>',