Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created September 23, 2013 21:05
Show Gist options
  • Save eduardolundgren/6676965 to your computer and use it in GitHub Desktop.
Save eduardolundgren/6676965 to your computer and use it in GitHub Desktop.
AUI().use('event-resize', function(A) {
A.one(window).on('resize', function(event) {
dialog.align();
});
});
@eduardolundgren
Copy link
Author

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