Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to position jazz.ui.Dialog ?

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.

0 votes



One answer

Permanent link
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);

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,954

Question asked: Aug 05 '13, 2:54 a.m.

Question was seen: 4,866 times

Last updated: Aug 15 '13, 6:54 p.m.

Confirmation Cancel Confirm