[DE PE SSE mobile] Bug 49112

This commit is contained in:
SergeyEzhin 2021-06-03 16:25:52 +03:00
parent c2d5da8395
commit f5ca014da5
10 changed files with 81 additions and 41 deletions

View file

@ -541,4 +541,26 @@
white-space: normal; white-space: normal;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
input.modal-text-input {
box-sizing: border-box;
height: 26px;
background: #fff;
margin: 0;
margin-top: 15px;
padding: 0 5px;
border: 1px solid rgba(0,0,0,.3);
border-radius: 0;
width: 100%;
font-size: 14px;
font-family: inherit;
display: block;
box-shadow: 0 0 0 transparent;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
} }
}

View file

@ -477,4 +477,39 @@
margin-left: 0; margin-left: 0;
} }
} }
input.modal-text-input {
box-sizing: border-box;
height: 36px;
background: #fff;
margin: 0;
margin-top: 15px;
padding: 0;
border: none;
width: 100%;
font-size: 16px;
font-family: inherit;
display: block;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
-webkit-transition-duration: .2s;
transition-duration: .2s;
}
.input-field {
.inputs-list {
margin: 15px 0 0;
ul {
&::before, &::after {
display: none;
}
}
.item-input, .item-inner {
padding: 0;
}
}
}
} }

View file

@ -331,6 +331,7 @@
"closeButtonText": "Close File", "closeButtonText": "Close File",
"advDRMOptions": "Protected File", "advDRMOptions": "Protected File",
"txtProtected": "Once you enter the password and open the file, the current password to the file will be reset", "txtProtected": "Once you enter the password and open the file, the current password to the file will be reset",
"textOpenFile": "Enter a password to open the file",
"textNoTextFound": "Text not found", "textNoTextFound": "Text not found",
"textReplace": "Replace", "textReplace": "Replace",
"textReplaceAll": "Replace All", "textReplaceAll": "Replace All",

View file

@ -122,16 +122,16 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady
}); });
} else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
Common.Notifications.trigger('preloader:close'); Common.Notifications.trigger('preloader:close');
Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], -256); // Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], -256);
const buttons = [{ const buttons = [{
text: 'OK', text: 'OK',
bold: true, bold: true,
onClick: function () { onClick: function () {
const password = document.getElementById('modal-password').value; const password = document.getElementById('modal-password').value;
api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password)); api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
if (!isDocReady) { // if (!isDocReady) {
Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], -256); // Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], -256);
} // }
} }
}]; }];
if (canRequestClose) if (canRequestClose)
@ -143,9 +143,9 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady
}); });
f7.dialog.create({ f7.dialog.create({
title: _t.advDRMOptions, title: _t.advDRMOptions,
text: _t.txtProtected, text: _t.textOpenFile,
content: content: Device.ios ?
'<div class="input-field"><input type="password" name="modal-password" placeholder="' + _t.advDRMPassword + '" id="modal-password"></div>', '<div class="input-field"><input type="password" class="modal-text-input" name="modal-password" placeholder="' + _t.advDRMPassword + '" id="modal-password"></div>' : '<div class="input-field"><div class="inputs-list list inline-labels"><ul><li><div class="item-content item-input"><div class="item-inner"><div class="item-input-wrap"><input type="password" name="modal-password" id="modal-password" placeholder=' + _t.advDRMPassword + '></div></div></div></li></ul></div></div>',
buttons: buttons, buttons: buttons,
cssClass: 'dlg-adv-options' cssClass: 'dlg-adv-options'
}).open(); }).open();

View file

@ -27,7 +27,8 @@
"closeButtonText": "Close File", "closeButtonText": "Close File",
"advDRMOptions": "Protected File", "advDRMOptions": "Protected File",
"advDRMPassword": "Password", "advDRMPassword": "Password",
"txtProtected": "Once you enter the password and open the file, the current password to the file will be reset",
"textOpenFile": "Enter a password to open the file",
"leavePageText": "You have unsaved changes in this document. Click 'Stay on this Page' to await the autosave of the document. Click 'Leave this Page' to discard all the unsaved changes.", "leavePageText": "You have unsaved changes in this document. Click 'Stay on this Page' to await the autosave of the document. Click 'Leave this Page' to discard all the unsaved changes.",
"titleLicenseExp": "License expired", "titleLicenseExp": "License expired",
"warnLicenseExp": "Your license has expired. Please update your license and refresh the page.", "warnLicenseExp": "Your license has expired. Please update your license and refresh the page.",

View file

