2020-02-28 13:30:58 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (c) Copyright Ascensio System SIA 2010-2020
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SpecialPasteDialog.js
|
|
|
|
*
|
|
|
|
* Created by Julia Radzhabova on 27.02.2020
|
|
|
|
* Copyright (c) 2020 Ascensio System SIA. All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
define([
|
|
|
|
'common/main/lib/util/utils',
|
|
|
|
'common/main/lib/component/RadioBox',
|
|
|
|
'common/main/lib/component/CheckBox',
|
|
|
|
'common/main/lib/view/AdvancedSettingsWindow'
|
|
|
|
], function () { 'use strict';
|
|
|
|
|
|
|
|
SSE.Views.SpecialPasteDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({
|
|
|
|
options: {
|
|
|
|
contentWidth: 350,
|
|
|
|
height: 385
|
|
|
|
},
|
|
|
|
|
|
|
|
initialize : function(options) {
|
|
|
|
var me = this;
|
|
|
|
|
|
|
|
_.extend(this.options, {
|
|
|
|
title: this.textTitle,
|
|
|
|
template: [
|
|
|
|
'<div class="box" style="height:' + (me.options.height - 85) + 'px;">',
|
|
|
|
'<div class="content-panel" style="padding: 0 5px;"><div class="inner-content">',
|
|
|
|
'<div class="settings-panel active">',
|
|
|
|
'<table cols="2" style="width: 100%;">',
|
|
|
|
'<tr>',
|
|
|
|
'<td colspan=2 class="padding-small">',
|
|
|
|
'<label class="header">', me.textPaste,'</label>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-all"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-without-borders"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-formulas"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-formula-formats"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-values"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-formula-col-width"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-formats"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-formula-num-format"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-comments"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-value-num-format"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-large">',
|
|
|
|
'<div id="paste-radio-col-width"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-large">',
|
|
|
|
'<div id="paste-radio-value-formats"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td colspan=2 class="padding-small">',
|
|
|
|
'<label class="header">', me.textOperation,'</label>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-none"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-mult"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-add"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-div"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-radio-sub"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
// '</table>',
|
|
|
|
// '<div class="separator horizontal padding-small"></div>',
|
|
|
|
// '<table cols="2" style="width: 100%;">',
|
|
|
|
'<tr>',
|
|
|
|
'<td colspan=2 class="padding-small" style="border-top: 1px solid #cbcbcb;">',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'<tr>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-checkbox-transpose"></div>',
|
|
|
|
'</td>',
|
|
|
|
'<td class="padding-small">',
|
|
|
|
'<div id="paste-checkbox-blanks"></div>',
|
|
|
|
'</td>',
|
|
|
|
'</tr>',
|
|
|
|
'</table>',
|
|
|
|
'</div></div>',
|
|
|
|
'</div>',
|
|
|
|
'</div>'
|
|
|
|
].join('')
|
|
|
|
}, options);
|
|
|
|
|
|
|
|
this.handler = options.handler;
|
|
|
|
this.props = options.props;
|
|
|
|
this._changedProps = null;
|
2020-03-03 11:01:20 +00:00
|
|
|
this.isTable = !!options.isTable;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
|
|
|
|
},
|
|
|
|
|
|
|
|
render: function() {
|
|
|
|
Common.Views.AdvancedSettingsWindow.prototype.render.call(this);
|
|
|
|
var me = this;
|
|
|
|
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls = [];
|
2020-02-28 13:30:58 +00:00
|
|
|
this.radioAll = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-all'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textAll,
|
|
|
|
value: Asc.c_oSpecialPasteProps.paste,
|
2020-02-28 14:23:06 +00:00
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioAll.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.paste] = this.radioAll;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioFormulas = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-formulas'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textFormulas,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.pasteOnlyFormula,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioFormulas.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.pasteOnlyFormula] = this.radioFormulas;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioValues = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-values'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textValues,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.pasteOnlyValues,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioValues.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.pasteOnlyValues] = this.radioValues;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioFormats = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-formats'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textFormats,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.pasteOnlyFormating,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioFormats.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.pasteOnlyFormating] = this.radioFormats;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioComments = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-comments'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textComments,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.comments,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioComments.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.comments] = this.radioComments;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioColWidth = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-col-width'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textColWidth,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.columnWidth,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioColWidth.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.columnWidth] = this.radioColWidth;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioWBorders = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-without-borders'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textWBorders,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.formulaWithoutBorders,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioWBorders.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.formulaWithoutBorders] = this.radioWBorders;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioFFormat = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-formula-formats'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textFFormat,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.formulaAllFormatting,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioFFormat.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.formulaAllFormatting] = this.radioFFormat;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioFWidth = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-formula-col-width'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textFWidth,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.formulaColumnWidth,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioFWidth.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.formulaColumnWidth] = this.radioFWidth;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioFNFormat = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-formula-num-format'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textFNFormat,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.formulaNumberFormat,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioFNFormat.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.formulaNumberFormat] = this.radioFNFormat;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioVNFormat = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-value-num-format'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textVNFormat,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.valueNumberFormat,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioVNFormat.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.valueNumberFormat] = this.radioVNFormat;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioVFormat = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-value-formats'),
|
|
|
|
name: 'asc-radio-paste',
|
|
|
|
labelText: this.textVFormat,
|
2020-02-28 14:23:06 +00:00
|
|
|
value: Asc.c_oSpecialPasteProps.valueAllFormating,
|
|
|
|
disabled: true
|
2020-02-28 13:30:58 +00:00
|
|
|
});
|
|
|
|
this.radioVFormat.on('change', _.bind(this.onRadioPasteChange, this));
|
2020-02-28 14:23:06 +00:00
|
|
|
this.propControls[Asc.c_oSpecialPasteProps.valueAllFormating] = this.radioVFormat;
|
2020-02-28 13:30:58 +00:00
|
|
|
|
|
|
|
this.radioNone = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-none'),
|
|
|
|
name: 'asc-radio-paste-operation',
|
|
|
|
labelText: this.textNone,
|
|
|
|
value: Asc.c_oSpecialPasteOperation.none,
|
|
|
|
checked: true
|
|
|
|
});
|
|
|
|
this.radioNone.on('change', _.bind(this.onRadioOperationChange, this));
|
|
|
|
|
|
|
|
this.radioAdd = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-add'),
|
|
|
|
name: 'asc-radio-paste-operation',
|
|
|
|
labelText: this.textAdd,
|
|
|
|
value: Asc.c_oSpecialPasteOperation.add
|
|
|
|
});
|
|
|
|
this.radioAdd.on('change', _.bind(this.onRadioOperationChange, this));
|
|
|
|
|
|
|
|
this.radioMult = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-mult'),
|
|
|
|
name: 'asc-radio-paste-operation',
|
|
|
|
labelText: this.textMult,
|
|
|
|
value: Asc.c_oSpecialPasteOperation.multiply
|
|
|
|
});
|
|
|
|
this.radioMult.on('change', _.bind(this.onRadioOperationChange, this));
|
|
|
|
|
|
|
|
this.radioSub = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-sub'),
|
|
|
|
name: 'asc-radio-paste-operation',
|
|
|
|
labelText: this.textSub,
|
|
|
|
value: Asc.c_oSpecialPasteOperation.subtract
|
|
|
|
});
|
|
|
|
this.radioSub.on('change', _.bind(this.onRadioOperationChange, this));
|
|
|
|
|
|
|
|
this.radioDiv = new Common.UI.RadioBox({
|
|
|
|
el: $('#paste-radio-div'),
|
|
|
|
name: 'asc-radio-paste-operation',
|
|
|
|
labelText: this.textDiv,
|
|
|
|
value: Asc.c_oSpecialPasteOperation.divide
|
|
|
|
});
|
|
|
|
this.radioDiv.on('change', _.bind(this.onRadioOperationChange, this));
|
|
|
|
|
|
|
|
this.chBlanks = new Common.UI.CheckBox({
|
|
|
|
el: $('#paste-checkbox-blanks'),
|
|
|
|
labelText: this.textBlanks
|
|
|
|
});
|
|
|
|
this.chTranspose = new Common.UI.CheckBox({
|
|
|
|
el: $('#paste-checkbox-transpose'),
|
|
|
|
labelText: this.textTranspose
|
|
|
|
});
|
|
|
|
|
|
|
|
this.afterRender();
|
|
|
|
},
|
|
|
|
|
2021-04-14 15:16:27 +00:00
|
|
|
getFocusedComponents: function() {
|
|
|
|
return [this.radioAll, this.radioFormulas, this.radioValues, this.radioFormats, this.radioComments, this.radioColWidth,
|
|
|
|
this.radioWBorders, this.radioFFormat, this.radioFWidth, this.radioFNFormat, this.radioVNFormat, this.radioVFormat,
|
|
|
|
this.radioNone, this.radioAdd, this.radioMult, this.radioSub, this.radioDiv, this.chBlanks, this.chTranspose];
|
|
|
|
},
|
|
|
|
|
|
|
|
getDefaultFocusableComponent: function () {
|
|
|
|
return this.radioAll;
|
|
|
|
},
|
|
|
|
|
2020-02-28 13:30:58 +00:00
|
|
|
afterRender: function() {
|
|
|
|
this._setDefaults(this.props);
|
|
|
|
},
|
|
|
|
|
|
|
|
show: function() {
|
|
|
|
Common.Views.AdvancedSettingsWindow.prototype.show.apply(this, arguments);
|
|
|
|
},
|
|
|
|
|
|
|
|
_setDefaults: function (props) {
|
2020-03-03 11:01:20 +00:00
|
|
|
var me = this;
|
|
|
|
props && _.each(props, function(menuItem, index) {
|
|
|
|
me.propControls[menuItem] && me.propControls[menuItem].setDisabled(false);
|
|
|
|
});
|
2020-02-28 13:30:58 +00:00
|
|
|
this._changedProps = new Asc.SpecialPasteProps();
|
|
|
|
this._changedProps.asc_setProps(Asc.c_oSpecialPasteProps.paste);
|
|
|
|
this._changedProps.asc_setOperation(Asc.c_oSpecialPasteOperation.none);
|
2020-03-03 11:01:20 +00:00
|
|
|
|
|
|
|
this.radioAll.setValue(true);
|
2020-02-28 13:30:58 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
getSettings: function () {
|
|
|
|
if (this._changedProps) {
|
|
|
|
this._changedProps.asc_setTranspose(this.chTranspose.getValue()=='checked');
|
|
|
|
this._changedProps.asc_setSkipBlanks(this.chBlanks.getValue()=='checked');
|
|
|
|
}
|
|
|
|
return this._changedProps;
|
|
|
|
},
|
|
|
|
|
|
|
|
onDlgBtnClick: function(event) {
|
|
|
|
this._handleInput((typeof(event) == 'object') ? event.currentTarget.attributes['result'].value : event);
|
|
|
|
},
|
|
|
|
|
|
|
|
onPrimary: function() {
|
|
|
|
this._handleInput('ok');
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
|
|
|
|
_handleInput: function(state) {
|
|
|
|
this.handler && this.handler.call(this, state, (state == 'ok') ? this.getSettings() : undefined);
|
|
|
|
this.close();
|
|
|
|
},
|
|
|
|
|
|
|
|
onRadioPasteChange: function(field, newValue, eOpts) {
|
|
|
|
if (newValue && this._changedProps) {
|
|
|
|
this._changedProps.asc_setProps(field.options.value);
|
|
|
|
var disable = field.options.value == Asc.c_oSpecialPasteProps.pasteOnlyFormating || field.options.value == Asc.c_oSpecialPasteProps.comments ||
|
2020-03-03 09:42:06 +00:00
|
|
|
field.options.value == Asc.c_oSpecialPasteProps.columnWidth,
|
|
|
|
disableTable = this.isTable && !!this._changedProps.asc_getTableAllowed();
|
|
|
|
this.radioNone.setDisabled(disable || disableTable);
|
|
|
|
this.radioAdd.setDisabled(disable || disableTable);
|
|
|
|
this.radioDiv.setDisabled(disable || disableTable);
|
|
|
|
this.radioSub.setDisabled(disable || disableTable);
|
|
|
|
this.radioMult.setDisabled(disable || disableTable);
|
|
|
|
this.chBlanks.setDisabled(disableTable);
|
|
|
|
this.chTranspose.setDisabled(disableTable);
|
2020-02-28 13:30:58 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
onRadioOperationChange: function(field, newValue, eOpts) {
|
|
|
|
if (newValue && this._changedProps) {
|
|
|
|
this._changedProps.asc_setOperation(field.options.value);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
textTitle: 'Paste Special',
|
|
|
|
textAll: 'All',
|
|
|
|
textFormulas: 'Formulas',
|
|
|
|
textValues: 'Values',
|
|
|
|
textFormats: 'Formats',
|
|
|
|
textComments: 'Comments',
|
|
|
|
textColWidth: 'Column widths',
|
|
|
|
textWBorders: 'All except borders',
|
|
|
|
textFFormat: 'Formulas & formatting',
|
|
|
|
textFWidth: 'Formulas & column widths',
|
|
|
|
textFNFormat: 'Formulas & number formats',
|
|
|
|
textVNFormat: 'Values & number formats',
|
|
|
|
textVFormat: 'Values & formatting',
|
|
|
|
textNone: 'None',
|
|
|
|
textAdd: 'Add',
|
|
|
|
textMult: 'Multiply',
|
|
|
|
textDiv: 'Divide',
|
|
|
|
textSub: 'Subtract',
|
|
|
|
textBlanks: 'Skip blanks',
|
|
|
|
textTranspose: 'Transpose',
|
|
|
|
textOperation: 'Operation',
|
|
|
|
textPaste: 'Paste'
|
|
|
|
|
|
|
|
}, SSE.Views.SpecialPasteDialog || {}))
|
|
|
|
});
|