활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Is there a way to force the current page to refresh when switching between Edit and Preview modes? This is to ensure that logic that checks against the current mode value runs as expected.
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
This has been shown in an EKS demo. If you look at the EKS wiki page [0]. There should be a recording for a Touch UI session and this was discussed there.
A very basic code that does something similar is below. Obviously this will need to be tested and ensured that it works, but it gives the general idea.
(function ($, channel) {
'use strict';
$(function () {
channel.on('cq-layer-activated', function (event) {
var pageUrl = window.location.href;
var ANNOTATE_LAYER = 'Annotate';
if ( event.prevLayer && event.layer !== event.prevLayer
&& event.layer != ANNOTATE_LAYER && event.prevLayer != ANNOTATE_LAYER ) {
location.reload();
}
});
});
})(Granite.$, jQuery(document));
조회 수
답글
좋아요 수
You can add this piece of code
<script> CQ.WCM.launchSidekick("${currentPage.path @ context='uri'}", { propsDialog: "${wcmInit.dialogPath @ context='uri'}", locked: ${currentPage.locked @ context="scriptString"}, previewReload: "true" }); </script>
조회 수
답글
좋아요 수
edubey wrote...
You can add this piece of code
<script>
CQ.WCM.launchSidekick("${currentPage.path @ context='uri'}", {
propsDialog: "${wcmInit.dialogPath @ context='uri'}",
locked: ${currentPage.locked @ context="scriptString"},
previewReload: "true"
});
</script>
Is that only for the classic ui, not the touch ui?
조회 수
답글
좋아요 수
Yes.. this is for classic UI when you use sidekick
조회 수
답글
좋아요 수
This has been shown in an EKS demo. If you look at the EKS wiki page [0]. There should be a recording for a Touch UI session and this was discussed there.
A very basic code that does something similar is below. Obviously this will need to be tested and ensured that it works, but it gives the general idea.
(function ($, channel) {
'use strict';
$(function () {
channel.on('cq-layer-activated', function (event) {
var pageUrl = window.location.href;
var ANNOTATE_LAYER = 'Annotate';
if ( event.prevLayer && event.layer !== event.prevLayer
&& event.layer != ANNOTATE_LAYER && event.prevLayer != ANNOTATE_LAYER ) {
location.reload();
}
});
});
})(Granite.$, jQuery(document));
조회 수
답글
좋아요 수
HI - This has been shown in an EKS demo. If you look at the EKS wiki page [0]. There should be a recording for a Touch UI session and this was discussed there.
A very basic code that does something similar is below. Obviously this will need to be tested and ensured that it works, but it gives the general idea.
(function ($, channel) {
'use strict';
$(function () {
channel.on('cq-layer-activated', function (event) {
var pageUrl = window.location.href;
var ANNOTATE_LAYER = 'Annotate';
if ( event.prevLayer && event.layer !== event.prevLayer
&& event.layer != ANNOTATE_LAYER && event.prevLayer != ANNOTATE_LAYER ) {
location.reload();
}
});
});
})(Granite.$, jQuery(document));
조회 수
답글
좋아요 수