我正在将 AUI 弹出对话框窗口从 liferay 6.1 迁移到 liferay 6.2。我看到有一些具体的改变要做。我在显示按钮时遇到了一些问题,但现在已解决。但问题在于应该在右上角的关闭图标 (x)。我一添加保存按钮,它就突然消失了。
这是我的代码:
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 : a + ' 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();
});
}
如果您对此有任何想法,请告诉我。
关于myPopupSubmit
我还编写了代码来关闭弹出窗口:
top.document.getElementById('closethick').click();
由于没有closethick
按钮它返回null
。