Opened 11 years ago

Closed 11 years ago

#8710 closed enhancement (fixed)

ContentPane: add onHide

Reported by: Les Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0b1
Keywords: ContentPane Cc: Nathan Toone
Blocked By: Blocking:

Description (last modified by bill)

I see that changeset [16769] calls onShow if one is present. Would it be possible to add a corresponding onHide call?

Change History (4)

comment:1 Changed 11 years ago by bill

Milestone: tbd1.4
Owner: set to bill

Seems reasonable...

comment:2 Changed 11 years ago by bill

Description: modified (diff)

comment:3 Changed 11 years ago by bill

onHide() is actually already being called, if the user has defined an onHide method. It's called for any widget that's a child of a StackContainer/TabContainer/etc. (typically ContentPane).

The problem is that there's no empty onHide method in ContentPane, so markup like this gets ignored:

<div dojoType=dijit.layout.ContentPane onHide=...>

I'll add a definition for onHide() into Widget.js so that it can be used both by ContentPane and by other possible TabContainer children, such as the grid.

I'll also update ContentPane's subclasses, Dialog, TooltipDialog, and TitlePane, to make sure that onShow() and onHide() get called appropriately. (For TitlePane this means that the TitlePane has been opened/closed, making the content visible/hidden.)

Note that unfortunately there are competing standards: onShow/onHide are called in the cases mentioned above, but onOpen/onClose are called for popups like Menu, or any random widget that serves as a popup, like Calendar. They are also called for TreeNodes. I'd like to address that for 2.0.

comment:4 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

(In [17400]) Make onHide() and onShow() callbacks available for all children of StackContainer? (and it's subclasses, TabContainer? and AccordionContainer?), and for all ContentPane? subclasses that are shown/hidden: Dialog, TooltipDialog?, and TitlePane?.

Note that unfortunately there are competing standards: onShow/onHide are called in the cases mentioned above, but onOpen/onClose are called by the dijit.popup code, for example when a Menu is popped up, or a Calendar is dropped down from a DateTextBox?. onOpen/onClose are also called for TreeNodes?. I'd like to standardize that naming for 2.0.

Note: See TracTickets for help on using tickets.