Opened 15 years ago

Closed 15 years ago

#4279 closed enhancement (fixed)

[cla/patch] dijit.Dialog unaware of visibility state

Reported by: dante Owned by: dante
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Cc: bill
Blocked By: Blocking:


dijit.Dialog doesn't know if its open or closed. Patch enables similar API to dijit.TitlePane?: Boolean

no patch for matching .toggle() api, but would be simple like:

toggle: function(){ this[( ? "_hide" : "_show")](); }

after this patch. precise timing not accounted for (onEnd, beforeBegin)

Attachments (1)

dialog-openState.patch (767 bytes) - added by dante 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by dante

Attachment: dialog-openState.patch added

comment:1 Changed 15 years ago by bill

Sure, looks fine to me.

comment:2 Changed 15 years ago by dante

Status: newassigned

thinking more, and hating to change the API on either, shouldn't they both be "isOpen", as the open param doesn't 'do' anything (just a Boolean)?

comment:3 Changed 15 years ago by bill

Summary: [cla/patch] dijit.Dialog unaware of visibiltiy state[cla/patch] dijit.Dialog unaware of visibility state

Well, maybe. But remember that these are parameters specified in markup too, so that the markup would become

<div dojoType="dijit.TitlePane" isOpen="true">

Does that look right? I'm not sure.

Also remember that any change to the API is supposed include a deprecation cycle with a deprecation warning. That's hard for changes to non-functions like open, but I guess it could be done by having some code that looks at the params object passed to Widget.create(). (We should be saving the params object somewhere, by the way.)

comment:4 Changed 15 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [10361]) fixes #4279 - adds open: param/API to Dialog (though does not make start open, like TitlePane? open="true") ... is true when open, false when hidden.

(no need to change to isOpen: sounds silly and who wants deprecated calls anyway?)

Note: See TracTickets for help on using tickets.