Opened 12 years ago

Closed 12 years ago

Last modified 5 years ago

#5973 closed defect (fixed)

[cla][patch][test]TitlePane not easily subclassed

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

Description

TitlePane? is not very easily subclassed - since the _setCss function operates on focusNode. The end result is that a subclass cannot move focusNode off of the title bar (although, it may be desirable - for example, to have *ONLY* the arrow be the focus node).

In the included patch is a test case (in the form of a patch to tests/test_TitlePane.html) that demonstrates moving the nodes around.

The suggested fix is to create a new attach point (called, in this patch "titleBarNode") and use that node for the _setCss functions.

Attachments (1)

TitlePane-Focus.patch (3.7 KB) - added by guest 12 years ago.
Allows the focusNode to be moved, if desired.

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by guest

Attachment: TitlePane-Focus.patch added

Allows the focusNode to be moved, if desired.

comment:1 Changed 12 years ago by guest

Patch submitted by Nathan Toone

comment:2 Changed 12 years ago by bill

Reporter: changed from guest to nathan@…

comment:3 Changed 12 years ago by bill

Milestone: 1.1
Owner: set to bill
Status: newassigned

comment:4 Changed 12 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [12697]) Fixes #5973: make TitlePane? more easy to subclass by separating out titleBarNode and focusNode as separate attach points. Patch from Nathan Toone (CLA on file)

comment:5 Changed 12 years ago by nathan

Reporter: changed from nathan@… to nathan

comment:6 Changed 9 years ago by bill

(In [21823]) Remove spaces from sub-classed TitlePane template as they caused a weird focus border around the arrow on IE7. The focus border included the spaces, which had more height than the icon.

That example still doesn't render well though because of problems vertically aligning the arrow and the text. vertical-align: middle isn't working right since the arrow icon is nested inside of a span rather than being a sibling of the title text.

Refs #5973.

comment:7 Changed 5 years ago by Bill Keese <bill@…>

In de51ac6211202d9066315ce7313b0cb2ed36598f/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:8 Changed 5 years ago by Bill Keese <bill@…>

In 29b9f6f7a24aeae61c18ec4e1ea789532973da77/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.