[DE] Fix Bug 48523
This commit is contained in:
parent
20cd47b211
commit
dc9a6e196b
|
@ -376,7 +376,7 @@ define([
|
||||||
template: _.template(['<div class="listview inner" style=""></div>'].join('')),
|
template: _.template(['<div class="listview inner" style=""></div>'].join('')),
|
||||||
itemTemplate: _.template([
|
itemTemplate: _.template([
|
||||||
'<div id="<%= id %>" class="list-item">',
|
'<div id="<%= id %>" class="list-item">',
|
||||||
'<div class="<% if (checked) { %>checked<% } %>"><%= name %></div>',
|
'<div class="<% if (checked) { %>checked<% } %>"><%= displayValue %></div>',
|
||||||
'<div>',
|
'<div>',
|
||||||
'<div class="input-field" style="width:40px;"><input type="text" class="form-control" value="<%= value %>" style="text-align: right;" maxLength="1">',
|
'<div class="input-field" style="width:40px;"><input type="text" class="form-control" value="<%= value %>" style="text-align: right;" maxLength="1">',
|
||||||
'</div>',
|
'</div>',
|
||||||
|
@ -519,6 +519,7 @@ define([
|
||||||
if (style.get_QFormat() || level>=0) {
|
if (style.get_QFormat() || level>=0) {
|
||||||
styles.push({
|
styles.push({
|
||||||
name: name,
|
name: name,
|
||||||
|
displayValue: style.get_TranslatedName(),
|
||||||
allowSelected: false,
|
allowSelected: false,
|
||||||
checked: false,
|
checked: false,
|
||||||
value: '',
|
value: '',
|
||||||
|
@ -553,6 +554,7 @@ define([
|
||||||
} else {
|
} else {
|
||||||
styles.push({
|
styles.push({
|
||||||
name: style,
|
name: style,
|
||||||
|
displayValue: style,
|
||||||
allowSelected: false,
|
allowSelected: false,
|
||||||
checked: true,
|
checked: true,
|
||||||
value: level,
|
value: level,
|
||||||
|
@ -609,8 +611,8 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
styles.sort(function(a, b){
|
styles.sort(function(a, b){
|
||||||
var aname = a.name.toLocaleLowerCase(),
|
var aname = a.displayValue.toLocaleLowerCase(),
|
||||||
bname = b.name.toLocaleLowerCase();
|
bname = b.displayValue.toLocaleLowerCase();
|
||||||
if (aname < bname) return -1;
|
if (aname < bname) return -1;
|
||||||
if (aname > bname) return 1;
|
if (aname > bname) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -657,18 +659,25 @@ define([
|
||||||
|
|
||||||
arr = [];
|
arr = [];
|
||||||
_.each(this.api.asc_getAllUsedParagraphStyles(), function (style, index) {
|
_.each(this.api.asc_getAllUsedParagraphStyles(), function (style, index) {
|
||||||
var name = style.get_Name();
|
|
||||||
arr.push({
|
arr.push({
|
||||||
displayValue: name,
|
displayValue: style.get_TranslatedName(),
|
||||||
|
styleName: style.get_Name(),
|
||||||
value: index
|
value: index
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
arr.sort(function(a, b){
|
||||||
|
var aname = a.displayValue.toLocaleLowerCase(),
|
||||||
|
bname = b.displayValue.toLocaleLowerCase();
|
||||||
|
if (aname < bname) return -1;
|
||||||
|
if (aname > bname) return 1;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
this.cmbTOFStyles.setData(arr);
|
this.cmbTOFStyles.setData(arr);
|
||||||
value = undefined;
|
value = undefined;
|
||||||
if (props) {
|
if (props) {
|
||||||
var count = props.get_StylesCount();
|
var count = props.get_StylesCount();
|
||||||
if (count>0) {
|
if (count>0) {
|
||||||
var rec = this.cmbTOFStyles.store.findWhere({displayValue: props.get_StyleName(0)});
|
var rec = this.cmbTOFStyles.store.findWhere({styleName: props.get_StyleName(0)});
|
||||||
rec && (value = rec.get('value'));
|
rec && (value = rec.get('value'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -759,7 +768,7 @@ define([
|
||||||
} else {
|
} else {
|
||||||
props.put_Caption(null);
|
props.put_Caption(null);
|
||||||
var rec = this.cmbTOFStyles.getSelectedRecord();
|
var rec = this.cmbTOFStyles.getSelectedRecord();
|
||||||
rec && props.add_Style(rec.displayValue);
|
rec && props.add_Style(rec.styleName);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this._needUpdateOutlineLevels) {
|
if (this._needUpdateOutlineLevels) {
|
||||||
|
@ -837,7 +846,7 @@ define([
|
||||||
var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
|
var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
|
||||||
properties.put_Caption(null);
|
properties.put_Caption(null);
|
||||||
properties.clear_Styles();
|
properties.clear_Styles();
|
||||||
properties.add_Style(record.displayValue);
|
properties.add_Style(record.styleName);
|
||||||
this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties);
|
this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties);
|
||||||
this.scrollerY.update();
|
this.scrollerY.update();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue