2019-05-30 10:15:49 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (c) Copyright Ascensio System SIA 2010-2019
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* DataTab.js
|
|
|
|
*
|
|
|
|
* Created by Julia Radzhabova on 30.05.2019
|
|
|
|
* Copyright (c) 2019 Ascensio System SIA. All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
define([
|
|
|
|
'common/main/lib/util/utils',
|
|
|
|
'common/main/lib/component/BaseView',
|
|
|
|
'common/main/lib/component/Layout'
|
|
|
|
], function () {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
SSE.Views.DataTab = Common.UI.BaseView.extend(_.extend((function(){
|
|
|
|
function setEvents() {
|
|
|
|
var me = this;
|
|
|
|
me.btnUngroup.menu.on('item:click', function (menu, item, e) {
|
|
|
|
me.fireEvent('data:ungroup', [item.value]);
|
|
|
|
});
|
|
|
|
me.btnUngroup.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:ungroup');
|
|
|
|
});
|
2019-08-08 07:48:27 +00:00
|
|
|
me.btnGroup.menu.on('item:click', function (menu, item, e) {
|
|
|
|
me.fireEvent('data:group', [item.value, item.checked]);
|
|
|
|
});
|
2019-05-30 10:15:49 +00:00
|
|
|
me.btnGroup.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:group');
|
|
|
|
});
|
2019-08-08 07:48:27 +00:00
|
|
|
me.btnGroup.menu.on('show:before', function (menu, e) {
|
|
|
|
me.fireEvent('data:groupsettings', [menu]);
|
|
|
|
});
|
2019-05-30 12:52:25 +00:00
|
|
|
me.btnTextToColumns.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:tocolumns');
|
|
|
|
});
|
2020-04-07 12:48:45 +00:00
|
|
|
me.btnRemoveDuplicates.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:remduplicates');
|
|
|
|
});
|
2020-11-11 20:55:11 +00:00
|
|
|
me.btnDataValidation.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:datavalidation');
|
|
|
|
});
|
2019-11-21 16:18:15 +00:00
|
|
|
// isn't used for awhile
|
|
|
|
// me.btnShow.on('click', function (b, e) {
|
|
|
|
// me.fireEvent('data:show');
|
|
|
|
// });
|
|
|
|
// me.btnHide.on('click', function (b, e) {
|
|
|
|
// me.fireEvent('data:hide');
|
|
|
|
// });
|
2019-05-31 14:48:14 +00:00
|
|
|
me.btnsSortDown.forEach(function(button) {
|
|
|
|
button.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:sort', [Asc.c_oAscSortOptions.Ascending]);
|
|
|
|
});
|
|
|
|
});
|
2019-05-31 15:07:27 +00:00
|
|
|
me.btnsSortUp.forEach(function(button) {
|
|
|
|
button.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:sort', [Asc.c_oAscSortOptions.Descending]);
|
|
|
|
});
|
|
|
|
});
|
2019-06-03 10:20:24 +00:00
|
|
|
me.btnsSetAutofilter.forEach(function(button) {
|
|
|
|
button.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:setfilter', [Asc.c_oAscSortOptions.Descending]);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
me.btnsClearAutofilter.forEach(function(button) {
|
|
|
|
button.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:clearfilter', [Asc.c_oAscSortOptions.Descending]);
|
|
|
|
});
|
|
|
|
});
|
2019-10-01 11:20:52 +00:00
|
|
|
me.btnCustomSort.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:sortcustom');
|
|
|
|
});
|
2021-03-26 09:51:01 +00:00
|
|
|
me.btnDataFromText.menu ?
|
2021-03-19 14:00:05 +00:00
|
|
|
me.btnDataFromText.menu.on('item:click', function (menu, item, e) {
|
|
|
|
me.fireEvent('data:fromtext', [item.value]);
|
2021-03-26 09:51:01 +00:00
|
|
|
}) : me.btnDataFromText.on('click', function (b, e) {
|
|
|
|
me.fireEvent('data:fromtext', ['file']);
|
2021-03-19 14:00:05 +00:00
|
|
|
});
|
2019-05-30 10:15:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
options: {},
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
Common.UI.BaseView.prototype.initialize.call(this);
|
|
|
|
this.toolbar = options.toolbar;
|
|
|
|
|
|
|
|
this.lockedControls = [];
|
|
|
|
|
|
|
|
var me = this,
|
|
|
|
$host = me.toolbar.$el,
|
|
|
|
_set = SSE.enumLock;
|
|
|
|
|
2021-03-19 14:00:05 +00:00
|
|
|
this.btnDataFromText = new Common.UI.Button({
|
|
|
|
parentEl: $host.find('#slot-btn-data-from-text'),
|
|
|
|
cls: 'btn-toolbar x-huge icon-top',
|
2021-03-26 08:38:40 +00:00
|
|
|
iconCls: 'toolbar__icon btn-import-data',
|
2021-03-19 14:00:05 +00:00
|
|
|
caption: this.capDataFromText,
|
2021-03-26 09:51:01 +00:00
|
|
|
menu: !this.toolbar.mode.isDesktopApp,
|
2021-03-19 14:00:05 +00:00
|
|
|
disabled: true,
|
2021-08-05 10:49:29 +00:00
|
|
|
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.sheetLock, _set.wbLock, _set.lostConnect, _set.coAuth, _set.wsLock],
|
2021-06-08 14:26:10 +00:00
|
|
|
dataHint: '1',
|
|
|
|
dataHintDirection: 'bottom',
|
|
|
|
dataHintOffset: 'small'
|
2021-03-19 14:00:05 +00:00
|
|
|
});
|
|
|
|
this.lockedControls.push(this.btnDataFromText);
|
|
|
|
|
2019-05-30 10:15:49 +00:00
|
|
|
this.btnGroup = new Common.UI.Button({
|
2020-04-29 07:36:53 +00:00
|
|
|
parentEl: $host.find('#slot-btn-group'),
|
2019-05-30 10:15:49 +00:00
|
|
|
cls: 'btn-toolbar x-huge icon-top',
|
2019-11-21 16:15:47 +00:00
|
|
|
iconCls: 'toolbar__icon btn-cell-group',
|
2019-05-30 10:15:49 +00:00
|
|
|
caption: this.capBtnGroup,
|
2019-08-08 07:48:27 +00:00
|
|
|
split: true,
|
|
|
|
menu: true,
|
2019-05-30 10:15:49 +00:00
|
|
|
disabled: true,
|
2021-08-05 10:49:29 +00:00
|
|
|
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.sheetLock, _set.lostConnect, _set.coAuth, _set.wsLock],
|
2021-06-08 14:26:10 +00:00
|
|
|
dataHint: '1',
|
|
|
|
dataHintDirection: 'bottom',
|
|
|
|
dataHintOffset: 'small'
|
2019-05-30 10:15:49 +00:00
|
|
|
});
|
|
|
|
this.lockedControls.push(this.btnGroup);
|
|
|
|
|
|
|
|
this.btnUngroup = new Common.UI.Button({
|
2020-04-29 07:36:53 +00:00
|
|
|
parentEl: $host.find('#slot-btn-ungroup'),
|
2019-05-30 10:15:49 +00:00
|
|
|
cls: 'btn-toolbar x-huge icon-top',
|
2019-11-21 16:15:47 +00:00
|
|
|
iconCls: 'toolbar__icon btn-cell-ungroup',
|
2019-05-30 10:15:49 +00:00
|
|
|
caption: this.capBtnUngroup,
|
|
|
|
split: true,
|
|
|
|
menu: true,
|
|
|
|
disabled: true,
|
2021-08-05 10:49:29 +00:00
|
|
|
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.sheetLock, _set.lostConnect, _set.coAuth, _set.wsLock],
|
2021-06-08 14:26:10 +00:00
|
|
|
dataHint: '1',
|
|
|
|
dataHintDirection: 'bottom',
|
|
|
|
dataHintOffset: 'small'
|
2019-05-30 10:15:49 +00:00
|
|
|
});
|
|
|
|
this.lockedControls.push(this.btnUngroup);
|
|
|
|
|
2019-05-30 12:52:25 +00:00
|
|
|
this.btnTextToColumns = new Common.UI.Button({
|
2020-04-29 07:36:53 +00:00
|
|
|
parentEl: $host.find('#slot-btn-text-column'),
|
2019-05-30 12:52:25 +00:00
|
|
|
cls: 'btn-toolbar x-huge icon-top',
|
2019-11-21 16:15:47 +00:00
|
|
|
iconCls: 'toolbar__icon btn-to-columns',
|
2019-05-30 12:52:25 +00:00
|
|
|
caption: this.capBtnTextToCol,
|
|
|
|
split: false,
|
|
|
|
disabled: true,
|
2021-08-05 10:49:29 +00:00
|
|
|
lock: [_set.multiselect, _set.multiselectCols, _set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.wsLock],
|
2021-06-08 14:26:10 +00:00
|
|
|
dataHint: '1',
|
|
|
|
dataHintDirection: 'bottom',
|
|
|
|
dataHintOffset: 'small'
|
2019-05-30 12:52:25 +00:00
|
|
|
});
|
|
|
|
this.lockedControls.push(this.btnTextToColumns);
|
|
|
|
|
2019-11-21 16:18:15 +00:00
|
|
|
// this.btnShow = new Common.UI.Button({
|
|
|
|
// cls : 'btn-toolbar',
|
|
|
|
// iconCls : 'btn-show-details',
|
|
|
|
// style: 'padding-right: 2px;',
|
|
|
|
// caption: this.capBtnTextShow,
|
|
|
|
// lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth]
|
|
|
|
// });
|
|
|
|
// Common.Utils.injectComponent($host.find('#slot-btn-show-details'), this.btnShow);
|
|
|
|
// this.lockedControls.push(this.btnShow);
|
2019-05-31 07:59:38 +00:00
|
|
|
|
2019-11-21 16:18:15 +00:00
|
|
|
// this.btnHide = new Common.UI.Button({
|
|
|
|
// cls : 'btn-toolbar',
|
|
|
|
// iconCls : 'btn-hide-details',
|
|
|
|
// style: 'padding-right: 2px;',
|
|
|
|
// caption: this.capBtnTextHide,
|
|
|
|
// lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth]
|
|
|
|
// });
|
|
|
|
// Common.Utils.injectComponent($host.find('#slot-btn-hide-details'), this.btnHide);
|
|
|
|
// this.lockedControls.push(this.btnHide);
|
2019-05-30 14:51:11 +00:00
|
|
|
|
2020-04-07 12:48:45 +00:00
|
|
|
this.btnRemoveDuplicates = new Common.UI.Button({
|
2020-04-29 07:36:53 +00:00
|
|
|
parentEl: $host.find('#slot-btn-rem-duplicates'),
|
2020-04-07 12:48:45 +00:00
|
|
|
cls: 'btn-toolbar x-huge icon-top',
|
2020-04-08 12:01:24 +00:00
|
|
|
iconCls: 'toolbar__icon btn-remove-duplicates',
|
2020-04-07 12:48:45 +00:00
|
|
|
caption: this.capBtnTextRemDuplicates,
|
|
|
|
disabled: true,
|
2021-08-05 10:49:29 +00:00
|
|
|
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock, _set.wsLock],
|
2021-06-08 14:26:10 +00:00
|
|
|
dataHint: '1',
|
|
|
|
dataHintDirection: 'bottom',
|
|
|
|
dataHintOffset: 'small'
|
2020-04-07 12:48:45 +00:00
|
|
|
});
|
|
|
|
this.lockedControls.push(this.btnRemoveDuplicates);
|
|
|
|
|
2020-11-11 20:55:11 +00:00
|
|
|
this.btnDataValidation = new Common.UI.Button({
|
|
|
|
parentEl: $host.find('#slot-btn-data-validation'),
|
|
|
|
cls: 'btn-toolbar x-huge icon-top',
|
|
|
|
iconCls: 'toolbar__icon btn-data-validation',
|
|
|
|
caption: this.capBtnTextDataValidation,
|
|
|
|
disabled: true,
|
2021-08-05 10:49:29 +00:00
|
|
|
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock, _set.wsLock],
|
2021-06-08 14:26:10 +00:00
|
|
|
dataHint: '1',
|
|
|
|
dataHintDirection: 'bottom',
|
|
|
|
dataHintOffset: 'small'
|
2020-11-11 20:55:11 +00:00
|
|
|
});
|
|
|
|
this.lockedControls.push(this.btnDataValidation);
|
|
|
|
|
2019-10-01 11:20:52 +00:00
|
|
|
this.btnCustomSort = new Common.UI.Button({
|
2020-04-29 07:36:53 +00:00
|
|
|
parentEl: $host.find('#slot-btn-custom-sort'),
|
2019-10-01 11:20:52 +00:00
|
|
|
cls: 'btn-toolbar x-huge icon-top',
|
2019-12-04 13:26:27 +00:00
|
|
|
iconCls: 'toolbar__icon btn-custom-sort',
|
2019-10-01 11:20:52 +00:00
|
|
|
caption: this.capBtnTextCustomSort,
|
|
|
|
disabled: true,
|
2021-08-05 10:49:29 +00:00
|
|
|
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock, _set['Sort']],
|
2021-06-08 14:26:10 +00:00
|
|
|
dataHint: '1',
|
|
|
|
dataHintDirection: 'bottom',
|
|
|
|
dataHintOffset: 'small'
|
2019-10-01 11:20:52 +00:00
|
|
|
});
|
|
|
|
this.lockedControls.push(this.btnCustomSort);
|
|
|
|
|
2019-11-21 16:15:47 +00:00
|
|
|
this.btnsSortDown = Common.Utils.injectButtons($host.find('.slot-sortdesc'), '', 'toolbar__icon btn-sort-down', '',
|
2021-08-05 10:49:29 +00:00
|
|
|
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter, _set.sheetLock, _set.cantSort, _set['Sort']], undefined, undefined, undefined, '1', 'top', undefined, 'D');
|
2019-05-31 14:48:14 +00:00
|
|
|
|
2019-11-21 16:15:47 +00:00
|
|
|
this.btnsSortUp = Common.Utils.injectButtons($host.find('.slot-sortasc'), '', 'toolbar__icon btn-sort-up', '',
|
2021-08-05 10:49:29 +00:00
|
|
|
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter, _set.sheetLock, _set.cantSort, _set['Sort']], undefined, undefined, undefined, '1', 'top', undefined, 'U');
|
2019-05-31 15:07:27 +00:00
|
|
|
|
2019-11-21 16:15:47 +00:00
|
|
|
this.btnsSetAutofilter = Common.Utils.injectButtons($host.find('.slot-btn-setfilter'), '', 'toolbar__icon btn-autofilter', '',
|
2021-07-16 21:49:36 +00:00
|
|
|
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.tableHasSlicer, _set.wsLock],
|
2021-07-02 11:58:27 +00:00
|
|
|
false, false, true, '1', 'bottom', undefined, 'F');
|
2019-06-03 10:20:24 +00:00
|
|
|
|
2019-11-21 16:15:47 +00:00
|
|
|
this.btnsClearAutofilter = Common.Utils.injectButtons($host.find('.slot-btn-clear-filter'), '', 'toolbar__icon btn-clear-filter', '',
|
2021-08-05 10:49:29 +00:00
|
|
|
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleDelFilter, _set.wsLock], undefined, undefined, undefined, '1', 'bottom', undefined, 'N');
|
2019-06-11 11:27:25 +00:00
|
|
|
|
|
|
|
Array.prototype.push.apply(this.lockedControls, this.btnsSortDown.concat(this.btnsSortUp, this.btnsSetAutofilter,this.btnsClearAutofilter));
|
2019-06-03 10:20:24 +00:00
|
|
|
|
2019-05-30 10:15:49 +00:00
|
|
|
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
|
|
|
},
|
|
|
|
|
|
|
|
render: function (el) {
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
|
|
|
|
onAppReady: function (config) {
|
|
|
|
var me = this;
|
|
|
|
(new Promise(function (accept, reject) {
|
|
|
|
accept();
|
|
|
|
})).then(function(){
|
|
|
|
me.btnUngroup.updateHint( me.tipUngroup );
|
|
|
|
var _menu = new Common.UI.Menu({
|
|
|
|
items: [
|
|
|
|
{caption: me.textRows, value: 'rows'},
|
|
|
|
{caption: me.textColumns, value: 'columns'},
|
|
|
|
{caption: me.textClear, value: 'clear'}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
me.btnUngroup.setMenu(_menu);
|
|
|
|
|
|
|
|
me.btnGroup.updateHint(me.tipGroup);
|
2019-08-08 07:48:27 +00:00
|
|
|
_menu = new Common.UI.Menu({
|
|
|
|
items: [
|
|
|
|
{caption: me.textGroupRows, value: 'rows'},
|
|
|
|
{caption: me.textGroupColumns, value: 'columns'},
|
|
|
|
{caption: '--'},
|
|
|
|
{caption: me.textBelow, value: 'below', checkable: true},
|
|
|
|
{caption: me.textRightOf, value: 'right', checkable: true}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
me.btnGroup.setMenu(_menu);
|
|
|
|
|
2021-03-19 14:00:05 +00:00
|
|
|
me.btnDataFromText.updateHint(me.tipDataFromText);
|
2021-03-26 09:51:01 +00:00
|
|
|
me.btnDataFromText.menu && me.btnDataFromText.setMenu(new Common.UI.Menu({
|
2021-03-19 14:00:05 +00:00
|
|
|
items: [
|
|
|
|
{ caption: me.mniFromFile, value: 'file' },
|
|
|
|
{ caption: me.mniFromUrl, value: 'url' }
|
|
|
|
// { caption: me.mniImageFromStorage, value: 'storage'}
|
|
|
|
]
|
|
|
|
}));
|
|
|
|
|
2019-05-30 12:52:25 +00:00
|
|
|
me.btnTextToColumns.updateHint(me.tipToColumns);
|
2020-04-07 12:48:45 +00:00
|
|
|
me.btnRemoveDuplicates.updateHint(me.tipRemDuplicates);
|
2020-11-11 20:55:11 +00:00
|
|
|
me.btnDataValidation.updateHint(me.tipDataValidation);
|
2019-05-30 10:15:49 +00:00
|
|
|
|
2019-05-31 14:48:14 +00:00
|
|
|
me.btnsSortDown.forEach( function(btn) {
|
|
|
|
btn.updateHint(me.toolbar.txtSortAZ);
|
|
|
|
});
|
2019-05-31 15:07:27 +00:00
|
|
|
me.btnsSortUp.forEach( function(btn) {
|
|
|
|
btn.updateHint(me.toolbar.txtSortZA);
|
|
|
|
});
|
2019-06-03 10:20:24 +00:00
|
|
|
me.btnsSetAutofilter.forEach( function(btn) {
|
|
|
|
btn.updateHint(me.toolbar.txtFilter + ' (Ctrl+Shift+L)');
|
|
|
|
});
|
|
|
|
me.btnsClearAutofilter.forEach( function(btn) {
|
|
|
|
btn.updateHint(me.toolbar.txtClearFilter);
|
|
|
|
});
|
2019-10-01 11:20:52 +00:00
|
|
|
me.btnCustomSort.updateHint(me.tipCustomSort);
|
2019-05-31 14:48:14 +00:00
|
|
|
|
2019-05-30 10:15:49 +00:00
|
|
|
setEvents.call(me);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
show: function () {
|
|
|
|
Common.UI.BaseView.prototype.show.call(this);
|
|
|
|
this.fireEvent('show', this);
|
|
|
|
},
|
|
|
|
|
2019-05-31 14:48:14 +00:00
|
|
|
getButtons: function(type) {
|
|
|
|
if (type == 'sort-down')
|
|
|
|
return this.btnsSortDown;
|
2019-05-31 15:07:27 +00:00
|
|
|
else if (type == 'sort-up')
|
|
|
|
return this.btnsSortUp;
|
2019-10-01 11:20:52 +00:00
|
|
|
else if (type == 'sort-custom')
|
|
|
|
return this.btnCustomSort;
|
2019-06-03 10:20:24 +00:00
|
|
|
else if (type == 'set-filter')
|
|
|
|
return this.btnsSetAutofilter;
|
|
|
|
else if (type == 'clear-filter')
|
|
|
|
return this.btnsClearAutofilter;
|
2020-04-08 08:51:55 +00:00
|
|
|
else if (type == 'rem-duplicates')
|
|
|
|
return this.btnRemoveDuplicates;
|
2020-11-11 20:55:11 +00:00
|
|
|
else if (type == 'data-validation')
|
|
|
|
return this.btnDataValidation;
|
2019-05-31 14:48:14 +00:00
|
|
|
else if (type===undefined)
|
|
|
|
return this.lockedControls;
|
|
|
|
return [];
|
2019-05-30 10:15:49 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
SetDisabled: function (state) {
|
|
|
|
this.lockedControls && this.lockedControls.forEach(function(button) {
|
|
|
|
if ( button ) {
|
|
|
|
button.setDisabled(state);
|
|
|
|
}
|
|
|
|
}, this);
|
|
|
|
},
|
|
|
|
|
|
|
|
capBtnGroup: 'Group',
|
|
|
|
capBtnUngroup: 'Ungroup',
|
|
|
|
textRows: 'Ungroup rows',
|
|
|
|
textColumns: 'Ungroup columns',
|
2019-08-08 07:48:27 +00:00
|
|
|
textGroupRows: 'Group rows',
|
|
|
|
textGroupColumns: 'Group columns',
|
2019-05-30 10:15:49 +00:00
|
|
|
textClear: 'Clear outline',
|
|
|
|
tipGroup: 'Group range of cells',
|
2019-05-30 12:52:25 +00:00
|
|
|
tipUngroup: 'Ungroup range of cells',
|
|
|
|
capBtnTextToCol: 'Text to Columns',
|
2019-05-30 14:51:11 +00:00
|
|
|
tipToColumns: 'Separate cell text into columns',
|
|
|
|
capBtnTextShow: 'Show details',
|
2019-08-08 07:48:27 +00:00
|
|
|
capBtnTextHide: 'Hide details',
|
|
|
|
textBelow: 'Summary rows below detail',
|
2019-10-01 11:20:52 +00:00
|
|
|
textRightOf: 'Summary columns to right of detail',
|
|
|
|
capBtnTextCustomSort: 'Custom Sort',
|
2020-04-07 12:48:45 +00:00
|
|
|
tipCustomSort: 'Custom sort',
|
|
|
|
capBtnTextRemDuplicates: 'Remove Duplicates',
|
2020-11-11 20:55:11 +00:00
|
|
|
tipRemDuplicates: 'Remove duplicate rows from a sheet',
|
|
|
|
capBtnTextDataValidation: 'Data Validation',
|
2021-03-19 14:00:05 +00:00
|
|
|
tipDataValidation: 'Data validation',
|
|
|
|
capDataFromText: 'From Text/CSV',
|
|
|
|
tipDataFromText: 'Get data from Text/CSV file',
|
|
|
|
mniFromFile: 'Get Data from File',
|
|
|
|
mniFromUrl: 'Get Data from URL'
|
2019-05-30 10:15:49 +00:00
|
|
|
}
|
|
|
|
}()), SSE.Views.DataTab || {}));
|
|
|
|
});
|