web-apps/apps/presentationeditor/main/app/view/Toolbar.js

2072 lines
108 KiB
JavaScript
Raw Normal View History

2016-04-01 13:17:09 +00:00
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
2016-04-01 13:17:09 +00:00
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
2016-04-01 13:17:09 +00:00
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
2016-03-11 00:48:53 +00:00
/**
* Toolbar.js
*
* Toolbar view
*
* Created by Alexander Yuzhin on 4/16/14
2018-03-01 12:16:38 +00:00
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
2016-03-11 00:48:53 +00:00
*
*/
define([
'backbone',
'text!presentationeditor/main/app/template/Toolbar.template',
2018-05-17 08:37:24 +00:00
'text!presentationeditor/main/app/template/ToolbarView.template',
2016-03-11 00:48:53 +00:00
'common/main/lib/collection/Fonts',
'common/main/lib/component/Button',
'common/main/lib/component/ComboBox',
'common/main/lib/component/DataView',
'common/main/lib/component/ColorPalette',
'common/main/lib/component/ThemeColorPalette',
'common/main/lib/component/Menu',
'common/main/lib/component/DimensionPicker',
'common/main/lib/component/Window',
'common/main/lib/component/ComboBoxFonts',
'common/main/lib/component/ComboDataView'
,'common/main/lib/component/SynchronizeTip'
,'common/main/lib/component/Mixtbar',
'common/main/lib/component/ComboDataViewShape'
], function (Backbone, template, template_view) {
2016-03-11 00:48:53 +00:00
'use strict';
2021-12-29 16:41:15 +00:00
if (!Common.enumLock)
Common.enumLock = {};
var enumLock = {
2016-03-11 00:48:53 +00:00
paragraphLock: 'para-lock',
shapeLock: 'shape-lock',
slideLock: 'slide-lock',
slideDeleted: 'slide-deleted',
noSlides: 'no-slides',
lostConnect: 'disconnect',
incIndentLock: 'can-inc-indent',
decIndentLock: 'can-dec-indent',
hyperlinkLock: 'can-hyperlink',
undoLock: 'can-undo',
redoLock: 'can-redo',
docPropsLock: 'doc-props-lock',
themeLock: 'theme-lock',
menuFileOpen: 'menu-file-open',
noParagraphSelected: 'no-paragraph',
noObjectSelected: 'no-object',
disableOnStart: 'on-start',
2016-05-16 09:15:18 +00:00
cantPrint: 'cant-print',
2016-10-25 10:48:31 +00:00
noTextSelected: 'no-text',
inEquation: 'in-equation',
2021-01-12 20:01:55 +00:00
commentLock: 'can-comment',
2021-08-02 23:06:03 +00:00
noColumns: 'no-columns',
transitLock: 'transit-lock',
inSmartart: 'in-smartart',
inSmartartInternal: 'in-smartart-internal',
noGraphic: 'no-graphic',
noAnimation: 'no-animation',
noAnimationParam: 'no-animation-params',
2021-12-17 00:30:16 +00:00
noTriggerObjects: 'no-trigger-objects',
noMoveAnimationEarlier: 'no-move-animation-earlier',
noMoveAnimationLater: 'no-move-animation-later',
2022-01-17 23:55:01 +00:00
noAnimationPreview: 'no-animation-preview',
noAnimationRepeat: 'no-animation-repeat',
2022-04-01 10:10:56 +00:00
noAnimationDuration: 'no-animation-duration',
timingLock: 'timing-lock'
2016-03-11 00:48:53 +00:00
};
2021-12-29 16:41:15 +00:00
for (var key in enumLock) {
if (enumLock.hasOwnProperty(key)) {
Common.enumLock[key] = enumLock[key];
}
}
2016-03-11 00:48:53 +00:00
2017-04-22 13:11:04 +00:00
PE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend((function(){
2017-04-20 13:34:39 +00:00
return {
el: '#toolbar',
// Delegated events for creating new items, and clearing completed ones.
events: {
//
},
initialize: function () {
var me = this;
me.paragraphControls = [];
me.shapeControls = [];
me.slideOnlyControls = [];
me.synchTooltip = undefined;
2018-04-27 10:25:18 +00:00
me.needShowSynchTip = false;
2021-05-19 20:54:27 +00:00
me.SchemeNames = [me.txtScheme22,
2017-04-20 13:34:39 +00:00
me.txtScheme1, me.txtScheme2, me.txtScheme3, me.txtScheme4, me.txtScheme5,
me.txtScheme6, me.txtScheme7, me.txtScheme8, me.txtScheme9, me.txtScheme10,
me.txtScheme11, me.txtScheme12, me.txtScheme13, me.txtScheme14, me.txtScheme15,
me.txtScheme16, me.txtScheme17, me.txtScheme18, me.txtScheme19, me.txtScheme20,
me.txtScheme21
];
me._state = {
hasCollaborativeChanges: undefined
};
2019-08-21 14:08:21 +00:00
me.binding = {};
2017-04-20 13:34:39 +00:00
Common.NotificationCenter.on('app:ready', me.onAppReady.bind(this));
return this;
},
2017-04-20 13:34:39 +00:00
applyLayout: function (config) {
var me = this;
me.lockControls = [];
if ( config.isEdit ) {
Common.UI.Mixtbar.prototype.initialize.call(this, {
template: _.template(template),
tabs: [
{caption: me.textTabFile, action: 'file', extcls: 'canedit', layoutname: 'toolbar-file', haspanel:false, dataHintTitle: 'F'},
{caption: me.textTabHome, action: 'home', extcls: 'canedit', dataHintTitle: 'H'},
{caption: me.textTabInsert, action: 'ins', extcls: 'canedit', dataHintTitle: 'I'},
2021-12-08 11:31:11 +00:00
{caption: me.textTabTransitions, action: 'transit', extcls: 'canedit', dataHintTitle: 'N'},
{caption: me.textTabAnimation, action: 'animate', extcls: 'canedit', dataHintTitle: 'A'}
// undefined, undefined, undefined,
]
2016-03-11 00:48:53 +00:00
}
);
me.btnSaveCls = 'btn-save';
me.btnSaveTip = this.tipSave + Common.Utils.String.platformKey('Ctrl+S');
/**
* UI Components
*/
2021-12-29 16:41:15 +00:00
var _set = Common.enumLock;
me.btnChangeSlide = new Common.UI.Button({
id: 'id-toolbar-button-change-slide',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-changeslide',
lock: [_set.menuFileOpen, _set.slideDeleted, _set.slideLock, _set.lostConnect, _set.noSlides, _set.disableOnStart],
menu: true,
dataHint: '1',
dataHintDirection: 'top',
dataHintOffset: '0, -6'
});
me.slideOnlyControls.push(me.btnChangeSlide);
me.btnPreview = new Common.UI.Button({
id: 'id-toolbar-button-preview',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-preview',
lock: [_set.menuFileOpen, _set.slideDeleted, _set.noSlides, _set.disableOnStart],
split: true,
menu: new Common.UI.Menu({
items: [
{caption: this.textShowBegin, value: 0},
{caption: this.textShowCurrent, value: 1},
{caption: this.textShowPresenterView, value: 2},
{caption: '--'},
me.mnuShowSettings = new Common.UI.MenuItem({
caption: this.textShowSettings,
value: 3,
lock: [_set.lostConnect]
})
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -16'
});
me.slideOnlyControls.push(me.btnPreview);
me.btnPrint = new Common.UI.Button({
id: 'id-toolbar-btn-print',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-print no-mask',
lock: [_set.slideDeleted, _set.noSlides, _set.cantPrint, _set.disableOnStart],
signals: ['disabled'],
dataHint: '1',
2022-06-25 19:36:11 +00:00
dataHintDirection: 'bottom',
dataHintTitle: 'P'
});
2018-09-25 13:19:33 +00:00
me.slideOnlyControls.push(me.btnPrint);
me.btnSave = new Common.UI.Button({
id: 'id-toolbar-btn-save',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon no-mask ' + me.btnSaveCls,
lock: [_set.lostConnect],
signals: ['disabled'],
dataHint: '1',
2022-06-25 19:36:11 +00:00
dataHintDirection: 'top',
dataHintTitle: 'S'
});
me.btnCollabChanges = me.btnSave;
me.btnUndo = new Common.UI.Button({
id: 'id-toolbar-btn-undo',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-undo',
lock: [_set.undoLock, _set.slideDeleted, _set.lostConnect, _set.disableOnStart],
signals: ['disabled'],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintTitle: 'Z'
});
me.slideOnlyControls.push(me.btnUndo);
me.btnRedo = new Common.UI.Button({
id: 'id-toolbar-btn-redo',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-redo',
lock: [_set.redoLock, _set.slideDeleted, _set.lostConnect, _set.disableOnStart],
signals: ['disabled'],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintTitle: 'Y'
});
me.slideOnlyControls.push(me.btnRedo);
me.btnCopy = new Common.UI.Button({
id: 'id-toolbar-btn-copy',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-copy',
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'top',
dataHintTitle: 'C'
});
me.slideOnlyControls.push(me.btnCopy);
me.btnPaste = new Common.UI.Button({
id: 'id-toolbar-btn-paste',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-paste',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides],
dataHint: '1',
dataHintDirection: 'top',
dataHintTitle: 'V'
});
me.paragraphControls.push(me.btnPaste);
me.btnCut = new Common.UI.Button({
id: 'id-toolbar-btn-cut',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-cut',
lock: [_set.slideDeleted, _set.paragraphLock, _set.shapeLock, _set.slideLock, _set.lostConnect, _set.noSlides, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'top',
dataHintTitle: 'X'
});
me.paragraphControls.push(me.btnCut);
me.btnSelectAll = new Common.UI.Button({
id: 'id-toolbar-btn-select-all',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon select-all',
lock: [_set.noSlides, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'bottom'
});
me.slideOnlyControls.push(me.btnSelectAll);
me.cmbFontName = new Common.UI.ComboBoxFonts({
cls: 'input-group-nr',
menuCls: 'scrollable-menu',
menuStyle: 'min-width: 325px;',
hint: me.tipFontName,
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
store: new Common.Collections.Fonts(),
dataHint: '1',
dataHintDirection: 'top'
});
me.paragraphControls.push(me.cmbFontName);
me.cmbFontSize = new Common.UI.ComboBox({
cls: 'input-group-nr',
menuStyle: 'min-width: 55px;',
hint: me.tipFontSize,
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
data: [
{value: 8, displayValue: "8"},
{value: 9, displayValue: "9"},
{value: 10, displayValue: "10"},
{value: 11, displayValue: "11"},
{value: 12, displayValue: "12"},
{value: 14, displayValue: "14"},
{value: 16, displayValue: "16"},
{value: 18, displayValue: "18"},
{value: 20, displayValue: "20"},
{value: 22, displayValue: "22"},
{value: 24, displayValue: "24"},
{value: 26, displayValue: "26"},
{value: 28, displayValue: "28"},
{value: 36, displayValue: "36"},
{value: 48, displayValue: "48"},
2019-02-12 11:48:27 +00:00
{value: 72, displayValue: "72"},
{value: 96, displayValue: "96"}
],
dataHint: '1',
dataHintDirection: 'top'
});
me.paragraphControls.push(me.cmbFontSize);
2020-11-27 21:23:26 +00:00
me.btnIncFontSize = new Common.UI.Button({
id: 'id-toolbar-btn-incfont',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-incfont',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
dataHint: '1',
dataHintDirection: 'top'
2020-11-27 21:23:26 +00:00
});
me.paragraphControls.push(me.btnIncFontSize);
me.btnDecFontSize = new Common.UI.Button({
id: 'id-toolbar-btn-decfont',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-decfont',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
dataHint: '1',
dataHintDirection: 'top'
2020-11-27 21:23:26 +00:00
});
me.paragraphControls.push(me.btnDecFontSize);
me.btnBold = new Common.UI.Button({
id: 'id-toolbar-btn-bold',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-bold',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
enableToggle: true,
dataHint: '1',
dataHintDirection: 'bottom'
});
me.paragraphControls.push(me.btnBold);
me.btnItalic = new Common.UI.Button({
id: 'id-toolbar-btn-italic',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-italic',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
enableToggle: true,
dataHint: '1',
dataHintDirection: 'bottom'
});
me.paragraphControls.push(me.btnItalic);
me.btnUnderline = new Common.UI.Button({
id: 'id-toolbar-btn-underline',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-underline',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
enableToggle: true,
dataHint: '1',
dataHintDirection: 'bottom'
});
me.paragraphControls.push(me.btnUnderline);
me.btnStrikeout = new Common.UI.Button({
id: 'id-toolbar-btn-strikeout',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-strikeout',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
enableToggle: true,
dataHint: '1',
dataHintDirection: 'bottom'
});
me.paragraphControls.push(me.btnStrikeout);
me.btnSuperscript = new Common.UI.Button({
id: 'id-toolbar-btn-superscript',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-superscript',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock, _set.inEquation],
enableToggle: true,
toggleGroup: 'superscriptGroup',
dataHint: '1',
dataHintDirection: 'bottom'
});
me.paragraphControls.push(me.btnSuperscript);
me.btnSubscript = new Common.UI.Button({
id: 'id-toolbar-btn-subscript',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-subscript',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock, _set.inEquation],
enableToggle: true,
toggleGroup: 'superscriptGroup',
dataHint: '1',
dataHintDirection: 'bottom'
});
me.paragraphControls.push(me.btnSubscript);
me.btnHighlightColor = new Common.UI.ButtonColored({
id: 'id-toolbar-btn-highlight',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-highlight',
enableToggle: true,
allowDepress: true,
split: true,
2022-03-28 13:56:22 +00:00
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
menu: new Common.UI.Menu({
style: 'min-width: 100px;',
items: [
{template: _.template('<div id="id-toolbar-menu-highlight" style="width: 145px; display: inline-block;" class="palette-large"></div>')},
{caption: '--'},
me.mnuHighlightTransparent = new Common.UI.MenuItem({
caption: me.strMenuNoFill,
checkable: true
})
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -16'
});
me.paragraphControls.push(me.btnHighlightColor);
2021-01-21 19:48:27 +00:00
me.btnFontColor = new Common.UI.ButtonColored({
id: 'id-toolbar-btn-fontcolor',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-fontcolor',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
split: true,
menu: true,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -16'
});
me.paragraphControls.push(me.btnFontColor);
2021-01-29 13:06:51 +00:00
me.btnChangeCase = new Common.UI.Button({
id: 'id-toolbar-btn-case',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-change-case',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
menu: new Common.UI.Menu({
items: [
{caption: me.mniSentenceCase, value: Asc.c_oAscChangeTextCaseType.SentenceCase},
{caption: me.mniLowerCase, value: Asc.c_oAscChangeTextCaseType.LowerCase},
{caption: me.mniUpperCase, value: Asc.c_oAscChangeTextCaseType.UpperCase},
{caption: me.mniCapitalizeWords, value: Asc.c_oAscChangeTextCaseType.CapitalizeWords},
{caption: me.mniToggleCase, value: Asc.c_oAscChangeTextCaseType.ToggleCase}
]
}),
dataHint: '1',
dataHintDirection: 'top',
dataHintOffset: '0, -6'
2021-01-29 13:06:51 +00:00
});
me.paragraphControls.push(me.btnChangeCase);
me.mnuChangeCase = me.btnChangeCase.menu;
me.btnClearStyle = new Common.UI.Button({
id: 'id-toolbar-btn-clearstyle',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-clearstyle',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
dataHint: '1',
dataHintDirection: 'top'
});
me.paragraphControls.push(me.btnClearStyle);
me.btnCopyStyle = new Common.UI.Button({
id: 'id-toolbar-btn-copystyle',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-copystyle',
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.noParagraphSelected, _set.disableOnStart],
enableToggle: true,
dataHint: '1',
dataHintDirection: 'bottom'
});
me.slideOnlyControls.push(me.btnCopyStyle);
me.btnMarkers = new Common.UI.Button({
id: 'id-toolbar-btn-markers',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-setmarkers',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected, _set.inSmartart, _set.inSmartartInternal],
enableToggle: true,
toggleGroup: 'markersGroup',
split: true,
menu: true,
dataHint: '1',
dataHintDirection: 'top',
dataHintOffset: '0, -16'
});
me.paragraphControls.push(me.btnMarkers);
me.btnNumbers = new Common.UI.Button({
id: 'id-toolbar-btn-numbering',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-numbering',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected, _set.inSmartart, _set.inSmartartInternal],
enableToggle: true,
toggleGroup: 'markersGroup',
split: true,
menu: true,
dataHint: '1',
dataHintDirection: 'top',
dataHintOffset: '0, -16'
});
me.paragraphControls.push(me.btnNumbers);
var clone = function (source) {
var obj = {};
for (var prop in source)
obj[prop] = (typeof(source[prop]) == 'object') ? clone(source[prop]) : source[prop];
return obj;
};
this.mnuMarkersPicker = {
conf: {index: 0},
selectByIndex: function (idx) {
this.conf.index = idx;
}
};
this.mnuNumbersPicker = clone(this.mnuMarkersPicker);
me.btnHorizontalAlign = new Common.UI.Button({
id: 'id-toolbar-btn-halign',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-align-left',
icls: 'btn-align-left',
2020-10-09 14:24:11 +00:00
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
menu: new Common.UI.Menu({
items: [
{
caption: me.textAlignLeft + Common.Utils.String.platformKey('Ctrl+L'),
iconCls: 'menu__icon btn-align-left',
icls: 'btn-align-left',
checkable: true,
checkmark: false,
toggleGroup: 'halignGroup',
checked: true,
value: 1
},
{
caption: me.textAlignCenter + Common.Utils.String.platformKey('Ctrl+E'),
iconCls: 'menu__icon btn-align-center',
icls: 'btn-align-center',
checkable: true,
checkmark: false,
toggleGroup: 'halignGroup',
value: 2
},
{
caption: me.textAlignRight + Common.Utils.String.platformKey('Ctrl+R'),
iconCls: 'menu__icon btn-align-right',
icls: 'btn-align-right',
checkable: true,
checkmark: false,
toggleGroup: 'halignGroup',
value: 0
},
{
caption: me.textAlignJust + Common.Utils.String.platformKey('Ctrl+J'),
iconCls: 'menu__icon btn-align-just',
icls: 'btn-align-just',
checkable: true,
checkmark: false,
toggleGroup: 'halignGroup',
value: 3
}
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -6'
});
me.paragraphControls.push(me.btnHorizontalAlign);
me.btnVerticalAlign = new Common.UI.Button({
id: 'id-toolbar-btn-valign',
cls: 'btn-toolbar',
2020-10-09 14:24:11 +00:00
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected, _set.noObjectSelected],
iconCls: 'toolbar__icon btn-align-middle',
icls: 'btn-align-middle',
menu: new Common.UI.Menu({
items: [
{
caption: me.textAlignTop,
iconCls: 'menu__icon btn-align-top',
icls: 'btn-align-top',
checkable: true,
checkmark: false,
toggleGroup: 'valignGroup',
value: Asc.c_oAscVAlign.Top
},
{
caption: me.textAlignMiddle,
iconCls: 'menu__icon btn-align-middle',
icls: 'btn-align-middle',
checkable: true,
checkmark: false,
toggleGroup: 'valignGroup',
value: Asc.c_oAscVAlign.Center,
checked: true
},
{
caption: me.textAlignBottom,
iconCls: 'menu__icon btn-align-bottom',
icls: 'btn-align-bottom',
checkable: true,
checkmark: false,
toggleGroup: 'valignGroup',
value: Asc.c_oAscVAlign.Bottom
}
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -6'
});
me.paragraphControls.push(me.btnVerticalAlign);
me.btnDecLeftOffset = new Common.UI.Button({
id: 'id-toolbar-btn-decoffset',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-decoffset',
lock: [_set.decIndentLock, _set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected, _set.inSmartart, _set.inSmartartInternal],
dataHint: '1',
dataHintDirection: 'top'
});
me.paragraphControls.push(me.btnDecLeftOffset);
me.btnIncLeftOffset = new Common.UI.Button({
id: 'id-toolbar-btn-incoffset',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-incoffset',
lock: [_set.incIndentLock, _set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected, _set.inSmartart, _set.inSmartartInternal],
dataHint: '1',
dataHintDirection: 'top'
});
me.paragraphControls.push(me.btnIncLeftOffset);
me.btnLineSpace = new Common.UI.Button({
id: 'id-toolbar-btn-linespace',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-linespace',
2020-10-09 14:24:11 +00:00
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
menu: new Common.UI.Menu({
style: 'min-width: 60px;',
items: [
{caption: '1.0', value: 1.0, checkable: true, toggleGroup: 'linesize'},
{caption: '1.15', value: 1.15, checkable: true, toggleGroup: 'linesize'},
{caption: '1.5', value: 1.5, checkable: true, toggleGroup: 'linesize'},
{caption: '2.0', value: 2.0, checkable: true, toggleGroup: 'linesize'},
{caption: '2.5', value: 2.5, checkable: true, toggleGroup: 'linesize'},
{caption: '3.0', value: 3.0, checkable: true, toggleGroup: 'linesize'}
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -6'
});
me.paragraphControls.push(me.btnLineSpace);
2021-01-12 20:01:55 +00:00
me.btnColumns = new Common.UI.Button({
id: 'id-toolbar-btn-columns',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon columns-two',
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected, _set.noColumns],
menu: new Common.UI.Menu({
cls: 'ppm-toolbar shifted-right',
items: [
{
caption: this.textColumnsOne,
iconCls: 'menu__icon columns-one',
checkable: true,
checkmark: false,
toggleGroup: 'menuColumns',
value: 0
},
{
caption: this.textColumnsTwo,
iconCls: 'menu__icon columns-two',
checkable: true,
checkmark: false,
toggleGroup: 'menuColumns',
value: 1
},
{
caption: this.textColumnsThree,
iconCls: 'menu__icon columns-three',
checkable: true,
checkmark: false,
toggleGroup: 'menuColumns',
value: 2
},
{caption: '--'},
{caption: this.textColumnsCustom, value: 'advanced'}
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -6'
2021-01-12 20:01:55 +00:00
});
me.paragraphControls.push(me.btnColumns);
me.btnInsertTable = new Common.UI.Button({
id: 'tlbtn-inserttable',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-inserttable',
caption: me.capInsertTable,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
2022-04-01 14:58:01 +00:00
{caption: me.mniCustomTable, value: 'custom'},
{caption: me.mniInsertSSE, value: 'sse'}
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.slideOnlyControls.push(me.btnInsertTable);
me.btnInsertChart = new Common.UI.Button({
id: 'tlbtn-insertchart',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-insertchart',
caption: me.capInsertChart,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
menu: true,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.slideOnlyControls.push(me.btnInsertChart);
me.btnInsertEquation = new Common.UI.Button({
id: 'tlbtn-insertequation',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-insertequation',
caption: me.capInsertEquation,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
split: true,
menu: new Common.UI.Menu({cls: 'menu-shapes'}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.slideOnlyControls.push(this.btnInsertEquation);
2019-11-14 08:48:58 +00:00
me.btnInsertSymbol = new Common.UI.Button({
id: 'tlbtn-insertsymbol',
cls: 'btn-toolbar x-huge icon-top',
2019-11-29 11:46:58 +00:00
iconCls: 'toolbar__icon btn-symbol',
2019-11-14 08:48:58 +00:00
caption: me.capBtnInsSymbol,
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
2019-11-14 08:48:58 +00:00
});
me.paragraphControls.push(me.btnInsertSymbol);
me.btnInsertHyperlink = new Common.UI.Button({
id: 'tlbtn-insertlink',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-inserthyperlink',
caption: me.capInsertHyperlink,
lock: [_set.hyperlinkLock, _set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.paragraphControls.push(me.btnInsertHyperlink);
me.btnInsertTextArt = new Common.UI.Button({
id: 'tlbtn-inserttextart',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-textart',
caption: me.capInsertTextArt,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
menu: new Common.UI.Menu({
cls: 'menu-shapes',
items: [
{template: _.template('<div id="view-insert-art" style="width: 239px; margin-left: 5px;"></div>')}
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.slideOnlyControls.push(me.btnInsertTextArt);
me.btnEditHeader = new Common.UI.Button({
id: 'id-toolbar-btn-editheader',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-editheader',
caption: me.capBtnInsHeader,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.slideOnlyControls.push(me.btnEditHeader);
me.btnInsDateTime = new Common.UI.Button({
id: 'id-toolbar-btn-datetime',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-datetime',
caption: me.capBtnDateTime,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.paragraphLock, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.slideOnlyControls.push(me.btnInsDateTime);
me.btnInsSlideNum = new Common.UI.Button({
id: 'id-toolbar-btn-slidenum',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-pagenum',
caption: me.capBtnSlideNum,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.paragraphLock, _set.disableOnStart],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.slideOnlyControls.push(me.btnInsSlideNum);
2022-05-25 13:48:17 +00:00
if (Common.Controllers.Desktop.isActive() &&
Common.Controllers.Desktop.isFeatureAvailable("IsSupportMedia") && Common.Controllers.Desktop.call("IsSupportMedia"))
{
2020-03-02 14:36:10 +00:00
me.btnInsAudio = new Common.UI.Button({
id: 'tlbtn-insaudio',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-audio',
caption: me.capInsertAudio,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart]
});
me.slideOnlyControls.push(me.btnInsAudio);
me.btnInsVideo = new Common.UI.Button({
id: 'tlbtn-insvideo',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-video',
caption: me.capInsertVideo,
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart]
});
me.slideOnlyControls.push(me.btnInsVideo);
}
me.btnColorSchemas = new Common.UI.Button({
id: 'id-toolbar-btn-colorschemas',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-colorschemas',
lock: [_set.themeLock, _set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [],
restoreHeight: true
}),
dataHint: '1',
dataHintDirection: 'top',
dataHintOffset: '0, -6'
});
me.slideOnlyControls.push(me.btnColorSchemas);
2019-02-11 08:39:27 +00:00
me.mniAlignToSlide = new Common.UI.MenuItem({
caption: me.txtSlideAlign,
checkable: true,
toggleGroup: 'slidealign',
value: -1
}).on('click', function (mnu) {
Common.Utils.InternalSettings.set("pe-align-to-slide", true);
});
me.mniAlignObjects = new Common.UI.MenuItem({
caption: me.txtObjectsAlign,
checkable: true,
toggleGroup: 'slidealign',
value: -1
}).on('click', function (mnu) {
Common.Utils.InternalSettings.set("pe-align-to-slide", false);
});
me.mniDistribHor = new Common.UI.MenuItem({
caption: me.txtDistribHor,
iconCls: 'menu__icon shape-distribute-hor',
value: 6
});
me.mniDistribVert = new Common.UI.MenuItem({
caption: me.txtDistribVert,
iconCls: 'menu__icon shape-distribute-vert',
value: 7
});
me.btnShapeAlign = new Common.UI.Button({
id: 'id-toolbar-btn-shape-align',
cls: 'btn-toolbar',
2020-04-27 10:59:29 +00:00
iconCls: 'toolbar__icon shape-align-left',
lock: [_set.slideDeleted, _set.shapeLock, _set.lostConnect, _set.noSlides, _set.noObjectSelected, _set.disableOnStart],
menu: new Common.UI.Menu({
cls: 'shifted-right',
items: [
{
caption: me.textShapeAlignLeft,
iconCls: 'menu__icon shape-align-left',
value: Asc.c_oAscAlignShapeType.ALIGN_LEFT
},
{
caption: me.textShapeAlignCenter,
iconCls: 'menu__icon shape-align-center',
value: Asc.c_oAscAlignShapeType.ALIGN_CENTER
},
{
caption: me.textShapeAlignRight,
iconCls: 'menu__icon shape-align-right',
value: Asc.c_oAscAlignShapeType.ALIGN_RIGHT
},
{
caption: me.textShapeAlignTop,
iconCls: 'menu__icon shape-align-top',
value: Asc.c_oAscAlignShapeType.ALIGN_TOP
},
{
caption: me.textShapeAlignMiddle,
iconCls: 'menu__icon shape-align-middle',
value: Asc.c_oAscAlignShapeType.ALIGN_MIDDLE
},
{
caption: me.textShapeAlignBottom,
iconCls: 'menu__icon shape-align-bottom',
value: Asc.c_oAscAlignShapeType.ALIGN_BOTTOM
},
{caption: '--'},
me.mniDistribHor,
me.mniDistribVert,
2019-02-11 08:39:27 +00:00
{caption: '--'},
me.mniAlignToSlide,
me.mniAlignObjects
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -6'
});
me.shapeControls.push(me.btnShapeAlign);
me.slideOnlyControls.push(me.btnShapeAlign);
me.btnShapeArrange = new Common.UI.Button({
id: 'id-toolbar-btn-shape-arrange',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon arrange-front',
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.noObjectSelected, _set.disableOnStart],
menu: new Common.UI.Menu({
items: [
me.mnuArrangeFront = new Common.UI.MenuItem({
caption: me.textArrangeFront,
iconCls: 'menu__icon arrange-front',
value: 1
}),
me.mnuArrangeBack = new Common.UI.MenuItem({
caption: me.textArrangeBack,
iconCls: 'menu__icon arrange-back',
value: 2
}),
me.mnuArrangeForward = new Common.UI.MenuItem({
caption: me.textArrangeForward,
iconCls: 'menu__icon arrange-forward',
value: 3
}),
me.mnuArrangeBackward = new Common.UI.MenuItem({
caption: me.textArrangeBackward,
iconCls: 'menu__icon arrange-backward',
value: 4
}),
{caption: '--'},
me.mnuGroupShapes = new Common.UI.MenuItem({
caption: me.txtGroup,
iconCls: 'menu__icon shape-group',
value: 5
}),
me.mnuUnGroupShapes = new Common.UI.MenuItem({
caption: me.txtUngroup,
iconCls: 'menu__icon shape-ungroup',
value: 6
})
]
}),
dataHint: '1',
dataHintDirection: 'top',
dataHintOffset: '0, -6'
});
me.slideOnlyControls.push(me.btnShapeArrange);
me.btnSlideSize = new Common.UI.Button({
id: 'id-toolbar-btn-slide-size',
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-slidesize',
lock: [_set.docPropsLock, _set.slideDeleted, _set.lostConnect, _set.disableOnStart],
menu: new Common.UI.Menu({
items: [
{
caption: me.mniSlideStandard,
checkable: true,
toggleGroup: 'slidesize',
value: 0
},
{
caption: me.mniSlideWide,
checkable: true,
toggleGroup: 'slidesize',
value: 1
},
{caption: '--'},
{
caption: me.mniSlideAdvanced,
value: 'advanced'
}
]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -6'
});
me.slideOnlyControls.push(me.btnSlideSize);
me.listTheme = new Common.UI.ComboDataView({
cls: 'combo-styles',
2021-03-30 10:23:23 +00:00
itemWidth: 88,
enableKeyEvents: true,
2021-03-30 10:23:23 +00:00
itemHeight: 40,
style: 'min-width:130px;',
lock: [_set.themeLock, _set.lostConnect, _set.noSlides],
dataHint: '1',
dataHintDirection: 'bottom',
2021-09-19 22:44:09 +00:00
dataHintOffset: '-16, -4',
2022-02-10 19:44:44 +00:00
delayRenderTips: true,
2021-12-11 16:16:03 +00:00
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<div class="item-theme" style="' + '<% if (typeof imageUrl !== "undefined") { %>' + 'background-image: url(<%= imageUrl %>);' + '<% } %> background-position: 0 -<%= offsety %>px;"></div>',
'</div>'
].join('')),
beforeOpenHandler: function (e) {
var cmp = this,
menu = cmp.openButton.menu,
minMenuColumn = 6;
if (menu.cmpEl) {
var itemEl = $(cmp.cmpEl.find('.dataview.inner .style').get(0)).parent();
var itemMargin = /*parseInt($(itemEl.get(0)).parent().css('margin-right'))*/-1;
2021-10-08 11:42:04 +00:00
Common.Utils.applicationPixelRatio() > 1 && Common.Utils.applicationPixelRatio() < 2 && (itemMargin = -1 / Common.Utils.applicationPixelRatio());
var itemWidth = itemEl.is(':visible') ? parseFloat(itemEl.css('width')) :
(cmp.itemWidth + parseFloat(itemEl.css('padding-left')) + parseFloat(itemEl.css('padding-right')) +
parseFloat(itemEl.css('border-left-width')) + parseFloat(itemEl.css('border-right-width')));
var minCount = cmp.menuPicker.store.length >= minMenuColumn ? minMenuColumn : cmp.menuPicker.store.length,
columnCount = Math.min(cmp.menuPicker.store.length, Math.round($('.dataview', $(cmp.fieldPicker.el)).width() / (itemMargin + itemWidth) + 0.5));
columnCount = columnCount < minCount ? minCount : columnCount;
menu.menuAlignEl = cmp.cmpEl;
menu.menuAlign = 'tl-tl';
2022-07-13 18:35:11 +00:00
var menuWidth = columnCount * (itemMargin + itemWidth),
buttonOffsetLeft = cmp.openButton.$el.offset().left;
// if (menuWidth>buttonOffsetLeft)
// menuWidth = Math.max(Math.floor(buttonOffsetLeft/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth);
if (menuWidth>Common.Utils.innerWidth())
menuWidth = Math.max(Math.floor(Common.Utils.innerWidth()/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth);
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - Math.min(menuWidth, buttonOffsetLeft) - 1;
menu.setOffset(Math.min(offset, 0));
menu.cmpEl.css({
2022-07-13 18:35:11 +00:00
'width': menuWidth,
'min-height': cmp.cmpEl.height()
});
2017-04-20 13:34:39 +00:00
}
if (cmp.menuPicker.scroller) {
cmp.menuPicker.scroller.update({
includePadding: true,
suppressScrollX: true
});
2017-04-20 13:34:39 +00:00
}
2016-03-11 00:48:53 +00:00
}
});
this.cmbInsertShape = new Common.UI.ComboDataViewShape({
cls: 'combo-styles shapes',
itemWidth: 20,
itemHeight: 20,
2022-01-17 16:44:25 +00:00
menuMaxHeight: 652,
menuWidth: 362,
style: 'width: 140px;',
enableKeyEvents: true,
2021-12-29 16:41:15 +00:00
lock: [Common.enumLock.slideDeleted, Common.enumLock.lostConnect, Common.enumLock.noSlides, Common.enumLock.disableOnStart],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '-16, 0'
});
this.lockControls = [this.btnChangeSlide, this.btnSave,
this.btnCopy, this.btnPaste, this.btnCut, this.btnSelectAll,this.btnUndo, this.btnRedo, this.cmbFontName, this.cmbFontSize, this.btnIncFontSize, this.btnDecFontSize,
this.btnBold, this.btnItalic, this.btnUnderline, this.btnStrikeout, this.btnSuperscript, this.btnChangeCase, this.btnHighlightColor,
this.btnSubscript, this.btnFontColor, this.btnClearStyle, this.btnCopyStyle, this.btnMarkers,
2021-01-12 20:01:55 +00:00
this.btnNumbers, this.btnDecLeftOffset, this.btnIncLeftOffset, this.btnLineSpace, this.btnHorizontalAlign, this.btnColumns,
this.btnVerticalAlign, this.btnShapeArrange, this.btnShapeAlign, this.btnInsertTable, this.btnInsertChart,
2019-11-14 08:48:58 +00:00
this.btnInsertEquation, this.btnInsertSymbol, this.btnInsertHyperlink, this.btnColorSchemas, this.btnSlideSize, this.listTheme, this.mnuShowSettings
];
// Disable all components before load document
_.each([me.btnSave]
.concat(me.paragraphControls),
function (cmp) {
if (_.isFunction(cmp.setDisabled))
cmp.setDisabled(true);
});
2021-12-29 16:41:15 +00:00
this.lockToolbar(Common.enumLock.disableOnStart, true, {array: me.slideOnlyControls.concat(me.shapeControls)});
this.on('render:after', _.bind(this.onToolbarAfterRender, this));
} else {
Common.UI.Mixtbar.prototype.initialize.call(this, {
template: _.template(template_view),
tabs: [
{caption: me.textTabFile, action: 'file', layoutname: 'toolbar-file', haspanel:false, dataHintTitle: 'F'}
]
2016-03-11 00:48:53 +00:00
}
);
}
2017-04-20 13:34:39 +00:00
return this;
},
lockToolbar: function (causes, lock, opts) {
2019-05-29 13:49:52 +00:00
Common.Utils.lockControls(causes, lock, opts, this.lockControls);
2017-04-20 13:34:39 +00:00
},
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
render: function (mode) {
var me = this;
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
/**
* Render UI layout
*/
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
this.fireEvent('render:before', [this]);
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
me.isCompactView = mode.compactview;
if ( mode.isEdit ) {
2017-04-22 13:11:04 +00:00
me.$el.html(me.rendererComponents(me.$layout));
2021-07-27 10:50:13 +00:00
2017-04-20 13:34:39 +00:00
} else {
2017-04-22 13:11:04 +00:00
me.$layout.find('.canedit').hide();
me.$layout.addClass('folded');
me.$el.html(me.$layout);
2017-04-20 13:34:39 +00:00
}
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
this.fireEvent('render:after', [this]);
2017-04-22 13:11:04 +00:00
Common.UI.Mixtbar.prototype.afterRender.call(this);
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
Common.NotificationCenter.on({
2017-04-22 13:11:04 +00:00
'window:resize': function() {
Common.UI.Mixtbar.prototype.onResize.apply(me, arguments);
}
2017-04-20 13:34:39 +00:00
});
2021-07-27 17:51:37 +00:00
//_.bind(function (element){
//},me);
if ( mode.isEdit ) {
me.setTab('home');
me.processPanelVisible();
2021-07-27 17:51:37 +00:00
}
2017-04-20 13:34:39 +00:00
if ( me.isCompactView )
2018-03-21 11:28:28 +00:00
me.setFolded(true);
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
return this;
},
2016-03-11 00:48:53 +00:00
2017-08-30 12:23:22 +00:00
onTabClick: function (e) {
var me = this,
tab = $(e.currentTarget).find('> a[data-tab]').data('tab'),
is_file_active = me.isTabActive('file');
Common.UI.Mixtbar.prototype.onTabClick.apply(me, arguments);
if ( is_file_active ) {
me.fireEvent('file:close');
} else
if ( tab == 'file' ) {
me.fireEvent('file:open');
me.setTab(tab);
2017-08-30 12:23:22 +00:00
}
},
2017-04-20 13:34:39 +00:00
rendererComponents: function (html) {
var $host = $(html);
var _injectComponent = function (id, cmp) {
2019-06-10 10:45:38 +00:00
Common.Utils.injectComponent($host.find(id), cmp);
2017-04-20 13:34:39 +00:00
};
_injectComponent('#slot-field-fontname', this.cmbFontName);
_injectComponent('#slot-field-fontsize', this.cmbFontSize);
_injectComponent('#slot-btn-changeslide', this.btnChangeSlide);
_injectComponent('#slot-btn-preview', this.btnPreview);
_injectComponent('#slot-btn-print', this.btnPrint);
_injectComponent('#slot-btn-save', this.btnSave);
_injectComponent('#slot-btn-undo', this.btnUndo);
_injectComponent('#slot-btn-redo', this.btnRedo);
_injectComponent('#slot-btn-copy', this.btnCopy);
_injectComponent('#slot-btn-paste', this.btnPaste);
_injectComponent('#slot-btn-cut', this.btnCut);
_injectComponent('#slot-btn-select-all', this.btnSelectAll);
2017-04-20 13:34:39 +00:00
_injectComponent('#slot-btn-bold', this.btnBold);
_injectComponent('#slot-btn-italic', this.btnItalic);
_injectComponent('#slot-btn-underline', this.btnUnderline);
_injectComponent('#slot-btn-strikeout', this.btnStrikeout);
_injectComponent('#slot-btn-superscript', this.btnSuperscript);
_injectComponent('#slot-btn-subscript', this.btnSubscript);
2020-11-27 21:23:26 +00:00
_injectComponent('#slot-btn-incfont', this.btnIncFontSize);
_injectComponent('#slot-btn-decfont', this.btnDecFontSize);
2017-04-20 13:34:39 +00:00
_injectComponent('#slot-btn-fontcolor', this.btnFontColor);
_injectComponent('#slot-btn-highlight', this.btnHighlightColor);
2021-01-29 13:06:51 +00:00
_injectComponent('#slot-btn-changecase', this.btnChangeCase);
2017-04-20 13:34:39 +00:00
_injectComponent('#slot-btn-clearstyle', this.btnClearStyle);
_injectComponent('#slot-btn-copystyle', this.btnCopyStyle);
_injectComponent('#slot-btn-markers', this.btnMarkers);
_injectComponent('#slot-btn-numbering', this.btnNumbers);
_injectComponent('#slot-btn-incoffset', this.btnIncLeftOffset);
_injectComponent('#slot-btn-decoffset', this.btnDecLeftOffset);
_injectComponent('#slot-btn-halign', this.btnHorizontalAlign);
_injectComponent('#slot-btn-valign', this.btnVerticalAlign);
_injectComponent('#slot-btn-linespace', this.btnLineSpace);
2021-01-12 20:01:55 +00:00
_injectComponent('#slot-btn-columns', this.btnColumns);
2017-04-20 13:34:39 +00:00
_injectComponent('#slot-btn-arrange-shape', this.btnShapeArrange);
_injectComponent('#slot-btn-align-shape', this.btnShapeAlign);
_injectComponent('#slot-btn-insertequation', this.btnInsertEquation);
2019-11-14 08:48:58 +00:00
_injectComponent('#slot-btn-inssymbol', this.btnInsertSymbol);
2017-04-20 13:34:39 +00:00
_injectComponent('#slot-btn-insertlink', this.btnInsertHyperlink);
_injectComponent('#slot-btn-inserttable', this.btnInsertTable);
_injectComponent('#slot-btn-insertchart', this.btnInsertChart);
2017-08-01 12:28:15 +00:00
_injectComponent('#slot-btn-instextart', this.btnInsertTextArt);
2017-04-20 13:34:39 +00:00
_injectComponent('#slot-btn-colorschemas', this.btnColorSchemas);
_injectComponent('#slot-btn-slidesize', this.btnSlideSize);
_injectComponent('#slot-field-styles', this.listTheme);
_injectComponent('#slot-btn-editheader', this.btnEditHeader);
_injectComponent('#slot-btn-datetime', this.btnInsDateTime);
_injectComponent('#slot-btn-slidenum', this.btnInsSlideNum);
_injectComponent('#slot-combo-insertshape', this.cmbInsertShape);
2017-04-20 13:34:39 +00:00
2020-03-02 14:36:10 +00:00
this.btnInsAudio && _injectComponent('#slot-btn-insaudio', this.btnInsAudio);
this.btnInsVideo && _injectComponent('#slot-btn-insvideo', this.btnInsVideo);
if (!this.btnInsAudio && !this.btnInsVideo) {
$host.find('#slot-btn-insaudio').parents('.group').hide().prev().hide();
}
this.btnsInsertImage = Common.Utils.injectButtons($host.find('.slot-insertimg'), 'tlbtn-insertimage-', 'toolbar__icon btn-insertimage', this.capInsertImage,
2021-12-29 16:41:15 +00:00
[Common.enumLock.slideDeleted, Common.enumLock.lostConnect, Common.enumLock.noSlides, Common.enumLock.disableOnStart], false, true, undefined, '1', 'bottom', 'small');
this.btnsInsertText = Common.Utils.injectButtons($host.find('.slot-instext'), 'tlbtn-inserttext-', 'toolbar__icon btn-text', this.capInsertText,
2021-12-29 16:41:15 +00:00
[Common.enumLock.slideDeleted, Common.enumLock.lostConnect, Common.enumLock.noSlides, Common.enumLock.disableOnStart], false, false, true, '1', 'bottom', 'small');
this.btnsInsertShape = Common.Utils.injectButtons($host.find('.slot-insertshape'), 'tlbtn-insertshape-', 'toolbar__icon btn-insertshape', this.capInsertShape,
2021-12-29 16:41:15 +00:00
[Common.enumLock.slideDeleted, Common.enumLock.lostConnect, Common.enumLock.noSlides, Common.enumLock.disableOnStart], false, true, true, '1', 'bottom', 'small');
this.btnsAddSlide = Common.Utils.injectButtons($host.find('.slot-addslide'), 'tlbtn-addslide-', 'toolbar__icon btn-addslide', this.capAddSlide,
2021-12-29 16:41:15 +00:00
[Common.enumLock.menuFileOpen, Common.enumLock.lostConnect, Common.enumLock.disableOnStart], true, true, undefined, '1', 'bottom', 'small');
2019-06-11 07:52:13 +00:00
var created = this.btnsInsertImage.concat(this.btnsInsertText, this.btnsInsertShape, this.btnsAddSlide);
2021-12-29 16:41:15 +00:00
this.lockToolbar(Common.enumLock.disableOnStart, true, {array: created});
2017-05-11 08:21:02 +00:00
2019-06-11 07:52:13 +00:00
Array.prototype.push.apply(this.slideOnlyControls, created);
Array.prototype.push.apply(this.lockControls, created);
2017-04-20 13:34:39 +00:00
return $host;
},
onAppReady: function (config) {
var me = this;
2017-04-25 16:56:17 +00:00
if (!config.isEdit) return;
me.btnsInsertImage.forEach(function (btn) {
btn.updateHint(me.tipInsertImage);
btn.setMenu(
new Common.UI.Menu({
items: [
{caption: me.mniImageFromFile, value: 'file'},
2018-10-03 11:00:08 +00:00
{caption: me.mniImageFromUrl, value: 'url'},
{caption: me.mniImageFromStorage, value: 'storage'}
2017-04-25 16:56:17 +00:00
]
}).on('item:click', function (menu, item, e) {
me.fireEvent('insert:image', [item.value]);
})
);
2019-07-29 12:50:55 +00:00
btn.menu.items[2].setVisible(config.canRequestInsertImage || config.fileChoiceUrl && config.fileChoiceUrl.indexOf("{documentType}")>-1);
2017-04-25 16:56:17 +00:00
});
2017-04-20 13:34:39 +00:00
2017-04-25 16:56:17 +00:00
me.btnsInsertText.forEach(function (btn) {
btn.updateHint(me.tipInsertText);
btn.on('click', function (btn, e) {
me.fireEvent('insert:text', [btn.pressed ? 'begin' : 'end']);
2017-04-20 13:34:39 +00:00
});
2017-04-25 16:56:17 +00:00
});
2017-04-20 13:34:39 +00:00
2017-04-25 16:56:17 +00:00
me.btnsInsertShape.forEach(function (btn) {
btn.updateHint(me.tipInsertShape);
btn.setMenu(
new Common.UI.Menu({
cls: 'menu-shapes menu-insert-shape'
2017-04-25 16:56:17 +00:00
}).on('hide:after', function (e) {
me.fireEvent('insert:shape', ['menu:hide']);
})
);
2017-04-20 13:34:39 +00:00
});
me.btnsAddSlide.forEach(function (btn, index) {
btn.updateHint(me.tipAddSlide + Common.Utils.String.platformKey('Ctrl+M'));
btn.setMenu(
new Common.UI.Menu({
items: [
{template: _.template('<div id="id-toolbar-menu-addslide-' + index + '" class="menu-layouts" style="width: 302px; margin: 0 4px;"></div>')},
{caption: '--'},
{
caption: me.txtDuplicateSlide,
value: 'duplicate'
}
]
})
);
btn.on('click', function (btn, e) {
me.fireEvent('add:slide');
});
btn.menu.on('item:click', function (menu, item) {
(item.value === 'duplicate') && me.fireEvent('duplicate:slide');
});
});
2017-04-20 13:34:39 +00:00
},
createDelayedElements: function () {
// set hints
this.btnChangeSlide.updateHint(this.tipChangeSlide);
this.btnPreview.updateHint(this.tipPreview);
this.btnPrint.updateHint(this.tipPrint + Common.Utils.String.platformKey('Ctrl+P'));
this.btnSave.updateHint(this.btnSaveTip);
this.btnUndo.updateHint(this.tipUndo + Common.Utils.String.platformKey('Ctrl+Z'));
this.btnRedo.updateHint(this.tipRedo + Common.Utils.String.platformKey('Ctrl+Y'));
this.btnCopy.updateHint(this.tipCopy + Common.Utils.String.platformKey('Ctrl+C'));
this.btnPaste.updateHint(this.tipPaste + Common.Utils.String.platformKey('Ctrl+V'));
this.btnCut.updateHint(this.tipCut + Common.Utils.String.platformKey('Ctrl+X'));
this.btnSelectAll.updateHint(this.tipSelectAll + Common.Utils.String.platformKey('Ctrl+A'));
2020-11-27 21:23:26 +00:00
this.btnIncFontSize.updateHint(this.tipIncFont + Common.Utils.String.platformKey('Ctrl+]'));
this.btnDecFontSize.updateHint(this.tipDecFont + Common.Utils.String.platformKey('Ctrl+['));
2017-04-20 13:34:39 +00:00
this.btnBold.updateHint(this.textBold + Common.Utils.String.platformKey('Ctrl+B'));
this.btnItalic.updateHint(this.textItalic + Common.Utils.String.platformKey('Ctrl+I'));
this.btnUnderline.updateHint(this.textUnderline + Common.Utils.String.platformKey('Ctrl+U'));
this.btnStrikeout.updateHint(this.textStrikeout);
this.btnSuperscript.updateHint(this.textSuperscript);
this.btnSubscript.updateHint(this.textSubscript);
this.btnFontColor.updateHint(this.tipFontColor);
this.btnHighlightColor.updateHint(this.tipHighlightColor);
2021-01-29 13:06:51 +00:00
this.btnChangeCase.updateHint(this.tipChangeCase);
2017-04-20 13:34:39 +00:00
this.btnClearStyle.updateHint(this.tipClearStyle);
this.btnCopyStyle.updateHint(this.tipCopyStyle + Common.Utils.String.platformKey('Ctrl+Shift+C'));
this.btnMarkers.updateHint(this.tipMarkers);
this.btnNumbers.updateHint(this.tipNumbers);
this.btnHorizontalAlign.updateHint(this.tipHAligh);
this.btnVerticalAlign.updateHint(this.tipVAligh);
this.btnDecLeftOffset.updateHint(this.tipDecPrLeft + Common.Utils.String.platformKey('Ctrl+Shift+M'));
this.btnIncLeftOffset.updateHint(this.tipIncPrLeft);
this.btnLineSpace.updateHint(this.tipLineSpace);
2021-01-12 20:01:55 +00:00
this.btnColumns.updateHint(this.tipColumns);
2017-04-20 13:34:39 +00:00
this.btnInsertTable.updateHint(this.tipInsertTable);
this.btnInsertChart.updateHint(this.tipInsertChart);
this.btnInsertEquation.updateHint(this.tipInsertEquation);
2019-11-14 08:48:58 +00:00
this.btnInsertSymbol.updateHint(this.tipInsertSymbol);
2017-04-20 13:34:39 +00:00
this.btnInsertHyperlink.updateHint(this.tipInsertHyperlink + Common.Utils.String.platformKey('Ctrl+K'));
2017-08-01 12:28:15 +00:00
this.btnInsertTextArt.updateHint(this.tipInsertTextArt);
2020-03-02 14:36:10 +00:00
this.btnInsAudio && this.btnInsAudio.updateHint(this.tipInsertAudio);
this.btnInsVideo && this.btnInsVideo.updateHint(this.tipInsertVideo);
2017-04-20 13:34:39 +00:00
this.btnColorSchemas.updateHint(this.tipColorSchemas);
this.btnShapeAlign.updateHint(this.tipShapeAlign);
this.btnShapeArrange.updateHint(this.tipShapeArrange);
this.btnSlideSize.updateHint(this.tipSlideSize);
this.btnEditHeader.updateHint(this.tipEditHeader);
this.btnInsDateTime.updateHint(this.tipDateTime);
this.btnInsSlideNum.updateHint(this.tipSlideNum);
2017-04-20 13:34:39 +00:00
// set menus
var me = this;
this.btnMarkers.setMenu(
new Common.UI.Menu({
cls: 'shifted-left',
2021-08-23 14:47:10 +00:00
style: 'min-width: 145px',
2017-04-20 13:34:39 +00:00
items: [
2021-08-23 14:47:10 +00:00
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 145px; margin: 0 9px;"></div>')},
2019-10-31 10:57:03 +00:00
this.mnuMarkerSettings = new Common.UI.MenuItem({
2019-10-30 11:01:02 +00:00
caption: this.textListSettings,
value: 'settings'
})
2017-04-20 13:34:39 +00:00
]
})
);
this.btnNumbers.setMenu(
new Common.UI.Menu({
cls: 'shifted-left',
2017-04-20 13:34:39 +00:00
items: [
2021-04-02 20:04:37 +00:00
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 353px; margin: 0 9px;"></div>')},
2019-10-31 10:57:03 +00:00
this.mnuNumberSettings = new Common.UI.MenuItem({
caption: this.textListSettings,
value: 'settings'
})
2017-04-20 13:34:39 +00:00
]
})
);
this.btnChangeSlide.setMenu(
new Common.UI.Menu({
items: [
{template: _.template('<div id="id-toolbar-menu-changeslide" class="menu-layouts" style="width: 302px; margin: 0 4px;"></div>')}
]
})
);
this.btnInsertChart.setMenu( new Common.UI.Menu({
2021-01-13 11:14:36 +00:00
style: 'width: 364px;padding-top: 12px;',
items: [
2021-01-14 09:57:22 +00:00
{template: _.template('<div id="id-toolbar-menu-insertchart" class="menu-insertchart"></div>')}
]
}));
var onShowBefore = function(menu) {
var picker = new Common.UI.DataView({
el: $('#id-toolbar-menu-insertchart'),
parentMenu: menu,
showLast: false,
2021-01-14 09:57:22 +00:00
restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
2019-11-18 10:40:10 +00:00
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
});
picker.on('item:click', function (picker, item, record, e) {
if (record)
me.fireEvent('add:chart', [record.get('type')]);
});
menu.off('show:before', onShowBefore);
};
this.btnInsertChart.menu.on('show:before', onShowBefore);
2019-09-03 08:53:34 +00:00
var onShowBeforeTextArt = function (menu) {
var collection = PE.getCollection('Common.Collections.TextArt');
if (collection.length<1)
PE.getController('Main').fillTextArt(me.api.asc_getTextArtPreviews());
2019-09-03 10:33:51 +00:00
var picker = new Common.UI.DataView({
2019-09-03 08:53:34 +00:00
el: $('#view-insert-art', menu.$el),
store: collection,
parentMenu: menu,
showLast: false,
itemTemplate: _.template('<div class="item-art"><img src="<%= imageUrl %>" id="<%= id %>" style="width:50px;height:50px;"></div>')
});
2019-09-03 10:33:51 +00:00
picker.on('item:click', function (picker, item, record, e) {
2019-09-03 08:53:34 +00:00
if (record)
me.fireEvent('insert:textart', [record.get('data')]);
if (e.type !== 'click') menu.hide();
});
menu.off('show:before', onShowBeforeTextArt);
};
this.btnInsertTextArt.menu.on('show:before', onShowBeforeTextArt);
2017-04-20 13:34:39 +00:00
// set dataviews
2022-05-06 14:27:45 +00:00
this._markersArr = [
{type: Asc.asc_PreviewBulletType.text, text: 'None'},
{type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00B7), specialFont: 'Symbol'},
{type: Asc.asc_PreviewBulletType.char, char: 'o', specialFont: 'Courier New'},
{type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00A7), specialFont: 'Wingdings'},
{type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x0076), specialFont: 'Wingdings'},
{type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00D8), specialFont: 'Wingdings'},
{type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00FC), specialFont: 'Wingdings'},
{type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00A8), specialFont: 'Symbol'},
{type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x2013), specialFont: 'Arial'}
];
2017-04-20 13:34:39 +00:00
var _conf = this.mnuMarkersPicker.conf;
this.mnuMarkersPicker = new Common.UI.DataView({
el: $('#id-toolbar-menu-markers'),
parentMenu: this.btnMarkers.menu,
2021-09-17 20:30:46 +00:00
outerMenu: {menu: this.btnMarkers.menu, index: 0},
2018-02-07 12:14:20 +00:00
restoreHeight: 138,
2017-04-20 13:34:39 +00:00
allowScrollbar: false,
2021-09-27 09:59:39 +00:00
delayRenderTips: true,
2017-04-20 13:34:39 +00:00
store: new Common.UI.DataViewStore([
2022-05-06 14:27:45 +00:00
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1},drawdata: this._markersArr[0], skipRenderOnChange: true, tip: this.tipNone},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 1}, drawdata: this._markersArr[1], skipRenderOnChange: true, tip: this.tipMarkersFRound},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 2}, drawdata: this._markersArr[2], skipRenderOnChange: true, tip: this.tipMarkersHRound},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 3}, drawdata: this._markersArr[3], skipRenderOnChange: true, tip: this.tipMarkersFSquare},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 4}, drawdata: this._markersArr[4], skipRenderOnChange: true, tip: this.tipMarkersStar},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 5}, drawdata: this._markersArr[5], skipRenderOnChange: true, tip: this.tipMarkersArrow},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 6}, drawdata: this._markersArr[6], skipRenderOnChange: true, tip: this.tipMarkersCheckmark},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 7}, drawdata: this._markersArr[7], skipRenderOnChange: true, tip: this.tipMarkersFRhombus},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 8}, drawdata: this._markersArr[8], skipRenderOnChange: true, tip: this.tipMarkersDash}
]),
2021-04-02 20:04:37 +00:00
itemTemplate: _.template('<div id="<%= id %>" class="item-markerlist"></div>')
});
2021-09-17 20:30:46 +00:00
this.btnMarkers.menu.setInnerMenu([{menu: this.mnuMarkersPicker, index: 0}]);
2017-04-20 13:34:39 +00:00
_conf && this.mnuMarkersPicker.selectByIndex(_conf.index, true);
_conf = this.mnuNumbersPicker.conf;
this.mnuNumbersPicker = new Common.UI.DataView({
el: $('#id-toolbar-menu-numbering'),
parentMenu: this.btnNumbers.menu,
2021-09-17 20:30:46 +00:00
outerMenu: {menu: this.btnNumbers.menu, index: 0},
restoreHeight: 92,
2017-04-20 13:34:39 +00:00
allowScrollbar: false,
2021-09-27 09:59:39 +00:00
delayRenderTips: true,
2017-04-20 13:34:39 +00:00
store: new Common.UI.DataViewStore([
2022-05-06 07:34:00 +00:00
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1},drawdata: {type: Asc.asc_PreviewBulletType.text, text: 'None'}, skipRenderOnChange: true, tip: this.tipNone},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.UpperLetterDot_Left}, skipRenderOnChange: true, tip: this.tipNumCapitalLetters},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.LowerLetterBracket_Left}, skipRenderOnChange: true, tip: this.tipNumLettersParentheses},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.LowerLetterDot_Left}, skipRenderOnChange: true, tip: this.tipNumLettersPoints},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.DecimalDot_Right}, skipRenderOnChange: true, tip: this.tipNumNumbersPoint},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.DecimalBracket_Right}, skipRenderOnChange: true, tip: this.tipNumNumbersParentheses},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.UpperRomanDot_Right}, skipRenderOnChange: true, tip: this.tipNumRoman},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 7}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.LowerRomanDot_Right}, skipRenderOnChange: true, tip: this.tipNumRomanSmall}
2017-04-20 13:34:39 +00:00
]),
2021-04-02 20:04:37 +00:00
itemTemplate: _.template('<div id="<%= id %>" class="item-multilevellist"></div>')
2017-04-20 13:34:39 +00:00
});
2021-09-17 20:30:46 +00:00
this.btnNumbers.menu.setInnerMenu([{menu: this.mnuNumbersPicker, index: 0}]);
2017-04-20 13:34:39 +00:00
_conf && this.mnuNumbersPicker.selectByIndex(_conf.index, true);
this.mnuTablePicker = new Common.UI.DimensionPicker({
el: $('#id-toolbar-menu-tablepicker'),
minRows: 8,
minColumns: 10,
maxRows: 8,
maxColumns: 10
});
2017-04-20 13:34:39 +00:00
/** coauthoring begin **/
this.showSynchTip = !Common.localStorage.getBool('pe-hide-synch');
2017-04-20 13:34:39 +00:00
if (this.needShowSynchTip) {
this.needShowSynchTip = false;
this.onCollaborativeChanges();
}
/** coauthoring end **/
2017-04-20 13:34:39 +00:00
},
onToolbarAfterRender: function(toolbar) {
// DataView and pickers
//
2017-04-26 13:51:23 +00:00
if (this.btnFontColor.cmpEl) {
2021-07-10 23:25:12 +00:00
this.btnFontColor.setMenu();
this.mnuFontColorPicker = this.btnFontColor.getPicker();
2021-01-21 19:48:27 +00:00
this.btnFontColor.setColor(this.btnFontColor.currentColor || 'transparent');
2017-04-26 13:51:23 +00:00
}
if (this.btnHighlightColor.cmpEl) {
this.btnHighlightColor.currentColor = 'FFFF00';
this.btnHighlightColor.setColor(this.btnHighlightColor.currentColor);
this.mnuHighlightColorPicker = new Common.UI.ThemeColorPalette({
el: $('#id-toolbar-menu-highlight'),
colors: [
'FFFF00', '00FF00', '00FFFF', 'FF00FF', '0000FF', 'FF0000', '00008B', '008B8B',
'006400', '800080', '8B0000', '808000', 'FFFFFF', 'D3D3D3', 'A9A9A9', '000000'
],
value: 'FFFF00',
dynamiccolors: 0,
columns: 4,
outerMenu: {menu: this.btnHighlightColor.menu, index: 0, focusOnShow: true}
});
2021-07-10 23:25:12 +00:00
this.btnHighlightColor.setPicker(this.mnuHighlightColorPicker);
this.btnHighlightColor.menu.setInnerMenu([{menu: this.mnuHighlightColorPicker, index: 0}]);
}
},
2017-04-20 13:34:39 +00:00
setApi: function (api) {
this.api = api;
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
if (this.api) {
this.api.asc_registerCallback('asc_onSendThemeColorSchemes', _.bind(this.onSendThemeColorSchemes, this));
/** coauthoring begin **/
this.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(this.onCollaborativeChanges, this));
this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onApiUsersChanged, this));
this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.onApiUsersChanged, this));
/** coauthoring end **/
}
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
return this;
},
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
setMode: function (mode) {
if (mode.isDisconnected) {
2021-12-29 16:41:15 +00:00
this.lockToolbar(Common.enumLock.lostConnect, true);
this.lockToolbar( Common.enumLock.lostConnect, true, {array:[this.btnUndo,this.btnRedo,this.btnSave]} );
2021-06-28 19:17:56 +00:00
if ( this.synchTooltip )
this.synchTooltip.hide();
if (!mode.enableDownload)
2021-12-29 16:41:15 +00:00
this.lockToolbar(Common.enumLock.cantPrint, true, {array: [this.btnPrint]});
2022-06-25 19:36:11 +00:00
} else {
2021-12-29 16:41:15 +00:00
this.lockToolbar(Common.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]});
2022-06-25 19:36:11 +00:00
!mode.canPrint && this.btnPrint.hide();
}
2017-04-20 13:34:39 +00:00
this.mode = mode;
},
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
onSendThemeColorSchemes: function (schemas) {
var me = this,
mnuColorSchema = me.btnColorSchemas.menu;
if (mnuColorSchema) {
if (mnuColorSchema && mnuColorSchema.items.length > 0) {
_.each(mnuColorSchema.items, function (item) {
item.remove();
});
}
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
if (mnuColorSchema == null) {
mnuColorSchema = new Common.UI.Menu({
cls: 'shifted-left',
restoreHeight: true
2017-04-20 13:34:39 +00:00
});
}
mnuColorSchema.items = [];
var itemTemplate = _.template([
'<a id="<%= id %>" class="<%= options.cls %>" tabindex="-1" type="menuitem">',
'<span class="colors">',
'<% _.each(options.colors, function(color) { %>',
'<span class="color" style="background: <%= color %>;"></span>',
'<% }) %>',
'</span>',
'<span class="text"><%= caption %></span>',
'</a>'
].join(''));
_.each(schemas, function (schema, index) {
var colors = schema.get_colors();//schema.colors;
var schemecolors = [];
for (var j = 2; j < 7; j++) {
var clr = '#' + Common.Utils.ThemeColor.getHexColor(colors[j].get_r(), colors[j].get_g(), colors[j].get_b());
schemecolors.push(clr);
}
2016-03-11 00:48:53 +00:00
2021-05-19 20:54:27 +00:00
if (index == 22) {
2017-04-20 13:34:39 +00:00
mnuColorSchema.addItem({
caption: '--'
});
}
var name = schema.get_name();
2019-08-20 09:54:51 +00:00
mnuColorSchema.addItem({
template: itemTemplate,
cls: 'color-schemas-menu',
colors: schemecolors,
2021-05-19 20:54:27 +00:00
caption: (index < 22) ? (me.SchemeNames[index] || name) : name,
2019-12-19 08:00:49 +00:00
value: index,
2019-08-20 12:56:29 +00:00
checkable: true,
toggleGroup: 'menuSchema'
2019-08-20 09:54:51 +00:00
});
2017-04-20 13:34:39 +00:00
}, this);
}
},
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
/** coauthoring begin **/
onCollaborativeChanges: function () {
if (this._state.hasCollaborativeChanges) return;
2018-02-28 13:17:53 +00:00
if (!this.btnCollabChanges.rendered) {
2017-04-20 13:34:39 +00:00
this.needShowSynchTip = true;
return;
}
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
if (previewPanel && previewPanel.isVisible()) {
this.needShowSynchTip = true;
return;
}
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
this._state.hasCollaborativeChanges = true;
2019-11-20 09:42:39 +00:00
this.btnCollabChanges.cmpEl.addClass('notify');
2017-04-20 13:34:39 +00:00
if (this.showSynchTip) {
2018-02-28 13:17:53 +00:00
this.btnCollabChanges.updateHint('');
2017-04-20 13:34:39 +00:00
if (this.synchTooltip === undefined)
this.createSynchTip();
this.synchTooltip.show();
2016-03-11 00:48:53 +00:00
} else {
2018-02-28 13:17:53 +00:00
this.btnCollabChanges.updateHint(this.tipSynchronize + Common.Utils.String.platformKey('Ctrl+S'));
2017-04-20 13:34:39 +00:00
}
2016-03-11 00:48:53 +00:00
this.btnSave.setDisabled(false);
2017-04-20 13:34:39 +00:00
Common.Gateway.collaborativeChanges();
},
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
createSynchTip: function () {
this.synchTooltip = new Common.UI.SynchronizeTip({
2019-02-07 10:18:56 +00:00
extCls: (this.mode.customization && !!this.mode.customization.compactHeader) ? undefined : 'inc-index',
placement: 'right-bottom',
2018-02-28 13:17:53 +00:00
target: this.btnCollabChanges.$el
2017-04-20 13:34:39 +00:00
});
this.synchTooltip.on('dontshowclick', function () {
this.showSynchTip = false;
this.synchTooltip.hide();
2018-02-28 13:17:53 +00:00
this.btnCollabChanges.updateHint(this.tipSynchronize + Common.Utils.String.platformKey('Ctrl+S'));
2017-04-20 13:34:39 +00:00
Common.localStorage.setItem("pe-hide-synch", 1);
}, this);
this.synchTooltip.on('closeclick', function () {
this.synchTooltip.hide();
2018-02-28 13:17:53 +00:00
this.btnCollabChanges.updateHint(this.tipSynchronize + Common.Utils.String.platformKey('Ctrl+S'));
2017-04-20 13:34:39 +00:00
}, this);
},
synchronizeChanges: function () {
2018-02-28 13:17:53 +00:00
if (this.btnCollabChanges.rendered) {
2018-02-24 22:19:36 +00:00
var me = this;
2017-04-20 13:34:39 +00:00
2019-11-20 09:42:39 +00:00
if ( me.btnCollabChanges.cmpEl.hasClass('notify') ) {
me.btnCollabChanges.cmpEl.removeClass('notify');
2017-04-20 13:34:39 +00:00
if (this.synchTooltip)
this.synchTooltip.hide();
2018-02-28 13:17:53 +00:00
this.btnCollabChanges.updateHint(this.btnSaveTip);
this.btnSave.setDisabled(!me.mode.forcesave);
2017-04-20 13:34:39 +00:00
this._state.hasCollaborativeChanges = false;
}
}
},
2016-10-25 10:48:31 +00:00
2017-04-20 13:34:39 +00:00
onApiUsersChanged: function (users) {
var editusers = [];
_.each(users, function (item) {
if (!item.asc_getView())
editusers.push(item);
});
2016-10-25 10:48:31 +00:00
2017-04-20 13:34:39 +00:00
var length = _.size(editusers);
var cls = (length > 1) ? 'btn-save-coauth' : 'btn-save';
2018-02-28 13:17:53 +00:00
if (cls !== this.btnSaveCls && this.btnCollabChanges.rendered) {
2017-04-20 13:34:39 +00:00
this.btnSaveTip = ((length > 1) ? this.tipSaveCoauth : this.tipSave ) + Common.Utils.String.platformKey('Ctrl+S');
2019-11-20 09:42:39 +00:00
this.btnCollabChanges.updateHint(this.btnSaveTip);
this.btnCollabChanges.$icon.removeClass(this.btnSaveCls).addClass(cls);
2017-04-20 13:34:39 +00:00
this.btnSaveCls = cls;
}
},
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
/** coauthoring end **/
2016-03-11 00:48:53 +00:00
2017-04-20 13:34:39 +00:00
onSlidePickerShowAfter: function (picker) {
if (!picker._needRecalcSlideLayout) return;
if (picker.cmpEl && picker.dataViewItems.length > 0) {
var dataViewItems = picker.dataViewItems,
el = $(dataViewItems[0].el),
itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')),
2019-06-04 08:38:44 +00:00
columnCount = Math.floor(picker.options.restoreWidth / itemW + 0.5) || 1, // try to use restore width
2017-04-20 13:34:39 +00:00
col = 0, maxHeight = 0;
2019-06-04 08:38:44 +00:00
picker.cmpEl.width(itemW * columnCount + 11);
2017-04-20 13:34:39 +00:00
for (var i = 0; i < dataViewItems.length; i++) {
var div = $(dataViewItems[i].el).find('.title'),
height = div.height();
if (height > maxHeight)
maxHeight = height;
else
div.css({'height': maxHeight});
col++;
if (col > columnCount - 1) {
col = 0;
maxHeight = 0;
}
}
picker._needRecalcSlideLayout = false;
2016-03-11 00:48:53 +00:00
}
2017-04-20 13:34:39 +00:00
},
2016-03-11 00:48:53 +00:00
2019-08-20 11:05:13 +00:00
updateAutoshapeMenu: function (menuShape, collection) {
2021-09-14 16:48:14 +00:00
var me = this,
index = $(menuShape.el).prop('id').slice(-1);
2019-08-20 08:05:52 +00:00
var menuitem = new Common.UI.MenuItem({
2021-09-14 16:48:14 +00:00
template: _.template('<div id="id-toolbar-menu-insertshape-<%= options.index %>" class="menu-insertshape"></div>'),
index: index
});
menuShape.addItem(menuitem);
var recents = Common.localStorage.getItem('pe-recent-shapes');
recents = recents ? JSON.parse(recents) : null;
var shapePicker = new Common.UI.DataViewShape({
2021-09-14 16:48:14 +00:00
el: $('#id-toolbar-menu-insertshape-'+index),
itemTemplate: _.template('<div class="item-shape" id="<%= id %>"><svg width="20" height="20" class=\"icon\"><use xlink:href=\"#svg-icon-<%= data.shapeType %>\"></use></svg></div>'),
2021-10-04 12:56:34 +00:00
groups: collection,
parentMenu: menuShape,
2022-01-17 16:44:25 +00:00
restoreHeight: 652,
textRecentlyUsed: me.textRecentlyUsed,
recentShapes: recents
});
shapePicker.on('item:click', function(picker, item, record, e) {
if (e.type !== 'click') Common.UI.Menu.Manager.hideAll();
if (record) {
me.fireEvent('insert:shape', [record.get('data').shapeType]);
me.cmbInsertShape.updateComboView(record);
}
});
},
updateComboAutoshapeMenu: function (collection) {
var me = this,
recents = Common.localStorage.getItem('pe-recent-shapes');
recents = recents ? JSON.parse(recents) : null;
me.cmbInsertShape.setMenuPicker(collection, recents, me.textRecentlyUsed);
2017-04-20 13:34:39 +00:00
},
updateAddSlideMenu: function(collection) {
if (collection.size()<1) return;
var me = this;
2019-08-30 10:01:21 +00:00
if (!me.binding.onShowBeforeAddSlide) {
me.binding.onShowBeforeAddSlide = function(menu) {
2019-12-09 12:41:09 +00:00
var change = (this.iconCls.indexOf('btn-changeslide')>-1);
2019-08-30 10:01:21 +00:00
var picker = new Common.UI.DataView({
el: $('.menu-layouts', menu.$el),
parentMenu: menu,
2021-09-22 21:12:38 +00:00
outerMenu: !change ? {menu: menu, index: 0} : undefined,
2019-08-30 10:01:21 +00:00
showLast: change,
restoreHeight: 300,
2019-06-04 08:38:44 +00:00
restoreWidth: 302,
style: 'max-height: 300px;',
store: PE.getCollection('SlideLayouts'),
itemTemplate: _.template([
'<div class="layout" id="<%= id %>" style="width: <%= itemWidth %>px;">',
2021-04-09 13:27:45 +00:00
'<div style="background-image: url(<%= imageUrl %>); width: <%= itemWidth %>px; height: <%= itemHeight %>px;background-size: contain;"></div>',
'<div class="title"><%= title %></div> ',
'</div>'
].join(''))
});
2019-08-30 10:01:21 +00:00
picker.on('item:click', function (picker, item, record, e) {
if (e.type !== 'click') Common.UI.Menu.Manager.hideAll();
if (record)
2019-08-30 10:01:21 +00:00
me.fireEvent(change ? 'change:slide' : 'add:slide', [record.get('data').idx]);
});
2019-08-30 10:01:21 +00:00
if (menu) {
menu.on('show:after', function () {
me.onSlidePickerShowAfter(picker);
!change && me.fireEvent('duplicate:check', [menu]);
2019-08-30 10:01:21 +00:00
picker.scroller.update({alwaysVisibleY: true});
if (change) {
var record = picker.store.findLayoutByIndex(picker.options.layout_index);
if (record) {
picker.selectRecord(record, true);
picker.scrollToRecord(record);
}
} else
picker.scroller.scrollTop(0);
});
2021-09-22 21:12:38 +00:00
!change && menu.setInnerMenu([{menu: picker, index: 0}]);
}
2019-08-30 10:01:21 +00:00
menu.off('show:before', me.binding.onShowBeforeAddSlide);
if (change && this.mnuSlidePicker)
picker.options.layout_index = this.mnuSlidePicker.options.layout_index;
this.mnuSlidePicker = picker;
this.mnuSlidePicker._needRecalcSlideLayout = true;
2019-08-30 10:01:21 +00:00
};
me.btnsAddSlide.concat(me.btnChangeSlide).forEach(function (btn, index) {
btn.menu.on('show:before', me.binding.onShowBeforeAddSlide, btn);
});
} else {
me.btnsAddSlide.concat(me.btnChangeSlide).forEach(function (btn, index) {
btn.mnuSlidePicker && (btn.mnuSlidePicker._needRecalcSlideLayout = true);
});
}
},
2017-04-20 13:34:39 +00:00
textBold: 'Bold',
textItalic: 'Italic',
textUnderline: 'Underline',
textStrikeout: 'Strikeout',
textSuperscript: 'Superscript',
textSubscript: 'Subscript',
tipFontName: 'Font Name',
tipFontSize: 'Font Size',
tipCopy: 'Copy',
tipPaste: 'Paste',
tipUndo: 'Undo',
tipRedo: 'Redo',
tipPrint: 'Print',
tipSave: 'Save',
tipFontColor: 'Font color',
tipMarkers: 'Bullets',
tipNumbers: 'Numbering',
tipBack: 'Back',
tipClearStyle: 'Clear Style',
tipCopyStyle: 'Copy Style',
textTitleError: 'Error',
tipHAligh: 'Horizontal Align',
tipVAligh: 'Vertical Align',
textAlignTop: 'Align text to the top',
textAlignMiddle: 'Align text to the middle',
textAlignBottom: 'Align text to the bottom',
textAlignLeft: 'Left align text',
textAlignRight: 'Right align text',
textAlignCenter: 'Center text',
textAlignJust: 'Justify',
tipDecPrLeft: 'Decrease Indent',
tipIncPrLeft: 'Increase Indent',
tipLineSpace: 'Line Spacing',
tipInsertTable: 'Insert Table',
2018-06-14 07:22:41 +00:00
tipInsertImage: 'Insert Image',
mniImageFromFile: 'Image from file',
mniImageFromUrl: 'Image from url',
2017-04-20 13:34:39 +00:00
mniCustomTable: 'Insert Custom Table',
tipInsertHyperlink: 'Add Hyperlink',
tipInsertText: 'Insert Text',
2017-08-01 12:28:15 +00:00
tipInsertTextArt: 'Insert Text Art',
2017-04-20 13:34:39 +00:00
tipInsertShape: 'Insert Autoshape',
tipPreview: 'Start Slideshow',
tipAddSlide: 'Add Slide',
tipShapeAlign: 'Align Shape',
tipShapeArrange: 'Arrange Shape',
textShapeAlignLeft: 'Align Left',
textShapeAlignRight: 'Align Right',
textShapeAlignCenter: 'Align Center',
textShapeAlignTop: 'Align Top',
textShapeAlignBottom: 'Align Bottom',
textShapeAlignMiddle: 'Align Middle',
textArrangeFront: 'Bring To Front',
textArrangeBack: 'Send To Back',
textArrangeForward: 'Bring Forward',
textArrangeBackward: 'Send Backward',
txtGroup: 'Group',
txtUngroup: 'Ungroup',
txtDistribHor: 'Distribute Horizontally',
txtDistribVert: 'Distribute Vertically',
tipChangeSlide: 'Change Slide Layout',
tipColorSchemas: 'Change Color Scheme',
mniSlideStandard: 'Standard (4:3)',
mniSlideWide: 'Widescreen (16:9)',
mniSlideAdvanced: 'Advanced Settings',
tipSlideSize: 'Select Slide Size',
tipInsertChart: 'Insert Chart',
tipSynchronize: 'The document has been changed by another user. Please click to save your changes and reload the updates.',
txtScheme1: 'Office',
txtScheme2: 'Grayscale',
txtScheme3: 'Apex',
txtScheme4: 'Aspect',
txtScheme5: 'Civic',
txtScheme6: 'Concourse',
txtScheme7: 'Equity',
txtScheme8: 'Flow',
txtScheme9: 'Foundry',
txtScheme10: 'Median',
txtScheme11: 'Metro',
txtScheme12: 'Module',
txtScheme13: 'Opulent',
txtScheme14: 'Oriel',
txtScheme15: 'Origin',
txtScheme16: 'Paper',
txtScheme17: 'Solstice',
txtScheme18: 'Technic',
txtScheme19: 'Trek',
txtScheme20: 'Urban',
txtScheme21: 'Verve',
tipSlideTheme: 'Slide Theme',
tipSaveCoauth: 'Save your changes for the other users to see them.',
textShowBegin: 'Show from Beginning',
textShowCurrent: 'Show from Current slide',
textShowSettings: 'Show Settings',
tipInsertEquation: 'Insert Equation',
tipChangeChart: 'Change Chart Type',
2017-08-01 12:28:15 +00:00
capInsertText: 'Text',
capInsertTextArt: 'Text Art',
2018-06-14 07:22:41 +00:00
capInsertImage: 'Image',
2017-04-20 13:34:39 +00:00
capInsertShape: 'Shape',
capInsertTable: 'Table',
capInsertChart: 'Chart',
capInsertHyperlink: 'Hyperlink',
capInsertEquation: 'Equation',
capAddSlide: 'Add Slide',
capTabFile: 'File',
capTabHome: 'Home',
2017-06-15 13:18:40 +00:00
capTabInsert: 'Insert',
2017-07-05 12:22:02 +00:00
capBtnComment: 'Comment',
2017-07-21 10:44:07 +00:00
textTabFile: 'File',
textTabHome: 'Home',
textTabInsert: 'Insert',
textShowPresenterView: 'Show presenter view',
textTabCollaboration: 'Collaboration',
2018-10-03 11:00:08 +00:00
textTabProtect: 'Protection',
2019-02-11 08:39:27 +00:00
mniImageFromStorage: 'Image from Storage',
txtSlideAlign: 'Align to Slide',
txtObjectsAlign: 'Align Selected Objects',
2019-11-28 10:27:01 +00:00
tipEditHeader: 'Edit footer',
tipSlideNum: 'Insert slide number',
tipDateTime: 'Insert current date and time',
2019-11-28 10:27:01 +00:00
capBtnInsHeader: 'Footer',
capBtnSlideNum: 'Slide Number',
2019-10-30 11:01:02 +00:00
capBtnDateTime: 'Date & Time',
textListSettings: 'List Settings',
capBtnAddComment: 'Add Comment',
2019-11-14 08:48:58 +00:00
capBtnInsSymbol: 'Symbol',
2020-03-02 14:36:10 +00:00
tipInsertSymbol: 'Insert symbol',
capInsertAudio: 'Audio',
capInsertVideo: 'Video',
tipInsertAudio: 'Insert audio',
2020-11-27 21:23:26 +00:00
tipInsertVideo: 'Insert video',
tipIncFont: 'Increment font size',
2021-01-12 20:01:55 +00:00
tipDecFont: 'Decrement font size',
tipColumns: 'Insert columns',
textColumnsOne: 'One Column',
textColumnsTwo: 'Two Columns',
textColumnsThree: 'Three Columns',
2021-01-29 13:06:51 +00:00
textColumnsCustom: 'Custom Columns',
tipChangeCase: 'Change case',
mniSentenceCase: 'Sentence case.',
mniLowerCase: 'lowercase',
mniUpperCase: 'UPPERCASE',
mniCapitalizeWords: 'Capitalize Each Word',
mniToggleCase: 'tOGGLE cASE',
strMenuNoFill: 'No Fill',
2021-05-19 20:54:27 +00:00
tipHighlightColor: 'Highlight color',
2021-07-31 00:36:26 +00:00
txtScheme22: 'New Office',
textTabTransitions: 'Transitions',
2021-10-15 01:15:43 +00:00
textTabAnimation: 'Animation',
textRecentlyUsed: 'Recently Used',
2021-09-27 09:59:39 +00:00
txtDuplicateSlide: 'Duplicate Slide',
tipNumCapitalLetters: 'A. B. C.',
tipNumLettersParentheses: 'a) b) c)',
tipNumLettersPoints: 'a. b. c.',
tipNumNumbersPoint: '1. 2. 3.',
tipNumNumbersParentheses: '1) 2) 3)',
tipNumRoman: 'I. II. III.',
tipNumRomanSmall: 'i. ii. iii.',
tipMarkersFRound: 'Filled round bullets',
tipMarkersHRound: 'Hollow round bullets',
tipMarkersFSquare: 'Filled square bullets',
tipMarkersStar: 'Star bullets',
tipMarkersArrow: 'Arrow bullets',
tipMarkersCheckmark: 'Checkmark bullets',
tipMarkersFRhombus: 'Filled rhombus bullets',
tipMarkersDash: 'Dash bullets',
2021-12-08 11:31:11 +00:00
tipNone: 'None',
2022-04-01 14:58:01 +00:00
textTabView: 'View',
mniInsertSSE: 'Insert Spreadsheet',
tipSelectAll: 'Select all',
tipCut: 'Cut'
2017-04-20 13:34:39 +00:00
}
}()), PE.Views.Toolbar || {}));
2016-03-11 00:48:53 +00:00
});