[mobile] Fix long actions controller
This commit is contained in:
parent
8fb9119f01
commit
ad5104c8c5
|
@ -7,6 +7,9 @@ const LongActionsController = () => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const _t = t("LongActions", { returnObjects: true });
|
const _t = t("LongActions", { returnObjects: true });
|
||||||
|
|
||||||
|
const ApplyEditRights = -255;
|
||||||
|
const LoadingDocument = -256;
|
||||||
|
|
||||||
const stackLongActions = new IrregularStack({
|
const stackLongActions = new IrregularStack({
|
||||||
strongCompare : function(obj1, obj2){return obj1.id === obj2.id && obj1.type === obj2.type;},
|
strongCompare : function(obj1, obj2){return obj1.id === obj2.id && obj1.type === obj2.type;},
|
||||||
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
||||||
|
@ -18,7 +21,7 @@ const LongActionsController = () => {
|
||||||
if (loadMask && loadMask.el) {
|
if (loadMask && loadMask.el) {
|
||||||
f7.dialog.close(loadMask.el);
|
f7.dialog.close(loadMask.el);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
Common.Notifications.on('engineCreated', (api) => {
|
Common.Notifications.on('engineCreated', (api) => {
|
||||||
|
|
|
@ -123,7 +123,9 @@
|
||||||
"txtEditingMode": "Set editing mode...",
|
"txtEditingMode": "Set editing mode...",
|
||||||
"loadingDocumentTitleText": "Loading document",
|
"loadingDocumentTitleText": "Loading document",
|
||||||
"loadingDocumentTextText": "Loading document...",
|
"loadingDocumentTextText": "Loading document...",
|
||||||
"textLoadingDocument": "Loading document"
|
"textLoadingDocument": "Loading document",
|
||||||
|
"loadThemeTitleText": "Loading Theme",
|
||||||
|
"loadThemeTextText": "Loading theme..."
|
||||||
},
|
},
|
||||||
"ContextMenu": {
|
"ContextMenu": {
|
||||||
"menuViewComment": "View Comment",
|
"menuViewComment": "View Comment",
|
||||||
|
|
|
@ -7,6 +7,9 @@ const LongActionsController = () => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const _t = t("LongActions", {returnObjects: true});
|
const _t = t("LongActions", {returnObjects: true});
|
||||||
|
|
||||||
|
const ApplyEditRights = -255;
|
||||||
|
const LoadingDocument = -256;
|
||||||
|
|
||||||
const stackLongActions = new IrregularStack({
|
const stackLongActions = new IrregularStack({
|
||||||
strongCompare : function(obj1, obj2){return obj1.id === obj2.id && obj1.type === obj2.type;},
|
strongCompare : function(obj1, obj2){return obj1.id === obj2.id && obj1.type === obj2.type;},
|
||||||
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
||||||
|
@ -118,6 +121,11 @@ const LongActionsController = () => {
|
||||||
text = _t.uploadImageTextText;
|
text = _t.uploadImageTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Asc.c_oAscAsyncAction['LoadTheme']:
|
||||||
|
title = _t.loadThemeTitleText;
|
||||||
|
text = _t.loadThemeTextText;
|
||||||
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
||||||
title = _t.applyChangesTitleText;
|
title = _t.applyChangesTitleText;
|
||||||
text = _t.applyChangesTextText;
|
text = _t.applyChangesTextText;
|
||||||
|
@ -151,7 +159,7 @@ const LongActionsController = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.type === Asc.c_oAscAsyncActionType['BlockInteraction']) {
|
if (action.type === Asc.c_oAscAsyncActionType['BlockInteraction']) {
|
||||||
if (action.id === Asc.c_oAscAsyncAction['ApplyChanges']) {
|
if (action.id === Asc.c_oAscAsyncAction['ApplyChanges'] || action.id === Asc.c_oAscAsyncAction['LoadDocumentFonts']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +169,6 @@ const LongActionsController = () => {
|
||||||
loadMask = f7.dialog.preloader(title);
|
loadMask = f7.dialog.preloader(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onOpenDocument = (progress) => {
|
const onOpenDocument = (progress) => {
|
||||||
|
|
|
@ -7,6 +7,9 @@ const LongActionsController = () => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const _t = t("LongActions", { returnObjects: true });
|
const _t = t("LongActions", { returnObjects: true });
|
||||||
|
|
||||||
|
const ApplyEditRights = -255;
|
||||||
|
const LoadingDocument = -256;
|
||||||
|
|
||||||
const stackLongActions = new IrregularStack({
|
const stackLongActions = new IrregularStack({
|
||||||
strongCompare : function(obj1, obj2){return obj1.id === obj2.id && obj1.type === obj2.type;},
|
strongCompare : function(obj1, obj2){return obj1.id === obj2.id && obj1.type === obj2.type;},
|
||||||
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
||||||
|
@ -18,7 +21,7 @@ const LongActionsController = () => {
|
||||||
if (loadMask && loadMask.el) {
|
if (loadMask && loadMask.el) {
|
||||||
f7.dialog.close(loadMask.el);
|
f7.dialog.close(loadMask.el);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
Common.Notifications.on('engineCreated', (api) => {
|
Common.Notifications.on('engineCreated', (api) => {
|
||||||
|
|
Loading…
Reference in a new issue