dijit/layout/TabController.js

  • Provides:

    • dijit.layout.TabController
  • dijit.layout.TabController

    • type
      Function
    • chains:
      • dijit.layout.StackController: (prototype)
      • dijit.layout.StackController: (call)
    • summary
      Set of tabs (the things with titles and a close button, that you click to show a tab panel).
      Used internally by `dijit.layout.TabContainer`.
    • description
      Lets the user select the currently shown pane in a TabContainer or StackContainer.
      TabController also monitors the TabContainer, and whenever a pane is
      added or deleted updates itself accordingly.
      tags:
      private
  • dijit.layout.TabController.templateString

    • summary
  • dijit.layout.TabController.tabPosition

    • type
      String
    • summary
      Defines where tabs go relative to the content.
      "top", "bottom", "left-h", "right-h"
  • dijit.layout.TabController.buttonWidget

    • type
      String
    • summary
      The name of the tab widget to create to correspond to each page
  • dijit.layout.TabController._rectifyRtlTabList

    • type
      Function
    • source: [view]
        if(0 >= this.tabPosition.indexOf('-h')){ return; }
        if(!this.pane2button){ return; }


        var maxWidth = 0;
        for(var pane in this.pane2button){
         var ow = this.pane2button[pane].innerDiv.scrollWidth;
         maxWidth = Math.max(maxWidth, ow);
        }
        //unify the length of all the tabs
        for(pane in this.pane2button){
         this.pane2button[pane].innerDiv.style.width = maxWidth + 'px';
        }
    • summary
      For left/right TabContainer when page is RTL mode, rectify the width of all tabs to be equal, otherwise the tab widths are different in IE
  • dijit.layout._TabButton

    • type
      Function
    • chains:
      • dijit.layout._StackButton: (prototype)
      • dijit.layout._StackButton: (call)
    • summary
      A tab (the thing you click to select a pane).
    • description
      Contains the title of the pane, and optionally a close-button to destroy the pane.
      This is an internal widget and should not be instantiated directly.
      tags:
      private
  • dijit.layout._TabButton.baseClass

    • type
      String
    • summary
      The CSS class applied to the domNode.
  • dijit.layout._TabButton.cssStateNodes

    • type
      Object
    • summary
  • dijit.layout._TabButton.templateString

    • summary
  • dijit.layout._TabButton.scrollOnFocus

    • summary
  • dijit.layout._TabButton.buildRendering

    • type
      Function
    • source: [view]
        this.inherited(arguments);


        dojo.setSelectable(this.containerNode, false);
    • summary
  • dijit.layout._TabButton.startup

    • type
      Function
    • source: [view]
        this.inherited(arguments);
        var n = this.domNode;


        // Required to give IE6 a kick, as it initially hides the
        // tabs until they are focused on.
        setTimeout(function(){
         n.className = n.className;
        }, 1);
    • summary
  • dijit.layout._TabButton._setCloseButtonAttr

    • type
      Function
    • parameters:
      • disp: (typeof Boolean)
    • source: [view]
        this._set("closeButton", disp);
        dojo.toggleClass(this.innerDiv, "dijitClosable", disp);
        this.closeNode.style.display = disp ? "" : "none";
        if(disp){
         var _nlsResources = dojo.i18n.getLocalization("dijit", "common");
         if(this.closeNode){
          dojo.attr(this.closeNode,"title", _nlsResources.itemClose);
         }
         // add context menu onto title button
         var _nlsResources = dojo.i18n.getLocalization("dijit", "common");
         this._closeMenu = new dijit.Menu({
          id: this.id+"_Menu",
          dir: this.dir,
          lang: this.lang,
          targetNodeIds: [this.domNode]
         });


         this._closeMenu.addChild(new dijit.MenuItem({
          label: _nlsResources.itemClose,
          dir: this.dir,
          lang: this.lang,
          onClick: dojo.hitch(this, "onClickCloseButton")
         }));
        }else{
         if(this._closeMenu){
          this._closeMenu.destroyRecursive();
          delete this._closeMenu;
         }
        }
    • summary
      Hide/show close button
  • dijit.layout._TabButton._setLabelAttr

    • type
      Function
    • parameters:
      • content: (typeof String)
    • source: [view]
        this.inherited(arguments);
        if(this.showLabel == false && !this.params.title){
         this.iconNode.alt = dojo.trim(this.containerNode.innerText || this.containerNode.textContent || '');
        }
    • summary
      Hook for set('label', ...) to work.
    • description
      takes an HTML string.
      Inherited ToggleButton implementation will Set the label (text) of the button;
      Need to set the alt attribute of icon on tab buttons if no label displayed
  • dijit.layout._TabButton.destroy

    • type
      Function
    • source: [view]
        if(this._closeMenu){
         this._closeMenu.destroyRecursive();
         delete this._closeMenu;
        }
        this.inherited(arguments);
    • summary
  • dijit.layout._TabButton.cssStateNodes.closeNode

    • summary
  • dijit.layout._TabButton.closeNode.style.display

    • summary
  • dijit.layout._TabButton._closeMenu

    • summary
  • dijit.layout._TabButton.showLabel

    • summary
  • dijit.layout._TabButton.iconNode.alt

    • summary
  • dijit.layout

    • type
      Object
    • summary
  • dijit

    • type
      Object
    • summary