Tuesday, 15 February 2011

closethick button disappear liferay popup 6.2 -



closethick button disappear liferay popup 6.2 -

i migrating aui popup dialog window liferay 6.1 liferay 6.2. see there specific changes made. had problems display of buttons resolved now. problem close icon (x) should on top right corner. disappeared added save button.

here code:

mypopup = aui().use('aui-base','liferay-util-window','aui-io-deprecated', 'event', 'event-custom', function(a) { var buttons =[{ cssclass: 'button_close', label: 'save', render:true, id: 'mypopupbutton', on: { click: function() { mypopupsubmit(); }} }]; mypopup = liferay.util.window.getwindow( { dialog: { title : + ' mytitle', centered : true, height : 600, width : 500, draggable : true, resizable : true, modal : true, toolbars: { footer:buttons }, }}).plug(a.plugin.io, { uri : url }).render(); mypopup.show(); }); }

please allow me know if have thought on it..

on mypopupsubmit have written code close popup as:

top.document.getelementbyid('closethick').click();

since there no closethick button returns null.

using modal dialog example comparison, x close button removed when using toolbars property.

reviewing the source code toolbars property (line 309 @ time of writing this) indicates if utilize property directly, you'll need include own x close in header.

an alternative utilize addtoolbar function (as seen in example) include buttons while preserving default toolbars.

modal.addtoolbar([{ cssclass: 'button_close', label: 'save', render:true, id: 'mypopupbutton', on: { click: function() { mypopupsubmit(); } } }]);

i consider making instance of dialog available mypopupsubmit function have direct access perform dialog.hide() or calling dialog.hide() after mypopupsubmit versus using x close approach.

if sticking current approach, id beingness used not work, you'll need utilize css selector yui based id change.

popup liferay alloy-ui liferay-aui

No comments:

Post a Comment