It's all about the answers!

Ask a question

How to position jazz.ui.Dialog ?


Debo Xiong (3146) | asked Aug 05 '13, 2:54 a.m.
Hi,
Now I want to position a  jazz.ui.Dialog to a relative position. I saw the api :
https://jazz.net/wiki/bin/view/WebUIBook/DialogWidget
So I made center false like this :
this.dialog = new jazz.ui.Dialog({
            contentNode: this.contentNode,
            primaryTitle: this.messages.Notice_1,
            width: this.width,
            left:'30%',
            top:'10%',
            destroyContents: true,
            center: false
        });
It doesn't work, so how to position a Dialog ? thanks.

One answer



permanent link
Joseph Salomone (25613) | answered Aug 15 '13, 6:54 p.m.
JAZZ DEVELOPER
After look at the js file for jazz.ui.Dialog, the center variable has this jsdoc attached to it:

/**
* Specify whether the Dialog should be positioned in the center of the window. If false, the
* consumer is responsible for appending the dialog to the DOM.
* @type Boolean
* @default true
*/
center: true,

So this means you will need to attach the dialog to the dom yourself. So your code would have to look more like:

this.dialog = new jazz.ui.Dialog({
contentNode: this.contentNode,
primaryTitle: this.messages.Notice_1,
width: this.width,
destroyContents: true,
center: false
});
this.domNode.appendChild(this.dialog);

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.