From f3265b768f06524ea4c854f96532ecc9cc4461f0 Mon Sep 17 00:00:00 2001 From: timomeister Date: Fri, 29 Nov 2024 11:25:11 +0100 Subject: [PATCH] update for ocm v3 --- snap.extension.js | 12 ------------ snap.extension.min.js | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/snap.extension.js b/snap.extension.js index 098ed3c..eaf74b7 100644 --- a/snap.extension.js +++ b/snap.extension.js @@ -25,18 +25,6 @@ if (typeof TPP_SNAP !== "undefined") { // trigger cache clean reload TPP_SNAP.onRerenderView(() => location.reload(true)); - TPP_SNAP.overrideDefaultButton("translate", { - isVisible: () => true, - isEnabled: () => true, - }); - - // reload frontend after default 'workflows' button execution to update page status - TPP_SNAP.overrideDefaultButton("workflows", { - afterExecute: async () => { - location.reload(true); - }, - }); - // ContentCreator browsing - 28.07.2020 TPP_SNAP.onRequestPreviewElement(async (previewId) => { // map page attribute to SF community page identifier diff --git a/snap.extension.min.js b/snap.extension.min.js index f582b34..97d9dbd 100644 --- a/snap.extension.min.js +++ b/snap.extension.min.js @@ -1 +1 @@ -"use strict";document.addEventListener("sto_com_fs_content_loaded",e=>{"undefined"!=typeof TPP_SNAP&&e.detail&&e.detail.previewId&&TPP_SNAP.setPreviewElement(e.detail.previewId)}),"undefined"!=typeof TPP_SNAP&&(TPP_SNAP.onRerenderView(()=>location.reload(!0)),TPP_SNAP.overrideDefaultButton("translate",{isVisible:()=>!0,isEnabled:()=>!0}),TPP_SNAP.overrideDefaultButton("workflows",{afterExecute:async()=>{location.reload(!0)}}),TPP_SNAP.onRequestPreviewElement(async e=>{try{const t=await TPP_SNAP.renderElement(e),P=t.formData.pt_sfIdentifier.value;await TPP_SNAP.setPreviewElement(e),"/"==P?window.location.href=await TPP_SNAP.previewUrl():null!=P?window.location.href=await TPP_SNAP.previewUrl()+P:location.reload(!0)}catch(e){console.error(e)}})); \ No newline at end of file +"use strict";document.addEventListener("sto_com_fs_content_loaded",e=>{"undefined"!=typeof TPP_SNAP&&e.detail&&e.detail.previewId&&TPP_SNAP.setPreviewElement(e.detail.previewId)}),"undefined"!=typeof TPP_SNAP&&(TPP_SNAP.onRerenderView(()=>location.reload(!0)),TPP_SNAP.onRequestPreviewElement(async e=>{try{const t=await TPP_SNAP.renderElement(e),P=t.formData.pt_sfIdentifier.value;await TPP_SNAP.setPreviewElement(e),"/"==P?window.location.href=await TPP_SNAP.previewUrl():null!=P?window.location.href=await TPP_SNAP.previewUrl()+P:location.reload(!0)}catch(e){console.error(e)}})); \ No newline at end of file