Merge branch 'develop'

This commit is contained in:
Maxim Kadushkin 2020-09-01 14:09:10 +03:00
commit cf35554730
46 changed files with 512 additions and 42 deletions

View file

@ -107,10 +107,11 @@ define([
var id = Common.UI.getId(),
menu = new Common.UI.Menu({
id: id,
cls: 'shifted-left',
additionalAlign: options.additionalAlign,
items: (options.additionalItems ? options.additionalItems : []).concat([
{ template: _.template('<div id="' + id + '-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="' + id + '-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
{ template: _.template('<a id="' + id + '-color-new" style="">' + this.textNewColor + '</a>') }
])
});
return menu;

View file

@ -167,7 +167,8 @@ define([
fmax : panel.resize.fmax,
behaviour : panel.behaviour,
index : this.splitters.length,
offset : panel.resize.offset || 0
offset : panel.resize.offset || 0,
multiply : panel.resize.multiply
};
if (!stretch) {
@ -264,6 +265,7 @@ define([
this.resize.fmin = panel.fmin;
this.resize.fmax = panel.fmax;
this.resize.behaviour = panel.behaviour;
this.resize.multiply = panel.multiply;
this.resize.$el.addClass('move');
@ -274,9 +276,11 @@ define([
} else
if (e.data.type == 'horizontal') {
this.resize.width = parseInt(this.resize.$el.css('width'));
this.resize.max = (panel.maxpos > 0 ? panel.maxpos : this.resize.$el.parent().height() + panel.maxpos) - this.resize.width;
this.resize.max = (panel.maxpos > 0 ? panel.maxpos : this.resize.$el.parent().width() + panel.maxpos) - this.resize.width;
this.resize.initx = e.pageX*Common.Utils.zoom() - parseInt(e.currentTarget.style.left);
}
if (this.resize.multiply && this.resize.multiply.koeff)
this.resize.max = Math.floor(this.resize.max/this.resize.multiply.koeff) * this.resize.multiply.koeff + (this.resize.multiply.offset || 0);
Common.NotificationCenter.trigger('layout:resizestart');
},
@ -290,7 +294,13 @@ define([
prop = 'left';
value = e.pageX*zoom - this.resize.initx;
}
if (this.resize.multiply && this.resize.multiply.koeff) {
var m = this.resize.multiply.koeff,
val = value/m,
vfloor = Math.floor(val) * m + (this.resize.multiply.offset || 0),
vceil = Math.ceil(val) * m + (this.resize.multiply.offset || 0);
value = (value>vfloor+m/2) ? vceil : vfloor;
}
if (this.resize.fmin && this.resize.fmax) {
if (!(value < this.resize.fmin()) && !(value > this.resize.fmax())) {
this.resize.$el[0].style[prop] = value + 'px';
@ -332,7 +342,13 @@ define([
prop = 'width';
value = e.pageX*zoom - this.resize.initx;
}
if (this.resize.multiply && this.resize.multiply.koeff) {
var m = this.resize.multiply.koeff,
val = value/m,
vfloor = Math.floor(val) * m + (this.resize.multiply.offset || 0),
vceil = Math.ceil(val) * m + (this.resize.multiply.offset || 0);
value = (value>vfloor+m/2) ? vceil : vfloor;
}
if (this.resize.fmin && this.resize.fmax) {
value < this.resize.fmin() && (value = this.resize.fmin());
value > this.resize.fmax() && (value = this.resize.fmax());

View file

@ -238,6 +238,16 @@ define([
this.cmpEl.find('a').contents().last()[0].textContent = (noencoding) ? caption : Common.Utils.String.htmlEncode(caption);
},
setIconCls: function(iconCls) {
if (this.rendered && !_.isEmpty(this.iconCls)) {
var firstChild = this.cmpEl.children(':first');
if (firstChild) {
firstChild.find('.menu-item-icon').removeClass(this.iconCls).addClass(iconCls);
}
}
this.iconCls = iconCls;
},
setChecked: function(check, suppressEvent) {
this.toggle(check, suppressEvent);
},

View file

@ -261,6 +261,7 @@ define([
ascComment.asc_putUserName(comment.get('username'));
ascComment.asc_putSolved(!comment.get('resolved'));
ascComment.asc_putGuid(comment.get('guid'));
ascComment.asc_putUserData(comment.get('userdata'));
if (!_.isUndefined(ascComment.asc_putDocumentFlag)) {
ascComment.asc_putDocumentFlag(comment.get('unattached'));
@ -276,6 +277,7 @@ define([
addReply.asc_putOnlyOfficeTime(t.ooDateToString(new Date(reply.get('time'))));
addReply.asc_putUserId(reply.get('userid'));
addReply.asc_putUserName(reply.get('username'));
addReply.asc_putUserData(reply.get('userdata'));
ascComment.asc_addReply(addReply);
}
@ -354,6 +356,7 @@ define([
ascComment.asc_putUserName(t.currentUserName);
ascComment.asc_putSolved(comment.get('resolved'));
ascComment.asc_putGuid(comment.get('guid'));
ascComment.asc_putUserData(comment.get('userdata'));
if (!_.isUndefined(ascComment.asc_putDocumentFlag)) {
ascComment.asc_putDocumentFlag(comment.get('unattached'));
@ -380,6 +383,7 @@ define([
addReply.asc_putOnlyOfficeTime(t.ooDateToString(new Date(reply.get('time'))));
addReply.asc_putUserId(reply.get('userid'));
addReply.asc_putUserName(reply.get('username'));
addReply.asc_putUserData(reply.get('userdata'));
ascComment.asc_addReply(addReply);
}
@ -411,6 +415,7 @@ define([
ascComment.asc_putUserName(comment.get('username'));
ascComment.asc_putSolved(comment.get('resolved'));
ascComment.asc_putGuid(comment.get('guid'));
ascComment.asc_putUserData(comment.get('userdata'));
if (!_.isUndefined(ascComment.asc_putDocumentFlag)) {
ascComment.asc_putDocumentFlag(comment.get('unattached'));
@ -434,6 +439,7 @@ define([
addReply.asc_putTime(me.utcDateToString(new Date(reply.get('time'))));
addReply.asc_putOnlyOfficeTime(me.ooDateToString(new Date(reply.get('time'))));
addReply.asc_putUserData(reply.get('userdata'));
ascComment.asc_addReply(addReply);
}
@ -474,6 +480,7 @@ define([
ascComment.asc_putUserName(comment.get('username'));
ascComment.asc_putSolved(comment.get('resolved'));
ascComment.asc_putGuid(comment.get('guid'));
ascComment.asc_putUserData(comment.get('userdata'));
if (!_.isUndefined(ascComment.asc_putDocumentFlag)) {
ascComment.asc_putDocumentFlag(comment.get('unattached'));
@ -490,6 +497,7 @@ define([
addReply.asc_putOnlyOfficeTime(me.ooDateToString(new Date(reply.get('time'))));
addReply.asc_putUserId(reply.get('userid'));
addReply.asc_putUserName(reply.get('username'));
addReply.asc_putUserData(reply.get('userdata'));
ascComment.asc_addReply(addReply);
}
@ -533,6 +541,7 @@ define([
ascComment.asc_putUserName(comment.get('username'));
ascComment.asc_putSolved(comment.get('resolved'));
ascComment.asc_putGuid(comment.get('guid'));
ascComment.asc_putUserData(comment.get('userdata'));
if (!_.isUndefined(ascComment.asc_putDocumentFlag)) {
ascComment.asc_putDocumentFlag(comment.get('unattached'));
@ -549,6 +558,7 @@ define([
addReply.asc_putOnlyOfficeTime(me.ooDateToString(new Date(reply.get('time'))));
addReply.asc_putUserId(reply.get('userid'));
addReply.asc_putUserName(reply.get('username'));
addReply.asc_putUserData(reply.get('userdata'));
ascComment.asc_addReply(addReply);
}
@ -762,6 +772,7 @@ define([
comment.set('usercolor', (user) ? user.get('color') : null);
comment.set('resolved', data.asc_getSolved());
comment.set('quote', data.asc_getQuoteText());
comment.set('userdata', data.asc_getUserData());
comment.set('time', date.getTime());
comment.set('date', t.dateToLocaleTimeString(date));
@ -783,6 +794,7 @@ define([
usercolor : (user) ? user.get('color') : null,
date : t.dateToLocaleTimeString(dateReply),
reply : data.asc_getReply(i).asc_getText(),
userdata : data.asc_getReply(i).asc_getUserData(),
time : dateReply.getTime(),
editText : false,
editTextInPopover : false,
@ -1217,6 +1229,7 @@ define([
comment : data.asc_getText(),
resolved : data.asc_getSolved(),
unattached : !_.isUndefined(data.asc_getDocumentFlag) ? data.asc_getDocumentFlag() : false,
userdata : data.asc_getUserData(),
id : Common.UI.getId(),
time : date.getTime(),
showReply : false,
@ -1257,6 +1270,7 @@ define([
usercolor : (user) ? user.get('color') : null,
date : this.dateToLocaleTimeString(date),
reply : data.asc_getReply(i).asc_getText(),
userdata : data.asc_getReply(i).asc_getUserData(),
time : date.getTime(),
editText : false,
editTextInPopover : false,

View file

@ -64,6 +64,7 @@ define([
lock : false,
lockuserid : '',
unattached : false,
userdata : '',
id : Common.UI.getId(), // internal
time : 0,
@ -89,6 +90,7 @@ define([
usercolor : null,
reply : '',
date : undefined,
userdata : '',
id : Common.UI.getId(), // internal
editText : false,

View file

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

View file

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

View file

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 200 B

View file

Before

Width:  |  Height:  |  Size: 139 B

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

View file

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

View file

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

View file

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

View file

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

View file

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

View file

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

View file

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

View file

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

View file

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

View file

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

View file

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 265 B

View file

@ -84,4 +84,26 @@
}
}
}
&.shifted-right {
li {
& > a {
padding-left: 28px;
}
.menu-item-icon {
margin: -3px 0 0 -24px;
}
.checked:not(.no-checkmark):before {
margin-left: -22px;
}
}
}
&.shifted-left {
li {
& > a {
padding-left: 12px;
padding-right: 12px;
}
}
}
}

View file

@ -132,7 +132,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
additionalItems: [{
id: 'control-settings-system-color',
caption: this.textSystemColor,
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 -7px; background-color: #dcdcdc;"></span><%= caption %></a>')
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 1px; background-color: #dcdcdc;"></span><%= caption %></a>')
},
{caption: '--'}],
additionalAlign: this.menuAddAlign,

View file

@ -883,6 +883,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1053,6 +1054,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1080,6 +1082,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1099,6 +1102,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1128,6 +1132,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1180,6 +1185,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1986,11 +1992,13 @@ define([
var me = this;
var menuViewCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption: me.textCopy,
value: 'copy'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuViewUndo = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-undo',
caption: me.textUndo
}).on('click', function () {
me.api.Undo();
@ -2001,6 +2009,7 @@ define([
});
var menuViewAddComment = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
caption: me.addCommentText
}).on('click', _.bind(me.addComment, me));
@ -2011,10 +2020,12 @@ define([
var menuViewSignSeparator = new Common.UI.MenuItem({caption: '--' });
var menuViewPrint = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-print',
caption : me.txtPrintSelection
}).on('click', _.bind(me.onPrintSelection, me));
this.viewModeMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function (value) {
var isInChart = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ChartProperties())),
isInShape = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ShapeProperties())),
@ -2118,7 +2129,7 @@ define([
me.fireEvent('editcomplete', me);
}
return new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2204,7 +2215,7 @@ define([
}
return new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2246,6 +2257,7 @@ define([
});
this.menuImageWrap = new Common.UI.MenuItem({
iconCls: 'menu__icon wrap-inline',
caption : me.textWrap,
menu : (function(){
function onItemClick(item, e) {
@ -2272,7 +2284,7 @@ define([
}
return new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2339,6 +2351,7 @@ define([
});
var menuImageAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-image',
caption : me.advancedText
}).on('click', function(item, e) {
var elType, elValue;
@ -2405,6 +2418,7 @@ define([
var menuImgReplace = new Common.UI.MenuItem({
caption : me.textReplace,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2444,21 +2458,25 @@ define([
});
var menuImgCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.textCopy,
value : 'copy'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuImgPaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.textPaste,
value : 'paste'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuImgCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.textCut,
value : 'cut'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuImgPrint = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-print',
caption : me.txtPrintSelection
}).on('click', _.bind(me.onPrintSelection, me));
@ -2469,22 +2487,27 @@ define([
var menuImgRotate = new Common.UI.MenuItem({
caption : me.textRotate,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-rotate-90',
caption: this.textRotate90,
value : 1
}).on('click', _.bind(me.onImgRotate, me)),
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-rotate-270',
caption: this.textRotate270,
value : 0
}).on('click', _.bind(me.onImgRotate, me)),
{ caption: '--' },
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-flip-hor',
caption: this.textFlipH,
value : 1
}).on('click', _.bind(me.onImgFlip, me)),
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-flip-vert',
caption: this.textFlipV,
value : 0
}).on('click', _.bind(me.onImgFlip, me))
@ -2495,6 +2518,7 @@ define([
me.menuImgCrop = new Common.UI.MenuItem({
caption : me.textCrop,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2516,6 +2540,7 @@ define([
});
this.pictureMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function(value){
if (_.isUndefined(value.imgProps))
return;
@ -2525,50 +2550,63 @@ define([
me.menuImageWrap._originalProps = value.imgProps.value;
var cls = 'menu__icon ';
if (notflow) {
for (var i = 0; i < 6; i++) {
me.menuImageWrap.menu.items[i].setChecked(false);
}
cls += 'wrap-inline';
} else {
switch (wrapping) {
case Asc.c_oAscWrapStyle2.Inline:
me.menuImageWrap.menu.items[0].setChecked(true);
cls += 'wrap-inline';
break;
case Asc.c_oAscWrapStyle2.Square:
me.menuImageWrap.menu.items[1].setChecked(true);
cls += 'wrap-square';
break;
case Asc.c_oAscWrapStyle2.Tight:
me.menuImageWrap.menu.items[2].setChecked(true);
cls += 'wrap-tight';
break;
case Asc.c_oAscWrapStyle2.Through:
me.menuImageWrap.menu.items[3].setChecked(true);
cls += 'wrap-through';
break;
case Asc.c_oAscWrapStyle2.TopAndBottom:
me.menuImageWrap.menu.items[4].setChecked(true);
cls += 'wrap-topandbottom';
break;
case Asc.c_oAscWrapStyle2.Behind:
me.menuImageWrap.menu.items[6].setChecked(true);
cls += 'wrap-behind';
break;
case Asc.c_oAscWrapStyle2.InFront:
me.menuImageWrap.menu.items[5].setChecked(true);
cls += 'wrap-infront';
break;
default:
for (var i = 0; i < 6; i++) {
me.menuImageWrap.menu.items[i].setChecked(false);
}
cls += 'wrap-infront';
break;
}
}
me.menuImageWrap.setIconCls(cls);
_.each(me.menuImageWrap.menu.items, function(item) {
item.setDisabled(notflow);
});
var onlyCommonProps = ( value.imgProps.isImg && value.imgProps.isChart || value.imgProps.isImg && value.imgProps.isShape ||
value.imgProps.isShape && value.imgProps.isChart);
if (onlyCommonProps)
if (onlyCommonProps) {
menuImageAdvanced.setCaption(me.advancedText, true);
else {
menuImageAdvanced.setIconCls('menu__icon btn-menu-image');
} else {
menuImageAdvanced.setCaption((value.imgProps.isImg) ? me.imageText : ((value.imgProps.isChart) ? me.chartText : me.shapeText), true);
menuImageAdvanced.setIconCls('menu__icon ' + (value.imgProps.isImg ? 'btn-menu-image' : (value.imgProps.isChart ? 'btn-menu-chart' : 'btn-menu-shape')));
}
menuChartEdit.setVisible(!_.isNull(value.imgProps.value.get_ChartProperties()) && !onlyCommonProps);
@ -2672,6 +2710,7 @@ define([
}).on('click', _.bind(me.onInsertCaption, me));
var mnuTableMerge = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-merge',
caption : me.mergeCellsText
}).on('click', function(item) {
if (me.api)
@ -2706,27 +2745,35 @@ define([
};
var menuTableCellAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.cellAlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuTableCellTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
toggleGroup : 'popuptablecellalign',
checkmark : false,
checkable : true,
checked : false,
valign : Asc.c_oAscVertAlignJc.Top
}).on('click', _.bind(tableCellsVAlign, me)),
me.menuTableCellCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
toggleGroup : 'popuptablecellalign',
checkmark : false,
checkable : true,
checked : false,
valign : Asc.c_oAscVertAlignJc.Center
}).on('click', _.bind(tableCellsVAlign, me)),
me.menuTableCellBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
toggleGroup : 'popuptablecellalign',
checkmark : false,
checkable : true,
checked : false,
valign : Asc.c_oAscVertAlignJc.Bottom
@ -2736,10 +2783,12 @@ define([
});
var menuTableAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-table',
caption : me.advancedTableText
}).on('click', _.bind(me.advancedTableClick, me));
var menuParagraphAdvancedInTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paragraph',
caption : me.advancedParagraphText
}).on('click', _.bind(me.advancedParagraphClick, me));
@ -2759,8 +2808,10 @@ define([
});
var menuHyperlinkTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.hyperlinkText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
menuEditHyperlinkTable,
@ -2782,6 +2833,7 @@ define([
var menuTableControl = new Common.UI.MenuItem({
caption: me.textContentControls,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
menuTableRemoveControl,
@ -2793,6 +2845,7 @@ define([
var menuTableTOC = new Common.UI.MenuItem({
caption : me.textTOC,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -2816,11 +2869,13 @@ define([
/** coauthoring begin **/
var menuAddCommentTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
caption : me.addCommentText
}).on('click', _.bind(me.addComment, me));
/** coauthoring end **/
var menuAddHyperlinkTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.hyperlinkText
}).on('click', _.bind(me.addHyperlink, me));
@ -2836,6 +2891,7 @@ define([
me.menuSpellMoreTable = new Common.UI.MenuItem({
caption : me.moreText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
restoreHeight: true,
items : [
@ -2851,6 +2907,7 @@ define([
].join(''));
me.langTableMenu = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-ic-doclang',
caption : me.langText,
menu : new Common.UI.MenuSimple({
cls: 'lang-menu',
@ -2896,8 +2953,10 @@ define([
});
me.menuSpellCheckTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-ic-docspell',
caption : me.spellcheckText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuSpellTable,
@ -2913,21 +2972,25 @@ define([
});
var menuTableCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.textCopy,
value : 'copy'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuTablePaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.textPaste,
value : 'paste'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuTableCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.textCut,
value : 'cut'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuTablePrint = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-print',
caption : me.txtPrintSelection
}).on('click', _.bind(me.onPrintSelection, me));
@ -2961,9 +3024,10 @@ define([
};
var menuTableDirection = new Common.UI.MenuItem({
iconCls: 'menu__icon text-orient-hor',
caption : me.directionText,
menu : new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuTableDirectH = new Common.UI.MenuItem({
@ -3012,6 +3076,7 @@ define([
var menuNumberingTable = new Common.UI.MenuItem({
caption : me.bulletsText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
menuTableStartNewList,
@ -3033,6 +3098,7 @@ define([
});
this.tableMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function(value){
// table properties
if (_.isUndefined(value.tableProps))
@ -3045,11 +3111,37 @@ define([
}
var align = value.tableProps.value.get_CellsVAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVertAlignJc.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVertAlignJc.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVertAlignJc.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
menuTableCellAlign.setIconCls(cls);
me.menuTableCellTop.setChecked(align == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
var dir = value.tableProps.value.get_CellsTextDirection();
cls = '';
switch (dir) {
case Asc.c_oAscCellTextDirection.LRTB:
cls = 'menu__icon text-orient-hor';
break;
case Asc.c_oAscCellTextDirection.TBRL:
cls = 'menu__icon text-orient-rdown';
break;
case Asc.c_oAscCellTextDirection.BTLR:
cls = 'menu__icon btn-align-rup';
break;
}
menuTableDirection.setIconCls(cls);
me.menuTableDirectH.setChecked(dir == Asc.c_oAscCellTextDirection.LRTB);
me.menuTableDirect90.setChecked(dir == Asc.c_oAscCellTextDirection.TBRL);
me.menuTableDirect270.setChecked(dir == Asc.c_oAscCellTextDirection.BTLR);
@ -3067,7 +3159,6 @@ define([
menuTableDistCols.setDisabled(disabled);
menuTableCellAlign.setDisabled(disabled);
menuTableDirection.setDisabled(disabled);
menuTableAdvanced.setDisabled(disabled);
var cancopy = me.api && me.api.can_CopyCut();
@ -3204,6 +3295,7 @@ define([
{
caption : me.selectText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
style : 'width: 100px',
items : [
@ -3235,8 +3327,10 @@ define([
})
},
{
iconCls: 'menu__icon btn-addcell',
caption : me.insertText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
style : 'width: 100px',
items : [
@ -3273,8 +3367,10 @@ define([
})
},
{
iconCls: 'menu__icon btn-delcell',
caption : me.deleteText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
style : 'width: 100px',
items : [
@ -3365,26 +3461,34 @@ define([
};
var menuParagraphVAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.vertAlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuParagraphTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
checkmark : false,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphvalign',
valign : Asc.c_oAscVAlign.Top
}).on('click', _.bind(paragraphVAlign, me)),
me.menuParagraphCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
checkmark : false,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphvalign',
valign : Asc.c_oAscVAlign.Center
}).on('click', _.bind(paragraphVAlign, me)),
me.menuParagraphBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
checkmark : false,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphvalign',
@ -3403,9 +3507,10 @@ define([
};
var menuParagraphDirection = new Common.UI.MenuItem({
iconCls: 'menu__icon text-orient-hor',
caption : me.directionText,
menu : new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuParagraphDirectH = new Common.UI.MenuItem({
@ -3440,6 +3545,7 @@ define([
});
var menuParagraphAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paragraph',
caption : me.advancedParagraphText
}).on('click', _.bind(me.advancedParagraphClick, me));
@ -3453,6 +3559,7 @@ define([
});
var menuAddCommentPara = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
caption : me.addCommentText
}).on('click', _.bind(me.addComment, me));
/** coauthoring end **/
@ -3462,6 +3569,7 @@ define([
});
var menuAddHyperlinkPara = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.hyperlinkText
}).on('click', _.bind(me.addHyperlink, me));
@ -3477,8 +3585,10 @@ define([
});
var menuHyperlinkPara = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.hyperlinkText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
menuEditHyperlinkPara,
@ -3491,6 +3601,7 @@ define([
var menuStyle = new Common.UI.MenuItem({
caption: me.styleText,
menu: new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
me.menuStyleSave = new Common.UI.MenuItem({
@ -3511,6 +3622,7 @@ define([
me.menuSpellMorePara = new Common.UI.MenuItem({
caption : me.moreText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
restoreHeight: true,
items: []
@ -3518,6 +3630,7 @@ define([
});
me.langParaMenu = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-ic-doclang',
caption : me.langText,
menu : new Common.UI.MenuSimple({
cls: 'lang-menu',
@ -3559,21 +3672,25 @@ define([
});
var menuParaCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.textCopy,
value : 'copy'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuParaPaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.textPaste,
value : 'paste'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuParaCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.textCut,
value : 'cut'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuParaPrint = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-print',
caption : me.txtPrintSelection
}).on('click', _.bind(me.onPrintSelection, me));
@ -3606,6 +3723,7 @@ define([
var menuParaTOCRefresh = new Common.UI.MenuItem({
caption : me.textUpdateTOC,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -3663,6 +3781,7 @@ define([
});
this.textMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function(value){
var isInShape = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ShapeProperties()));
var isInChart = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ChartProperties()));
@ -3672,11 +3791,37 @@ define([
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if ( isInShape || isInChart ) {
var align = value.imgProps.value.get_VerticalTextAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVAlign.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVAlign.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVAlign.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
menuParagraphVAlign.setIconCls(cls);
me.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
var dir = value.imgProps.value.get_Vert();
cls = '';
switch (dir) {
case Asc.c_oAscVertDrawingText.normal:
cls = 'menu__icon text-orient-hor';
break;
case Asc.c_oAscVertDrawingText.vert:
cls = 'menu__icon text-orient-rdown';
break;
case Asc.c_oAscVertDrawingText.vert270:
cls = 'menu__icon btn-align-rup';
break;
}
menuParagraphDirection.setIconCls(cls);
me.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
@ -3896,6 +4041,7 @@ define([
});
this.hdrMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function(value){
menuEditHeaderFooter.setCaption(value.Header ? me.editHeaderText : me.editFooterText, true);
menuEditHeaderFooter.off('click').on('click', function(item) {

View file

@ -195,7 +195,7 @@ define([
btn.updateHint( me.tipContents );
var _menu = new Common.UI.Menu({
cls: 'toc-menu',
cls: 'toc-menu shifted-left',
items: [
{template: contentsTemplate, offsety: 0, value: 0},
{template: contentsTemplate, offsety: 72, value: 1},
@ -208,7 +208,7 @@ define([
});
me.contentsMenu = new Common.UI.Menu({
cls: 'toc-menu',
cls: 'toc-menu shifted-left',
items: [
{template: contentsTemplate, offsety: 0, value: 0},
{template: contentsTemplate, offsety: 72, value: 1},

View file

@ -1419,7 +1419,7 @@ define([
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-add-breakpoint',
disabled: this._locked,
hint: this.tipAddGradientPoint,
hint: this.tipAddGradientPoint
});
this.btnAddGradientStep.on('click', _.bind(this.onAddGradientStep, this));
this.lockedControls.push(this.btnAddGradientStep);

View file

@ -260,15 +260,16 @@ define([
iconCls: 'toolbar__icon btn-fontcolor',
split: true,
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [
{
id: 'id-toolbar-menu-auto-fontcolor',
caption: this.textAutoColor,
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 -7px; background-color: #000;"></span><%= caption %></a>')
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 1px; background-color: #000;"></span><%= caption %></a>')
},
{caption: '--'},
{template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>')},
{template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + this.textNewColor + '</a>')}
{template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="">' + this.textNewColor + '</a>')}
]
})
});
@ -436,6 +437,7 @@ define([
iconCls: 'toolbar__icon btn-inserttable',
caption: me.capBtnInsTable,
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
{caption: this.mniCustomTable, value: 'custom'},
@ -565,7 +567,7 @@ define([
iconCls: 'toolbar__icon btn-dropcap',
caption: me.capBtnInsDropcap,
menu: new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
items: [
{
caption: this.textNone,
@ -605,16 +607,16 @@ define([
iconCls: 'toolbar__icon btn-controls',
caption: me.capBtnInsControls,
menu: new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
items: [
{
caption: this.textPlainControl,
// iconCls: 'menu__icon cc-plaintext',
iconCls: 'menu__icon cc-plaintext',
value: 'plain'
},
{
caption: this.textRichControl,
// iconCls: 'menu__icon cc-richtext',
iconCls: 'menu__icon cc-richtext',
value: 'rich'
},
{
@ -670,7 +672,7 @@ define([
{caption: '--'},
{
caption: this.textRemoveControl,
// iconCls: 'menu__icon cc-remove',
iconCls: 'menu__icon cc-remove',
value: 'remove'
},
{caption: '--'},
@ -706,7 +708,7 @@ define([
iconCls: 'toolbar__icon btn-columns',
caption: me.capBtnColumns,
menu: new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
items: [
{
caption: this.textColumnsOne,
@ -992,6 +994,7 @@ define([
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-colorschemas',
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [],
restoreHeight: true
})
@ -1467,6 +1470,7 @@ define([
});
me.btnImgAlign.setMenu(new Common.UI.Menu({
cls: 'shifted-right',
items: [{
caption : _holder_view.textShapeAlignLeft,
iconCls : 'menu__icon shape-align-left',
@ -1645,9 +1649,10 @@ define([
this.btnMarkers.setMenu(
new Common.UI.Menu({
cls: 'shifted-left',
style: 'min-width: 139px',
items: [
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 139px; margin: 0 16px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 139px; margin: 0 9px;"></div>')},
this.mnuMarkerSettings = new Common.UI.MenuItem({
caption: this.textListSettings,
disabled: (this.mnuMarkersPicker.conf.index || 0)==0,
@ -1659,8 +1664,9 @@ define([
this.btnNumbers.setMenu(
new Common.UI.Menu({
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 185px; margin: 0 16px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 185px; margin: 0 9px;"></div>')},
this.mnuNumberSettings = new Common.UI.MenuItem({
caption: this.textListSettings,
disabled: (this.mnuNumbersPicker.conf.index || 0)==0,
@ -1672,9 +1678,10 @@ define([
this.btnMultilevels.setMenu(
new Common.UI.Menu({
cls: 'shifted-left',
style: 'min-width: 90px',
items: [
{template: _.template('<div id="id-toolbar-menu-multilevels" class="menu-markers" style="width: 93px; margin: 0 16px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-multilevels" class="menu-markers" style="width: 93px; margin: 0 9px;"></div>')},
this.mnuMultilevelSettings = new Common.UI.MenuItem({
caption: this.textListSettings,
disabled: (this.mnuMultilevelPicker.conf.index || 0)==0,
@ -1694,7 +1701,9 @@ define([
caption: this.textInsertPageNumber,
disabled: this.mnuInsertPageNum.isDisabled(),
menu: new Common.UI.Menu({
cls: 'shifted-left',
menuAlign: 'tl-tr',
style: 'min-width: 90px;',
items: [
{template: _.template('<div id="id-toolbar-menu-pageposition" class="menu-pageposition"></div>')},
this.mnuPageNumCurrentPos = new Common.UI.MenuItem({
@ -1997,6 +2006,7 @@ define([
if (this.mnuColorSchema == null) {
this.mnuColorSchema = new Common.UI.Menu({
cls: 'shifted-left',
restoreHeight: true
});
}

View file

@ -329,15 +329,16 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
iconCls : 'toolbar__icon btn-fontcolor',
hint : this.textColor,
menu : new Common.UI.Menu({
cls: 'shifted-left',
items: [
{
id: 'watermark-auto-color',
caption: this.textAuto,
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 -7px; background-color: #000;"></span><%= caption %></a>')
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 1px; background-color: #000;"></span><%= caption %></a>')
},
{caption: '--'},
{ template: _.template('<div id="watermark-menu-textcolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="watermark-menu-textcolor-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
{ template: _.template('<a id="watermark-menu-textcolor-new">' + this.textNewColor + '</a>') }
]
})
});

View file

@ -117,7 +117,7 @@
.dataview {
width: 125px;
height: 85px;
margin: 0 auto;
margin: 0 10px;
&.disabled {
> .item {

View file

@ -821,6 +821,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -991,6 +992,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1018,6 +1020,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1037,6 +1040,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1066,6 +1070,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1118,6 +1123,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -1774,11 +1780,13 @@ define([
var me = this;
var menuViewCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption: me.textCopy,
value: 'copy'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuViewUndo = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-undo',
caption: me.textUndo
}).on('click', function () {
me.api.Undo();
@ -1789,10 +1797,12 @@ define([
});
var menuViewAddComment = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
caption: me.addCommentText
}).on('click', _.bind(me.addComment, me));
this.viewModeMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function (value) {
menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled);
menuViewUndo.setDisabled(!me.api.asc_getCanUndo() && !me._isDisabled);
@ -1817,6 +1827,7 @@ define([
});
var mnuPreview = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-preview',
caption : me.txtPreview
}).on('click', function(item) {
var current = me.api.getCurrentPage();
@ -1835,6 +1846,7 @@ define([
});
var mnuPrintSelection = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-print',
caption : me.txtPrintSelection
}).on('click', function(item){
if (me.api){
@ -1849,6 +1861,7 @@ define([
});
this.viewModeMenuSlide = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function (value) {
mnuSelectAll.setDisabled(me.slidesCount<2);
mnuPrintSelection.setVisible(me.mode.canPrint && value.fromThumbs===true);
@ -1888,6 +1901,7 @@ define([
});
var mnuChangeSlide = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-changeslide',
caption : me.txtChangeLayout,
menu : new Common.UI.Menu({
menuAlign: 'tl-tr',
@ -1919,6 +1933,7 @@ define([
});
var mnuPreview = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-preview',
caption : me.txtPreview
}).on('click', function(item) {
var current = me.api.getCurrentPage();
@ -1937,6 +1952,7 @@ define([
});
var mnuPrintSelection = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-print',
caption : me.txtPrintSelection
}).on('click', function(item){
if (me.api){
@ -1951,11 +1967,13 @@ define([
});
var menuSlidePaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.textPaste,
value : 'paste'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuSlideSettings = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-slide',
caption : me.textSlideSettings,
value : null
}).on('click', function(item){
@ -1976,6 +1994,7 @@ define([
});
me.slideMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function(value) {
menuSlidePaste.setVisible(value.fromThumbs!==true);
me.slideMenu.items[1].setVisible(value.fromThumbs===true); // New Slide
@ -2142,6 +2161,7 @@ define([
});
var mnuTableMerge = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-merge',
caption : me.mergeCellsText
}).on('click', function(item) {
if (me.api)
@ -2168,6 +2188,7 @@ define([
});
var menuTableCellAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.cellAlignText,
menu : (function(){
function onItemClick(item, e) {
@ -2182,23 +2203,30 @@ define([
}
return new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
me.menuTableCellTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
value : Asc.c_oAscVertAlignJc.Top
}).on('click', _.bind(onItemClick, me)),
me.menuTableCellCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
value : Asc.c_oAscVertAlignJc.Center
}).on('click', _.bind(onItemClick, me)),
me.menuTableCellBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
value : Asc.c_oAscVertAlignJc.Bottom
}).on('click', _.bind(onItemClick, me))
@ -2231,6 +2259,7 @@ define([
me.menuSpellMoreTable = new Common.UI.MenuItem({
caption : me.moreText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
restoreHeight: true,
items : []
@ -2245,6 +2274,7 @@ define([
].join(''));
me.langTableMenu = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-ic-doclang',
caption : me.langText,
menu : new Common.UI.MenuSimple({
cls: 'lang-menu',
@ -2290,8 +2320,10 @@ define([
});
me.menuSpellCheckTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-ic-docspell',
caption : me.spellcheckText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuSpellTable,
@ -2314,6 +2346,7 @@ define([
me.menuSpellMorePara = new Common.UI.MenuItem({
caption : me.moreText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
restoreHeight: true,
items: []
@ -2321,6 +2354,7 @@ define([
});
me.langParaMenu = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-ic-doclang',
caption : me.langText,
menu : new Common.UI.MenuSimple({
cls: 'lang-menu',
@ -2362,6 +2396,7 @@ define([
});
var menuTableAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-table',
caption : me.advancedTableText
}).on('click', function(item) {
if (me.api) {
@ -2395,6 +2430,7 @@ define([
});
var menuImageAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-image',
caption : me.advancedImageText
}).on('click', function(item) {
if (me.api){
@ -2437,6 +2473,7 @@ define([
});
var menuShapeAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-shape',
caption : me.advancedShapeText
}).on('click', function(item) {
if (me.api){
@ -2468,6 +2505,7 @@ define([
});
var menuParagraphAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paragraph',
caption : me.advancedParagraphText
}).on('click', function(item) {
if (me.api){
@ -2506,6 +2544,7 @@ define([
});
var menuAddHyperlinkPara = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.hyperlinkText
}).on('click', _.bind(me.addHyperlink, me));
@ -2525,8 +2564,10 @@ define([
});
var menuHyperlinkPara = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.hyperlinkText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
menuEditHyperlinkPara,
@ -2536,6 +2577,7 @@ define([
});
var menuAddHyperlinkTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.hyperlinkText
}).on('click', _.bind(me.addHyperlink, me));
@ -2555,8 +2597,10 @@ define([
});
var menuHyperlinkTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.hyperlinkText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
menuEditHyperlinkTable,
@ -2596,6 +2640,7 @@ define([
var menuImgShapeArrange = new Common.UI.MenuItem({
caption : me.txtArrange,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2671,6 +2716,7 @@ define([
}
return new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2720,10 +2766,12 @@ define([
});
var menuChartEdit = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-chart',
caption : me.editChartText
}).on('click', _.bind(me.editChartClick, me, undefined));
var menuParagraphVAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.vertAlignText,
menu : (function(){
function onItemClick(item) {
@ -2739,23 +2787,30 @@ define([
}
return new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
me.menuParagraphTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Top
}).on('click', _.bind(onItemClick, me)),
me.menuParagraphCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Center
}).on('click', _.bind(onItemClick, me)),
me.menuParagraphBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Bottom
}).on('click', _.bind(onItemClick, me))
@ -2775,8 +2830,10 @@ define([
};
var menuParagraphDirection = new Common.UI.MenuItem({
iconCls: 'menu__icon text-orient-hor',
caption : me.directionText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuParagraphDirectH = new Common.UI.MenuItem({
@ -2837,6 +2894,7 @@ define([
var menuImgReplace = new Common.UI.MenuItem({
caption : me.textReplace,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2878,22 +2936,27 @@ define([
var menuImgShapeRotate = new Common.UI.MenuItem({
caption : me.textRotate,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-rotate-90',
caption: me.textRotate90,
value : 1
}).on('click', _.bind(onImgRotate, me)),
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-rotate-270',
caption: me.textRotate270,
value : 0
}).on('click', _.bind(onImgRotate, me)),
{ caption: '--' },
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-flip-hor',
caption: me.textFlipH,
value : 1
}).on('click', _.bind(onImgFlip, me)),
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-flip-vert',
caption: me.textFlipV,
value : 0
}).on('click', _.bind(onImgFlip, me))
@ -2915,6 +2978,7 @@ define([
me.menuImgCrop = new Common.UI.MenuItem({
caption : me.textCrop,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -2937,11 +3001,13 @@ define([
/** coauthoring begin **/
var menuAddCommentPara = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
caption : me.addCommentText
}).on('click', _.bind(me.addComment, me));
menuAddCommentPara.hide();
var menuAddCommentTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
caption : me.addCommentText
}).on('click', _.bind(me.addComment, me));
menuAddCommentTable.hide();
@ -2952,6 +3018,7 @@ define([
menuCommentSeparatorImg.hide();
var menuAddCommentImg = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
caption : me.addCommentText
}).on('click', _.bind(me.addComment, me));
menuAddCommentImg.hide();
@ -2962,46 +3029,55 @@ define([
}).on('click', _.bind(me.addToLayout, me));
var menuParaCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.textCopy,
value : 'copy'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuParaPaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.textPaste,
value : 'paste'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuParaCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.textCut,
value : 'cut'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuImgCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.textCopy,
value : 'copy'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuImgPaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.textPaste,
value : 'paste'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuImgCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.textCut,
value : 'cut'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuTableCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.textCopy,
value : 'copy'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuTablePaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.textPaste,
value : 'paste'
}).on('click', _.bind(me.onCutCopyPaste, me));
var menuTableCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.textCut,
value : 'cut'
}).on('click', _.bind(me.onCutCopyPaste, me));
@ -3019,6 +3095,7 @@ define([
}).on('click', _.bind(me.addToLayout, me));
me.textMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function(value){
var isInShape = (value.shapeProps && !_.isNull(value.shapeProps.value));
var isInChart = (value.chartProps && !_.isNull(value.chartProps.value));
@ -3033,14 +3110,43 @@ define([
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if (isInShape || isInChart) {
var align = value.shapeProps.value.get_VerticalTextAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVAlign.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVAlign.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVAlign.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
menuParagraphVAlign.setIconCls(cls);
me.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
var dir = value.shapeProps.value.get_Vert();
cls = '';
switch (dir) {
case Asc.c_oAscVertDrawingText.normal:
cls = 'menu__icon text-orient-hor';
break;
case Asc.c_oAscVertDrawingText.vert:
cls = 'menu__icon text-orient-rdown';
break;
case Asc.c_oAscVertDrawingText.vert270:
cls = 'menu__icon btn-align-rup';
break;
}
menuParagraphDirection.setIconCls(cls);
me.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
} else {
menuParagraphVAlign.setIconCls('');
menuParagraphDirection.setIconCls('');
}
menuParagraphVAlign.setDisabled(disabled);
menuParagraphDirection.setDisabled(disabled);
@ -3144,6 +3250,7 @@ define([
});
me.tableMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function(value){
// table properties
if (_.isUndefined(value.tableProps))
@ -3156,9 +3263,23 @@ define([
var disabled = (value.slideProps!==undefined && value.slideProps.locked);
me.menuTableCellTop.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Bottom);
var align = value.tableProps.value.get_CellsVAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVertAlignJc.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVertAlignJc.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVertAlignJc.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
menuTableCellAlign.setIconCls(cls);
me.menuTableCellTop.setChecked(align == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
if (me.api) {
mnuTableMerge.setDisabled(value.tableProps.locked || disabled || !me.api.CheckBeforeMergeCells());
@ -3240,6 +3361,7 @@ define([
new Common.UI.MenuItem({
caption : me.selectText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -3258,8 +3380,10 @@ define([
})
}),
{
iconCls: 'menu__icon btn-addcell',
caption : me.insertText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
style : 'width: 100px',
items : [
@ -3291,8 +3415,10 @@ define([
})
},
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-delcell',
caption : me.deleteText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -3337,6 +3463,7 @@ define([
});
me.pictureMenu = new Common.UI.Menu({
cls: 'shifted-right',
initMenu: function(value){
if (me.api) {
mnuUnGroupImg.setDisabled(!me.api.canUnGroup());
@ -3576,6 +3703,7 @@ define([
if (!menu) {
this.placeholderMenuTable = menu = new Common.UI.Menu({
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-placeholder-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
{caption: me.mniCustomTable, value: 'custom'}

View file

@ -324,6 +324,7 @@ define([
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
split: true,
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>')},
{template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + me.textNewColor + '</a>')}
@ -521,6 +522,7 @@ define([
caption: me.capInsertTable,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
{caption: me.mniCustomTable, value: 'custom'}
@ -636,6 +638,7 @@ define([
iconCls: 'toolbar__icon btn-colorschemas',
lock: [_set.themeLock, _set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [],
restoreHeight: true
})
@ -676,6 +679,7 @@ define([
iconCls: 'toolbar__icon shape-align-left',
lock: [_set.slideDeleted, _set.shapeLock, _set.lostConnect, _set.noSlides, _set.noObjectSelected, _set.disableOnStart],
menu: new Common.UI.Menu({
cls: 'shifted-right',
items: [
{
caption: me.textShapeAlignLeft,
@ -1106,9 +1110,10 @@ define([
this.btnMarkers.setMenu(
new Common.UI.Menu({
cls: 'shifted-left',
style: 'min-width: 139px',
items: [
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 139px; margin: 0 16px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 139px; margin: 0 9px;"></div>')},
this.mnuMarkerSettings = new Common.UI.MenuItem({
caption: this.textListSettings,
value: 'settings'
@ -1119,8 +1124,9 @@ define([
this.btnNumbers.setMenu(
new Common.UI.Menu({
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 185px; margin: 0 16px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 185px; margin: 0 9px;"></div>')},
this.mnuNumberSettings = new Common.UI.MenuItem({
caption: this.textListSettings,
value: 'settings'
@ -1296,6 +1302,7 @@ define([
if (mnuColorSchema == null) {
mnuColorSchema = new Common.UI.Menu({
cls: 'shifted-left',
restoreHeight: true
});
}

View file

@ -1701,7 +1701,7 @@ define([
documentHolder.mnuChartEdit.chartInfo = elValue;
ischartmenu = true;
has_chartprops = true;
} if ( elValue.asc_getSlicerProperties() ) {
} else if ( elValue.asc_getSlicerProperties() ) {
documentHolder.mnuSlicerAdvanced.imageInfo = elValue;
isslicermenu = true;
} else {
@ -1778,10 +1778,36 @@ define([
direct = value.asc_getVert(),
listtype = this.api.asc_getCurrentListType();
isObjLocked = isObjLocked || value.asc_getLocked();
var cls = '';
switch (align) {
case Asc.c_oAscVAlign.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVAlign.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVAlign.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
documentHolder.menuParagraphVAlign.setIconCls(cls);
documentHolder.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
documentHolder.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
documentHolder.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
cls = '';
switch (direct) {
case Asc.c_oAscVertDrawingText.normal:
cls = 'menu__icon text-orient-hor';
break;
case Asc.c_oAscVertDrawingText.vert:
cls = 'menu__icon text-orient-rdown';
break;
case Asc.c_oAscVertDrawingText.vert270:
cls = 'menu__icon btn-align-rup';
break;
}
documentHolder.menuParagraphDirection.setIconCls(cls);
documentHolder.menuParagraphDirectH.setChecked(direct == Asc.c_oAscVertDrawingText.normal);
documentHolder.menuParagraphDirect90.setChecked(direct == Asc.c_oAscVertDrawingText.vert);
documentHolder.menuParagraphDirect270.setChecked(direct == Asc.c_oAscVertDrawingText.vert270);
@ -2726,6 +2752,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -2896,6 +2923,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -2923,6 +2951,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -2942,6 +2971,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -2971,6 +3001,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{
@ -3023,6 +3054,7 @@ define([
equation : true,
disabled : me._currentParaObjDisabled,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{

View file

@ -90,11 +90,13 @@ define([
var me = this;
me.menuViewCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption: me.txtCopy,
value: 'copy'
});
me.menuViewUndo = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-undo',
caption: me.textUndo
});
@ -103,6 +105,7 @@ define([
});
me.menuViewAddComment = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
id: 'id-context-menu-item-view-add-comment',
caption: me.txtAddComment
});
@ -114,6 +117,7 @@ define([
me.menuViewSignSeparator = new Common.UI.MenuItem({caption: '--' });
this.viewModeMenu = new Common.UI.Menu({
cls: 'shifted-right',
items: [
me.menuViewCopy,
me.menuViewUndo,
@ -134,16 +138,19 @@ define([
var me = this;
me.pmiCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.txtCut,
value : 'cut'
});
me.pmiCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.txtCopy,
value : 'copy'
});
me.pmiPaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.txtPaste,
value : 'paste'
});
@ -151,6 +158,7 @@ define([
me.pmiSelectTable = new Common.UI.MenuItem({
caption : me.txtSelect,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
{ caption: this.selectRowText, value: Asc.c_oAscChangeSelectionFormatTable.row},
@ -166,8 +174,10 @@ define([
});
me.pmiInsertCells = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-addcell',
caption : me.txtInsert,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
{
@ -188,8 +198,10 @@ define([
});
me.pmiInsertTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-addcell',
caption : me.txtInsert,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
{ caption: me.insertRowAboveText, value: Asc.c_oAscInsertOptions.InsertTableRowAbove},
@ -205,8 +217,10 @@ define([
});
me.pmiDeleteCells = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-delcell',
caption : me.txtDelete,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
{
@ -227,8 +241,10 @@ define([
});
me.pmiDeleteTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-delcell',
caption : me.txtDelete,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
{ caption: this.deleteRowText, value: Asc.c_oAscDeleteOptions.DeleteRows},
@ -239,8 +255,10 @@ define([
});
me.pmiClear = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-clearstyle',
caption : me.txtClear,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
{
@ -270,12 +288,15 @@ define([
me.pmiSortCells = new Common.UI.MenuItem({
caption : me.txtSort,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
{
iconCls: 'menu__icon btn-sort-down',
caption : me.txtAscending,
value : Asc.c_oAscSortOptions.Ascending
},{
iconCls: 'menu__icon btn-sort-up',
caption : me.txtDescending,
value : Asc.c_oAscSortOptions.Descending
},{
@ -290,8 +311,10 @@ define([
});
me.pmiFilterCells = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-autofilter',
caption : me.txtFilter,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
{
@ -313,10 +336,12 @@ define([
});
me.pmiInsFunction = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-function',
caption : me.txtFormula
});
me.menuAddHyperlink = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.txtInsHyperlink,
inCell : true
});
@ -331,8 +356,10 @@ define([
});
me.menuHyperlink = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.txtInsHyperlink,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuEditHyperlink,
@ -344,6 +371,7 @@ define([
me.pmiRowHeight = new Common.UI.MenuItem({
caption : me.txtRowHeight,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{ caption: me.txtAutoRowHeight, value: 'auto-row-height' },
@ -355,6 +383,7 @@ define([
me.pmiColumnWidth = new Common.UI.MenuItem({
caption : me.txtColumnWidth,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{ caption: me.txtAutoColumnWidth, value: 'auto-column-width' },
@ -372,6 +401,7 @@ define([
});
me.pmiAddComment = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-comments',
id : 'id-context-menu-item-add-comment',
caption : me.txtAddComment
});
@ -396,6 +426,7 @@ define([
me.pmiSparklines = new Common.UI.MenuItem({
caption : me.txtSparklines,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{ caption: me.txtClearSparklines, value: Asc.c_oAscCleanOptions.Sparklines },
@ -413,6 +444,7 @@ define([
me.pmiNumFormat = new Common.UI.MenuItem({
caption: me.txtNumFormat,
menu: new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
{
@ -505,6 +537,7 @@ define([
});
me.ssMenu = new Common.UI.Menu({
cls: 'shifted-right',
id : 'id-context-menu-cell',
items : [
me.pmiCut,
@ -560,10 +593,12 @@ define([
});
me.mnuShapeAdvanced = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-menu-shape',
caption : me.advancedShapeText
});
me.mnuImgAdvanced = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-menu-image',
caption : me.advancedImgText
});
@ -572,24 +607,29 @@ define([
});
me.mnuSlicerAdvanced = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-slicer',
caption : me.advancedSlicerText
});
me.mnuChartEdit = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-menu-chart',
caption : me.chartText
});
me.pmiImgCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.txtCut,
value : 'cut'
});
me.pmiImgCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.txtCopy,
value : 'copy'
});
me.pmiImgPaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.txtPaste,
value : 'paste'
});
@ -605,6 +645,7 @@ define([
me.menuImgReplace = new Common.UI.MenuItem({
caption : me.textReplace,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({caption : this.textFromFile, value: 'file'}),
@ -617,6 +658,7 @@ define([
me.menuImgCrop = new Common.UI.MenuItem({
caption : me.textCrop,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
@ -665,6 +707,7 @@ define([
me.menuImageArrange = new Common.UI.MenuItem({
caption : me.textArrange,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
me.mnuBringToFront,
@ -681,6 +724,7 @@ define([
me.menuImageAlign = new Common.UI.MenuItem({
caption : me.textAlign,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [{
caption : me.textShapeAlignLeft,
@ -724,25 +768,30 @@ define([
me.menuImgRotate = new Common.UI.MenuItem({
caption : me.textRotate,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-rotate-90',
caption: me.textRotate90,
type : 'rotate',
value : 1
}),
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-rotate-270',
caption: me.textRotate270,
type : 'rotate',
value : 0
}),
{ caption: '--' },
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-flip-hor',
caption: me.textFlipH,
type : 'flip',
value : 1
}),
new Common.UI.MenuItem({
iconCls: 'menu__icon btn-flip-vert',
caption: me.textFlipV,
type : 'flip',
value : 0
@ -752,6 +801,7 @@ define([
});
this.imgMenu = new Common.UI.Menu({
cls: 'shifted-right',
items: [
me.pmiImgCut,
me.pmiImgCopy,
@ -776,25 +826,33 @@ define([
});
this.menuParagraphVAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : this.vertAlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
me.menuParagraphTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.topCellText,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Top
}),
me.menuParagraphCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.centerCellText,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Center
}),
this.menuParagraphBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.bottomCellText,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Bottom
})
@ -803,8 +861,10 @@ define([
});
me.menuParagraphDirection = new Common.UI.MenuItem({
iconCls: 'menu__icon text-orient-hor',
caption : me.directionText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuParagraphDirectH = new Common.UI.MenuItem({
@ -839,8 +899,10 @@ define([
});
me.menuParagraphBullets = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-setmarkers',
caption : me.bulletsText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
{ template: _.template('<div id="id-docholder-menu-bullets" class="menu-layouts" style="width: 184px; margin: 0 4px;"></div>') },
@ -883,6 +945,7 @@ define([
};
me.menuAddHyperlinkShape = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.txtInsHyperlink
});
@ -895,8 +958,10 @@ define([
});
me.menuHyperlinkShape = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-inserthyperlink',
caption : me.txtInsHyperlink,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuEditHyperlinkShape,
@ -906,25 +971,30 @@ define([
});
this.pmiTextAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paragraph',
caption : me.txtTextAdvanced
});
me.pmiTextCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.txtCut,
value : 'cut'
});
me.pmiTextCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.txtCopy,
value : 'copy'
});
me.pmiTextPaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.txtPaste,
value : 'paste'
});
this.textInShapeMenu = new Common.UI.Menu({
cls: 'shifted-right',
items: [
me.pmiTextCut,
me.pmiTextCopy,
@ -941,21 +1011,25 @@ define([
});
me.pmiCommonCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.txtCut,
value : 'cut'
});
me.pmiCommonCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption : me.txtCopy,
value : 'copy'
});
me.pmiCommonPaste = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-paste',
caption : me.txtPaste,
value : 'paste'
});
this.copyPasteMenu = new Common.UI.Menu({
cls: 'shifted-right',
items: [
me.pmiCommonCut,
me.pmiCommonCopy,

View file

@ -1046,6 +1046,7 @@ define([
iconCls : 'toolbar__icon toolbar__icon btn-colorschemas',
lock : [_set.editCell, _set.lostConnect, _set.coAuth],
menu : new Common.UI.Menu({
cls: 'shifted-left',
items: [],
restoreHeight: true
})
@ -1985,6 +1986,7 @@ define([
if (this.mnuColorSchema == null) {
this.mnuColorSchema = new Common.UI.Menu({
cls: 'shifted-left',
restoreHeight: true
});
}

View file

@ -135,7 +135,8 @@ define([
rely: true,
resize: {
min: 19,
max: -100
max: -100,
multiply: { koeff: 18, offset: 2}
}
}, {
el: items[1],

View file

@ -83,6 +83,8 @@
min-height: 19px;
border: 0 none;
font-size: 12px;
line-height: 18px;
padding-bottom: 0;
&[disabled] {
color: @gray-darker;

View file

@ -4,7 +4,6 @@
"homepage": "http://www.onlyoffice.com",
"private": true,
"dependencies": {
"chai": "1.9.1",
"grunt": "^1.0.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^0.5.1",
@ -17,7 +16,6 @@
"grunt-contrib-uglify": "^4.0.1",
"grunt-inline": "0.3.4",
"grunt-json-minify": "^1.1.0",
"grunt-mocha": "^1.0.0",
"grunt-spritesmith": "^6.8.0",
"grunt-svgmin": "^6.0.0",
"grunt-text-replace": "0.3.11",
@ -25,7 +23,11 @@
"iconv-lite": "^0.5.1",
"less-plugin-clean-css": "1.5.0",
"lodash": "^4.0.0",
"mocha": "^6.2.2",
"vinyl-fs": "^3.0.3"
}
},
"devDependencies": {
"chai": "1.9.1",
"mocha": "^6.2.2",
"grunt-mocha": "^1.0.0"
}
}