att
This commit is contained in:
Binary file not shown.
@@ -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
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user