[SSE] Import xml to current cell by default
This commit is contained in:
parent
9e35ee62d1
commit
6b2159c18c
|
@ -612,7 +612,7 @@ define([
|
|||
txtImportWizard: 'Text Import Wizard',
|
||||
txtUrlTitle: 'Paste a data URL',
|
||||
txtErrorExternalLink: 'Error: updating is failed',
|
||||
strSheet : 'Sheet'
|
||||
strSheet: 'Sheet'
|
||||
|
||||
}, SSE.Controllers.DataTab || {}));
|
||||
});
|
|
@ -34,14 +34,14 @@
|
|||
/**
|
||||
* CreatePivotDialog.js
|
||||
*
|
||||
* Created by Julia Radzhabova on 04.10.2019
|
||||
* Created by Julia Radzhabova on 08.12.2022
|
||||
* Copyright (c) 2019 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
define([
|
||||
'common/main/lib/util/utils',
|
||||
'common/main/lib/component/InputField',
|
||||
'common/main/lib/component/ComboBox',
|
||||
'common/main/lib/component/RadioBox',
|
||||
'common/main/lib/view/AdvancedSettingsWindow'
|
||||
], function () { 'use strict';
|
||||
|
||||
|
@ -88,7 +88,7 @@ define([
|
|||
].join('')
|
||||
}, options);
|
||||
|
||||
this.api = options.api;
|
||||
this.api = options.api;
|
||||
|
||||
this.options.handler = function(result, value) {
|
||||
if ( result != 'ok' || this.isRangeValid() ) {
|
||||
|
@ -115,16 +115,14 @@ define([
|
|||
btnHint : this.textSelectData,
|
||||
allowBlank : true,
|
||||
validateOnChange: true,
|
||||
validateOnBlur: false,
|
||||
disabled: true
|
||||
validateOnBlur: false
|
||||
});
|
||||
this.txtDestRange.on('button:click', _.bind(this.onSelectData, this, 'dest'));
|
||||
|
||||
this.radioNew = new Common.UI.RadioBox({
|
||||
el: $('#import-xml-radio-new'),
|
||||
labelText: this.textNew,
|
||||
name: 'asc-radio-xml-dest',
|
||||
checked: true
|
||||
name: 'asc-radio-xml-dest'
|
||||
}).on('change', function(field, newValue) {
|
||||
me.txtDestRange.setDisabled(newValue);
|
||||
me.txtDestRange.showError();
|
||||
|
@ -133,7 +131,8 @@ define([
|
|||
this.radioExist = new Common.UI.RadioBox({
|
||||
el: $('#import-xml-radio-exist'),
|
||||
labelText: this.textExist,
|
||||
name: 'asc-radio-xml-dest'
|
||||
name: 'asc-radio-xml-dest',
|
||||
checked: true
|
||||
}).on('change', function(field, newValue) {
|
||||
me.txtDestRange.setDisabled(!newValue);
|
||||
me.txtDestRange.cmpEl.find('input').focus();
|
||||
|
@ -149,21 +148,22 @@ define([
|
|||
getDefaultFocusableComponent: function () {
|
||||
if (this._alreadyRendered) return; // focus only at first show
|
||||
this._alreadyRendered = true;
|
||||
return this.txtSourceRange;
|
||||
return this.txtDestRange;
|
||||
},
|
||||
|
||||
afterRender: function() {
|
||||
this._setDefaults(this.props);
|
||||
this._setDefaults();
|
||||
},
|
||||
|
||||
_setDefaults: function (props) {
|
||||
if (props) {
|
||||
var me = this;
|
||||
this.txtDestRange.validation = function(value) {
|
||||
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.PivotTableReport, value, false);
|
||||
return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true;
|
||||
};
|
||||
}
|
||||
_setDefaults: function () {
|
||||
var me = this;
|
||||
this.txtDestRange.validation = function(value) {
|
||||
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.PivotTableReport, value, false);
|
||||
return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true;
|
||||
};
|
||||
var range = this.api.asc_getActiveRangeStr(Asc.referenceType.A);
|
||||
this.txtDestRange.setValue(range);
|
||||
this.dataDestValid = range;
|
||||
},
|
||||
|
||||
getSettings: function () {
|
||||
|
|
|
@ -668,6 +668,7 @@
|
|||
"SSE.Controllers.DataTab.txtRemoveDataValidation": "The selection contains more than one type of validation.<br>Erase current settings and continue?",
|
||||
"SSE.Controllers.DataTab.txtRemSelected": "Remove in selected",
|
||||
"SSE.Controllers.DataTab.txtUrlTitle": "Paste a data URL",
|
||||
"SSE.Controllers.DataTab.strSheet": "Sheet",
|
||||
"SSE.Controllers.DocumentHolder.alignmentText": "Alignment",
|
||||
"SSE.Controllers.DocumentHolder.centerText": "Center",
|
||||
"SSE.Controllers.DocumentHolder.deleteColumnText": "Delete Column",
|
||||
|
@ -2767,6 +2768,13 @@
|
|||
"SSE.Views.ImageSettingsAdvanced.textTitle": "Image - Advanced settings",
|
||||
"SSE.Views.ImageSettingsAdvanced.textTwoCell": "Move and size with cells",
|
||||
"SSE.Views.ImageSettingsAdvanced.textVertically": "Vertically",
|
||||
"SSE.Views.ImportFromXmlDialog.textTitle": "Import Data",
|
||||
"SSE.Views.ImportFromXmlDialog.textSelectData": "Select data",
|
||||
"SSE.Views.ImportFromXmlDialog.textDestination": "Choose, where to place the data",
|
||||
"SSE.Views.ImportFromXmlDialog.textNew": "New worksheet",
|
||||
"SSE.Views.ImportFromXmlDialog.textExist": "Existing worksheet",
|
||||
"SSE.Views.ImportFromXmlDialog.txtEmpty": "This field is required",
|
||||
"SSE.Views.ImportFromXmlDialog.textInvalidRange": "Invalid cells range",
|
||||
"SSE.Views.LeftMenu.tipAbout": "About",
|
||||
"SSE.Views.LeftMenu.tipChat": "Chat",
|
||||
"SSE.Views.LeftMenu.tipComments": "Comments",
|
||||
|
|
Loading…
Reference in a new issue