dijit/TooltipDialog.js

  • Provides:

    • dijit.TooltipDialog
  • dijit.TooltipDialog

    • type
      Function
    • chains:
      • dijit.layout.ContentPane: (prototype)
      • dijit.layout.ContentPane: (call)
      • dijit._Templated: (call)
      • dijit.form._FormMixin: (call)
      • dijit._DialogMixin: (call)
    • mixins:
      • dijit._Templated.prototype: (prototype)
      • dijit.form._FormMixin.prototype: (prototype)
      • dijit._DialogMixin.prototype: (prototype)
    • summary
      Pops up a dialog that appears like a Tooltip
  • dijit.TooltipDialog.title

    • type
      String
    • summary
      Description of tooltip dialog (required for a11y)
  • dijit.TooltipDialog.doLayout

    • tags: protected
    • type
      Boolean
    • summary
      Don't change this parameter from the default value.
      This ContentPane parameter doesn't make sense for TooltipDialog, since TooltipDialog
      is never a child of a layout container, nor can you specify the size of
      TooltipDialog in order to control the size of an inner widget.
  • dijit.TooltipDialog.autofocus

    • type
      Boolean
    • summary
      A Toggle to modify the default focus behavior of a Dialog, which
      is to focus on the first dialog element after opening the dialog.
      False will disable autofocusing. Default: true
  • dijit.TooltipDialog.baseClass

    • tags: protected
    • type
      String
    • summary
      The root className to use for the various states of this widget
  • dijit.TooltipDialog._firstFocusItem

    • tags: private
    • type
      readonly
    • summary
      DomNode
      The pointer to the first focusable node in the dialog.
      Set by `dijit._DialogMixin._getFocusItems`.
  • dijit.TooltipDialog._lastFocusItem

    • tags: private
    • type
      readonly
    • summary
      DomNode
      The pointer to which node has focus prior to our dialog.
      Set by `dijit._DialogMixin._getFocusItems`.
  • dijit.TooltipDialog.templateString

    • summary
  • dijit.TooltipDialog._setTitleAttr

    • type
      Function
    • parameters:
      • title: (typeof String)
    • source: [view]
          this.containerNode.title = title;
          this._set("title", title)
    • summary
  • dijit.TooltipDialog.postCreate

    • type
      Function
    • source: [view]
          this.inherited(arguments);
          this.connect(this.containerNode, "onkeypress", "_onKey");
    • summary
  • dijit.TooltipDialog.orient

    • type
      Function
    • parameters:
      • node: (typeof DomNode)
      • aroundCorner: (typeof String)
      • corner: (typeof String)
    • source: [view]
          var newC = "dijitTooltipAB" + (corner.charAt(1) == 'L' ? "Left" : "Right")
            + " dijitTooltip"
            + (corner.charAt(0) == 'T' ? "Below" : "Above");

          
          dojo.replaceClass(this.domNode, newC, this._currentOrientClass || "");
          this._currentOrientClass = newC;
    • summary
      Configure widget to be displayed in given position relative to the button.
      This is called from the dijit.popup code, and should not be called
      directly.
    • tags:
  • dijit.TooltipDialog.focus

    • type
      Function
    • source: [view]
          this._getFocusItems(this.containerNode);
          dijit.focus(this._firstFocusItem);
    • summary
      Focus on first field
  • dijit.TooltipDialog.onOpen

    • type
      Function
    • parameters:
      • pos: (typeof Object)
    • source: [view]
          this.orient(this.domNode,pos.aroundCorner, pos.corner);
          this._onShow(); // lazy load trigger
    • summary
      Called when dialog is displayed.
      This is called from the dijit.popup code, and should not be called directly.
    • tags:
  • dijit.TooltipDialog.onClose

    • type
      Function
    • source: [view]
          this.onHide();
    • summary
      Called when dialog is hidden.
      This is called from the dijit.popup code, and should not be called directly.
    • tags:
  • dijit.TooltipDialog._onKey

    • type
      Function
    • parameters:
      • evt: (typeof Event)
    • source: [view]
          var node = evt.target;
          var dk = dojo.keys;
          if(evt.charOrCode === dk.TAB){
           this._getFocusItems(this.containerNode);
          }
          var singleFocusItem = (this._firstFocusItem == this._lastFocusItem);
          if(evt.charOrCode == dk.ESCAPE){
           // Use setTimeout to avoid crash on IE, see #10396.
           setTimeout(dojo.hitch(this, "onCancel"), 0);
           dojo.stopEvent(evt);
          }else if(node == this._firstFocusItem && evt.shiftKey && evt.charOrCode === dk.TAB){
           if(!singleFocusItem){
            dijit.focus(this._lastFocusItem); // send focus to last item in dialog
           }
           dojo.stopEvent(evt);
          }else if(node == this._lastFocusItem && evt.charOrCode === dk.TAB && !evt.shiftKey){
           if(!singleFocusItem){
            dijit.focus(this._firstFocusItem); // send focus to first item in dialog
           }
           dojo.stopEvent(evt);
          }else if(evt.charOrCode === dk.TAB){
           // we want the browser's default tab handling to move focus
           // but we don't want the tab to propagate upwards
           evt.stopPropagation();
          }
    • summary
      Handler for keyboard events
    • description
      Keep keyboard focus in dialog; close dialog on escape key
    • tags:
  • dijit.TooltipDialog.containerNode.title

    • summary
  • dijit.TooltipDialog._currentOrientClass

    • summary
  • dijit

    • type
      Object
    • summary