diff --git a/apps/documenteditor/main/app/view/ListSettingsDialog.js b/apps/documenteditor/main/app/view/ListSettingsDialog.js
index 2988bea91..84eb49605 100644
--- a/apps/documenteditor/main/app/view/ListSettingsDialog.js
+++ b/apps/documenteditor/main/app/view/ListSettingsDialog.js
@@ -54,7 +54,7 @@ define([
DE.Views.ListSettingsDialog = Common.UI.Window.extend(_.extend({
options: {
type: 0, // 0 - markers, 1 - numbers, 2 - multilevel
- width: 300,
+ width: 330,
height: 334,
style: 'min-width: 240px;',
cls: 'modal-dlg',
@@ -64,7 +64,7 @@ define([
initialize : function(options) {
this.type = options.type || 0;
- this.height = this.type==2 ? 422 : 334;
+ this.height = 422;
_.extend(this.options, {
title: this.txtTitle
@@ -103,11 +103,11 @@ define([
'
',
'',
'',
- '',
+ '',
' | ',
'',
'',
- '',
+ '',
' | ',
'
',
'',
@@ -206,7 +206,7 @@ define([
this.cmbFormat = new Common.UI.ComboBoxCustom({
el : $window.find('#id-dlg-numbering-format'),
menuStyle : 'min-width: 100%;max-height: 183px;',
- style : "width: 129px;",
+ style : "width: 144px;",
editable : false,
template : _.template(template.join('')),
itemsTemplate: _.template(itemsTemplate.join('')),
@@ -258,7 +258,7 @@ define([
}
}
if (this.api) {
- this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.type==2);
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level);
}
}, this));
@@ -277,7 +277,7 @@ define([
if (this._changedProps)
this._changedProps.put_Align(record.value);
if (this.api) {
- this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.type==2);
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level);
}
}, this));
@@ -313,7 +313,7 @@ define([
this._changedProps.get_TextPr().put_FontSize((record.value>0) ? record.value : undefined);
}
if (this.api) {
- this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.type==2);
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level);
}
}, this));
@@ -333,6 +333,14 @@ define([
afterRender: function() {
this.updateThemeColors();
this._setDefaults(this.props);
+ var me = this;
+ var onApiLevelChange = function(level) {
+ me.levelsList.selectByIndex(level);
+ };
+ this.api.asc_registerCallback('asc_onPreviewLevelChange', onApiLevelChange);
+ this.on('close', function(obj){
+ me.api.asc_unregisterCallback('asc_onPreviewLevelChange', onApiLevelChange);
+ });
},
updateThemeColors: function() {
@@ -355,7 +363,7 @@ define([
this._changedProps.get_TextPr().put_Color(color);
}
if (this.api) {
- this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.type==2);
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level);
}
}
},
@@ -370,7 +378,7 @@ define([
this._changedProps.get_TextPr().put_Color(undefined);
}
if (this.api) {
- this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.type==2);
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level);
}
}
},
@@ -384,7 +392,7 @@ define([
this.btnColor.menu.items[0].setChecked(false, true);
this.btnColor.menu.items[1].setChecked(false, true);
if (this.api) {
- this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.type==2);
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level);
}
},
@@ -424,7 +432,7 @@ define([
win.show();
win.on('symbol:dblclick', handler);
if (this.api) {
- this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.type==2);
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level);
}
},
@@ -476,9 +484,6 @@ define([
this.fillLevelProps(this.levels[this.level]);
}
this._changedProps = this.levels[this.level];
- if (this.api) {
- this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.type==2);
- }
},
onSelectLevel: function(listView, itemView, record) {
@@ -535,6 +540,9 @@ define([
} else
this.cmbFormat.setValue((format!==undefined) ? format : '');
}
+ if (this.api) {
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level);
+ }
},
txtTitle: 'List Settings',