[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) {
var data = stylesStore.models;
_.each(styles, function(style, index){
data[index].set('imageUrl', style.asc_getImageUrl());
data[index].set('imageUrl', style.asc_getImage());
});
} else {
var stylearray = [],
selectedIdx = -1;
_.each(styles, function(item, index){
stylearray.push({
imageUrl: item.asc_getImageUrl(),
data : item.asc_getStyle(),
tip : me.textStyle + ' ' + item.asc_getStyle()
imageUrl: item.asc_getImage(),
data : item.asc_getName(),
tip : me.textStyle + ' ' + item.asc_getName()
});
});
stylesStore.reset(stylearray, {silent: false});

View file

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