diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json
index 43f6290c3..56df9e3cc 100644
--- a/apps/documenteditor/mobile/locale/en.json
+++ b/apps/documenteditor/mobile/locale/en.json
@@ -47,7 +47,10 @@
"textDisableAllMacrosWithNotification": "Disable all macros with notification",
"textEnableAll": "Enable All",
"textEnableAllMacrosWithoutNotification": "Enable all macros without notification",
- "textDownloadAs": "Download As"
+ "textDownloadAs": "Download As",
+ "notcriticalErrorTitle": "Warning",
+ "textDownloadTxt": "If you continue saving in this format all features except the text will be lost. Are you sure you want to continue?",
+ "textDownloadRtf": "If you continue saving in this format some of the formatting might be lost. Are you sure you want to continue?"
},
"Collaboration": {
"textEditUser": "Users who are editing the file:"
diff --git a/apps/documenteditor/mobile/src/controller/settings/Download.jsx b/apps/documenteditor/mobile/src/controller/settings/Download.jsx
index 2debde916..8dd017d3a 100644
--- a/apps/documenteditor/mobile/src/controller/settings/Download.jsx
+++ b/apps/documenteditor/mobile/src/controller/settings/Download.jsx
@@ -2,8 +2,7 @@ import React, { Component } from "react";
import Download from "../../view/settings/Download";
import { Device } from '../../../../../common/mobile/utils/device';
import { f7 } from 'framework7-react';
-// import { observer } from "mobx-react";
-// import { withTranslation } from 'react-i18next';
+import { withTranslation } from 'react-i18next';
class DownloadController extends Component {
constructor(props) {
@@ -13,31 +12,29 @@ class DownloadController extends Component {
closeModal() {
if (Device.phone) {
- f7.sheet.close('#edit-sheet', true);
+ f7.sheet.close('.settings-popup', true);
} else {
- f7.popover.close('#edit-popover');
+ f7.popover.close('#settings-popover');
}
}
onSaveFormat(format) {
- // const api = Common.EditorApi.get();
- console.log(format);
- if(format) {
- // if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
- // // const { t } = this.props;
- // // f7.dialog.alert(t('Edit.textNotUrl'), t('Edit.notcriticalErrorTitle'));
- // if (format == Asc.c_oAscFileType.TXT) {
- // // Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
+ const api = Common.EditorApi.get();
+ const { t } = this.props;
- // asc_CDownloadOptions(format);
- // }
- // else {
- // api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
- // }
- // }
- // else {
- // api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
- // }
+ if(format) {
+ if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
+ f7.dialog.confirm(
+ (format === Asc.c_oAscFileType.TXT) ? t("Settings.textDownloadTxt") : t("Settings.textDownloadRtf"),
+ t("Settings.notcriticalErrorTitle"),
+ function () {
+ api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
+ }
+ );
+ }
+ else {
+ api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
+ }
this.closeModal();
}
@@ -51,4 +48,4 @@ class DownloadController extends Component {
}
-export default DownloadController;
\ No newline at end of file
+export default withTranslation()(DownloadController);
\ No newline at end of file
diff --git a/apps/documenteditor/mobile/src/css/icons-material.less b/apps/documenteditor/mobile/src/css/icons-material.less
index 2d8480742..495125f48 100644
--- a/apps/documenteditor/mobile/src/css/icons-material.less
+++ b/apps/documenteditor/mobile/src/css/icons-material.less
@@ -75,7 +75,66 @@
height: 22px;
.encoded-svg-background('');
}
+
+ // Download
+
+ &.icon-format-docx {
+ width: 30px;
+ height: 30px;
+ .encoded-svg-background('')
+ }
+
+ &.icon-format-pdf {
+ width: 30px;
+ height: 30px;
+ .encoded-svg-background('')
+ }
+
+ &.icon-format-pdfa {
+ width: 30px;
+ height: 30px;
+ .encoded-svg-background('')
+ }
+
+ &.icon-format-txt {
+ width: 24px;
+ height: 24px;
+ .encoded-svg-background('')
+ }
+
+ &.icon-format-rtf {
+ width: 24px;
+ height: 24px;
+ .encoded-svg-background('')
+ }
+
+ &.icon-format-odt {
+ width: 30px;
+ height: 30px;
+ .encoded-svg-background('')
+ }
+
+ &.icon-format-html {
+ width: 30px;
+ height: 30px;
+ .encoded-svg-background('')
+ }
+
+ &.icon-format-dotx {
+ width: 30px;
+ height: 30px;
+ .encoded-svg-background('')
+ }
+
+ &.icon-format-ott {
+ width: 30px;
+ height: 30px;
+ .encoded-svg-background('')
+ }
+
+
//Edit
+
&.icon-text-align-left {
width: 22px;
height: 22px;
diff --git a/apps/documenteditor/mobile/src/view/settings/ApplicationSettings.jsx b/apps/documenteditor/mobile/src/view/settings/ApplicationSettings.jsx
index 5feac9462..f726e6724 100644
--- a/apps/documenteditor/mobile/src/view/settings/ApplicationSettings.jsx
+++ b/apps/documenteditor/mobile/src/view/settings/ApplicationSettings.jsx
@@ -24,12 +24,12 @@ const PageApplicationSettings = props => {
{_t.textUnitOfMeasurement}
- changeMeasureSettings(e.target.value)}>
- changeMeasureSettings(e.target.value)}>
- changeMeasureSettings(e.target.value)}>
+ changeMeasureSettings(0)}>
+ changeMeasureSettings(1)}>
+ changeMeasureSettings(2)}>
@@ -107,12 +107,12 @@ const PageMacrosSettings = props => {
- changeMacros(e.target.value)}>
- changeMacros(e.target.value)}>
- changeMacros(e.target.value)}>
+ changeMacros(2)}>
+ changeMacros(0)}>
+ changeMacros(1)}>
);
diff --git a/apps/documenteditor/mobile/src/view/settings/Download.jsx b/apps/documenteditor/mobile/src/view/settings/Download.jsx
index 580b00948..03b30cea3 100644
--- a/apps/documenteditor/mobile/src/view/settings/Download.jsx
+++ b/apps/documenteditor/mobile/src/view/settings/Download.jsx
@@ -1,9 +1,9 @@
import React from 'react';
-import { observer } from "mobx-react";
+// import { observer } from "mobx-react";
import { Page, Navbar, List, ListItem, BlockTitle, Icon } from "framework7-react";
import { useTranslation } from "react-i18next";
-const PageDownload = props => {
+const Download = props => {
const { t } = useTranslation();
const _t = t("Settings", { returnObjects: true });
@@ -12,31 +12,31 @@ const PageDownload = props => {
{_t.textDownloadAs}
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(65)}>
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(513)}>
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(2305)}>
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(69)}>
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(68)}>
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(67)}>
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(2051)}>
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(76)}>
- props.onSaveFormat(e.target.value)}>
+ props.onSaveFormat(79)}>
@@ -44,6 +44,4 @@ const PageDownload = props => {
)
}
-const Download = observer(PageDownload);
-
export default Download;
\ No newline at end of file