Merge pull request #914 from ONLYOFFICE/release-fixes

Release fixes
This commit is contained in:
maxkadushkin 2021-06-03 16:34:09 +03:00 committed by GitHub
commit 948491b645
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 138 additions and 42 deletions

View file

@ -478,6 +478,7 @@ class ViewCommentsController extends Component {
}
deleteComment (comment) {
const api = Common.EditorApi.get();
Device.phone ? f7.sheet.close('#view-comment-sheet') : f7.popover.close('#view-comment-popover');
comment && api.asc_removeComment(comment.uid);
}
deleteReply (comment, reply) {

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.",
@ -132,7 +133,10 @@
"ContextMenu": {
"menuViewComment": "View Comment",
"menuAddComment": "Add Comment",
"menuMerge": "Merge",
"menuSplit": "Split",
"menuDelete": "Delete",
"menuDeleteTable": "Delete Table",
"menuEdit": "Edit",
"menuAddLink": "Add Link",
"menuOpenLink": "Open Link",
@ -140,7 +144,9 @@
"menuCancel": "Cancel",
"textCopyCutPasteActions": "Copy, Cut and Paste Actions",
"errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only.",
"textDoNotShowAgain": "Don't show again"
"textDoNotShowAgain": "Don't show again",
"textColumns": "Columns",
"textRows": "Rows"
},
"Toolbar": {
"dlgLeaveTitleText": "You leave the application",

View file

@ -117,6 +117,56 @@ class ContextMenu extends ContextMenuController {
}).open();
}
showSplitModal() {
const { t } = this.props;
const _t = t("ContextMenu", { returnObjects: true });
let picker;
const dialog = f7.dialog.create({
title: _t.menuSplit,
text: '',
content: `<div class="content-block">
<div class="row">
<div class="col-50">${_t.textColumns}</div>
<div class="col-50">${_t.textRows}</div>
</div>
<div id="picker-split-size"></div>
</div>`,
buttons: [
{
text: _t.menuCancel
},
{
text: 'OK',
bold: true,
onClick: function () {
const size = picker.value;
Common.EditorApi.get().SplitCell(parseInt(size[0]), parseInt(size[1]));
}
}
]
}).open();
dialog.on('opened', () => {
picker = f7.picker.create({
containerEl: document.getElementById('picker-split-size'),
cols: [
{
textAlign: 'center',
width: '100%',
values: [1,2,3,4,5,6,7,8,9,10]
},
{
textAlign: 'center',
width: '100%',
values: [1,2,3,4,5,6,7,8,9,10]
}
],
toolbar: false,
rotateEffect: true,
value: [3, 3]
});
});
}
openLink(url) {
const api = Common.EditorApi.get();
if (api.asc_getUrlType(url) > 0) {

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 {