[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;
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;
}
}
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",
"advDRMOptions": "Protected File",
"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",
"textReplace": "Replace",
"textReplaceAll": "Replace All",

View file

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

View file

@ -27,7 +27,8 @@
"closeButtonText": "Close File",
"advDRMOptions": "Protected File",
"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.",
"titleLicenseExp": "License expired",
"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 About from '../../../../common/mobile/lib/view/About';
import PluginsController from '../../../../common/mobile/lib/controller/Plugins.jsx';
import { Device } from '../../../../common/mobile/utils/device';
@inject(
"storeFocusObjects",
@ -585,7 +586,7 @@ class MainController extends Component {
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
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 = [{
text: 'OK',
@ -595,9 +596,9 @@ class MainController extends Component {
const password = document.getElementById('modal-password').value;
this.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
if (!this._isDocReady) {
Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument);
}
// if (!this._isDocReady) {
// Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument);
// }
}
}];
if (this.props.storeAppOptions.canRequestClose)
@ -610,11 +611,9 @@ class MainController extends Component {
f7.dialog.create({
title: _t.advDRMOptions,
text: (typeof advOptions === 'string' ? advOptions : _t.txtProtected),
content:
`<div class="input-field">
<input type="password" name="modal-password" placeholder="${ _t.advDRMPassword }" class="modal-text-input">
</div>`,
text: _t.textOpenFile,
content: Device.ios ?
'<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,
cssClass: 'dlg-adv-options'
}).open();

View file

@ -458,6 +458,7 @@
"advDRMPassword": "Password",
"closeButtonText": "Close File",
"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",
"textUnitOfMeasurement": "Unit Of Measurement",
"textCentimeter": "Centimeter",

View file

@ -318,7 +318,7 @@ class MainController extends Component {
this.api.asc_registerCallback('asc_onAdvancedOptions', (type, advOptions, mode, formatOptions) => {
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);
});

View file

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

View file

@ -1,25 +1,5 @@
.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
.radio-checkbox-item {
label.item-content input[type=checkbox]:checked ~ .item-inner {