2016-04-01 13:17:09 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (c) Copyright Ascensio System Limited 2010-2016
|
|
|
|
*
|
|
|
|
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
|
|
|
* EU, LV-1021.
|
|
|
|
*
|
|
|
|
* 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
|
|
|
/**
|
|
|
|
* DocumentHolder.js
|
|
|
|
*
|
|
|
|
* DocumentHolder view
|
|
|
|
*
|
|
|
|
* Created by Julia Radzhabova on 3/28/14
|
|
|
|
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
define([
|
|
|
|
'jquery',
|
|
|
|
'underscore',
|
|
|
|
'backbone',
|
|
|
|
'gateway',
|
|
|
|
'common/main/lib/component/Menu'
|
|
|
|
// 'spreadsheeteditor/main/app/view/HyperlinkSettingsDialog',
|
|
|
|
// 'spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced',
|
|
|
|
// 'spreadsheeteditor/main/app/view/TableSettingsAdvanced'
|
|
|
|
], function ($, _, Backbone, gateway) { 'use strict';
|
|
|
|
|
|
|
|
SSE.Views.DocumentHolder = Backbone.View.extend(_.extend({
|
|
|
|
el: '#editor_sdk',
|
|
|
|
|
|
|
|
// Compile our stats template
|
|
|
|
template: null,
|
|
|
|
|
|
|
|
// Delegated events for creating new items, and clearing completed ones.
|
|
|
|
events: {
|
|
|
|
},
|
|
|
|
|
|
|
|
initialize: function() {
|
|
|
|
var me = this;
|
|
|
|
|
|
|
|
this.setApi = function(api) {
|
|
|
|
me.api = api;
|
|
|
|
return me;
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
render: function() {
|
|
|
|
this.fireEvent('render:before', this);
|
|
|
|
|
|
|
|
this.cmpEl = $(this.el);
|
|
|
|
|
|
|
|
this.fireEvent('render:after', this);
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
|
|
|
|
focus: function() {
|
|
|
|
var me = this;
|
|
|
|
_.defer(function(){
|
|
|
|
me.cmpEl.focus();
|
|
|
|
}, 50);
|
|
|
|
},
|
|
|
|
|
|
|
|
createDelayedElements: function() {
|
|
|
|
var me = this;
|
|
|
|
|
|
|
|
me.pmiCut = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtCut,
|
|
|
|
value : 'cut'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiCopy = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtCopy,
|
|
|
|
value : 'copy'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiPaste = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtPaste,
|
|
|
|
value : 'paste'
|
|
|
|
});
|
|
|
|
|
2016-03-30 12:27:16 +00:00
|
|
|
me.pmiSelectTable = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtSelect,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
2016-04-19 13:00:22 +00:00
|
|
|
{ caption: this.selectRowText, value: Asc.c_oAscChangeSelectionFormatTable.row},
|
|
|
|
{ caption: this.selectColumnText, value: Asc.c_oAscChangeSelectionFormatTable.column},
|
|
|
|
{ caption: this.selectDataText, value: Asc.c_oAscChangeSelectionFormatTable.data},
|
|
|
|
{ caption: this.selectTableText, value: Asc.c_oAscChangeSelectionFormatTable.all}
|
2016-03-30 12:27:16 +00:00
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
2016-03-11 00:48:53 +00:00
|
|
|
me.pmiInsertEntire = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtInsert
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiInsertCells = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtInsert,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
caption : me.txtShiftRight,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscInsertOptions.InsertCellsAndShiftRight
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : me.txtShiftDown,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscInsertOptions.InsertCellsAndShiftDown
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : me.txtRow,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscInsertOptions.InsertRows
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : me.txtColumn,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscInsertOptions.InsertColumns
|
2016-03-11 00:48:53 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
2016-03-30 12:27:16 +00:00
|
|
|
|
|
|
|
me.pmiInsertTable = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtInsert,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
2016-04-19 13:00:22 +00:00
|
|
|
{ caption: me.insertRowAboveText, value: Asc.c_oAscInsertOptions.InsertTableRowAbove},
|
|
|
|
{ caption: me.insertRowBelowText, value: Asc.c_oAscInsertOptions.InsertTableRowBelow},
|
|
|
|
{ caption: me.insertColumnLeftText, value: Asc.c_oAscInsertOptions.InsertTableColLeft},
|
|
|
|
{ caption: me.insertColumnRightText, value: Asc.c_oAscInsertOptions.InsertTableColRight}
|
2016-03-30 12:27:16 +00:00
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
2016-03-11 00:48:53 +00:00
|
|
|
|
|
|
|
me.pmiDeleteEntire = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtDelete
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiDeleteCells = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtDelete,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
caption : me.txtShiftLeft,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftLeft
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : me.txtShiftUp,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftTop
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : me.txtRow,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscDeleteOptions.DeleteRows
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : me.txtColumn,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscDeleteOptions.DeleteColumns
|
2016-03-11 00:48:53 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
2016-03-30 12:27:16 +00:00
|
|
|
me.pmiDeleteTable = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtDelete,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
2016-04-19 13:00:22 +00:00
|
|
|
{ caption: this.deleteRowText, value: Asc.c_oAscDeleteOptions.DeleteRows},
|
|
|
|
{ caption: this.deleteColumnText, value: Asc.c_oAscDeleteOptions.DeleteColumns},
|
|
|
|
{ caption: this.deleteTableText, value: Asc.c_oAscDeleteOptions.DeleteTable}
|
2016-03-30 12:27:16 +00:00
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
2016-03-11 00:48:53 +00:00
|
|
|
me.pmiClear = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtClear,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
caption : me.txtClearAll,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscCleanOptions.All
|
2016-03-11 00:48:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
caption : me.txtClearText,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscCleanOptions.Text
|
2016-03-11 00:48:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
caption : me.txtClearFormat,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscCleanOptions.Format
|
2016-03-11 00:48:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
caption : me.txtClearComments,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscCleanOptions.Comments
|
2016-03-11 00:48:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
caption : me.txtClearHyper,
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscCleanOptions.Hyperlinks
|
2016-03-11 00:48:53 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiSortCells = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtSort,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
caption : me.txtAscending,
|
2016-05-05 14:38:57 +00:00
|
|
|
value : Asc.c_oAscSortOptions.Ascending
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : me.txtDescending,
|
2016-05-05 14:38:57 +00:00
|
|
|
value : Asc.c_oAscSortOptions.Descending
|
2016-05-17 08:33:39 +00:00
|
|
|
},{
|
|
|
|
caption : me.txtSortCellColor,
|
|
|
|
value : Asc.c_oAscSortOptions.ByColorFill
|
|
|
|
},{
|
|
|
|
caption : me.txtSortFontColor,
|
|
|
|
value : Asc.c_oAscSortOptions.ByColorFont
|
2016-03-11 00:48:53 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
2016-05-17 08:01:41 +00:00
|
|
|
me.pmiFilterCells = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtFilter,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
caption : me.txtFilterValue,
|
|
|
|
value : 0
|
|
|
|
},{
|
|
|
|
caption : me.txtFilterCellColor,
|
|
|
|
value : 1
|
|
|
|
},{
|
|
|
|
caption : me.txtFilterFontColor,
|
|
|
|
value : 2
|
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiReapply = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtReapply
|
|
|
|
});
|
|
|
|
|
2016-03-11 00:48:53 +00:00
|
|
|
me.pmiInsFunction = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtFormula
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuAddHyperlink = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtInsHyperlink,
|
|
|
|
inCell : true
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuEditHyperlink = new Common.UI.MenuItem({
|
|
|
|
caption : me.editHyperlinkText,
|
|
|
|
inCell : true
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuRemoveHyperlink = new Common.UI.MenuItem({
|
|
|
|
caption : me.removeHyperlinkText
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuHyperlink = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtInsHyperlink,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign: 'tl-tr',
|
|
|
|
items : [
|
|
|
|
me.menuEditHyperlink,
|
|
|
|
me.menuRemoveHyperlink
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiRowHeight = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtRowHeight,
|
2016-07-26 12:47:48 +00:00
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign: 'tl-tr',
|
|
|
|
items : [
|
|
|
|
{ caption: me.txtAutoRowHeight, value: 'auto-row-height' },
|
|
|
|
{ caption: me.txtCustomRowHeight, value: 'row-height' }
|
|
|
|
]
|
|
|
|
})
|
2016-03-11 00:48:53 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiColumnWidth = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtColumnWidth,
|
2016-07-26 12:47:48 +00:00
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign: 'tl-tr',
|
|
|
|
items : [
|
|
|
|
{ caption: me.txtAutoColumnWidth, value: 'auto-column-width' },
|
|
|
|
{ caption: me.txtCustomColumnWidth, value: 'column-width' }
|
|
|
|
]
|
|
|
|
})
|
2016-03-11 00:48:53 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiEntireHide = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtHide
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiEntireShow = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtShow
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiAddComment = new Common.UI.MenuItem({
|
|
|
|
id : 'id-context-menu-item-add-comment',
|
|
|
|
caption : me.txtAddComment
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiCellMenuSeparator = new Common.UI.MenuItem({
|
|
|
|
caption : '--'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiAddNamedRange = new Common.UI.MenuItem({
|
|
|
|
id : 'id-context-menu-item-add-named-range',
|
|
|
|
caption : me.txtAddNamedRange
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiFreezePanes = new Common.UI.MenuItem({
|
|
|
|
caption : me.textFreezePanes
|
|
|
|
});
|
|
|
|
|
|
|
|
me.ssMenu = new Common.UI.Menu({
|
|
|
|
id : 'id-context-menu-cell',
|
|
|
|
items : [
|
|
|
|
me.pmiCut,
|
|
|
|
me.pmiCopy,
|
|
|
|
me.pmiPaste,
|
|
|
|
{caption: '--'},
|
2016-03-30 12:27:16 +00:00
|
|
|
me.pmiSelectTable,
|
2016-03-11 00:48:53 +00:00
|
|
|
me.pmiInsertEntire,
|
|
|
|
me.pmiInsertCells,
|
2016-03-30 12:27:16 +00:00
|
|
|
me.pmiInsertTable,
|
2016-03-11 00:48:53 +00:00
|
|
|
me.pmiDeleteEntire,
|
|
|
|
me.pmiDeleteCells,
|
2016-03-30 12:27:16 +00:00
|
|
|
me.pmiDeleteTable,
|
2016-03-11 00:48:53 +00:00
|
|
|
me.pmiClear,
|
2016-05-17 08:01:41 +00:00
|
|
|
{caption: '--'},
|
2016-03-11 00:48:53 +00:00
|
|
|
me.pmiSortCells,
|
2016-05-17 08:01:41 +00:00
|
|
|
me.pmiFilterCells,
|
|
|
|
me.pmiReapply,
|
2016-03-11 00:48:53 +00:00
|
|
|
{caption: '--'},
|
|
|
|
me.pmiAddComment,
|
|
|
|
me.pmiCellMenuSeparator,
|
|
|
|
me.pmiAddNamedRange,
|
|
|
|
me.pmiInsFunction,
|
|
|
|
me.menuAddHyperlink,
|
|
|
|
me.menuHyperlink,
|
|
|
|
me.pmiRowHeight,
|
|
|
|
me.pmiColumnWidth,
|
|
|
|
me.pmiEntireHide,
|
|
|
|
me.pmiEntireShow,
|
|
|
|
me.pmiFreezePanes
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
me.mnuGroupImg = new Common.UI.MenuItem({
|
|
|
|
caption : this.txtGroup,
|
|
|
|
iconCls : 'mnu-group',
|
|
|
|
type : 'group',
|
|
|
|
value : 'grouping'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.mnuUnGroupImg = new Common.UI.MenuItem({
|
|
|
|
caption : this.txtUngroup,
|
|
|
|
iconCls : 'mnu-ungroup',
|
|
|
|
type : 'group',
|
|
|
|
value : 'ungrouping'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.mnuShapeSeparator = new Common.UI.MenuItem({
|
|
|
|
caption : '--'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.mnuShapeAdvanced = new Common.UI.MenuItem({
|
|
|
|
caption : me.advancedShapeText
|
|
|
|
});
|
|
|
|
|
|
|
|
me.mnuChartEdit = new Common.UI.MenuItem({
|
|
|
|
caption : me.chartText
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiImgCut = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtCut,
|
|
|
|
value : 'cut'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiImgCopy = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtCopy,
|
|
|
|
value : 'copy'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiImgPaste = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtPaste,
|
|
|
|
value : 'paste'
|
|
|
|
});
|
|
|
|
|
|
|
|
this.imgMenu = new Common.UI.Menu({
|
|
|
|
items: [
|
|
|
|
me.pmiImgCut,
|
|
|
|
me.pmiImgCopy,
|
|
|
|
me.pmiImgPaste,
|
|
|
|
{caption: '--'},
|
|
|
|
{
|
|
|
|
caption : this.textArrangeFront,
|
|
|
|
iconCls : 'mnu-arrange-front',
|
|
|
|
type : 'arrange',
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscDrawingLayerType.BringToFront
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : this.textArrangeBack,
|
|
|
|
iconCls : 'mnu-arrange-back',
|
|
|
|
type : 'arrange',
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscDrawingLayerType.SendToBack
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption : this.textArrangeForward,
|
|
|
|
iconCls : 'mnu-arrange-forward',
|
|
|
|
type : 'arrange',
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscDrawingLayerType.BringForward
|
2016-03-11 00:48:53 +00:00
|
|
|
},{
|
|
|
|
caption: this.textArrangeBackward,
|
|
|
|
iconCls : 'mnu-arrange-backward',
|
|
|
|
type : 'arrange',
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscDrawingLayerType.SendBackward
|
2016-03-11 00:48:53 +00:00
|
|
|
},
|
|
|
|
{caption: '--'},
|
|
|
|
me.mnuGroupImg,
|
|
|
|
me.mnuUnGroupImg,
|
|
|
|
me.mnuShapeSeparator,
|
|
|
|
me.mnuChartEdit,
|
|
|
|
me.mnuShapeAdvanced
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
this.menuParagraphVAlign = new Common.UI.MenuItem({
|
|
|
|
caption : this.vertAlignText,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign : 'tl-tr',
|
|
|
|
items: [
|
|
|
|
me.menuParagraphTop = new Common.UI.MenuItem({
|
|
|
|
caption : me.topCellText,
|
|
|
|
checkable : true,
|
|
|
|
toggleGroup : 'popupparagraphvalign',
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
|
2016-03-11 00:48:53 +00:00
|
|
|
}),
|
|
|
|
me.menuParagraphCenter = new Common.UI.MenuItem({
|
|
|
|
caption : me.centerCellText,
|
|
|
|
checkable : true,
|
|
|
|
toggleGroup : 'popupparagraphvalign',
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
|
2016-03-11 00:48:53 +00:00
|
|
|
}),
|
|
|
|
this.menuParagraphBottom = new Common.UI.MenuItem({
|
|
|
|
caption : me.bottomCellText,
|
|
|
|
checkable : true,
|
|
|
|
toggleGroup : 'popupparagraphvalign',
|
2016-04-05 11:52:34 +00:00
|
|
|
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
|
2016-03-11 00:48:53 +00:00
|
|
|
})
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuParagraphDirection = new Common.UI.MenuItem({
|
|
|
|
caption : me.directionText,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign: 'tl-tr',
|
|
|
|
items : [
|
|
|
|
me.menuParagraphDirectH = new Common.UI.MenuItem({
|
|
|
|
caption : me.directHText,
|
|
|
|
iconCls : 'mnu-direct-horiz',
|
|
|
|
checkable : true,
|
|
|
|
checked : false,
|
|
|
|
toggleGroup : 'popupparagraphdirect',
|
2016-04-05 11:52:34 +00:00
|
|
|
direction : Asc.c_oAscVertDrawingText.normal
|
2016-03-11 00:48:53 +00:00
|
|
|
}),
|
|
|
|
me.menuParagraphDirect90 = new Common.UI.MenuItem({
|
|
|
|
caption : me.direct90Text,
|
|
|
|
iconCls : 'mnu-direct-rdown',
|
|
|
|
checkable : true,
|
|
|
|
checked : false,
|
|
|
|
toggleGroup : 'popupparagraphdirect',
|
2016-04-05 11:52:34 +00:00
|
|
|
direction : Asc.c_oAscVertDrawingText.vert
|
2016-03-11 00:48:53 +00:00
|
|
|
}),
|
|
|
|
me.menuParagraphDirect270 = new Common.UI.MenuItem({
|
|
|
|
caption : me.direct270Text,
|
|
|
|
iconCls : 'mnu-direct-rup',
|
|
|
|
checkable : true,
|
|
|
|
checked : false,
|
|
|
|
toggleGroup : 'popupparagraphdirect',
|
2016-04-05 11:52:34 +00:00
|
|
|
direction : Asc.c_oAscVertDrawingText.vert270
|
2016-03-11 00:48:53 +00:00
|
|
|
})
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuAddHyperlinkShape = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtInsHyperlink
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuEditHyperlinkShape = new Common.UI.MenuItem({
|
|
|
|
caption : me.editHyperlinkText
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuRemoveHyperlinkShape = new Common.UI.MenuItem({
|
|
|
|
caption : me.removeHyperlinkText
|
|
|
|
});
|
|
|
|
|
|
|
|
me.menuHyperlinkShape = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtInsHyperlink,
|
|
|
|
menu : new Common.UI.Menu({
|
|
|
|
menuAlign: 'tl-tr',
|
|
|
|
items : [
|
|
|
|
me.menuEditHyperlinkShape,
|
|
|
|
me.menuRemoveHyperlinkShape
|
|
|
|
]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
this.pmiTextAdvanced = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtTextAdvanced
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiTextCut = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtCut,
|
|
|
|
value : 'cut'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiTextCopy = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtCopy,
|
|
|
|
value : 'copy'
|
|
|
|
});
|
|
|
|
|
|
|
|
me.pmiTextPaste = new Common.UI.MenuItem({
|
|
|
|
caption : me.txtPaste,
|
|
|
|
value : 'paste'
|
|
|
|
});
|
|
|
|
|
|
|
|
this.textInShapeMenu = new Common.UI.Menu({
|
|
|
|
items: [
|
|
|
|
me.pmiTextCut,
|
|
|
|
me.pmiTextCopy,
|
|
|
|
me.pmiTextPaste,
|
|
|
|
{caption: '--'},
|
|
|
|
me.menuParagraphVAlign,
|
|
|
|
me.menuParagraphDirection,
|
|
|
|
me.menuAddHyperlinkShape,
|
|
|
|
me.menuHyperlinkShape,
|
|
|
|
{caption: '--'},
|
|
|
|
me.pmiTextAdvanced
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
this.entriesMenu = new Common.UI.Menu({
|
|
|
|
maxHeight: 200,
|
|
|
|
cyclic: false,
|
|
|
|
items: []
|
|
|
|
}).on('render:after', function(mnu) {
|
2016-07-06 10:59:54 +00:00
|
|
|
mnu.cmpEl.removeAttr('oo_editor_input').attr('oo_editor_keyboard', true);
|
2016-03-11 00:48:53 +00:00
|
|
|
this.scroller = new Common.UI.Scroller({
|
|
|
|
el: $(this.el).find('.dropdown-menu '),
|
|
|
|
useKeyboard: this.enableKeyEvents && !this.handleSelect,
|
|
|
|
minScrollbarLength : 40,
|
|
|
|
alwaysVisibleY: true
|
|
|
|
});
|
|
|
|
}).on('show:after', function () {
|
|
|
|
this.scroller.update({alwaysVisibleY: true});
|
|
|
|
});
|
|
|
|
|
|
|
|
this.funcMenu = new Common.UI.Menu({
|
|
|
|
maxHeight: 200,
|
|
|
|
cyclic: false,
|
|
|
|
items: []
|
|
|
|
}).on('render:after', function(mnu) {
|
2016-07-06 10:59:54 +00:00
|
|
|
mnu.cmpEl.removeAttr('oo_editor_input').attr('oo_editor_keyboard', true);
|
2016-03-11 00:48:53 +00:00
|
|
|
this.scroller = new Common.UI.Scroller({
|
|
|
|
el: $(this.el).find('.dropdown-menu '),
|
|
|
|
useKeyboard: this.enableKeyEvents && !this.handleSelect,
|
|
|
|
minScrollbarLength : 40,
|
|
|
|
alwaysVisibleY: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
me.fireEvent('createdelayedelements', [me]);
|
|
|
|
},
|
|
|
|
|
|
|
|
setMenuItemCommentCaptionMode: function (edit) {
|
|
|
|
edit ? this.pmiAddComment.setCaption(this.txtEditComment, true) :
|
|
|
|
this.pmiAddComment.setCaption(this.txtAddComment, true);
|
|
|
|
},
|
|
|
|
|
|
|
|
txtSort: 'Sort',
|
|
|
|
txtAscending: 'Ascending',
|
|
|
|
txtDescending: 'Descending',
|
|
|
|
txtFormula: 'Insert Function',
|
|
|
|
txtInsHyperlink: 'Hyperlink',
|
|
|
|
txtCut: 'Cut',
|
|
|
|
txtCopy: 'Copy',
|
|
|
|
txtPaste: 'Paste',
|
|
|
|
txtInsert: 'Insert',
|
|
|
|
txtDelete: 'Delete',
|
|
|
|
txtClear: 'Clear',
|
|
|
|
txtClearAll: 'All',
|
|
|
|
txtClearText: 'Text',
|
|
|
|
txtClearFormat: 'Format',
|
|
|
|
txtClearHyper: 'Hyperlink',
|
|
|
|
txtClearComments: 'Comments',
|
|
|
|
txtShiftRight: 'Shift cells right',
|
|
|
|
txtShiftLeft: 'Shift cells left',
|
|
|
|
txtShiftUp: 'Shift cells up',
|
|
|
|
txtShiftDown: 'Shift cells down',
|
|
|
|
txtRow: 'Entire Row',
|
|
|
|
txtColumn: 'Entire Column',
|
2016-07-26 12:47:48 +00:00
|
|
|
txtColumnWidth: 'Set Column Width',
|
|
|
|
txtRowHeight: 'Set Row Height',
|
2016-03-11 00:48:53 +00:00
|
|
|
txtWidth: 'Width',
|
|
|
|
txtHide: 'Hide',
|
|
|
|
txtShow: 'Show',
|
|
|
|
textArrangeFront: 'Bring To Front',
|
|
|
|
textArrangeBack: 'Send To Back',
|
|
|
|
textArrangeForward: 'Bring Forward',
|
|
|
|
textArrangeBackward: 'Send Backward',
|
|
|
|
txtArrange: 'Arrange',
|
|
|
|
txtAddComment: 'Add Comment',
|
|
|
|
txtEditComment: 'Edit Comment',
|
|
|
|
txtUngroup: 'Ungroup',
|
|
|
|
txtGroup: 'Group',
|
|
|
|
topCellText: 'Align Top',
|
|
|
|
centerCellText: 'Align Center',
|
|
|
|
bottomCellText: 'Align Bottom',
|
|
|
|
vertAlignText: 'Vertical Alignment',
|
|
|
|
txtTextAdvanced: 'Text Advanced Settings',
|
|
|
|
editHyperlinkText: 'Edit Hyperlink',
|
|
|
|
removeHyperlinkText: 'Remove Hyperlink',
|
|
|
|
editChartText: 'Edit Data',
|
|
|
|
advancedShapeText: 'Shape Advanced Settings',
|
|
|
|
chartText: 'Chart Advanced Settings',
|
|
|
|
directionText: 'Text Direction',
|
|
|
|
directHText: 'Horizontal',
|
|
|
|
direct90Text: 'Rotate at 90°',
|
|
|
|
direct270Text: 'Rotate at 270°',
|
|
|
|
txtAddNamedRange: 'Define Name',
|
|
|
|
textFreezePanes: 'Freeze Panes',
|
2016-03-30 12:27:16 +00:00
|
|
|
textUnFreezePanes: 'Unfreeze Panes',
|
|
|
|
txtSelect: 'Select',
|
|
|
|
selectRowText : 'Select Row',
|
|
|
|
selectColumnText : 'Select Entire Column',
|
|
|
|
selectDataText : 'Select Column Data',
|
|
|
|
selectTableText : 'Select Table',
|
|
|
|
insertRowAboveText : 'Insert Row Above',
|
|
|
|
insertRowBelowText : 'Insert Row Below',
|
|
|
|
insertColumnLeftText : 'Insert Column Left',
|
|
|
|
insertColumnRightText : 'Insert Column Right',
|
|
|
|
deleteRowText : 'Delete Row',
|
|
|
|
deleteColumnText : 'Delete Column',
|
2016-05-17 08:01:41 +00:00
|
|
|
deleteTableText : 'Delete Table',
|
|
|
|
txtFilter: 'Filter',
|
|
|
|
txtFilterValue: 'Filter by Selected cell\'s value',
|
|
|
|
txtFilterCellColor: 'Filter by cell\'s color',
|
|
|
|
txtFilterFontColor: 'Filter by font color',
|
2016-05-17 08:33:39 +00:00
|
|
|
txtReapply: 'Reapply',
|
|
|
|
txtSortCellColor: 'Selected Cell Color on top',
|
2016-07-26 12:47:48 +00:00
|
|
|
txtSortFontColor: 'Selected Font Color on top',
|
|
|
|
txtAutoColumnWidth: 'Auto Fit Column Width',
|
|
|
|
txtAutoRowHeight: 'Auto Fit Row Height',
|
|
|
|
txtCustomColumnWidth: 'Custom Column Width',
|
|
|
|
txtCustomRowHeight: 'Custom Row Height'
|
|
|
|
|
2016-03-11 00:48:53 +00:00
|
|
|
}, SSE.Views.DocumentHolder || {}));
|
|
|
|
});
|