diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index 258705dd3..9e9ba8934 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -495,7 +495,10 @@ define([
switch(this._state.bullets.type) {
case 0:
this.toolbar.btnMarkers.toggle(true, true);
- this.toolbar.mnuMarkersPicker.selectByIndex(this._state.bullets.subtype, true);
+ if (this._state.bullets.subtype!==undefined)
+ this.toolbar.mnuMarkersPicker.selectByIndex(this._state.bullets.subtype, true);
+ else
+ this.toolbar.mnuMarkersPicker.deselectAll(true);
break;
case 1:
var idx = 0;
@@ -1315,16 +1318,6 @@ define([
onMarkerSettingsClick: function(type) {
var me = this;
-
- // var selectedElements = me.api.getSelectedElements();
- // if (selectedElements && _.isArray(selectedElements)) {
- // for (var i = 0; i< selectedElements.length; i++) {
- // if (Asc.c_oAscTypeSelectElement.Paragraph == selectedElements[i].get_ObjectType()) {
- // props = selectedElements[i].get_ObjectValue();
- // break;
- // }
- // }
- // }
var listId = me.api.asc_GetCurrentNumberingId(),
level = me.api.asc_GetCurrentNumberingLvl(),
props = (listId !== null) ? me.api.asc_GetNumberingPr(listId).get_Lvl(level) : null;
@@ -1337,7 +1330,7 @@ define([
handler: function(result, value) {
if (result == 'ok') {
if (me.api) {
- // me.api.paraApply(value);
+ me.api.asc_ChangeNumberingLvl(listId, value, props.get_LvlNum());
}
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
diff --git a/apps/documenteditor/main/app/view/BulletSettingsDialog.js b/apps/documenteditor/main/app/view/BulletSettingsDialog.js
index a38db2e99..34160ac6a 100644
--- a/apps/documenteditor/main/app/view/BulletSettingsDialog.js
+++ b/apps/documenteditor/main/app/view/BulletSettingsDialog.js
@@ -91,7 +91,7 @@ define([
'
',
'',
'',
- '',
+ '',
' | ',
'
',
'',
@@ -120,7 +120,7 @@ define([
{
id: 'id-dlg-bullet-auto-color',
caption: this.textAuto,
- template: _.template('<%= caption %>')
+ template: _.template('<%= caption %>')
},
{caption: '--'},
{ template: _.template('') },
@@ -175,13 +175,13 @@ define([
if (this._changedProps)
this._changedProps.put_Align(record.value);
if (this.api) {
- //this.api.SetDrawImagePreviewMargins('page-margins-preview', this.properties);
+ //this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this._changedProps);
}
}, this));
this.cmbSize = new Common.UI.ComboBox({
el : $window.find('#id-dlg-bullet-size'),
- menuStyle : 'min-width: 100%;max-height: 310px;',
+ menuStyle : 'min-width: 100%;max-height: 183px;',
editable : false,
cls : 'input-group-nr',
data : [
@@ -208,10 +208,10 @@ define([
this.cmbSize.on('selected', _.bind(function (combo, record) {
if (this._changedProps) {
if (!this._changedProps.get_TextPr()) this._changedProps.put_TextPr(new AscCommonWord.CTextPr());
- this._changedProps.get_TextPr().put_FontSize(record.value);
+ this._changedProps.get_TextPr().put_FontSize((record.value>0) ? record.value : null);
}
if (this.api) {
- //this.api.SetDrawImagePreviewMargins('page-margins-preview', this.properties);
+ //this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this._changedProps);
}
}, this));
@@ -232,20 +232,33 @@ define([
},
onAutoColor: function(e) {
- var color = Common.Utils.ThemeColor.getHexColor(220, 220, 220);
+ var color = Common.Utils.ThemeColor.getHexColor(0, 0, 0);
this.btnColor.setColor(color);
this.colors.clearSelection();
var clr_item = this.btnColor.menu.$el.find('#id-dlg-bullet-auto-color > a');
!clr_item.hasClass('selected') && clr_item.addClass('selected');
this.isAutoColor = true;
+ if (this._changedProps) {
+ if (!this._changedProps.get_TextPr()) this._changedProps.put_TextPr(new AscCommonWord.CTextPr());
+ var color = new Asc.asc_CColor();
+ color.put_auto(true);
+ this._changedProps.get_TextPr().put_Color(color);
+ }
+ if (this.api) {
+ //this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this._changedProps);
+ }
},
onColorsSelect: function(picker, color) {
this.btnColor.setColor(color);
if (this._changedProps) {
- // this._changedProps.asc_putBulletColor(Common.Utils.ThemeColor.getRgbColor(color));
+ if (!this._changedProps.get_TextPr()) this._changedProps.put_TextPr(new AscCommonWord.CTextPr());
+ this._changedProps.get_TextPr().put_Color(Common.Utils.ThemeColor.getRgbColor(color));
}
this.isAutoColor = false;
+ if (this.api) {
+ //this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this._changedProps);
+ }
},
onEditBullet: function() {
@@ -278,6 +291,9 @@ define([
});
win.show();
win.on('symbol:dblclick', handler);
+ if (this.api) {
+ //this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this._changedProps);
+ }
},
_handleInput: function(state) {
@@ -337,7 +353,7 @@ define([
this.btnColor.setColor(color);
}
}
- this._changedProps = new Asc.CAscNumberingLvl(this.level);
+ this._changedProps = props || new Asc.CAscNumberingLvl(this.level);
},
txtTitle: 'Define New Bullet',