[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',
|
txtImportWizard: 'Text Import Wizard',
|
||||||
txtUrlTitle: 'Paste a data URL',
|
txtUrlTitle: 'Paste a data URL',
|
||||||
txtErrorExternalLink: 'Error: updating is failed',
|
txtErrorExternalLink: 'Error: updating is failed',
|
||||||
strSheet : 'Sheet'
|
strSheet: 'Sheet'
|
||||||
|
|
||||||
}, SSE.Controllers.DataTab || {}));
|
}, SSE.Controllers.DataTab || {}));
|
||||||
});
|
});
|
|
@ -34,14 +34,14 @@
|
||||||
/**
|
/**
|
||||||
* CreatePivotDialog.js
|
* 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.
|
* Copyright (c) 2019 Ascensio System SIA. All rights reserved.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define([
|
define([
|
||||||
'common/main/lib/util/utils',
|
'common/main/lib/util/utils',
|
||||||
'common/main/lib/component/InputField',
|
'common/main/lib/component/InputField',
|
||||||
'common/main/lib/component/ComboBox',
|
'common/main/lib/component/RadioBox',
|
||||||
'common/main/lib/view/AdvancedSettingsWindow'
|
'common/main/lib/view/AdvancedSettingsWindow'
|
||||||
], function () { 'use strict';
|
], function () { 'use strict';
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ define([
|
||||||
].join('')
|
].join('')
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
this.api = options.api;
|
this.api = options.api;
|
||||||
|
|
||||||
this.options.handler = function(result, value) {
|
this.options.handler = function(result, value) {
|
||||||
if ( result != 'ok' || this.isRangeValid() ) {
|
if ( result != 'ok' || this.isRangeValid() ) {
|
||||||
|
@ -115,16 +115,14 @@ define([
|
||||||
btnHint : this.textSelectData,
|
btnHint : this.textSelectData,
|
||||||
allowBlank : true,
|
allowBlank : true,
|
||||||
validateOnChange: true,
|
validateOnChange: true,
|
||||||
validateOnBlur: false,
|
validateOnBlur: false
|
||||||
disabled: true
|
|
||||||
});
|
});
|
||||||
this.txtDestRange.on('button:click', _.bind(this.onSelectData, this, 'dest'));
|
this.txtDestRange.on('button:click', _.bind(this.onSelectData, this, 'dest'));
|
||||||
|
|
||||||
this.radioNew = new Common.UI.RadioBox({
|
this.radioNew = new Common.UI.RadioBox({
|
||||||
el: $('#import-xml-radio-new'),
|
el: $('#import-xml-radio-new'),
|
||||||
labelText: this.textNew,
|
labelText: this.textNew,
|
||||||
name: 'asc-radio-xml-dest',
|
name: 'asc-radio-xml-dest'
|
||||||
checked: true
|
|
||||||
}).on('change', function(field, newValue) {
|
}).on('change', function(field, newValue) {
|
||||||
me.txtDestRange.setDisabled(newValue);
|
me.txtDestRange.setDisabled(newValue);
|
||||||
me.txtDestRange.showError();
|
me.txtDestRange.showError();
|
||||||
|
@ -133,7 +131,8 @@ define([
|
||||||
this.radioExist = new Common.UI.RadioBox({
|
this.radioExist = new Common.UI.RadioBox({
|
||||||
el: $('#import-xml-radio-exist'),
|
el: $('#import-xml-radio-exist'),
|
||||||
labelText: this.textExist,
|
labelText: this.textExist,
|
||||||
name: 'asc-radio-xml-dest'
|
name: 'asc-radio-xml-dest',
|
||||||
|
checked: true
|
||||||
}).on('change', function(field, newValue) {
|
}).on('change', function(field, newValue) {
|
||||||
me.txtDestRange.setDisabled(!newValue);
|
me.txtDestRange.setDisabled(!newValue);
|
||||||
me.txtDestRange.cmpEl.find('input').focus();
|
me.txtDestRange.cmpEl.find('input').focus();
|
||||||
|
@ -149,21 +148,22 @@ define([
|
||||||
getDefaultFocusableComponent: function () {
|
getDefaultFocusableComponent: function () {
|
||||||
if (this._alreadyRendered) return; // focus only at first show
|
if (this._alreadyRendered) return; // focus only at first show
|
||||||
this._alreadyRendered = true;
|
this._alreadyRendered = true;
|
||||||
return this.txtSourceRange;
|
return this.txtDestRange;
|
||||||
},
|
},
|
||||||
|
|
||||||
afterRender: function() {
|
afterRender: function() {
|
||||||
this._setDefaults(this.props);
|
this._setDefaults();
|
||||||
},
|
},
|
||||||
|
|
||||||
_setDefaults: function (props) {
|
_setDefaults: function () {
|
||||||
if (props) {
|
var me = this;
|
||||||
var me = this;
|
this.txtDestRange.validation = function(value) {
|
||||||
this.txtDestRange.validation = function(value) {
|
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.PivotTableReport, value, false);
|
||||||
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.PivotTableReport, value, false);
|
return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true;
|
||||||
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 () {
|
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.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.txtRemSelected": "Remove in selected",
|
||||||
"SSE.Controllers.DataTab.txtUrlTitle": "Paste a data URL",
|
"SSE.Controllers.DataTab.txtUrlTitle": "Paste a data URL",
|
||||||
|
"SSE.Controllers.DataTab.strSheet": "Sheet",
|
||||||
"SSE.Controllers.DocumentHolder.alignmentText": "Alignment",
|
"SSE.Controllers.DocumentHolder.alignmentText": "Alignment",
|
||||||
"SSE.Controllers.DocumentHolder.centerText": "Center",
|
"SSE.Controllers.DocumentHolder.centerText": "Center",
|
||||||
"SSE.Controllers.DocumentHolder.deleteColumnText": "Delete Column",
|
"SSE.Controllers.DocumentHolder.deleteColumnText": "Delete Column",
|
||||||
|
@ -2767,6 +2768,13 @@
|
||||||
"SSE.Views.ImageSettingsAdvanced.textTitle": "Image - Advanced settings",
|
"SSE.Views.ImageSettingsAdvanced.textTitle": "Image - Advanced settings",
|
||||||
"SSE.Views.ImageSettingsAdvanced.textTwoCell": "Move and size with cells",
|
"SSE.Views.ImageSettingsAdvanced.textTwoCell": "Move and size with cells",
|
||||||
"SSE.Views.ImageSettingsAdvanced.textVertically": "Vertically",
|
"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.tipAbout": "About",
|
||||||
"SSE.Views.LeftMenu.tipChat": "Chat",
|
"SSE.Views.LeftMenu.tipChat": "Chat",
|
||||||
"SSE.Views.LeftMenu.tipComments": "Comments",
|
"SSE.Views.LeftMenu.tipComments": "Comments",
|
||||||
|
|
Loading…
Reference in a new issue