Servis-Rhino 4211B Guide de l'utilisateur Page 159

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 298
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 158
not. The default is true meaning that it should be initially shown open.
dijit/Fieldset
This widget places content within a fieldset that may be collapsed.
Dialogs
A dialog is a pop-up window showing additional content. This window can usually be moved
around within the primary parent window. The window can also be closed. Commonly, the
appearance of the dialog means that it has to be closed before interaction with other content may be
achieved. This is what is known as a "modal" dialog.
dijit/Dialog
The dialog module is contained within "dijit/Dialog" which is commonly mapped to the
variable called "Dialog"
Consider the following HTML:
<div id="dlg1" style="display: none">
… Other content goes here …
</div>
And the following script:
var dlg = new Dialog({
title: "HI"
}, "dlg1");
dlg.show();
In a declarative style we can code:
<div id="dialogOne" data-dojo-type="dijit/Dialog" title="My Dialog Title">
… Other content goes here …
</div>
To show a dialog, use its show() method. To hide the dialog, use its hide() method.
When shown or hidden, the onShow() and onHide() events are fired these events are targeted
to the Dialog.
The dijit/Dialog is a modal dialog which means that it locks out interaction with the base
page until disposed. An interesting (and so far working) technique to make it non-modal is to add
the following CSS to the page:
.nonModal_underlay {
display:none
}
and add the following to the Dialog constructor parameters:
"class": "nonModal"
Although this works well, it is unknown why this works and I don't like mysteries.
Some of the more important attributes of this widget include:
title – The title of the dialog.
closeable – Should an [x] close button be shown on the dialog?
From an event perspective:
onHide() – Called when the dialog is hidden.
Page 159
Vue de la page 158
1 2 ... 154 155 156 157 158 159 160 161 162 163 164 ... 297 298

Commentaires sur ces manuels

Pas de commentaire