Changes between Initial Version and Version 1 of Ticket #5178


Ignore:
Timestamp:
Nov 17, 2007, 4:11:43 AM (13 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5178

    • Property Owner anonymous deleted
    • Property Component changed from General to Dijit
  • Ticket #5178 – Description

    initial v1  
    22
    33I suggest adding a new attach point (titleHeaderNode) and using it to set the CSS state.  This allows subclasses to "move" the focus node to the arrow (if they desire - to make just the arrow "clickable") without messing up the css state.
    4 
    5 For example:
    6 
    7 --- dijit/templates/TitlePane.html.orig 2007-11-16 13:43:59.000000000 -0700
    8 +++ dijit/templates/TitlePane.html      2007-11-16 13:44:55.000000000 -0700
    9 @@ -1,6 +1,6 @@
    10  <div class="dijitTitlePane">
    11         <div dojoAttachEvent="onclick:toggle,onkeypress: _onTitleKey,onfocus:_handleFocus,onblur:_handleFocus" tabindex="0"
    12 -                       waiRole="button" class="dijitTitlePaneTitle" dojoAttachPoint="focusNode">
    13 +                       waiRole="button" class="dijitTitlePaneTitle" dojoAttachPoint="focusNode,titleHeaderNode">
    14                 <div dojoAttachPoint="arrowNode" class="dijitInline dijitArrowNode"><span dojoAttachPoint="arrowNodeInner" class="dijitArrowNodeInner"></span></div>
    15                 <div dojoAttachPoint="titleNode" class="dijitTitlePaneTextNode"></div>
    16         </div>
    17 --- dijit/TitlePane.js.orig     2007-11-16 13:43:52.000000000 -0700
    18 +++ dijit/TitlePane.js  2007-11-16 13:44:43.000000000 -0700
    19 @@ -103,8 +103,8 @@ dojo.declare(
    20                 // summary: set the open/close css state for the TitlePane
    21                 var classes = ["dijitClosed", "dijitOpen"];
    22                 var boolIndex = this.open;
    23 -               dojo.removeClass(this.focusNode, classes[!boolIndex+0]);
    24 -               this.focusNode.className += " " + classes[boolIndex+0];
    25 +               dojo.removeClass(this.titleHeaderNode, classes[!boolIndex+0]);
    26 +               this.titleHeaderNode.className += " " + classes[boolIndex+0];
    27  
    28                 // provide a character based indicator for images-off mode
    29                 this.arrowNodeInner.innerHTML = this.open ? "-" : "+";
    30 
    31 
    32 Should achieve the desired functionality.