Put javascript function in your portal-normal.vm file
<script type="text/javascript" charset="utf-8">And try to set render URL as:
function showPopup() {
AUI().use('aui-dialog', 'aui-io', 'event-custom', 'io-form', function(A) {
window.instance = new A.Dialog({
centered: true,
constrain2view: true,
destroyOnClose: true,
draggable: true,
height: 500,
resizable: false,
modal: true,
stack: true,
title: 'Authentification',
width: 1000
}).plug(A.Plugin.IO, {uri: '$my_url'}).render();
});
}
</script>
#set ($my_url = $portletURLFactory.create($request, "58", $getterUtil.getLong($plid), "RENDER_PHASE"))And call the javascript function as:
$my_url.setParameter("p_p_state", "exclusive")
<a href="#" id="sign-in" rel="nofollow" onclick="showPopup();">$sign_in_text</a>
I have failed and got error "new A.Dialog" on javascrypt. The message is "A.Dialog is not constructor"
ReplyDelete