[SSE mobile] Bug 48623

This commit is contained in:
SergeyEzhin 2021-05-04 19:40:35 +03:00
parent 4a4b144ab5
commit 5a244af7a1
2 changed files with 150 additions and 1 deletions

View file

@ -59,7 +59,26 @@
"errorProcessSaveResult": "Saving is failed.", "errorProcessSaveResult": "Saving is failed.",
"criticalErrorTitle": "Error", "criticalErrorTitle": "Error",
"warnProcessRightsChange": "You have been denied the right to edit the file.", "warnProcessRightsChange": "You have been denied the right to edit the file.",
"errorAccessDeny": "You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator." "errorAccessDeny": "You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.",
"confirmMoveCellRange": "The destination cell`s range can contain data. Continue the operation?",
"textOk": "Ok",
"confirmPutMergeRange": "The source data contains merged cells.<br>They will be unmerged before they are pasted into the table.",
"openTitleText": "Opening Document",
"saveTitleText": "Saving Document",
"loadFontsTitleText": "Loading Data",
"loadImagesTitleText": "Loading Images",
"loadFontTitleText": "Loading Data",
"loadImageTitleText": "Loading Image",
"downloadTitleText": "Downloading Document",
"printTitleText": "Printing Document",
"uploadImageTitleText": "Uploading Image",
"titleRecalcFormulas": "Calculating formulas...",
"textPleaseWait": "It`s working hard. Please wait...",
"savePreparingText": "Preparing to save",
"waitText": "Please, wait...",
"txtEditingMode": "Set editing mode...",
"loadingDocumentTitleText": "Loading spreadsheet"
} }
}, },
"LongActions": { "LongActions": {

View file

@ -35,6 +35,9 @@ class MainController extends Component {
window.editorType = 'sse'; window.editorType = 'sse';
this.LoadingDocument = -256; this.LoadingDocument = -256;
this.ApplyEditRights = -255;
this.InitApplication = -254;
this.isShowOpenDialog = false;
this._state = { this._state = {
licenseType: false, licenseType: false,
@ -288,6 +291,8 @@ class MainController extends Component {
this.api.asc_registerCallback('asc_onPrint', this.onPrint.bind(this)); this.api.asc_registerCallback('asc_onPrint', this.onPrint.bind(this));
this.api.asc_registerCallback('asc_onDocumentName', this.onDocumentName.bind(this)); this.api.asc_registerCallback('asc_onDocumentName', this.onDocumentName.bind(this));
this.api.asc_registerCallback('asc_onEndAction', this._onLongActionEnd.bind(this)); this.api.asc_registerCallback('asc_onEndAction', this._onLongActionEnd.bind(this));
// this.api.asc_registerCallback('asc_onStartAction', this.onLongActionBegin.bind(this));
this.api.asc_registerCallback('asc_onConfirmAction', this.onConfirmAction.bind(this));
EditorUIController.initCellInfo && EditorUIController.initCellInfo(this.props); EditorUIController.initCellInfo && EditorUIController.initCellInfo(this.props);
@ -314,6 +319,131 @@ class MainController extends Component {
} }
// onLongActionBegin(type, id) {
// let action = {id: id, type: type};
// this.setLongActionView(action);
// }
// setLongActionView(action) {
// const _t = this._t;
// let title = '';
// switch (action.id) {
// case Asc.c_oAscAsyncAction.Open:
// title = _t.openTitleText;
// break;
// case Asc.c_oAscAsyncAction.Save:
// title = _t.saveTitleText;
// break;
// case Asc.c_oAscAsyncAction.ForceSaveTimeout:
// break;
// case Asc.c_oAscAsyncAction.ForceSaveButton:
// break;
// case Asc.c_oAscAsyncAction.LoadDocumentFonts:
// title = _t.loadFontsTitleText;
// break;
// case Asc.c_oAscAsyncAction.LoadDocumentImages:
// title = _t.loadImagesTitleText;
// break;
// case Asc.c_oAscAsyncAction.LoadFont:
// title = _t.loadFontTitleText;
// break;
// case Asc.c_oAscAsyncAction.LoadImage:
// title = _t.loadImageTitleText;
// break;
// case Asc.c_oAscAsyncAction.DownloadAs:
// title = _t.downloadTitleText;
// break;
// case Asc.c_oAscAsyncAction.Print:
// title = _t.printTitleText;
// break;
// case Asc.c_oAscAsyncAction.UploadImage:
// title = _t.uploadImageTitleText;
// break;
// case Asc.c_oAscAsyncAction.Recalc:
// title = _t.titleRecalcFormulas;
// break;
// case Asc.c_oAscAsyncAction.SlowOperation:
// title = _t.textPleaseWait;
// break;
// case Asc.c_oAscAsyncAction['PrepareToSave']:
// title = _t.savePreparingText;
// break;
// case Asc.c_oAscAsyncAction['Waiting']:
// title = _t.waitText;
// break;
// case this.ApplyEditRights:
// title = _t.txtEditingMode;
// break;
// case this.LoadingDocument:
// title = _t.loadingDocumentTitleText;
// break;
// default:
// if (typeof action.id == 'string'){
// title = action.id;
// }
// break;
// }
// if (action.type == Asc.c_oAscAsyncActionType.BlockInteraction) {
// // !this.loadMask && (this.loadMask = new Common.UI.LoadMask({owner: $$('#viewport')}));
// // this.loadMask.setTitle(title);
// if (!this.isShowOpenDialog) {
// this.api.asc_enableKeyEvents(false);
// // this.loadMask.show();
// }
// }
// }
onConfirmAction(id, apiCallback) {
const _t = this._t;
if (id == Asc.c_oAscConfirm.ConfirmReplaceRange) {
f7.dialog.create({
title: _t.notcriticalErrorTitle,
text: _t.confirmMoveCellRange,
buttons: [
{text: _t.textYes,
onClick: () => {
if (apiCallback) apiCallback(true);
}},
{text: _t.textNo,
onClick: () => {
if (apiCallback) apiCallback(false);
}}
],
}).open();
} else if (id == Asc.c_oAscConfirm.ConfirmPutMergeRange) {
f7.dialog.create({
title: _t.notcriticalErrorTitle,
text: _t.confirmPutMergeRange,
buttons: [
{text: _t.textOk,
onClick: () => {
if (apiCallback) apiCallback();
}},
],
}).open();
}
}
_onLongActionEnd(type, id) { _onLongActionEnd(type, id) {
if ( type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open ) { if ( type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open ) {
Common.Gateway.internalMessage('documentReady', {}); Common.Gateway.internalMessage('documentReady', {});