Created
September 23, 2013 21:05
-
-
Save eduardolundgren/6676965 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AUI().use('event-resize', function(A) { | |
A.one(window).on('resize', function(event) { | |
dialog.align(); | |
}); | |
}); |
Author
eduardolundgren
commented
Sep 23, 2013
UserQuestions = function(noPopup, url) {
if (!noPopup) {
openModal("Questions", url);
}
Liferay.provide(
window,
'openModal',
function(title, url) {
var A = AUI();
var width = 675;
var dialog = Liferay.Util.openWindow(
{
dialog: {
centered: true,
cssClass: 'user-questions',
constrain2view: true,
modal: true,
width: width
},
title: title,
uri: url
}
);
A.one(window).on('resize', function(event) {
console.log('foo');
console.log('dialog: ' + dialog);
});
},
['event-resize']
);
};
UserQuestions = function(noPopup, url) {
if (!noPopup) {
openModal("Questions", url);
}
};
Liferay.provide(
window,
'openModal',
function(title, url) {
var A = AUI();
var width = 675;
var dialog = Liferay.Util.openWindow({
dialog: {
centered: true,
cssClass: 'user-questions',
constrain2view: true,
modal: true,
width: width
},
title: title,
uri: url
});
A.one(window).on('resize', function(event) {
console.log('foo');
console.log('dialog: ' + dialog);
});
}, ['event-resize']
);
UserQuestions = function(noPopup, url) {
if (!noPopup) {
openModal("Questions", url);
}
};
Liferay.provide(
window,
'openModal',
function(title, url) {
var A = AUI();
var width = 675;
var dialog = Liferay.Util.openWindow(
{
dialog: {
centered: true,
cssClass: 'user-questions',
constrain2view: true,
modal: true,
width: width
},
title: title,
uri: url
}
);
A.one(window).on('resize', function(event) {
console.log('foo');
console.log('dialog: ' + dialog);
});
},
['event-resize']
)
UserQuestions = function(noPopup, url) {
if (!noPopup) {
openModal("Questions", url);
}
};
Liferay.provide(
window,
'openModal',
function(title, url) {
var A = AUI();
var width = 675;
Liferay.Util.openWindow({
dialog: {
centered: true,
cssClass: 'user-questions',
constrain2view: true,
modal: true,
width: width
},
id:'userQuestionsId',
title: title,
uri: url
});
A.one(window).on('resize', function(event) {
var userQuestionsDialog = Liferay.Util.getWindow('userQuestionsId');
console.log('foo');
console.log('dialog: ' + userQuestionsDialog);
});
}, ['event-resize']
);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment