Message Boards

how to trigger aui openModal in liferay-ui:icon

Scarletake Bwi, modified 2 Years ago.

how to trigger aui openModal in liferay-ui:icon

Expert Posts: 326 Join Date: 12/20/10 Recent Posts

hi

i had issue on popup window, popup-windows-issue-in-7-4, it looks like a unfixable issue.

now i try use openModal, it's more beautiful, but it cannot be trigger by liferay-ui:icon, if i use button, it works.

<liferay-ui:icon  image="edit" message="<%=buttonNamePrefixInfoEdit%>" id="<%=prefixRecordVO.getPartNumber() %>"/>

<portlet:renderURL var="secondJspURL" windowState="<%=LiferayWindowState.POP_UP.toString()%>">
	<portlet:param name="mvcPath" value="/second.jsp"/>
	<portlet:param name="targetPart" value="<%=prefixRecordVO.getPartNumber() %>"/>
</portlet:renderURL>

<aui:script position="inline" use="aui-base">
var popupButton = A.one('#<portlet:namespace />'<%=prefixRecordVO.getPartNumber() %>);
popupButton.on('click',
	function() {

		Liferay.Util.openModal(
			{
				title: 'My Own Title(400x400 Window Size)',
				url: '<%=secondJspURL.toString()%>',
				size: 'md'
			}
		);
	}
);
</aui:script>

can anyone help? thanks in advance.

Scarletake Bwi, modified 2 Years ago.

RE: how to trigger aui openModal in liferay-ui:icon (Answer)

Expert Posts: 326 Join Date: 12/20/10 Recent Posts

liferay-ui:icon's id cannot work in aui tag, i use url and call script, the window pupup now