@ -14,6 +14,7 @@ import LongActionsController from "./LongActions";
import {LocalStorage} from "../../../../common/mobile/utils/LocalStorage"; import {LocalStorage} from "../../../../common/mobile/utils/LocalStorage";
import About from '../../../../common/mobile/lib/view/About'; import About from '../../../../common/mobile/lib/view/About';
import PluginsController from '../../../../common/mobile/lib/controller/Plugins.jsx'; import PluginsController from '../../../../common/mobile/lib/controller/Plugins.jsx';
import { Device } from '../../../../common/mobile/utils/device';
@inject( @inject(
"storeFocusObjects", "storeFocusObjects",
@ -585,7 +586,7 @@ class MainController extends Component {
if (type == Asc.c_oAscAdvancedOptionsID.DRM) { if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
Common.Notifications.trigger('preloader:close'); Common.Notifications.trigger('preloader:close');
Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument); // Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument);
const buttons = [{ const buttons = [{
text: 'OK', text: 'OK',
@ -595,9 +596,9 @@ class MainController extends Component {
const password = document.getElementById('modal-password').value; const password = document.getElementById('modal-password').value;
this.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password)); this.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
if (!this._isDocReady) { // if (!this._isDocReady) {
Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument); // Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument);
} // }
} }
}]; }];
if (this.props.storeAppOptions.canRequestClose) if (this.props.storeAppOptions.canRequestClose)
@ -610,11 +611,9 @@ class MainController extends Component {
f7.dialog.create({ f7.dialog.create({
title: _t.advDRMOptions, title: _t.advDRMOptions,
text: (typeof advOptions === 'string' ? advOptions : _t.txtProtected), text: _t.textOpenFile,
content: content: Device.ios ?
`<div class="input-field"> '<div class="input-field"><input type="password" class="modal-text-input" name="modal-password" placeholder="' + _t.advDRMPassword + '" id="modal-password"></div>' : '<div class="input-field"><div class="inputs-list list inline-labels"><ul><li><div class="item-content item-input"><div class="item-inner"><div class="item-input-wrap"><input type="password" name="modal-password" id="modal-password" placeholder=' + _t.advDRMPassword + '></div></div></div></li></ul></div></div>',
<input type="password" name="modal-password" placeholder="${ _t.advDRMPassword }" class="modal-text-input">
</div>`,
buttons: buttons, buttons: buttons,
cssClass: 'dlg-adv-options' cssClass: 'dlg-adv-options'
}).open(); }).open();

View file

@ -458,6 +458,7 @@
"advDRMPassword": "Password", "advDRMPassword": "Password",
"closeButtonText": "Close File", "closeButtonText": "Close File",
"txtProtected": "Once you enter the password and open the file, the current password to the file will be reset", "txtProtected": "Once you enter the password and open the file, the current password to the file will be reset",
"textOpenFile": "Enter a password to open the file",
"textCancel": "Cancel", "textCancel": "Cancel",
"textUnitOfMeasurement": "Unit Of Measurement", "textUnitOfMeasurement": "Unit Of Measurement",
"textCentimeter": "Centimeter", "textCentimeter": "Centimeter",

View file

@ -318,7 +318,7 @@ class MainController extends Component {
this.api.asc_registerCallback('asc_onAdvancedOptions', (type, advOptions, mode, formatOptions) => { this.api.asc_registerCallback('asc_onAdvancedOptions', (type, advOptions, mode, formatOptions) => {
const {t} = this.props; const {t} = this.props;
const _t = t("Settings", { returnObjects: true }); const _t = t("View.Settings", { returnObjects: true });
onAdvancedOptions(type, advOptions, mode, formatOptions, _t, this.props.storeAppOptions.canRequestClose); onAdvancedOptions(type, advOptions, mode, formatOptions, _t, this.props.storeAppOptions.canRequestClose);
}); });

View file

@ -121,6 +121,7 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, canRequest
}); });
} else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
Common.Notifications.trigger('preloader:close');
//me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); //me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
const buttons = [{ const buttons = [{
text: 'OK', text: 'OK',
@ -144,9 +145,9 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, canRequest
f7.dialog.create({ f7.dialog.create({
title: _t.advDRMOptions, title: _t.advDRMOptions,
text: _t.txtProtected, text: _t.textOpenFile,
content: content: Device.ios ?
'<div class="input-field"><input type="password" name="modal-password" placeholder="' + _t.advDRMPassword + '" id="modal-password"></div>', '<div class="input-field"><input type="password" class="modal-text-input" name="modal-password" placeholder="' + _t.advDRMPassword + '" id="modal-password"></div>' : '<div class="input-field"><div class="inputs-list list inline-labels"><ul><li><div class="item-content item-input"><div class="item-inner"><div class="item-input-wrap"><input type="password" name="modal-password" id="modal-password" placeholder=' + _t.advDRMPassword + '></div></div></div></li></ul></div></div>',
buttons: buttons buttons: buttons
}).open(); }).open();
} }

View file

@ -1,25 +1,5 @@
.device-ios { .device-ios {
input.modal-text-input {
box-sizing: border-box;
height: 26px;
background: #fff;
margin: 0;
margin-top: 15px;
padding: 0 5px;
border: 1px solid rgba(0,0,0,.3);
border-radius: 0;
width: 100%;
font-size: 14px;
font-family: inherit;
display: block;
box-shadow: 0 0 0 transparent;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
}
// For filter options // For filter options
.radio-checkbox-item { .radio-checkbox-item {
label.item-content input[type=checkbox]:checked ~ .item-inner { label.item-content input[type=checkbox]:checked ~ .item-inner {