diff --git a/apps/spreadsheeteditor/main/app/view/DataTab.js b/apps/spreadsheeteditor/main/app/view/DataTab.js
index 0e2f1599a..4ed17b13e 100644
--- a/apps/spreadsheeteditor/main/app/view/DataTab.js
+++ b/apps/spreadsheeteditor/main/app/view/DataTab.js
@@ -102,6 +102,12 @@ define([
me.btnCustomSort.on('click', function (b, e) {
me.fireEvent('data:sortcustom');
});
+ me.btnDataFromText.menu ?
+ me.btnDataFromText.menu.on('item:click', function (menu, item, e) {
+ me.fireEvent('data:fromtext', [item.value]);
+ }) : me.btnDataFromText.on('click', function (b, e) {
+ me.fireEvent('data:fromtext', ['file']);
+ });
}
return {
@@ -117,6 +123,17 @@ define([
$host = me.toolbar.$el,
_set = SSE.enumLock;
+ this.btnDataFromText = new Common.UI.Button({
+ parentEl: $host.find('#slot-btn-data-from-text'),
+ cls: 'btn-toolbar x-huge icon-top',
+ iconCls: 'toolbar__icon btn-import-data',
+ caption: this.capDataFromText,
+ menu: !this.toolbar.mode.isDesktopApp,
+ disabled: true,
+ lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.sheetLock, _set.lostConnect, _set.coAuth]
+ });
+ this.lockedControls.push(this.btnDataFromText);
+
this.btnGroup = new Common.UI.Button({
parentEl: $host.find('#slot-btn-group'),
cls: 'btn-toolbar x-huge icon-top',
@@ -251,6 +268,15 @@ define([
});
me.btnGroup.setMenu(_menu);
+ me.btnDataFromText.updateHint(me.tipDataFromText);
+ me.btnDataFromText.menu && me.btnDataFromText.setMenu(new Common.UI.Menu({
+ items: [
+ { caption: me.mniFromFile, value: 'file' },
+ { caption: me.mniFromUrl, value: 'url' }
+ // { caption: me.mniImageFromStorage, value: 'storage'}
+ ]
+ }));
+
me.btnTextToColumns.updateHint(me.tipToColumns);
me.btnRemoveDuplicates.updateHint(me.tipRemDuplicates);
me.btnDataValidation.updateHint(me.tipDataValidation);
@@ -326,7 +352,11 @@ define([
capBtnTextRemDuplicates: 'Remove Duplicates',
tipRemDuplicates: 'Remove duplicate rows from a sheet',
capBtnTextDataValidation: 'Data Validation',
- tipDataValidation: 'Data validation'
+ tipDataValidation: 'Data validation',
+ capDataFromText: 'From Text/CSV',
+ tipDataFromText: 'Get data from Text/CSV file',
+ mniFromFile: 'Get Data from File',
+ mniFromUrl: 'Get Data from URL'
}
}()), SSE.Views.DataTab || {}));
});
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index 9e5df070f..5725cd740 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -249,6 +249,10 @@
"Common.Views.OpenDialog.txtTab": "Tab",
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
+ "Common.Views.OpenDialog.textSelectData": "Select data",
+ "Common.Views.OpenDialog.txtDestData": "Choose where to put the data",
+ "Common.Views.OpenDialog.txtEmpty": "This field is required",
+ "Common.Views.OpenDialog.textInvalidRange": "Invalid cells range",
"Common.Views.PasswordDialog.txtDescription": "Set a password to protect this document",
"Common.Views.PasswordDialog.txtIncorrectPwd": "Confirmation password is not identical",
"Common.Views.PasswordDialog.txtPassword": "Password",
@@ -398,6 +402,8 @@
"SSE.Controllers.DataTab.txtRemDuplicates": "Remove Duplicates",
"SSE.Controllers.DataTab.txtRemoveDataValidation": "The selection contains more than one type of validation.
Erase current settings and continue?",
"SSE.Controllers.DataTab.txtRemSelected": "Remove in selected",
+ "SSE.Controllers.DataTab.textEmptyUrl": "You need to specify URL.",
+ "SSE.Controllers.DataTab.txtImportWizard": "Text Import Wizard",
"SSE.Controllers.DocumentHolder.alignmentText": "Alignment",
"SSE.Controllers.DocumentHolder.centerText": "Center",
"SSE.Controllers.DocumentHolder.deleteColumnText": "Delete Column",
@@ -1673,6 +1679,10 @@
"SSE.Views.DataTab.tipRemDuplicates": "Remove duplicate rows from a sheet",
"SSE.Views.DataTab.tipToColumns": "Separate cell text into columns",
"SSE.Views.DataTab.tipUngroup": "Ungroup range of cells",
+ "SSE.Views.DataTab.capDataFromText": "From Text/CSV",
+ "SSE.Views.DataTab.tipDataFromText": "Get data from Text/CSV file",
+ "SSE.Views.DataTab.mniFromFile": "Get Data from File",
+ "SSE.Views.DataTab.mniFromUrl": "Get Data from URL",
"SSE.Views.DataValidationDialog.errorFormula": "The value currently evaluates to an error. Do you want to continue?",
"SSE.Views.DataValidationDialog.errorInvalid": "The value you entered for the field \"{0}\" is invalid.",
"SSE.Views.DataValidationDialog.errorInvalidDate": "The date you entered for the field \"{0}\" is invalid.",