dojox/editor/plugins/CollapsibleToolbar.js

  • Provides:

    • dojox.editor.plugins.CollapsibleToolbar
  • dojox.editor.plugins._CollapsibleToolbarButton

    • type
      Function
    • chains:
      • dijit._Widget: (prototype)
      • dijit._Widget: (call)
      • dijit._Templated: (call)
    • mixins:
      • dijit._Templated.prototype: (prototype)
    • summary
      Simple internal widget for representing a clickable button for expand/collapse
      with A11Y support.
      tags:
      private
  • dojox.editor.plugins._CollapsibleToolbarButton.templateString

    • summary
  • dojox.editor.plugins._CollapsibleToolbarButton.title

    • summary
  • dojox.editor.plugins._CollapsibleToolbarButton.buttonClass

    • summary
  • dojox.editor.plugins._CollapsibleToolbarButton.text

    • summary
  • dojox.editor.plugins._CollapsibleToolbarButton.textClass

    • summary
  • dojox.editor.plugins._CollapsibleToolbarButton.onClick

    • type
      Function
    • parameters:
      • e: (typeof )
    • source: [view]
        // summary:
        //  Simple synthetic event to listen for dijit click events (mouse or keyboard)
    • summary
      Simple synthetic event to listen for dijit click events (mouse or keyboard)
  • dojox.editor.plugins.CollapsibleToolbar

    • type
      Function
    • chains:
      • dijit._editor._Plugin: (prototype)
      • dijit._editor._Plugin: (call)
    • summary
      This plugin provides a weappable toolbar container to allow expand/collapse
      of the editor toolbars.  This plugin should be registered first in most cases to
      avoid conflicts in toolbar construction.
  • dojox.editor.plugins.CollapsibleToolbar._myWidgets

    • tags: private
    • type
      array
    • summary
      Container for widgets I allocate that will need to be destroyed.
  • dojox.editor.plugins.CollapsibleToolbar.setEditor

    • type
      Function
    • parameters:
      • editor: (typeof Object)
        The editor to configure for this plugin to use.
    • source: [view]
        this.editor = editor;
        this._constructContainer();
    • summary
      Over-ride for the setting of the editor.
  • dojox.editor.plugins.CollapsibleToolbar._constructContainer

    • type
      Function
    • source: [view]
        var strings = dojo.i18n.getLocalization("dojox.editor.plugins", "CollapsibleToolbar");
        this._myWidgets = [];

        
        // Build the containers.
        var container = dojo.create("table", {style: { width: "100%" }, tabindex: -1, "class": "dojoxCollapsibleToolbarContainer"});
        var tbody = dojo.create("tbody", {tabindex: -1}, container);
        var row = dojo.create("tr", {tabindex: -1}, tbody);
        var openTd = dojo.create("td", {"class": "dojoxCollapsibleToolbarControl", tabindex: -1}, row);
        var closeTd = dojo.create("td", {"class": "dojoxCollapsibleToolbarControl", tabindex: -1}, row);
        var menuTd = dojo.create("td", {style: { width: "100%" }, tabindex: -1}, row);
        var m = dojo.create("span", {style: { width: "100%" }, tabindex: -1}, menuTd);


        var collapseButton = new dojox.editor.plugins._CollapsibleToolbarButton({
         buttonClass: "dojoxCollapsibleToolbarCollapse",
         title: strings.collapse,
         text: "-",
         textClass: "dojoxCollapsibleToolbarCollapseText"
        });
        dojo.place(collapseButton.domNode, openTd);
        var expandButton = new dojox.editor.plugins._CollapsibleToolbarButton({
         buttonClass: "dojoxCollapsibleToolbarExpand",
         title: strings.expand,
         text: "+",
         textClass: "dojoxCollapsibleToolbarExpandText"
        });
        dojo.place(expandButton.domNode, closeTd);


        this._myWidgets.push(collapseButton);
        this._myWidgets.push(expandButton);


        // Attach everything in now.
        dojo.style(closeTd, "display", "none");
        dojo.place(container, this.editor.toolbar.domNode, "after");
        dojo.place(this.editor.toolbar.domNode, m);


        this.openTd = openTd;
        this.closeTd = closeTd;
        this.menu = m;


        // Establish the events to handle open/close.
        this.connect(collapseButton, "onClick", "_onClose");
        this.connect(expandButton, "onClick", "_onOpen");
    • summary
      Internal function to construct a wrapper for the toolbar/header that allows
      it to expand and collapse.  It effectively builds a containing table,
      which handles the layout nicely and gets BIDI support by default.
    • tags:
  • dojox.editor.plugins.CollapsibleToolbar._onClose

    • type
      Function
    • parameters:
      • e: (typeof The)
        click event.
    • source: [view]
        if(e){ dojo.stopEvent(e); }
        var size = dojo.marginBox(this.editor.domNode);
        dojo.style(this.openTd, "display", "none");
        dojo.style(this.closeTd, "display", "");
        dojo.style(this.menu, "display", "none");
        this.editor.resize({h: size.h});
        // work around IE rendering glitch in a11y mode.
        if(dojo.isIE){
         this.editor.header.className = this.editor.header.className;
         this.editor.footer.className = this.editor.footer.className;
        }
        dijit.focus(this.closeTd.firstChild);
    • summary
      Internal function for handling a click event that will close the toolbar.
    • tags:
  • dojox.editor.plugins.CollapsibleToolbar._onOpen

    • type
      Function
    • parameters:
      • e: (typeof The)
        click event.
    • source: [view]
        if(e){ dojo.stopEvent(e); }
        var size = dojo.marginBox(this.editor.domNode);
        dojo.style(this.closeTd, "display", "none");
        dojo.style(this.openTd, "display", "");
        dojo.style(this.menu, "display", "");
        this.editor.resize({h: size.h});
         // work around IE rendering glitch in a11y mode.
        if(dojo.isIE){
         this.editor.header.className = this.editor.header.className;
         this.editor.footer.className = this.editor.footer.className;
        }
        dijit.focus(this.openTd.firstChild);
    • summary
      Internal function for handling a click event that will open the toolbar.
    • tags:
  • dojox.editor.plugins.CollapsibleToolbar.destroy

    • type
      Function
    • source: [view]
        this.inherited(arguments);
        if(this._myWidgets){
         while(this._myWidgets.length){
          this._myWidgets.pop().destroy();
         }
         delete this._myWidgets;
        }
    • summary
      Over-ride of destroy method for cleanup.
  • dojox.editor.plugins.CollapsibleToolbar.editor

    • summary
  • dojox.editor.plugins.CollapsibleToolbar.setEditor.editor

    • type
      Object
    • summary
      The editor to configure for this plugin to use.
  • dojox.editor.plugins.CollapsibleToolbar.openTd

    • summary
  • dojox.editor.plugins.CollapsibleToolbar.closeTd

    • summary
  • dojox.editor.plugins.CollapsibleToolbar.menu

    • summary
  • dojox.editor.plugins.CollapsibleToolbar.editor.header.className

    • summary
  • dojox.editor.plugins.CollapsibleToolbar.editor.footer.className

    • summary
  • name

    • summary
  • o.plugin

    • summary
  • dojox.editor.plugins

    • type
      Object
    • summary
  • dojox.editor

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary