[DE] Fix Bug 46598
This commit is contained in:
parent
09eba3c88b
commit
44fa7b6462
|
@ -310,7 +310,7 @@ define([
|
|||
toolbar.btnInsertShape.menu.on('hide:after', _.bind(this.onInsertShapeHide, this));
|
||||
toolbar.btnDropCap.menu.on('item:click', _.bind(this.onDropCapSelect, this));
|
||||
toolbar.btnContentControls.menu.on('item:click', _.bind(this.onControlsSelect, this));
|
||||
toolbar.mnuDropCapAdvanced.on('click', _.bind(this.onDropCapAdvancedClick, this));
|
||||
toolbar.mnuDropCapAdvanced.on('click', _.bind(this.onDropCapAdvancedClick, this, false));
|
||||
toolbar.btnColumns.menu.on('item:click', _.bind(this.onColumnsSelect, this));
|
||||
toolbar.btnPageOrient.menu.on('item:click', _.bind(this.onPageOrientSelect, this));
|
||||
toolbar.btnPageMargins.menu.on('item:click', _.bind(this.onPageMarginsSelect, this));
|
||||
|
@ -394,6 +394,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onTableEraseModeChanged', _.bind(this.onTableErase, this));
|
||||
Common.NotificationCenter.on('storage:image-load', _.bind(this.openImageFromStorage, this));
|
||||
Common.NotificationCenter.on('storage:image-insert', _.bind(this.insertImageFromStorage, this));
|
||||
Common.NotificationCenter.on('dropcap:settings', _.bind(this.onDropCapAdvancedClick, this));
|
||||
} else if (this.mode.isRestrictedEdit) {
|
||||
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObjectRestrictedEdit, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
|
@ -1742,11 +1743,11 @@ define([
|
|||
this._state.dropcap = v;
|
||||
},
|
||||
|
||||
onDropCapAdvancedClick: function() {
|
||||
onDropCapAdvancedClick: function(isFrame) {
|
||||
var win, props, text,
|
||||
me = this;
|
||||
|
||||
if (_.isUndefined(me.fontstore)) {
|
||||
if (!isFrame && _.isUndefined(me.fontstore)) {
|
||||
me.fontstore = new Common.Collections.Fonts();
|
||||
var fonts = me.toolbar.cmbFontName.store.toJSON();
|
||||
var arr = [];
|
||||
|
@ -1776,16 +1777,18 @@ define([
|
|||
(new DE.Views.DropcapSettingsAdvanced({
|
||||
tableStylerRows: 2,
|
||||
tableStylerColumns: 1,
|
||||
fontStore: me.fontstore,
|
||||
fontStore: !isFrame ? me.fontstore : null,
|
||||
paragraphProps: props,
|
||||
borderProps: me.borderAdvancedProps,
|
||||
api: me.api,
|
||||
isFrame: false,
|
||||
isFrame: !!isFrame,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok') {
|
||||
me.borderAdvancedProps = value.borderProps;
|
||||
if (value.paragraphProps && value.paragraphProps.get_DropCap() === Asc.c_oAscDropCap.None) {
|
||||
me.api.removeDropcap(true);
|
||||
if (value.paragraphProps &&
|
||||
( !isFrame && value.paragraphProps.get_DropCap() === Asc.c_oAscDropCap.None ||
|
||||
isFrame && value.paragraphProps.get_Wrap() === c_oAscFrameWrap.None)) {
|
||||
me.api.removeDropcap(!isFrame);
|
||||
} else
|
||||
me.api.put_FramePr(value.paragraphProps);
|
||||
}
|
||||
|
|
|
@ -1657,43 +1657,8 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
advancedFrameClick: function(item, e, eOpt){
|
||||
var win, me = this;
|
||||
if (me.api){
|
||||
var selectedElements = me.api.getSelectedElements();
|
||||
if (selectedElements && _.isArray(selectedElements)){
|
||||
for (var i = selectedElements.length - 1; i >= 0; i--) {
|
||||
var elType, elValue;
|
||||
elType = selectedElements[i].get_ObjectType();
|
||||
elValue = selectedElements[i].get_ObjectValue(); // заменить на свойства рамки
|
||||
if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
|
||||
win = new DE.Views.DropcapSettingsAdvanced({
|
||||
tableStylerRows : 2,
|
||||
tableStylerColumns : 1,
|
||||
paragraphProps : elValue,
|
||||
borderProps : me.borderAdvancedProps,
|
||||
api : me.api,
|
||||
isFrame : true,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok') {
|
||||
me.borderAdvancedProps = value.borderProps;
|
||||
if (value.paragraphProps && value.paragraphProps.get_Wrap() === c_oAscFrameWrap.None) {
|
||||
me.api.removeDropcap(false);
|
||||
} else
|
||||
me.api.put_FramePr(value.paragraphProps);
|
||||
}
|
||||
me.fireEvent('editcomplete', me);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (win) {
|
||||
win.show();
|
||||
}
|
||||
advancedFrameClick: function(isFrame, item, e, eOpt){
|
||||
Common.NotificationCenter.trigger('dropcap:settings', isFrame);
|
||||
},
|
||||
|
||||
advancedTableClick: function(item, e, eOpt){
|
||||
|
@ -3551,7 +3516,12 @@ define([
|
|||
|
||||
var menuFrameAdvanced = new Common.UI.MenuItem({
|
||||
caption : me.advancedFrameText
|
||||
}).on('click', _.bind(me.advancedFrameClick, me));
|
||||
}).on('click', _.bind(me.advancedFrameClick, me, true));
|
||||
|
||||
var menuDropCapAdvanced = new Common.UI.MenuItem({
|
||||
iconCls: 'menu__icon dropcap-intext',
|
||||
caption : me.advancedDropCapText
|
||||
}).on('click', _.bind(me.advancedFrameClick, me, false));
|
||||
|
||||
/** coauthoring begin **/
|
||||
var menuCommentSeparatorPara = new Common.UI.MenuItem({
|
||||
|
@ -3871,6 +3841,7 @@ define([
|
|||
menuParagraphKeepLines.setDisabled(disabled);
|
||||
menuParagraphAdvanced.setDisabled(disabled);
|
||||
menuFrameAdvanced.setDisabled(disabled);
|
||||
menuDropCapAdvanced.setDisabled(disabled);
|
||||
menuParagraphVAlign.setDisabled(disabled);
|
||||
menuParagraphDirection.setDisabled(disabled);
|
||||
|
||||
|
@ -3914,7 +3885,11 @@ define([
|
|||
menuEquationInsertCaption.setVisible(isEquation);
|
||||
menuEquationInsertCaptionSeparator.setVisible(isEquation);
|
||||
|
||||
menuFrameAdvanced.setVisible(value.paraProps.value.get_FramePr() !== undefined);
|
||||
var frame_pr = value.paraProps.value.get_FramePr();
|
||||
menuFrameAdvanced.setVisible(frame_pr !== undefined);
|
||||
menuDropCapAdvanced.setVisible(frame_pr !== undefined);
|
||||
if (frame_pr)
|
||||
menuDropCapAdvanced.setIconCls(frame_pr.get_DropCap()===Asc.c_oAscDropCap.Drop ? 'menu__icon dropcap-intext' : 'menu__icon dropcap-inmargin');
|
||||
|
||||
menuStyleSeparator.setVisible(me.mode.canEditStyles && !isInChart);
|
||||
menuStyle.setVisible(me.mode.canEditStyles && !isInChart);
|
||||
|
@ -4009,6 +3984,7 @@ define([
|
|||
menuParagraphDirection,
|
||||
menuParagraphAdvanced,
|
||||
menuFrameAdvanced,
|
||||
menuDropCapAdvanced,
|
||||
/** coauthoring begin **/
|
||||
menuCommentSeparatorPara,
|
||||
menuAddCommentPara,
|
||||
|
@ -4569,7 +4545,8 @@ define([
|
|||
textSeveral: 'Several Rows/Columns',
|
||||
txtInsertCaption: 'Insert Caption',
|
||||
txtEmpty: '(Empty)',
|
||||
textFromStorage: 'From Storage'
|
||||
textFromStorage: 'From Storage',
|
||||
advancedDropCapText: 'Drop Cap Settings'
|
||||
|
||||
}, DE.Views.DocumentHolder || {}));
|
||||
});
|
|
@ -1234,6 +1234,7 @@
|
|||
"DE.Views.DateTimeDialog.txtTitle": "Date & Time",
|
||||
"DE.Views.DocumentHolder.aboveText": "Above",
|
||||
"DE.Views.DocumentHolder.addCommentText": "Add Comment",
|
||||
"DE.Views.DocumentHolder.advancedDropCapText": "Drop Cap Settings",
|
||||
"DE.Views.DocumentHolder.advancedFrameText": "Frame Advanced Settings",
|
||||
"DE.Views.DocumentHolder.advancedParagraphText": "Paragraph Advanced Settings",
|
||||
"DE.Views.DocumentHolder.advancedTableText": "Table Advanced Settings",
|
||||
|
|
Loading…
Reference in a new issue