This commit is contained in:
Andrey Cunha
2026-03-12 23:05:52 -03:00
parent 40db0af098
commit 7113b026ef
33 changed files with 7939 additions and 2225 deletions
@@ -195,11 +195,20 @@
#canDisplayActionButton() {
const element = this.#input.get(0);
const hasEditPermission = parent.ECM.workflowView.userPermissions.indexOf("P") >= 0;
const isManagerMode = location.href.includes('ManagerMode');
const isTokenView = location.href.includes('token');
const hasMobileCameraBridge = (
(window.JSInterface && typeof window.JSInterface.showCamera === "function")
|| (parent && parent.JSInterface && typeof parent.JSInterface.showCamera === "function")
);
const isMobileUA = /android|iphone|ipad|ipod|mobile/i.test(navigator.userAgent || "");
const allowByContext = (isManagerMode && !isTokenView) || hasMobileCameraBridge || isMobileUA;
const allowByPermission = hasEditPermission || hasMobileCameraBridge || isMobileUA;
return this.#settings.showActionButton
&& parent.ECM.workflowView.userPermissions.indexOf("P") >= 0
&& location.href.includes('ManagerMode')
&& !location.href.includes('token')
&& allowByPermission
&& allowByContext
&& element.nodeName.toLowerCase() === "input"
&& !element.disabled
;