css - Add Content To Dialog Box DOJO -
Writing an app for opensocial raises the following problem:
I'm creating a dialogue box (CSS Tundra)
myDialog = new dijit.Dialog ({title: "My Dialogue", Content: "Test Content", Style: "width: 300px"});
How can I change the "overflow" and / or "height" of properties, in the form of this object, contained in myDialog
"dijitDialogPaneContent"
?
Thanks subin
There are several ways you can use, depending on how But there should be a solution normally.
Apply to all dialogs
If you want to apply the same style to all the dialogues, you can "expand" a subject, for example, in general You use a Tundra theme like this:
& lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Link rel = "stylesheet" href = "location / to / tundra.css" /> & Lt; / Head & gt; & Lt; Body class = "tundra" & gt; & Lt ;! - Your content goes here - & gt; & Lt; / Body & gt; & Lt; / Html & gt; If you are going to apply it to all dialogs, then you can do the following:
& Lt; link rel = "stylesheet" href = "custom / style.css" /> & Lt; / Head & gt; & Lt; Body class = "tundra custom" & gt; & Lt ;! - Your content goes here - & gt; & Lt; / Body & gt; & Lt; / Html & gt; And then type a custom stylesheet like this:
. custom .dijitDialogPaneContent {overflow: hidden; / ** Custom styles * /} will guarantee that it will override the normal tandra style for all the dialogues. If you do not use a class like .custom , you can not override the spreadsheets because .tundra.dijitDialogPaneContent will be more specific (meaning that it has a high Is priority). Of course, you can write .tundra .dijitDialogPaneContent in your custom stylesheet.
Apply on a dialogue through the stylesheet
If you want to apply it to a dialog, then enter an ID for the dialog, for example: < / P>
myDialog = new dijit.Dialog ({title: "My dialog", content: "test content", style: "width: 300px", id: "myDialogId"}); Then you can write a stylesheet like this:
#myDialogId .dijitDialogPaneContent {overflow: hidden ; / ** Custom styles * /}
Apply to a dialog (using Javascript)
Different stylesheet can improve readability because you If you do not need a different stylesheet then you can do something like this:
is needed ([dojo / query "," dojo / nodeList-dom "], function (Query) "" ("Overflow", "hidden");}); This content pane query For A will use the property of the dialog and then apply the style.
Apply to multiple dialogs
If you use the same style in multiple interactions (but all the dialogues) If you do not want to apply, then your best method will be to create a custom dialog by increasing the default dialogue. Looking at the length of my answer at the ATM, I do not explain it in detail, but I suggest reading a guide about it. So I.
Comments
Post a Comment