Merge pull request #475 from ONLYOFFICE/feature/menu-icons
Feature/menu icons
|
@ -107,10 +107,11 @@ define([
|
||||||
var id = Common.UI.getId(),
|
var id = Common.UI.getId(),
|
||||||
menu = new Common.UI.Menu({
|
menu = new Common.UI.Menu({
|
||||||
id: id,
|
id: id,
|
||||||
|
cls: 'shifted-left',
|
||||||
additionalAlign: options.additionalAlign,
|
additionalAlign: options.additionalAlign,
|
||||||
items: (options.additionalItems ? options.additionalItems : []).concat([
|
items: (options.additionalItems ? options.additionalItems : []).concat([
|
||||||
{ template: _.template('<div id="' + id + '-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
{ 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;
|
return menu;
|
||||||
|
|
|
@ -238,6 +238,16 @@ define([
|
||||||
this.cmpEl.find('a').contents().last()[0].textContent = (noencoding) ? caption : Common.Utils.String.htmlEncode(caption);
|
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) {
|
setChecked: function(check, suppressEvent) {
|
||||||
this.toggle(check, suppressEvent);
|
this.toggle(check, suppressEvent);
|
||||||
},
|
},
|
||||||
|
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 135 B After Width: | Height: | Size: 135 B |
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 265 B |
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -132,7 +132,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
||||||
additionalItems: [{
|
additionalItems: [{
|
||||||
id: 'control-settings-system-color',
|
id: 'control-settings-system-color',
|
||||||
caption: this.textSystemColor,
|
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: '--'}],
|
{caption: '--'}],
|
||||||
additionalAlign: this.menuAddAlign,
|
additionalAlign: this.menuAddAlign,
|
||||||
|
|
|
@ -883,6 +883,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1053,6 +1054,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1080,6 +1082,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1099,6 +1102,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1128,6 +1132,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1180,6 +1185,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1986,11 +1992,13 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
var menuViewCopy = new Common.UI.MenuItem({
|
var menuViewCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption: me.textCopy,
|
caption: me.textCopy,
|
||||||
value: 'copy'
|
value: 'copy'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuViewUndo = new Common.UI.MenuItem({
|
var menuViewUndo = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-undo',
|
||||||
caption: me.textUndo
|
caption: me.textUndo
|
||||||
}).on('click', function () {
|
}).on('click', function () {
|
||||||
me.api.Undo();
|
me.api.Undo();
|
||||||
|
@ -2001,6 +2009,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuViewAddComment = new Common.UI.MenuItem({
|
var menuViewAddComment = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
caption: me.addCommentText
|
caption: me.addCommentText
|
||||||
}).on('click', _.bind(me.addComment, me));
|
}).on('click', _.bind(me.addComment, me));
|
||||||
|
|
||||||
|
@ -2011,10 +2020,12 @@ define([
|
||||||
var menuViewSignSeparator = new Common.UI.MenuItem({caption: '--' });
|
var menuViewSignSeparator = new Common.UI.MenuItem({caption: '--' });
|
||||||
|
|
||||||
var menuViewPrint = new Common.UI.MenuItem({
|
var menuViewPrint = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-print',
|
||||||
caption : me.txtPrintSelection
|
caption : me.txtPrintSelection
|
||||||
}).on('click', _.bind(me.onPrintSelection, me));
|
}).on('click', _.bind(me.onPrintSelection, me));
|
||||||
|
|
||||||
this.viewModeMenu = new Common.UI.Menu({
|
this.viewModeMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function (value) {
|
initMenu: function (value) {
|
||||||
var isInChart = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ChartProperties())),
|
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())),
|
isInShape = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ShapeProperties())),
|
||||||
|
@ -2118,7 +2129,7 @@ define([
|
||||||
me.fireEvent('editcomplete', me);
|
me.fireEvent('editcomplete', me);
|
||||||
}
|
}
|
||||||
return new Common.UI.Menu({
|
return new Common.UI.Menu({
|
||||||
cls: 'ppm-toolbar',
|
cls: 'ppm-toolbar shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2204,7 +2215,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Common.UI.Menu({
|
return new Common.UI.Menu({
|
||||||
cls: 'ppm-toolbar',
|
cls: 'ppm-toolbar shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2246,6 +2257,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.menuImageWrap = new Common.UI.MenuItem({
|
this.menuImageWrap = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon wrap-inline',
|
||||||
caption : me.textWrap,
|
caption : me.textWrap,
|
||||||
menu : (function(){
|
menu : (function(){
|
||||||
function onItemClick(item, e) {
|
function onItemClick(item, e) {
|
||||||
|
@ -2272,7 +2284,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Common.UI.Menu({
|
return new Common.UI.Menu({
|
||||||
cls: 'ppm-toolbar',
|
cls: 'ppm-toolbar shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2339,6 +2351,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuImageAdvanced = new Common.UI.MenuItem({
|
var menuImageAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-image',
|
||||||
caption : me.advancedText
|
caption : me.advancedText
|
||||||
}).on('click', function(item, e) {
|
}).on('click', function(item, e) {
|
||||||
var elType, elValue;
|
var elType, elValue;
|
||||||
|
@ -2405,6 +2418,7 @@ define([
|
||||||
var menuImgReplace = new Common.UI.MenuItem({
|
var menuImgReplace = new Common.UI.MenuItem({
|
||||||
caption : me.textReplace,
|
caption : me.textReplace,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2444,11 +2458,13 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuImgCopy = new Common.UI.MenuItem({
|
var menuImgCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.textCopy,
|
caption : me.textCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuImgPaste = new Common.UI.MenuItem({
|
var menuImgPaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.textPaste,
|
caption : me.textPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
@ -2459,6 +2475,7 @@ define([
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuImgPrint = new Common.UI.MenuItem({
|
var menuImgPrint = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-print',
|
||||||
caption : me.txtPrintSelection
|
caption : me.txtPrintSelection
|
||||||
}).on('click', _.bind(me.onPrintSelection, me));
|
}).on('click', _.bind(me.onPrintSelection, me));
|
||||||
|
|
||||||
|
@ -2469,22 +2486,27 @@ define([
|
||||||
var menuImgRotate = new Common.UI.MenuItem({
|
var menuImgRotate = new Common.UI.MenuItem({
|
||||||
caption : me.textRotate,
|
caption : me.textRotate,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-rotate-90',
|
||||||
caption: this.textRotate90,
|
caption: this.textRotate90,
|
||||||
value : 1
|
value : 1
|
||||||
}).on('click', _.bind(me.onImgRotate, me)),
|
}).on('click', _.bind(me.onImgRotate, me)),
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-rotate-270',
|
||||||
caption: this.textRotate270,
|
caption: this.textRotate270,
|
||||||
value : 0
|
value : 0
|
||||||
}).on('click', _.bind(me.onImgRotate, me)),
|
}).on('click', _.bind(me.onImgRotate, me)),
|
||||||
{ caption: '--' },
|
{ caption: '--' },
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-flip-hor',
|
||||||
caption: this.textFlipH,
|
caption: this.textFlipH,
|
||||||
value : 1
|
value : 1
|
||||||
}).on('click', _.bind(me.onImgFlip, me)),
|
}).on('click', _.bind(me.onImgFlip, me)),
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-flip-vert',
|
||||||
caption: this.textFlipV,
|
caption: this.textFlipV,
|
||||||
value : 0
|
value : 0
|
||||||
}).on('click', _.bind(me.onImgFlip, me))
|
}).on('click', _.bind(me.onImgFlip, me))
|
||||||
|
@ -2495,6 +2517,7 @@ define([
|
||||||
me.menuImgCrop = new Common.UI.MenuItem({
|
me.menuImgCrop = new Common.UI.MenuItem({
|
||||||
caption : me.textCrop,
|
caption : me.textCrop,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2516,6 +2539,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.pictureMenu = new Common.UI.Menu({
|
this.pictureMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
if (_.isUndefined(value.imgProps))
|
if (_.isUndefined(value.imgProps))
|
||||||
return;
|
return;
|
||||||
|
@ -2525,50 +2549,63 @@ define([
|
||||||
|
|
||||||
me.menuImageWrap._originalProps = value.imgProps.value;
|
me.menuImageWrap._originalProps = value.imgProps.value;
|
||||||
|
|
||||||
|
var cls = 'menu__icon ';
|
||||||
if (notflow) {
|
if (notflow) {
|
||||||
for (var i = 0; i < 6; i++) {
|
for (var i = 0; i < 6; i++) {
|
||||||
me.menuImageWrap.menu.items[i].setChecked(false);
|
me.menuImageWrap.menu.items[i].setChecked(false);
|
||||||
}
|
}
|
||||||
|
cls += 'wrap-inline';
|
||||||
} else {
|
} else {
|
||||||
switch (wrapping) {
|
switch (wrapping) {
|
||||||
case Asc.c_oAscWrapStyle2.Inline:
|
case Asc.c_oAscWrapStyle2.Inline:
|
||||||
me.menuImageWrap.menu.items[0].setChecked(true);
|
me.menuImageWrap.menu.items[0].setChecked(true);
|
||||||
|
cls += 'wrap-inline';
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscWrapStyle2.Square:
|
case Asc.c_oAscWrapStyle2.Square:
|
||||||
me.menuImageWrap.menu.items[1].setChecked(true);
|
me.menuImageWrap.menu.items[1].setChecked(true);
|
||||||
|
cls += 'wrap-square';
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscWrapStyle2.Tight:
|
case Asc.c_oAscWrapStyle2.Tight:
|
||||||
me.menuImageWrap.menu.items[2].setChecked(true);
|
me.menuImageWrap.menu.items[2].setChecked(true);
|
||||||
|
cls += 'wrap-tight';
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscWrapStyle2.Through:
|
case Asc.c_oAscWrapStyle2.Through:
|
||||||
me.menuImageWrap.menu.items[3].setChecked(true);
|
me.menuImageWrap.menu.items[3].setChecked(true);
|
||||||
|
cls += 'wrap-through';
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscWrapStyle2.TopAndBottom:
|
case Asc.c_oAscWrapStyle2.TopAndBottom:
|
||||||
me.menuImageWrap.menu.items[4].setChecked(true);
|
me.menuImageWrap.menu.items[4].setChecked(true);
|
||||||
|
cls += 'wrap-topandbottom';
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscWrapStyle2.Behind:
|
case Asc.c_oAscWrapStyle2.Behind:
|
||||||
me.menuImageWrap.menu.items[6].setChecked(true);
|
me.menuImageWrap.menu.items[6].setChecked(true);
|
||||||
|
cls += 'wrap-behind';
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscWrapStyle2.InFront:
|
case Asc.c_oAscWrapStyle2.InFront:
|
||||||
me.menuImageWrap.menu.items[5].setChecked(true);
|
me.menuImageWrap.menu.items[5].setChecked(true);
|
||||||
|
cls += 'wrap-infront';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
for (var i = 0; i < 6; i++) {
|
for (var i = 0; i < 6; i++) {
|
||||||
me.menuImageWrap.menu.items[i].setChecked(false);
|
me.menuImageWrap.menu.items[i].setChecked(false);
|
||||||
}
|
}
|
||||||
|
cls += 'wrap-infront';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
me.menuImageWrap.setIconCls(cls);
|
||||||
_.each(me.menuImageWrap.menu.items, function(item) {
|
_.each(me.menuImageWrap.menu.items, function(item) {
|
||||||
item.setDisabled(notflow);
|
item.setDisabled(notflow);
|
||||||
});
|
});
|
||||||
|
|
||||||
var onlyCommonProps = ( value.imgProps.isImg && value.imgProps.isChart || value.imgProps.isImg && value.imgProps.isShape ||
|
var onlyCommonProps = ( value.imgProps.isImg && value.imgProps.isChart || value.imgProps.isImg && value.imgProps.isShape ||
|
||||||
value.imgProps.isShape && value.imgProps.isChart);
|
value.imgProps.isShape && value.imgProps.isChart);
|
||||||
if (onlyCommonProps)
|
if (onlyCommonProps) {
|
||||||
menuImageAdvanced.setCaption(me.advancedText, true);
|
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.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);
|
menuChartEdit.setVisible(!_.isNull(value.imgProps.value.get_ChartProperties()) && !onlyCommonProps);
|
||||||
|
@ -2672,6 +2709,7 @@ define([
|
||||||
}).on('click', _.bind(me.onInsertCaption, me));
|
}).on('click', _.bind(me.onInsertCaption, me));
|
||||||
|
|
||||||
var mnuTableMerge = new Common.UI.MenuItem({
|
var mnuTableMerge = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-merge',
|
||||||
caption : me.mergeCellsText
|
caption : me.mergeCellsText
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
if (me.api)
|
if (me.api)
|
||||||
|
@ -2706,27 +2744,35 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var menuTableCellAlign = new Common.UI.MenuItem({
|
var menuTableCellAlign = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.cellAlignText,
|
caption : me.cellAlignText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuTableCellTop = new Common.UI.MenuItem({
|
me.menuTableCellTop = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.textShapeAlignTop,
|
caption : me.textShapeAlignTop,
|
||||||
toggleGroup : 'popuptablecellalign',
|
toggleGroup : 'popuptablecellalign',
|
||||||
|
checkmark : false,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
checked : false,
|
checked : false,
|
||||||
valign : Asc.c_oAscVertAlignJc.Top
|
valign : Asc.c_oAscVertAlignJc.Top
|
||||||
}).on('click', _.bind(tableCellsVAlign, me)),
|
}).on('click', _.bind(tableCellsVAlign, me)),
|
||||||
me.menuTableCellCenter = new Common.UI.MenuItem({
|
me.menuTableCellCenter = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-middle',
|
||||||
caption : me.textShapeAlignMiddle,
|
caption : me.textShapeAlignMiddle,
|
||||||
toggleGroup : 'popuptablecellalign',
|
toggleGroup : 'popuptablecellalign',
|
||||||
|
checkmark : false,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
checked : false,
|
checked : false,
|
||||||
valign : Asc.c_oAscVertAlignJc.Center
|
valign : Asc.c_oAscVertAlignJc.Center
|
||||||
}).on('click', _.bind(tableCellsVAlign, me)),
|
}).on('click', _.bind(tableCellsVAlign, me)),
|
||||||
me.menuTableCellBottom = new Common.UI.MenuItem({
|
me.menuTableCellBottom = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-bottom',
|
||||||
caption : me.textShapeAlignBottom,
|
caption : me.textShapeAlignBottom,
|
||||||
toggleGroup : 'popuptablecellalign',
|
toggleGroup : 'popuptablecellalign',
|
||||||
|
checkmark : false,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
checked : false,
|
checked : false,
|
||||||
valign : Asc.c_oAscVertAlignJc.Bottom
|
valign : Asc.c_oAscVertAlignJc.Bottom
|
||||||
|
@ -2736,10 +2782,12 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuTableAdvanced = new Common.UI.MenuItem({
|
var menuTableAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-table',
|
||||||
caption : me.advancedTableText
|
caption : me.advancedTableText
|
||||||
}).on('click', _.bind(me.advancedTableClick, me));
|
}).on('click', _.bind(me.advancedTableClick, me));
|
||||||
|
|
||||||
var menuParagraphAdvancedInTable = new Common.UI.MenuItem({
|
var menuParagraphAdvancedInTable = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paragraph',
|
||||||
caption : me.advancedParagraphText
|
caption : me.advancedParagraphText
|
||||||
}).on('click', _.bind(me.advancedParagraphClick, me));
|
}).on('click', _.bind(me.advancedParagraphClick, me));
|
||||||
|
|
||||||
|
@ -2761,6 +2809,7 @@ define([
|
||||||
var menuHyperlinkTable = new Common.UI.MenuItem({
|
var menuHyperlinkTable = new Common.UI.MenuItem({
|
||||||
caption : me.hyperlinkText,
|
caption : me.hyperlinkText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
menuEditHyperlinkTable,
|
menuEditHyperlinkTable,
|
||||||
|
@ -2782,6 +2831,7 @@ define([
|
||||||
var menuTableControl = new Common.UI.MenuItem({
|
var menuTableControl = new Common.UI.MenuItem({
|
||||||
caption: me.textContentControls,
|
caption: me.textContentControls,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
menuTableRemoveControl,
|
menuTableRemoveControl,
|
||||||
|
@ -2793,6 +2843,7 @@ define([
|
||||||
var menuTableTOC = new Common.UI.MenuItem({
|
var menuTableTOC = new Common.UI.MenuItem({
|
||||||
caption : me.textTOC,
|
caption : me.textTOC,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -2816,6 +2867,7 @@ define([
|
||||||
|
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
var menuAddCommentTable = new Common.UI.MenuItem({
|
var menuAddCommentTable = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
caption : me.addCommentText
|
caption : me.addCommentText
|
||||||
}).on('click', _.bind(me.addComment, me));
|
}).on('click', _.bind(me.addComment, me));
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
|
@ -2836,6 +2888,7 @@ define([
|
||||||
me.menuSpellMoreTable = new Common.UI.MenuItem({
|
me.menuSpellMoreTable = new Common.UI.MenuItem({
|
||||||
caption : me.moreText,
|
caption : me.moreText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
restoreHeight: true,
|
restoreHeight: true,
|
||||||
items : [
|
items : [
|
||||||
|
@ -2851,6 +2904,7 @@ define([
|
||||||
].join(''));
|
].join(''));
|
||||||
|
|
||||||
me.langTableMenu = new Common.UI.MenuItem({
|
me.langTableMenu = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-ic-doclang',
|
||||||
caption : me.langText,
|
caption : me.langText,
|
||||||
menu : new Common.UI.MenuSimple({
|
menu : new Common.UI.MenuSimple({
|
||||||
cls: 'lang-menu',
|
cls: 'lang-menu',
|
||||||
|
@ -2896,8 +2950,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.menuSpellCheckTable = new Common.UI.MenuItem({
|
me.menuSpellCheckTable = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-ic-docspell',
|
||||||
caption : me.spellcheckText,
|
caption : me.spellcheckText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuSpellTable,
|
me.menuSpellTable,
|
||||||
|
@ -2913,11 +2969,13 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuTableCopy = new Common.UI.MenuItem({
|
var menuTableCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.textCopy,
|
caption : me.textCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuTablePaste = new Common.UI.MenuItem({
|
var menuTablePaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.textPaste,
|
caption : me.textPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
@ -2928,6 +2986,7 @@ define([
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuTablePrint = new Common.UI.MenuItem({
|
var menuTablePrint = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-print',
|
||||||
caption : me.txtPrintSelection
|
caption : me.txtPrintSelection
|
||||||
}).on('click', _.bind(me.onPrintSelection, me));
|
}).on('click', _.bind(me.onPrintSelection, me));
|
||||||
|
|
||||||
|
@ -2961,9 +3020,10 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var menuTableDirection = new Common.UI.MenuItem({
|
var menuTableDirection = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon text-orient-hor',
|
||||||
caption : me.directionText,
|
caption : me.directionText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
cls: 'ppm-toolbar',
|
cls: 'ppm-toolbar shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuTableDirectH = new Common.UI.MenuItem({
|
me.menuTableDirectH = new Common.UI.MenuItem({
|
||||||
|
@ -3012,6 +3072,7 @@ define([
|
||||||
var menuNumberingTable = new Common.UI.MenuItem({
|
var menuNumberingTable = new Common.UI.MenuItem({
|
||||||
caption : me.bulletsText,
|
caption : me.bulletsText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
menuTableStartNewList,
|
menuTableStartNewList,
|
||||||
|
@ -3033,6 +3094,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.tableMenu = new Common.UI.Menu({
|
this.tableMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
// table properties
|
// table properties
|
||||||
if (_.isUndefined(value.tableProps))
|
if (_.isUndefined(value.tableProps))
|
||||||
|
@ -3045,11 +3107,37 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
var align = value.tableProps.value.get_CellsVAlign();
|
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.menuTableCellTop.setChecked(align == Asc.c_oAscVertAlignJc.Top);
|
||||||
me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
|
me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
|
||||||
me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
|
me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
|
||||||
|
|
||||||
var dir = value.tableProps.value.get_CellsTextDirection();
|
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.menuTableDirectH.setChecked(dir == Asc.c_oAscCellTextDirection.LRTB);
|
||||||
me.menuTableDirect90.setChecked(dir == Asc.c_oAscCellTextDirection.TBRL);
|
me.menuTableDirect90.setChecked(dir == Asc.c_oAscCellTextDirection.TBRL);
|
||||||
me.menuTableDirect270.setChecked(dir == Asc.c_oAscCellTextDirection.BTLR);
|
me.menuTableDirect270.setChecked(dir == Asc.c_oAscCellTextDirection.BTLR);
|
||||||
|
@ -3067,7 +3155,6 @@ define([
|
||||||
menuTableDistCols.setDisabled(disabled);
|
menuTableDistCols.setDisabled(disabled);
|
||||||
menuTableCellAlign.setDisabled(disabled);
|
menuTableCellAlign.setDisabled(disabled);
|
||||||
menuTableDirection.setDisabled(disabled);
|
menuTableDirection.setDisabled(disabled);
|
||||||
|
|
||||||
menuTableAdvanced.setDisabled(disabled);
|
menuTableAdvanced.setDisabled(disabled);
|
||||||
|
|
||||||
var cancopy = me.api && me.api.can_CopyCut();
|
var cancopy = me.api && me.api.can_CopyCut();
|
||||||
|
@ -3204,6 +3291,7 @@ define([
|
||||||
{
|
{
|
||||||
caption : me.selectText,
|
caption : me.selectText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
style : 'width: 100px',
|
style : 'width: 100px',
|
||||||
items : [
|
items : [
|
||||||
|
@ -3235,8 +3323,10 @@ define([
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
iconCls: 'menu__icon btn-addcell',
|
||||||
caption : me.insertText,
|
caption : me.insertText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
style : 'width: 100px',
|
style : 'width: 100px',
|
||||||
items : [
|
items : [
|
||||||
|
@ -3273,8 +3363,10 @@ define([
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
iconCls: 'menu__icon btn-delcell',
|
||||||
caption : me.deleteText,
|
caption : me.deleteText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
style : 'width: 100px',
|
style : 'width: 100px',
|
||||||
items : [
|
items : [
|
||||||
|
@ -3365,26 +3457,34 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var menuParagraphVAlign = new Common.UI.MenuItem({
|
var menuParagraphVAlign = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.vertAlignText,
|
caption : me.vertAlignText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuParagraphTop = new Common.UI.MenuItem({
|
me.menuParagraphTop = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.textShapeAlignTop,
|
caption : me.textShapeAlignTop,
|
||||||
|
checkmark : false,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
checked : false,
|
checked : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
valign : Asc.c_oAscVAlign.Top
|
valign : Asc.c_oAscVAlign.Top
|
||||||
}).on('click', _.bind(paragraphVAlign, me)),
|
}).on('click', _.bind(paragraphVAlign, me)),
|
||||||
me.menuParagraphCenter = new Common.UI.MenuItem({
|
me.menuParagraphCenter = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-middle',
|
||||||
caption : me.textShapeAlignMiddle,
|
caption : me.textShapeAlignMiddle,
|
||||||
|
checkmark : false,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
checked : false,
|
checked : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
valign : Asc.c_oAscVAlign.Center
|
valign : Asc.c_oAscVAlign.Center
|
||||||
}).on('click', _.bind(paragraphVAlign, me)),
|
}).on('click', _.bind(paragraphVAlign, me)),
|
||||||
me.menuParagraphBottom = new Common.UI.MenuItem({
|
me.menuParagraphBottom = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-bottom',
|
||||||
caption : me.textShapeAlignBottom,
|
caption : me.textShapeAlignBottom,
|
||||||
|
checkmark : false,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
checked : false,
|
checked : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
|
@ -3403,9 +3503,10 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var menuParagraphDirection = new Common.UI.MenuItem({
|
var menuParagraphDirection = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon text-orient-hor',
|
||||||
caption : me.directionText,
|
caption : me.directionText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
cls: 'ppm-toolbar',
|
cls: 'ppm-toolbar shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuParagraphDirectH = new Common.UI.MenuItem({
|
me.menuParagraphDirectH = new Common.UI.MenuItem({
|
||||||
|
@ -3440,6 +3541,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuParagraphAdvanced = new Common.UI.MenuItem({
|
var menuParagraphAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paragraph',
|
||||||
caption : me.advancedParagraphText
|
caption : me.advancedParagraphText
|
||||||
}).on('click', _.bind(me.advancedParagraphClick, me));
|
}).on('click', _.bind(me.advancedParagraphClick, me));
|
||||||
|
|
||||||
|
@ -3453,6 +3555,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuAddCommentPara = new Common.UI.MenuItem({
|
var menuAddCommentPara = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
caption : me.addCommentText
|
caption : me.addCommentText
|
||||||
}).on('click', _.bind(me.addComment, me));
|
}).on('click', _.bind(me.addComment, me));
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
|
@ -3479,6 +3582,7 @@ define([
|
||||||
var menuHyperlinkPara = new Common.UI.MenuItem({
|
var menuHyperlinkPara = new Common.UI.MenuItem({
|
||||||
caption : me.hyperlinkText,
|
caption : me.hyperlinkText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
menuEditHyperlinkPara,
|
menuEditHyperlinkPara,
|
||||||
|
@ -3491,6 +3595,7 @@ define([
|
||||||
var menuStyle = new Common.UI.MenuItem({
|
var menuStyle = new Common.UI.MenuItem({
|
||||||
caption: me.styleText,
|
caption: me.styleText,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
me.menuStyleSave = new Common.UI.MenuItem({
|
me.menuStyleSave = new Common.UI.MenuItem({
|
||||||
|
@ -3511,6 +3616,7 @@ define([
|
||||||
me.menuSpellMorePara = new Common.UI.MenuItem({
|
me.menuSpellMorePara = new Common.UI.MenuItem({
|
||||||
caption : me.moreText,
|
caption : me.moreText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
restoreHeight: true,
|
restoreHeight: true,
|
||||||
items: []
|
items: []
|
||||||
|
@ -3518,6 +3624,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.langParaMenu = new Common.UI.MenuItem({
|
me.langParaMenu = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-ic-doclang',
|
||||||
caption : me.langText,
|
caption : me.langText,
|
||||||
menu : new Common.UI.MenuSimple({
|
menu : new Common.UI.MenuSimple({
|
||||||
cls: 'lang-menu',
|
cls: 'lang-menu',
|
||||||
|
@ -3559,11 +3666,13 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuParaCopy = new Common.UI.MenuItem({
|
var menuParaCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.textCopy,
|
caption : me.textCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuParaPaste = new Common.UI.MenuItem({
|
var menuParaPaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.textPaste,
|
caption : me.textPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
@ -3574,6 +3683,7 @@ define([
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuParaPrint = new Common.UI.MenuItem({
|
var menuParaPrint = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-print',
|
||||||
caption : me.txtPrintSelection
|
caption : me.txtPrintSelection
|
||||||
}).on('click', _.bind(me.onPrintSelection, me));
|
}).on('click', _.bind(me.onPrintSelection, me));
|
||||||
|
|
||||||
|
@ -3606,6 +3716,7 @@ define([
|
||||||
var menuParaTOCRefresh = new Common.UI.MenuItem({
|
var menuParaTOCRefresh = new Common.UI.MenuItem({
|
||||||
caption : me.textUpdateTOC,
|
caption : me.textUpdateTOC,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -3663,6 +3774,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.textMenu = new Common.UI.Menu({
|
this.textMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
var isInShape = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ShapeProperties()));
|
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()));
|
var isInChart = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ChartProperties()));
|
||||||
|
@ -3672,11 +3784,37 @@ define([
|
||||||
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
|
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
|
||||||
if ( isInShape || isInChart ) {
|
if ( isInShape || isInChart ) {
|
||||||
var align = value.imgProps.value.get_VerticalTextAlign();
|
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.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
|
||||||
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
|
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
|
||||||
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
|
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
|
||||||
|
|
||||||
var dir = value.imgProps.value.get_Vert();
|
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.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
|
||||||
me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
|
me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
|
||||||
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
|
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
|
||||||
|
@ -3896,6 +4034,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.hdrMenu = new Common.UI.Menu({
|
this.hdrMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
menuEditHeaderFooter.setCaption(value.Header ? me.editHeaderText : me.editFooterText, true);
|
menuEditHeaderFooter.setCaption(value.Header ? me.editHeaderText : me.editFooterText, true);
|
||||||
menuEditHeaderFooter.off('click').on('click', function(item) {
|
menuEditHeaderFooter.off('click').on('click', function(item) {
|
||||||
|
|
|
@ -195,7 +195,7 @@ define([
|
||||||
btn.updateHint( me.tipContents );
|
btn.updateHint( me.tipContents );
|
||||||
|
|
||||||
var _menu = new Common.UI.Menu({
|
var _menu = new Common.UI.Menu({
|
||||||
cls: 'toc-menu',
|
cls: 'toc-menu shifted-left',
|
||||||
items: [
|
items: [
|
||||||
{template: contentsTemplate, offsety: 0, value: 0},
|
{template: contentsTemplate, offsety: 0, value: 0},
|
||||||
{template: contentsTemplate, offsety: 72, value: 1},
|
{template: contentsTemplate, offsety: 72, value: 1},
|
||||||
|
@ -208,7 +208,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.contentsMenu = new Common.UI.Menu({
|
me.contentsMenu = new Common.UI.Menu({
|
||||||
cls: 'toc-menu',
|
cls: 'toc-menu shifted-left',
|
||||||
items: [
|
items: [
|
||||||
{template: contentsTemplate, offsety: 0, value: 0},
|
{template: contentsTemplate, offsety: 0, value: 0},
|
||||||
{template: contentsTemplate, offsety: 72, value: 1},
|
{template: contentsTemplate, offsety: 72, value: 1},
|
||||||
|
|
|
@ -1419,7 +1419,7 @@ define([
|
||||||
cls: 'btn-toolbar',
|
cls: 'btn-toolbar',
|
||||||
iconCls: 'toolbar__icon btn-add-breakpoint',
|
iconCls: 'toolbar__icon btn-add-breakpoint',
|
||||||
disabled: this._locked,
|
disabled: this._locked,
|
||||||
hint: this.tipAddGradientPoint,
|
hint: this.tipAddGradientPoint
|
||||||
});
|
});
|
||||||
this.btnAddGradientStep.on('click', _.bind(this.onAddGradientStep, this));
|
this.btnAddGradientStep.on('click', _.bind(this.onAddGradientStep, this));
|
||||||
this.lockedControls.push(this.btnAddGradientStep);
|
this.lockedControls.push(this.btnAddGradientStep);
|
||||||
|
|
|
@ -260,15 +260,16 @@ define([
|
||||||
iconCls: 'toolbar__icon btn-fontcolor',
|
iconCls: 'toolbar__icon btn-fontcolor',
|
||||||
split: true,
|
split: true,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
id: 'id-toolbar-menu-auto-fontcolor',
|
id: 'id-toolbar-menu-auto-fontcolor',
|
||||||
caption: this.textAutoColor,
|
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: '--'},
|
{caption: '--'},
|
||||||
{template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>')},
|
{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',
|
iconCls: 'toolbar__icon btn-inserttable',
|
||||||
caption: me.capBtnInsTable,
|
caption: me.capBtnInsTable,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [
|
items: [
|
||||||
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
|
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
|
||||||
{caption: this.mniCustomTable, value: 'custom'},
|
{caption: this.mniCustomTable, value: 'custom'},
|
||||||
|
@ -565,7 +567,7 @@ define([
|
||||||
iconCls: 'toolbar__icon btn-dropcap',
|
iconCls: 'toolbar__icon btn-dropcap',
|
||||||
caption: me.capBtnInsDropcap,
|
caption: me.capBtnInsDropcap,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
cls: 'ppm-toolbar',
|
cls: 'ppm-toolbar shifted-right',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
caption: this.textNone,
|
caption: this.textNone,
|
||||||
|
@ -605,16 +607,16 @@ define([
|
||||||
iconCls: 'toolbar__icon btn-controls',
|
iconCls: 'toolbar__icon btn-controls',
|
||||||
caption: me.capBtnInsControls,
|
caption: me.capBtnInsControls,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
cls: 'ppm-toolbar',
|
cls: 'ppm-toolbar shifted-right',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
caption: this.textPlainControl,
|
caption: this.textPlainControl,
|
||||||
// iconCls: 'menu__icon cc-plaintext',
|
iconCls: 'menu__icon cc-plaintext',
|
||||||
value: 'plain'
|
value: 'plain'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
caption: this.textRichControl,
|
caption: this.textRichControl,
|
||||||
// iconCls: 'menu__icon cc-richtext',
|
iconCls: 'menu__icon cc-richtext',
|
||||||
value: 'rich'
|
value: 'rich'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -670,7 +672,7 @@ define([
|
||||||
{caption: '--'},
|
{caption: '--'},
|
||||||
{
|
{
|
||||||
caption: this.textRemoveControl,
|
caption: this.textRemoveControl,
|
||||||
// iconCls: 'menu__icon cc-remove',
|
iconCls: 'menu__icon cc-remove',
|
||||||
value: 'remove'
|
value: 'remove'
|
||||||
},
|
},
|
||||||
{caption: '--'},
|
{caption: '--'},
|
||||||
|
@ -706,7 +708,7 @@ define([
|
||||||
iconCls: 'toolbar__icon btn-columns',
|
iconCls: 'toolbar__icon btn-columns',
|
||||||
caption: me.capBtnColumns,
|
caption: me.capBtnColumns,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
cls: 'ppm-toolbar',
|
cls: 'ppm-toolbar shifted-right',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
caption: this.textColumnsOne,
|
caption: this.textColumnsOne,
|
||||||
|
@ -992,6 +994,7 @@ define([
|
||||||
cls: 'btn-toolbar',
|
cls: 'btn-toolbar',
|
||||||
iconCls: 'toolbar__icon btn-colorschemas',
|
iconCls: 'toolbar__icon btn-colorschemas',
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [],
|
items: [],
|
||||||
restoreHeight: true
|
restoreHeight: true
|
||||||
})
|
})
|
||||||
|
@ -1467,6 +1470,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.btnImgAlign.setMenu(new Common.UI.Menu({
|
me.btnImgAlign.setMenu(new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
items: [{
|
items: [{
|
||||||
caption : _holder_view.textShapeAlignLeft,
|
caption : _holder_view.textShapeAlignLeft,
|
||||||
iconCls : 'menu__icon shape-align-left',
|
iconCls : 'menu__icon shape-align-left',
|
||||||
|
@ -1645,9 +1649,10 @@ define([
|
||||||
|
|
||||||
this.btnMarkers.setMenu(
|
this.btnMarkers.setMenu(
|
||||||
new Common.UI.Menu({
|
new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
style: 'min-width: 139px',
|
style: 'min-width: 139px',
|
||||||
items: [
|
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({
|
this.mnuMarkerSettings = new Common.UI.MenuItem({
|
||||||
caption: this.textListSettings,
|
caption: this.textListSettings,
|
||||||
disabled: (this.mnuMarkersPicker.conf.index || 0)==0,
|
disabled: (this.mnuMarkersPicker.conf.index || 0)==0,
|
||||||
|
@ -1659,8 +1664,9 @@ define([
|
||||||
|
|
||||||
this.btnNumbers.setMenu(
|
this.btnNumbers.setMenu(
|
||||||
new Common.UI.Menu({
|
new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [
|
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({
|
this.mnuNumberSettings = new Common.UI.MenuItem({
|
||||||
caption: this.textListSettings,
|
caption: this.textListSettings,
|
||||||
disabled: (this.mnuNumbersPicker.conf.index || 0)==0,
|
disabled: (this.mnuNumbersPicker.conf.index || 0)==0,
|
||||||
|
@ -1672,9 +1678,10 @@ define([
|
||||||
|
|
||||||
this.btnMultilevels.setMenu(
|
this.btnMultilevels.setMenu(
|
||||||
new Common.UI.Menu({
|
new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
style: 'min-width: 90px',
|
style: 'min-width: 90px',
|
||||||
items: [
|
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({
|
this.mnuMultilevelSettings = new Common.UI.MenuItem({
|
||||||
caption: this.textListSettings,
|
caption: this.textListSettings,
|
||||||
disabled: (this.mnuMultilevelPicker.conf.index || 0)==0,
|
disabled: (this.mnuMultilevelPicker.conf.index || 0)==0,
|
||||||
|
@ -1694,7 +1701,9 @@ define([
|
||||||
caption: this.textInsertPageNumber,
|
caption: this.textInsertPageNumber,
|
||||||
disabled: this.mnuInsertPageNum.isDisabled(),
|
disabled: this.mnuInsertPageNum.isDisabled(),
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
|
style: 'min-width: 90px;',
|
||||||
items: [
|
items: [
|
||||||
{template: _.template('<div id="id-toolbar-menu-pageposition" class="menu-pageposition"></div>')},
|
{template: _.template('<div id="id-toolbar-menu-pageposition" class="menu-pageposition"></div>')},
|
||||||
this.mnuPageNumCurrentPos = new Common.UI.MenuItem({
|
this.mnuPageNumCurrentPos = new Common.UI.MenuItem({
|
||||||
|
@ -1997,6 +2006,7 @@ define([
|
||||||
|
|
||||||
if (this.mnuColorSchema == null) {
|
if (this.mnuColorSchema == null) {
|
||||||
this.mnuColorSchema = new Common.UI.Menu({
|
this.mnuColorSchema = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
restoreHeight: true
|
restoreHeight: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,15 +329,16 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
|
||||||
iconCls : 'toolbar__icon btn-fontcolor',
|
iconCls : 'toolbar__icon btn-fontcolor',
|
||||||
hint : this.textColor,
|
hint : this.textColor,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
id: 'watermark-auto-color',
|
id: 'watermark-auto-color',
|
||||||
caption: this.textAuto,
|
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: '--'},
|
{caption: '--'},
|
||||||
{ template: _.template('<div id="watermark-menu-textcolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
{ 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>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
.dataview {
|
.dataview {
|
||||||
width: 125px;
|
width: 125px;
|
||||||
height: 85px;
|
height: 85px;
|
||||||
margin: 0 auto;
|
margin: 0 10px;
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
> .item {
|
> .item {
|
||||||
|
|
|
@ -821,6 +821,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -991,6 +992,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1018,6 +1020,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1037,6 +1040,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1066,6 +1070,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1118,6 +1123,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -1774,11 +1780,13 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
var menuViewCopy = new Common.UI.MenuItem({
|
var menuViewCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption: me.textCopy,
|
caption: me.textCopy,
|
||||||
value: 'copy'
|
value: 'copy'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuViewUndo = new Common.UI.MenuItem({
|
var menuViewUndo = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-undo',
|
||||||
caption: me.textUndo
|
caption: me.textUndo
|
||||||
}).on('click', function () {
|
}).on('click', function () {
|
||||||
me.api.Undo();
|
me.api.Undo();
|
||||||
|
@ -1789,10 +1797,12 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuViewAddComment = new Common.UI.MenuItem({
|
var menuViewAddComment = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
caption: me.addCommentText
|
caption: me.addCommentText
|
||||||
}).on('click', _.bind(me.addComment, me));
|
}).on('click', _.bind(me.addComment, me));
|
||||||
|
|
||||||
this.viewModeMenu = new Common.UI.Menu({
|
this.viewModeMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function (value) {
|
initMenu: function (value) {
|
||||||
menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled);
|
menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled);
|
||||||
menuViewUndo.setDisabled(!me.api.asc_getCanUndo() && !me._isDisabled);
|
menuViewUndo.setDisabled(!me.api.asc_getCanUndo() && !me._isDisabled);
|
||||||
|
@ -1817,6 +1827,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var mnuPreview = new Common.UI.MenuItem({
|
var mnuPreview = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-preview',
|
||||||
caption : me.txtPreview
|
caption : me.txtPreview
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
var current = me.api.getCurrentPage();
|
var current = me.api.getCurrentPage();
|
||||||
|
@ -1835,6 +1846,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var mnuPrintSelection = new Common.UI.MenuItem({
|
var mnuPrintSelection = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-print',
|
||||||
caption : me.txtPrintSelection
|
caption : me.txtPrintSelection
|
||||||
}).on('click', function(item){
|
}).on('click', function(item){
|
||||||
if (me.api){
|
if (me.api){
|
||||||
|
@ -1849,6 +1861,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.viewModeMenuSlide = new Common.UI.Menu({
|
this.viewModeMenuSlide = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function (value) {
|
initMenu: function (value) {
|
||||||
mnuSelectAll.setDisabled(me.slidesCount<2);
|
mnuSelectAll.setDisabled(me.slidesCount<2);
|
||||||
mnuPrintSelection.setVisible(me.mode.canPrint && value.fromThumbs===true);
|
mnuPrintSelection.setVisible(me.mode.canPrint && value.fromThumbs===true);
|
||||||
|
@ -1888,6 +1901,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var mnuChangeSlide = new Common.UI.MenuItem({
|
var mnuChangeSlide = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-changeslide',
|
||||||
caption : me.txtChangeLayout,
|
caption : me.txtChangeLayout,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
|
@ -1919,6 +1933,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var mnuPreview = new Common.UI.MenuItem({
|
var mnuPreview = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-preview',
|
||||||
caption : me.txtPreview
|
caption : me.txtPreview
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
var current = me.api.getCurrentPage();
|
var current = me.api.getCurrentPage();
|
||||||
|
@ -1937,6 +1952,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var mnuPrintSelection = new Common.UI.MenuItem({
|
var mnuPrintSelection = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-print',
|
||||||
caption : me.txtPrintSelection
|
caption : me.txtPrintSelection
|
||||||
}).on('click', function(item){
|
}).on('click', function(item){
|
||||||
if (me.api){
|
if (me.api){
|
||||||
|
@ -1951,11 +1967,13 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuSlidePaste = new Common.UI.MenuItem({
|
var menuSlidePaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.textPaste,
|
caption : me.textPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuSlideSettings = new Common.UI.MenuItem({
|
var menuSlideSettings = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-slide',
|
||||||
caption : me.textSlideSettings,
|
caption : me.textSlideSettings,
|
||||||
value : null
|
value : null
|
||||||
}).on('click', function(item){
|
}).on('click', function(item){
|
||||||
|
@ -1976,6 +1994,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.slideMenu = new Common.UI.Menu({
|
me.slideMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function(value) {
|
initMenu: function(value) {
|
||||||
menuSlidePaste.setVisible(value.fromThumbs!==true);
|
menuSlidePaste.setVisible(value.fromThumbs!==true);
|
||||||
me.slideMenu.items[1].setVisible(value.fromThumbs===true); // New Slide
|
me.slideMenu.items[1].setVisible(value.fromThumbs===true); // New Slide
|
||||||
|
@ -2142,6 +2161,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var mnuTableMerge = new Common.UI.MenuItem({
|
var mnuTableMerge = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-merge',
|
||||||
caption : me.mergeCellsText
|
caption : me.mergeCellsText
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
if (me.api)
|
if (me.api)
|
||||||
|
@ -2168,6 +2188,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuTableCellAlign = new Common.UI.MenuItem({
|
var menuTableCellAlign = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.cellAlignText,
|
caption : me.cellAlignText,
|
||||||
menu : (function(){
|
menu : (function(){
|
||||||
function onItemClick(item, e) {
|
function onItemClick(item, e) {
|
||||||
|
@ -2182,23 +2203,30 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Common.UI.Menu({
|
return new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
me.menuTableCellTop = new Common.UI.MenuItem({
|
me.menuTableCellTop = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.textShapeAlignTop,
|
caption : me.textShapeAlignTop,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popuptablecellalign',
|
toggleGroup : 'popuptablecellalign',
|
||||||
value : Asc.c_oAscVertAlignJc.Top
|
value : Asc.c_oAscVertAlignJc.Top
|
||||||
}).on('click', _.bind(onItemClick, me)),
|
}).on('click', _.bind(onItemClick, me)),
|
||||||
me.menuTableCellCenter = new Common.UI.MenuItem({
|
me.menuTableCellCenter = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-middle',
|
||||||
caption : me.textShapeAlignMiddle,
|
caption : me.textShapeAlignMiddle,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popuptablecellalign',
|
toggleGroup : 'popuptablecellalign',
|
||||||
value : Asc.c_oAscVertAlignJc.Center
|
value : Asc.c_oAscVertAlignJc.Center
|
||||||
}).on('click', _.bind(onItemClick, me)),
|
}).on('click', _.bind(onItemClick, me)),
|
||||||
me.menuTableCellBottom = new Common.UI.MenuItem({
|
me.menuTableCellBottom = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-bottom',
|
||||||
caption : me.textShapeAlignBottom,
|
caption : me.textShapeAlignBottom,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popuptablecellalign',
|
toggleGroup : 'popuptablecellalign',
|
||||||
value : Asc.c_oAscVertAlignJc.Bottom
|
value : Asc.c_oAscVertAlignJc.Bottom
|
||||||
}).on('click', _.bind(onItemClick, me))
|
}).on('click', _.bind(onItemClick, me))
|
||||||
|
@ -2231,6 +2259,7 @@ define([
|
||||||
me.menuSpellMoreTable = new Common.UI.MenuItem({
|
me.menuSpellMoreTable = new Common.UI.MenuItem({
|
||||||
caption : me.moreText,
|
caption : me.moreText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
restoreHeight: true,
|
restoreHeight: true,
|
||||||
items : []
|
items : []
|
||||||
|
@ -2245,6 +2274,7 @@ define([
|
||||||
].join(''));
|
].join(''));
|
||||||
|
|
||||||
me.langTableMenu = new Common.UI.MenuItem({
|
me.langTableMenu = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-ic-doclang',
|
||||||
caption : me.langText,
|
caption : me.langText,
|
||||||
menu : new Common.UI.MenuSimple({
|
menu : new Common.UI.MenuSimple({
|
||||||
cls: 'lang-menu',
|
cls: 'lang-menu',
|
||||||
|
@ -2290,8 +2320,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.menuSpellCheckTable = new Common.UI.MenuItem({
|
me.menuSpellCheckTable = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-ic-docspell',
|
||||||
caption : me.spellcheckText,
|
caption : me.spellcheckText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuSpellTable,
|
me.menuSpellTable,
|
||||||
|
@ -2314,6 +2346,7 @@ define([
|
||||||
me.menuSpellMorePara = new Common.UI.MenuItem({
|
me.menuSpellMorePara = new Common.UI.MenuItem({
|
||||||
caption : me.moreText,
|
caption : me.moreText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
restoreHeight: true,
|
restoreHeight: true,
|
||||||
items: []
|
items: []
|
||||||
|
@ -2321,6 +2354,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.langParaMenu = new Common.UI.MenuItem({
|
me.langParaMenu = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-ic-doclang',
|
||||||
caption : me.langText,
|
caption : me.langText,
|
||||||
menu : new Common.UI.MenuSimple({
|
menu : new Common.UI.MenuSimple({
|
||||||
cls: 'lang-menu',
|
cls: 'lang-menu',
|
||||||
|
@ -2362,6 +2396,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuTableAdvanced = new Common.UI.MenuItem({
|
var menuTableAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-table',
|
||||||
caption : me.advancedTableText
|
caption : me.advancedTableText
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
|
@ -2395,6 +2430,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuImageAdvanced = new Common.UI.MenuItem({
|
var menuImageAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-image',
|
||||||
caption : me.advancedImageText
|
caption : me.advancedImageText
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
if (me.api){
|
if (me.api){
|
||||||
|
@ -2437,6 +2473,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuShapeAdvanced = new Common.UI.MenuItem({
|
var menuShapeAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-shape',
|
||||||
caption : me.advancedShapeText
|
caption : me.advancedShapeText
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
if (me.api){
|
if (me.api){
|
||||||
|
@ -2468,6 +2505,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuParagraphAdvanced = new Common.UI.MenuItem({
|
var menuParagraphAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paragraph',
|
||||||
caption : me.advancedParagraphText
|
caption : me.advancedParagraphText
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
if (me.api){
|
if (me.api){
|
||||||
|
@ -2527,6 +2565,7 @@ define([
|
||||||
var menuHyperlinkPara = new Common.UI.MenuItem({
|
var menuHyperlinkPara = new Common.UI.MenuItem({
|
||||||
caption : me.hyperlinkText,
|
caption : me.hyperlinkText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
menuEditHyperlinkPara,
|
menuEditHyperlinkPara,
|
||||||
|
@ -2557,6 +2596,7 @@ define([
|
||||||
var menuHyperlinkTable = new Common.UI.MenuItem({
|
var menuHyperlinkTable = new Common.UI.MenuItem({
|
||||||
caption : me.hyperlinkText,
|
caption : me.hyperlinkText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
menuEditHyperlinkTable,
|
menuEditHyperlinkTable,
|
||||||
|
@ -2596,6 +2636,7 @@ define([
|
||||||
var menuImgShapeArrange = new Common.UI.MenuItem({
|
var menuImgShapeArrange = new Common.UI.MenuItem({
|
||||||
caption : me.txtArrange,
|
caption : me.txtArrange,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2671,6 +2712,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Common.UI.Menu({
|
return new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2720,10 +2762,12 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var menuChartEdit = new Common.UI.MenuItem({
|
var menuChartEdit = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-chart',
|
||||||
caption : me.editChartText
|
caption : me.editChartText
|
||||||
}).on('click', _.bind(me.editChartClick, me, undefined));
|
}).on('click', _.bind(me.editChartClick, me, undefined));
|
||||||
|
|
||||||
var menuParagraphVAlign = new Common.UI.MenuItem({
|
var menuParagraphVAlign = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.vertAlignText,
|
caption : me.vertAlignText,
|
||||||
menu : (function(){
|
menu : (function(){
|
||||||
function onItemClick(item) {
|
function onItemClick(item) {
|
||||||
|
@ -2739,23 +2783,30 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Common.UI.Menu({
|
return new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
me.menuParagraphTop = new Common.UI.MenuItem({
|
me.menuParagraphTop = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.textShapeAlignTop,
|
caption : me.textShapeAlignTop,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
value : Asc.c_oAscVAlign.Top
|
value : Asc.c_oAscVAlign.Top
|
||||||
}).on('click', _.bind(onItemClick, me)),
|
}).on('click', _.bind(onItemClick, me)),
|
||||||
me.menuParagraphCenter = new Common.UI.MenuItem({
|
me.menuParagraphCenter = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-middle',
|
||||||
caption : me.textShapeAlignMiddle,
|
caption : me.textShapeAlignMiddle,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
value : Asc.c_oAscVAlign.Center
|
value : Asc.c_oAscVAlign.Center
|
||||||
}).on('click', _.bind(onItemClick, me)),
|
}).on('click', _.bind(onItemClick, me)),
|
||||||
me.menuParagraphBottom = new Common.UI.MenuItem({
|
me.menuParagraphBottom = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-bottom',
|
||||||
caption : me.textShapeAlignBottom,
|
caption : me.textShapeAlignBottom,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
value : Asc.c_oAscVAlign.Bottom
|
value : Asc.c_oAscVAlign.Bottom
|
||||||
}).on('click', _.bind(onItemClick, me))
|
}).on('click', _.bind(onItemClick, me))
|
||||||
|
@ -2775,8 +2826,10 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var menuParagraphDirection = new Common.UI.MenuItem({
|
var menuParagraphDirection = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon text-orient-hor',
|
||||||
caption : me.directionText,
|
caption : me.directionText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuParagraphDirectH = new Common.UI.MenuItem({
|
me.menuParagraphDirectH = new Common.UI.MenuItem({
|
||||||
|
@ -2837,6 +2890,7 @@ define([
|
||||||
var menuImgReplace = new Common.UI.MenuItem({
|
var menuImgReplace = new Common.UI.MenuItem({
|
||||||
caption : me.textReplace,
|
caption : me.textReplace,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2878,22 +2932,27 @@ define([
|
||||||
var menuImgShapeRotate = new Common.UI.MenuItem({
|
var menuImgShapeRotate = new Common.UI.MenuItem({
|
||||||
caption : me.textRotate,
|
caption : me.textRotate,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-rotate-90',
|
||||||
caption: me.textRotate90,
|
caption: me.textRotate90,
|
||||||
value : 1
|
value : 1
|
||||||
}).on('click', _.bind(onImgRotate, me)),
|
}).on('click', _.bind(onImgRotate, me)),
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-rotate-270',
|
||||||
caption: me.textRotate270,
|
caption: me.textRotate270,
|
||||||
value : 0
|
value : 0
|
||||||
}).on('click', _.bind(onImgRotate, me)),
|
}).on('click', _.bind(onImgRotate, me)),
|
||||||
{ caption: '--' },
|
{ caption: '--' },
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-flip-hor',
|
||||||
caption: me.textFlipH,
|
caption: me.textFlipH,
|
||||||
value : 1
|
value : 1
|
||||||
}).on('click', _.bind(onImgFlip, me)),
|
}).on('click', _.bind(onImgFlip, me)),
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-flip-vert',
|
||||||
caption: me.textFlipV,
|
caption: me.textFlipV,
|
||||||
value : 0
|
value : 0
|
||||||
}).on('click', _.bind(onImgFlip, me))
|
}).on('click', _.bind(onImgFlip, me))
|
||||||
|
@ -2915,6 +2974,7 @@ define([
|
||||||
me.menuImgCrop = new Common.UI.MenuItem({
|
me.menuImgCrop = new Common.UI.MenuItem({
|
||||||
caption : me.textCrop,
|
caption : me.textCrop,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -2937,11 +2997,13 @@ define([
|
||||||
|
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
var menuAddCommentPara = new Common.UI.MenuItem({
|
var menuAddCommentPara = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
caption : me.addCommentText
|
caption : me.addCommentText
|
||||||
}).on('click', _.bind(me.addComment, me));
|
}).on('click', _.bind(me.addComment, me));
|
||||||
menuAddCommentPara.hide();
|
menuAddCommentPara.hide();
|
||||||
|
|
||||||
var menuAddCommentTable = new Common.UI.MenuItem({
|
var menuAddCommentTable = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
caption : me.addCommentText
|
caption : me.addCommentText
|
||||||
}).on('click', _.bind(me.addComment, me));
|
}).on('click', _.bind(me.addComment, me));
|
||||||
menuAddCommentTable.hide();
|
menuAddCommentTable.hide();
|
||||||
|
@ -2952,6 +3014,7 @@ define([
|
||||||
menuCommentSeparatorImg.hide();
|
menuCommentSeparatorImg.hide();
|
||||||
|
|
||||||
var menuAddCommentImg = new Common.UI.MenuItem({
|
var menuAddCommentImg = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
caption : me.addCommentText
|
caption : me.addCommentText
|
||||||
}).on('click', _.bind(me.addComment, me));
|
}).on('click', _.bind(me.addComment, me));
|
||||||
menuAddCommentImg.hide();
|
menuAddCommentImg.hide();
|
||||||
|
@ -2962,11 +3025,13 @@ define([
|
||||||
}).on('click', _.bind(me.addToLayout, me));
|
}).on('click', _.bind(me.addToLayout, me));
|
||||||
|
|
||||||
var menuParaCopy = new Common.UI.MenuItem({
|
var menuParaCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.textCopy,
|
caption : me.textCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuParaPaste = new Common.UI.MenuItem({
|
var menuParaPaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.textPaste,
|
caption : me.textPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
@ -2977,11 +3042,13 @@ define([
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuImgCopy = new Common.UI.MenuItem({
|
var menuImgCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.textCopy,
|
caption : me.textCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuImgPaste = new Common.UI.MenuItem({
|
var menuImgPaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.textPaste,
|
caption : me.textPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
@ -2992,11 +3059,13 @@ define([
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuTableCopy = new Common.UI.MenuItem({
|
var menuTableCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.textCopy,
|
caption : me.textCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
|
||||||
var menuTablePaste = new Common.UI.MenuItem({
|
var menuTablePaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.textPaste,
|
caption : me.textPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
}).on('click', _.bind(me.onCutCopyPaste, me));
|
}).on('click', _.bind(me.onCutCopyPaste, me));
|
||||||
|
@ -3019,6 +3088,7 @@ define([
|
||||||
}).on('click', _.bind(me.addToLayout, me));
|
}).on('click', _.bind(me.addToLayout, me));
|
||||||
|
|
||||||
me.textMenu = new Common.UI.Menu({
|
me.textMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
var isInShape = (value.shapeProps && !_.isNull(value.shapeProps.value));
|
var isInShape = (value.shapeProps && !_.isNull(value.shapeProps.value));
|
||||||
var isInChart = (value.chartProps && !_.isNull(value.chartProps.value));
|
var isInChart = (value.chartProps && !_.isNull(value.chartProps.value));
|
||||||
|
@ -3033,14 +3103,43 @@ define([
|
||||||
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
|
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
|
||||||
if (isInShape || isInChart) {
|
if (isInShape || isInChart) {
|
||||||
var align = value.shapeProps.value.get_VerticalTextAlign();
|
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.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
|
||||||
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
|
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
|
||||||
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
|
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
|
||||||
|
|
||||||
var dir = value.shapeProps.value.get_Vert();
|
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.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
|
||||||
me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
|
me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
|
||||||
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
|
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
|
||||||
|
} else {
|
||||||
|
menuParagraphVAlign.setIconCls('');
|
||||||
|
menuParagraphDirection.setIconCls('');
|
||||||
}
|
}
|
||||||
menuParagraphVAlign.setDisabled(disabled);
|
menuParagraphVAlign.setDisabled(disabled);
|
||||||
menuParagraphDirection.setDisabled(disabled);
|
menuParagraphDirection.setDisabled(disabled);
|
||||||
|
@ -3144,6 +3243,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.tableMenu = new Common.UI.Menu({
|
me.tableMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
// table properties
|
// table properties
|
||||||
if (_.isUndefined(value.tableProps))
|
if (_.isUndefined(value.tableProps))
|
||||||
|
@ -3156,9 +3256,23 @@ define([
|
||||||
|
|
||||||
var disabled = (value.slideProps!==undefined && value.slideProps.locked);
|
var disabled = (value.slideProps!==undefined && value.slideProps.locked);
|
||||||
|
|
||||||
me.menuTableCellTop.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Top);
|
var align = value.tableProps.value.get_CellsVAlign();
|
||||||
me.menuTableCellCenter.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Center);
|
var cls = '';
|
||||||
me.menuTableCellBottom.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Bottom);
|
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) {
|
if (me.api) {
|
||||||
mnuTableMerge.setDisabled(value.tableProps.locked || disabled || !me.api.CheckBeforeMergeCells());
|
mnuTableMerge.setDisabled(value.tableProps.locked || disabled || !me.api.CheckBeforeMergeCells());
|
||||||
|
@ -3240,6 +3354,7 @@ define([
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
caption : me.selectText,
|
caption : me.selectText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -3258,8 +3373,10 @@ define([
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
iconCls: 'menu__icon btn-addcell',
|
||||||
caption : me.insertText,
|
caption : me.insertText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
style : 'width: 100px',
|
style : 'width: 100px',
|
||||||
items : [
|
items : [
|
||||||
|
@ -3291,8 +3408,10 @@ define([
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-delcell',
|
||||||
caption : me.deleteText,
|
caption : me.deleteText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -3337,6 +3456,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pictureMenu = new Common.UI.Menu({
|
me.pictureMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
mnuUnGroupImg.setDisabled(!me.api.canUnGroup());
|
mnuUnGroupImg.setDisabled(!me.api.canUnGroup());
|
||||||
|
@ -3576,6 +3696,7 @@ define([
|
||||||
|
|
||||||
if (!menu) {
|
if (!menu) {
|
||||||
this.placeholderMenuTable = menu = new Common.UI.Menu({
|
this.placeholderMenuTable = menu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [
|
items: [
|
||||||
{template: _.template('<div id="id-placeholder-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
|
{template: _.template('<div id="id-placeholder-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
|
||||||
{caption: me.mniCustomTable, value: 'custom'}
|
{caption: me.mniCustomTable, value: 'custom'}
|
||||||
|
|
|
@ -324,6 +324,7 @@ define([
|
||||||
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
split: true,
|
split: true,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [
|
items: [
|
||||||
{template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>')},
|
{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>')}
|
{template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + me.textNewColor + '</a>')}
|
||||||
|
@ -521,6 +522,7 @@ define([
|
||||||
caption: me.capInsertTable,
|
caption: me.capInsertTable,
|
||||||
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
|
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [
|
items: [
|
||||||
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
|
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
|
||||||
{caption: me.mniCustomTable, value: 'custom'}
|
{caption: me.mniCustomTable, value: 'custom'}
|
||||||
|
@ -636,6 +638,7 @@ define([
|
||||||
iconCls: 'toolbar__icon btn-colorschemas',
|
iconCls: 'toolbar__icon btn-colorschemas',
|
||||||
lock: [_set.themeLock, _set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
|
lock: [_set.themeLock, _set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [],
|
items: [],
|
||||||
restoreHeight: true
|
restoreHeight: true
|
||||||
})
|
})
|
||||||
|
@ -676,6 +679,7 @@ define([
|
||||||
iconCls: 'toolbar__icon shape-align-left',
|
iconCls: 'toolbar__icon shape-align-left',
|
||||||
lock: [_set.slideDeleted, _set.shapeLock, _set.lostConnect, _set.noSlides, _set.noObjectSelected, _set.disableOnStart],
|
lock: [_set.slideDeleted, _set.shapeLock, _set.lostConnect, _set.noSlides, _set.noObjectSelected, _set.disableOnStart],
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
caption: me.textShapeAlignLeft,
|
caption: me.textShapeAlignLeft,
|
||||||
|
@ -1106,9 +1110,10 @@ define([
|
||||||
|
|
||||||
this.btnMarkers.setMenu(
|
this.btnMarkers.setMenu(
|
||||||
new Common.UI.Menu({
|
new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
style: 'min-width: 139px',
|
style: 'min-width: 139px',
|
||||||
items: [
|
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({
|
this.mnuMarkerSettings = new Common.UI.MenuItem({
|
||||||
caption: this.textListSettings,
|
caption: this.textListSettings,
|
||||||
value: 'settings'
|
value: 'settings'
|
||||||
|
@ -1119,8 +1124,9 @@ define([
|
||||||
|
|
||||||
this.btnNumbers.setMenu(
|
this.btnNumbers.setMenu(
|
||||||
new Common.UI.Menu({
|
new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [
|
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({
|
this.mnuNumberSettings = new Common.UI.MenuItem({
|
||||||
caption: this.textListSettings,
|
caption: this.textListSettings,
|
||||||
value: 'settings'
|
value: 'settings'
|
||||||
|
@ -1296,6 +1302,7 @@ define([
|
||||||
|
|
||||||
if (mnuColorSchema == null) {
|
if (mnuColorSchema == null) {
|
||||||
mnuColorSchema = new Common.UI.Menu({
|
mnuColorSchema = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
restoreHeight: true
|
restoreHeight: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1701,7 +1701,7 @@ define([
|
||||||
documentHolder.mnuChartEdit.chartInfo = elValue;
|
documentHolder.mnuChartEdit.chartInfo = elValue;
|
||||||
ischartmenu = true;
|
ischartmenu = true;
|
||||||
has_chartprops = true;
|
has_chartprops = true;
|
||||||
} if ( elValue.asc_getSlicerProperties() ) {
|
} else if ( elValue.asc_getSlicerProperties() ) {
|
||||||
documentHolder.mnuSlicerAdvanced.imageInfo = elValue;
|
documentHolder.mnuSlicerAdvanced.imageInfo = elValue;
|
||||||
isslicermenu = true;
|
isslicermenu = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1778,10 +1778,36 @@ define([
|
||||||
direct = value.asc_getVert(),
|
direct = value.asc_getVert(),
|
||||||
listtype = this.api.asc_getCurrentListType();
|
listtype = this.api.asc_getCurrentListType();
|
||||||
isObjLocked = isObjLocked || value.asc_getLocked();
|
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.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
|
||||||
documentHolder.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
|
documentHolder.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
|
||||||
documentHolder.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
|
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.menuParagraphDirectH.setChecked(direct == Asc.c_oAscVertDrawingText.normal);
|
||||||
documentHolder.menuParagraphDirect90.setChecked(direct == Asc.c_oAscVertDrawingText.vert);
|
documentHolder.menuParagraphDirect90.setChecked(direct == Asc.c_oAscVertDrawingText.vert);
|
||||||
documentHolder.menuParagraphDirect270.setChecked(direct == Asc.c_oAscVertDrawingText.vert270);
|
documentHolder.menuParagraphDirect270.setChecked(direct == Asc.c_oAscVertDrawingText.vert270);
|
||||||
|
@ -2726,6 +2752,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -2896,6 +2923,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -2923,6 +2951,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -2942,6 +2971,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -2971,6 +3001,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
@ -3023,6 +3054,7 @@ define([
|
||||||
equation : true,
|
equation : true,
|
||||||
disabled : me._currentParaObjDisabled,
|
disabled : me._currentParaObjDisabled,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,11 +90,13 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
me.menuViewCopy = new Common.UI.MenuItem({
|
me.menuViewCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption: me.txtCopy,
|
caption: me.txtCopy,
|
||||||
value: 'copy'
|
value: 'copy'
|
||||||
});
|
});
|
||||||
|
|
||||||
me.menuViewUndo = new Common.UI.MenuItem({
|
me.menuViewUndo = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-undo',
|
||||||
caption: me.textUndo
|
caption: me.textUndo
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -103,6 +105,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.menuViewAddComment = new Common.UI.MenuItem({
|
me.menuViewAddComment = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
id: 'id-context-menu-item-view-add-comment',
|
id: 'id-context-menu-item-view-add-comment',
|
||||||
caption: me.txtAddComment
|
caption: me.txtAddComment
|
||||||
});
|
});
|
||||||
|
@ -114,6 +117,7 @@ define([
|
||||||
me.menuViewSignSeparator = new Common.UI.MenuItem({caption: '--' });
|
me.menuViewSignSeparator = new Common.UI.MenuItem({caption: '--' });
|
||||||
|
|
||||||
this.viewModeMenu = new Common.UI.Menu({
|
this.viewModeMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
items: [
|
items: [
|
||||||
me.menuViewCopy,
|
me.menuViewCopy,
|
||||||
me.menuViewUndo,
|
me.menuViewUndo,
|
||||||
|
@ -139,11 +143,13 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiCopy = new Common.UI.MenuItem({
|
me.pmiCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.txtCopy,
|
caption : me.txtCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiPaste = new Common.UI.MenuItem({
|
me.pmiPaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.txtPaste,
|
caption : me.txtPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
});
|
});
|
||||||
|
@ -151,6 +157,7 @@ define([
|
||||||
me.pmiSelectTable = new Common.UI.MenuItem({
|
me.pmiSelectTable = new Common.UI.MenuItem({
|
||||||
caption : me.txtSelect,
|
caption : me.txtSelect,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{ caption: this.selectRowText, value: Asc.c_oAscChangeSelectionFormatTable.row},
|
{ caption: this.selectRowText, value: Asc.c_oAscChangeSelectionFormatTable.row},
|
||||||
|
@ -166,8 +173,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiInsertCells = new Common.UI.MenuItem({
|
me.pmiInsertCells = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-addcell',
|
||||||
caption : me.txtInsert,
|
caption : me.txtInsert,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
@ -188,8 +197,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiInsertTable = new Common.UI.MenuItem({
|
me.pmiInsertTable = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-addcell',
|
||||||
caption : me.txtInsert,
|
caption : me.txtInsert,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{ caption: me.insertRowAboveText, value: Asc.c_oAscInsertOptions.InsertTableRowAbove},
|
{ caption: me.insertRowAboveText, value: Asc.c_oAscInsertOptions.InsertTableRowAbove},
|
||||||
|
@ -205,8 +216,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiDeleteCells = new Common.UI.MenuItem({
|
me.pmiDeleteCells = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-delcell',
|
||||||
caption : me.txtDelete,
|
caption : me.txtDelete,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
@ -227,8 +240,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiDeleteTable = new Common.UI.MenuItem({
|
me.pmiDeleteTable = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-delcell',
|
||||||
caption : me.txtDelete,
|
caption : me.txtDelete,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{ caption: this.deleteRowText, value: Asc.c_oAscDeleteOptions.DeleteRows},
|
{ caption: this.deleteRowText, value: Asc.c_oAscDeleteOptions.DeleteRows},
|
||||||
|
@ -239,8 +254,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiClear = new Common.UI.MenuItem({
|
me.pmiClear = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-clearstyle',
|
||||||
caption : me.txtClear,
|
caption : me.txtClear,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
@ -270,12 +287,15 @@ define([
|
||||||
me.pmiSortCells = new Common.UI.MenuItem({
|
me.pmiSortCells = new Common.UI.MenuItem({
|
||||||
caption : me.txtSort,
|
caption : me.txtSort,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
iconCls: 'menu__icon btn-sort-down',
|
||||||
caption : me.txtAscending,
|
caption : me.txtAscending,
|
||||||
value : Asc.c_oAscSortOptions.Ascending
|
value : Asc.c_oAscSortOptions.Ascending
|
||||||
},{
|
},{
|
||||||
|
iconCls: 'menu__icon btn-sort-up',
|
||||||
caption : me.txtDescending,
|
caption : me.txtDescending,
|
||||||
value : Asc.c_oAscSortOptions.Descending
|
value : Asc.c_oAscSortOptions.Descending
|
||||||
},{
|
},{
|
||||||
|
@ -290,8 +310,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiFilterCells = new Common.UI.MenuItem({
|
me.pmiFilterCells = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-autofilter',
|
||||||
caption : me.txtFilter,
|
caption : me.txtFilter,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
@ -313,6 +335,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiInsFunction = new Common.UI.MenuItem({
|
me.pmiInsFunction = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-function',
|
||||||
caption : me.txtFormula
|
caption : me.txtFormula
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -333,6 +356,7 @@ define([
|
||||||
me.menuHyperlink = new Common.UI.MenuItem({
|
me.menuHyperlink = new Common.UI.MenuItem({
|
||||||
caption : me.txtInsHyperlink,
|
caption : me.txtInsHyperlink,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuEditHyperlink,
|
me.menuEditHyperlink,
|
||||||
|
@ -344,6 +368,7 @@ define([
|
||||||
me.pmiRowHeight = new Common.UI.MenuItem({
|
me.pmiRowHeight = new Common.UI.MenuItem({
|
||||||
caption : me.txtRowHeight,
|
caption : me.txtRowHeight,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{ caption: me.txtAutoRowHeight, value: 'auto-row-height' },
|
{ caption: me.txtAutoRowHeight, value: 'auto-row-height' },
|
||||||
|
@ -355,6 +380,7 @@ define([
|
||||||
me.pmiColumnWidth = new Common.UI.MenuItem({
|
me.pmiColumnWidth = new Common.UI.MenuItem({
|
||||||
caption : me.txtColumnWidth,
|
caption : me.txtColumnWidth,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{ caption: me.txtAutoColumnWidth, value: 'auto-column-width' },
|
{ caption: me.txtAutoColumnWidth, value: 'auto-column-width' },
|
||||||
|
@ -372,6 +398,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiAddComment = new Common.UI.MenuItem({
|
me.pmiAddComment = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-menu-comments',
|
||||||
id : 'id-context-menu-item-add-comment',
|
id : 'id-context-menu-item-add-comment',
|
||||||
caption : me.txtAddComment
|
caption : me.txtAddComment
|
||||||
});
|
});
|
||||||
|
@ -396,6 +423,7 @@ define([
|
||||||
me.pmiSparklines = new Common.UI.MenuItem({
|
me.pmiSparklines = new Common.UI.MenuItem({
|
||||||
caption : me.txtSparklines,
|
caption : me.txtSparklines,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{ caption: me.txtClearSparklines, value: Asc.c_oAscCleanOptions.Sparklines },
|
{ caption: me.txtClearSparklines, value: Asc.c_oAscCleanOptions.Sparklines },
|
||||||
|
@ -413,6 +441,7 @@ define([
|
||||||
me.pmiNumFormat = new Common.UI.MenuItem({
|
me.pmiNumFormat = new Common.UI.MenuItem({
|
||||||
caption: me.txtNumFormat,
|
caption: me.txtNumFormat,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
@ -505,6 +534,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.ssMenu = new Common.UI.Menu({
|
me.ssMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
id : 'id-context-menu-cell',
|
id : 'id-context-menu-cell',
|
||||||
items : [
|
items : [
|
||||||
me.pmiCut,
|
me.pmiCut,
|
||||||
|
@ -560,10 +590,12 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.mnuShapeAdvanced = new Common.UI.MenuItem({
|
me.mnuShapeAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls : 'menu__icon btn-menu-shape',
|
||||||
caption : me.advancedShapeText
|
caption : me.advancedShapeText
|
||||||
});
|
});
|
||||||
|
|
||||||
me.mnuImgAdvanced = new Common.UI.MenuItem({
|
me.mnuImgAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls : 'menu__icon btn-menu-image',
|
||||||
caption : me.advancedImgText
|
caption : me.advancedImgText
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -572,10 +604,12 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.mnuSlicerAdvanced = new Common.UI.MenuItem({
|
me.mnuSlicerAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls : 'menu__icon btn-slicer',
|
||||||
caption : me.advancedSlicerText
|
caption : me.advancedSlicerText
|
||||||
});
|
});
|
||||||
|
|
||||||
me.mnuChartEdit = new Common.UI.MenuItem({
|
me.mnuChartEdit = new Common.UI.MenuItem({
|
||||||
|
iconCls : 'menu__icon btn-menu-chart',
|
||||||
caption : me.chartText
|
caption : me.chartText
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -585,11 +619,13 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiImgCopy = new Common.UI.MenuItem({
|
me.pmiImgCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.txtCopy,
|
caption : me.txtCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiImgPaste = new Common.UI.MenuItem({
|
me.pmiImgPaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.txtPaste,
|
caption : me.txtPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
});
|
});
|
||||||
|
@ -605,6 +641,7 @@ define([
|
||||||
me.menuImgReplace = new Common.UI.MenuItem({
|
me.menuImgReplace = new Common.UI.MenuItem({
|
||||||
caption : me.textReplace,
|
caption : me.textReplace,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({caption : this.textFromFile, value: 'file'}),
|
new Common.UI.MenuItem({caption : this.textFromFile, value: 'file'}),
|
||||||
|
@ -617,6 +654,7 @@ define([
|
||||||
me.menuImgCrop = new Common.UI.MenuItem({
|
me.menuImgCrop = new Common.UI.MenuItem({
|
||||||
caption : me.textCrop,
|
caption : me.textCrop,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -665,6 +703,7 @@ define([
|
||||||
me.menuImageArrange = new Common.UI.MenuItem({
|
me.menuImageArrange = new Common.UI.MenuItem({
|
||||||
caption : me.textArrange,
|
caption : me.textArrange,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
me.mnuBringToFront,
|
me.mnuBringToFront,
|
||||||
|
@ -681,6 +720,7 @@ define([
|
||||||
me.menuImageAlign = new Common.UI.MenuItem({
|
me.menuImageAlign = new Common.UI.MenuItem({
|
||||||
caption : me.textAlign,
|
caption : me.textAlign,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [{
|
items: [{
|
||||||
caption : me.textShapeAlignLeft,
|
caption : me.textShapeAlignLeft,
|
||||||
|
@ -724,25 +764,30 @@ define([
|
||||||
me.menuImgRotate = new Common.UI.MenuItem({
|
me.menuImgRotate = new Common.UI.MenuItem({
|
||||||
caption : me.textRotate,
|
caption : me.textRotate,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-rotate-90',
|
||||||
caption: me.textRotate90,
|
caption: me.textRotate90,
|
||||||
type : 'rotate',
|
type : 'rotate',
|
||||||
value : 1
|
value : 1
|
||||||
}),
|
}),
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-rotate-270',
|
||||||
caption: me.textRotate270,
|
caption: me.textRotate270,
|
||||||
type : 'rotate',
|
type : 'rotate',
|
||||||
value : 0
|
value : 0
|
||||||
}),
|
}),
|
||||||
{ caption: '--' },
|
{ caption: '--' },
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-flip-hor',
|
||||||
caption: me.textFlipH,
|
caption: me.textFlipH,
|
||||||
type : 'flip',
|
type : 'flip',
|
||||||
value : 1
|
value : 1
|
||||||
}),
|
}),
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-flip-vert',
|
||||||
caption: me.textFlipV,
|
caption: me.textFlipV,
|
||||||
type : 'flip',
|
type : 'flip',
|
||||||
value : 0
|
value : 0
|
||||||
|
@ -752,6 +797,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.imgMenu = new Common.UI.Menu({
|
this.imgMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
items: [
|
items: [
|
||||||
me.pmiImgCut,
|
me.pmiImgCut,
|
||||||
me.pmiImgCopy,
|
me.pmiImgCopy,
|
||||||
|
@ -776,25 +822,33 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.menuParagraphVAlign = new Common.UI.MenuItem({
|
this.menuParagraphVAlign = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : this.vertAlignText,
|
caption : this.vertAlignText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items: [
|
items: [
|
||||||
me.menuParagraphTop = new Common.UI.MenuItem({
|
me.menuParagraphTop = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-top',
|
||||||
caption : me.topCellText,
|
caption : me.topCellText,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
value : Asc.c_oAscVAlign.Top
|
value : Asc.c_oAscVAlign.Top
|
||||||
}),
|
}),
|
||||||
me.menuParagraphCenter = new Common.UI.MenuItem({
|
me.menuParagraphCenter = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-middle',
|
||||||
caption : me.centerCellText,
|
caption : me.centerCellText,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
value : Asc.c_oAscVAlign.Center
|
value : Asc.c_oAscVAlign.Center
|
||||||
}),
|
}),
|
||||||
this.menuParagraphBottom = new Common.UI.MenuItem({
|
this.menuParagraphBottom = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-align-bottom',
|
||||||
caption : me.bottomCellText,
|
caption : me.bottomCellText,
|
||||||
checkable : true,
|
checkable : true,
|
||||||
|
checkmark : false,
|
||||||
toggleGroup : 'popupparagraphvalign',
|
toggleGroup : 'popupparagraphvalign',
|
||||||
value : Asc.c_oAscVAlign.Bottom
|
value : Asc.c_oAscVAlign.Bottom
|
||||||
})
|
})
|
||||||
|
@ -803,8 +857,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.menuParagraphDirection = new Common.UI.MenuItem({
|
me.menuParagraphDirection = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon text-orient-hor',
|
||||||
caption : me.directionText,
|
caption : me.directionText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuParagraphDirectH = new Common.UI.MenuItem({
|
me.menuParagraphDirectH = new Common.UI.MenuItem({
|
||||||
|
@ -839,8 +895,10 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.menuParagraphBullets = new Common.UI.MenuItem({
|
me.menuParagraphBullets = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-setmarkers',
|
||||||
caption : me.bulletsText,
|
caption : me.bulletsText,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{ template: _.template('<div id="id-docholder-menu-bullets" class="menu-layouts" style="width: 184px; margin: 0 4px;"></div>') },
|
{ template: _.template('<div id="id-docholder-menu-bullets" class="menu-layouts" style="width: 184px; margin: 0 4px;"></div>') },
|
||||||
|
@ -897,6 +955,7 @@ define([
|
||||||
me.menuHyperlinkShape = new Common.UI.MenuItem({
|
me.menuHyperlinkShape = new Common.UI.MenuItem({
|
||||||
caption : me.txtInsHyperlink,
|
caption : me.txtInsHyperlink,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
me.menuEditHyperlinkShape,
|
me.menuEditHyperlinkShape,
|
||||||
|
@ -906,6 +965,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this.pmiTextAdvanced = new Common.UI.MenuItem({
|
this.pmiTextAdvanced = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paragraph',
|
||||||
caption : me.txtTextAdvanced
|
caption : me.txtTextAdvanced
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -915,16 +975,19 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiTextCopy = new Common.UI.MenuItem({
|
me.pmiTextCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.txtCopy,
|
caption : me.txtCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiTextPaste = new Common.UI.MenuItem({
|
me.pmiTextPaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.txtPaste,
|
caption : me.txtPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
});
|
});
|
||||||
|
|
||||||
this.textInShapeMenu = new Common.UI.Menu({
|
this.textInShapeMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
items: [
|
items: [
|
||||||
me.pmiTextCut,
|
me.pmiTextCut,
|
||||||
me.pmiTextCopy,
|
me.pmiTextCopy,
|
||||||
|
@ -946,16 +1009,19 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiCommonCopy = new Common.UI.MenuItem({
|
me.pmiCommonCopy = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-copy',
|
||||||
caption : me.txtCopy,
|
caption : me.txtCopy,
|
||||||
value : 'copy'
|
value : 'copy'
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pmiCommonPaste = new Common.UI.MenuItem({
|
me.pmiCommonPaste = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon btn-paste',
|
||||||
caption : me.txtPaste,
|
caption : me.txtPaste,
|
||||||
value : 'paste'
|
value : 'paste'
|
||||||
});
|
});
|
||||||
|
|
||||||
this.copyPasteMenu = new Common.UI.Menu({
|
this.copyPasteMenu = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-right',
|
||||||
items: [
|
items: [
|
||||||
me.pmiCommonCut,
|
me.pmiCommonCut,
|
||||||
me.pmiCommonCopy,
|
me.pmiCommonCopy,
|
||||||
|
|
|
@ -1046,6 +1046,7 @@ define([
|
||||||
iconCls : 'toolbar__icon toolbar__icon btn-colorschemas',
|
iconCls : 'toolbar__icon toolbar__icon btn-colorschemas',
|
||||||
lock : [_set.editCell, _set.lostConnect, _set.coAuth],
|
lock : [_set.editCell, _set.lostConnect, _set.coAuth],
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
items: [],
|
items: [],
|
||||||
restoreHeight: true
|
restoreHeight: true
|
||||||
})
|
})
|
||||||
|
@ -1985,6 +1986,7 @@ define([
|
||||||
|
|
||||||
if (this.mnuColorSchema == null) {
|
if (this.mnuColorSchema == null) {
|
||||||
this.mnuColorSchema = new Common.UI.Menu({
|
this.mnuColorSchema = new Common.UI.Menu({
|
||||||
|
cls: 'shifted-left',
|
||||||
restoreHeight: true
|
restoreHeight: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|