dojox/mdnd/PureSource.js

  • Provides:

    • dojox.mdnd.PureSource
  • Requires:

    • dojo.dnd.Selector in common in project dojo
    • dojo.dnd.Manager in common in project dojo
  • dojox.mdnd.PureSource

    • type
      Function
    • chains:
      • dojo.dnd.Selector: (prototype)
      • dojo.dnd.Selector: (call)
    • summary
      Initialize a new PureSource.
    • parameters:
      • node: (typeof DOMNode|String)
        Node or node's id to build the source on.
      • params: (typeof dojo.dnd.__SourceArgs)
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
  • dojox.mdnd.PureSource.horizontal

    • summary
  • dojox.mdnd.PureSource.copyOnly

    • summary
  • dojox.mdnd.PureSource.skipForm

    • summary
  • dojox.mdnd.PureSource.withHandles

    • summary
  • dojox.mdnd.PureSource.isSource

    • summary
  • dojox.mdnd.PureSource.targetState

    • summary
  • dojox.mdnd.PureSource.generateText

    • summary
  • dojox.mdnd.PureSource.onDndCancel

    • type
      Function
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
    • summary
      Topic event processor for /dnd/cancel, called to cancel the Dnd
      operation.
  • dojox.mdnd.PureSource.copyState

    • type
      Function
    • parameters:
      • keyPressed: (typeof Boolean)
        The "copy" was pressed.
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
    • summary
      Returns true, if we need to copy items, false to move.
      It is separated to be overwritten dynamically, if needed.
    • returns
      Boolean
  • dojox.mdnd.PureSource.destroy

    • type
      Function
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
    • returns
      Boolean
    • chains:
      • dojox.mdnd.PureSource.superclass.destroy: (call)
    • summary
  • dojox.mdnd.PureSource.markupFactory

    • type
      Function
    • parameters:
      • params: (typeof Object)
        ???
      • node: (typeof DomNode)
        ???
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
       },


       markupFactory: function(/*Object*/params, /*DomNode*/node){
        // summary:
        //  Markup methods.
        // params:
        //  ???
        // node:
        //  ???
        // returns:
        //  New dojox.mdnd.PureSource instance.


        //console.log('dojox.mdnd.PureSource ::: markupFactory');
        params._skipStartup = true;
        return new dojox.mdnd.PureSource(node, params);
    • summary
      Markup methods.
    • returns
      Boolean
  • dojox.mdnd.PureSource.onMouseMove

    • type
      Function
    • parameters:
      • e: (typeof Event)
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
       },


       markupFactory: function(/*Object*/params, /*DomNode*/node){
        // summary:
        //  Markup methods.
        // params:
        //  ???
        // node:
        //  ???
        // returns:
        //  New dojox.mdnd.PureSource instance.


        //console.log('dojox.mdnd.PureSource ::: markupFactory');
        params._skipStartup = true;
        return new dojox.mdnd.PureSource(node, params);
       },


       onMouseMove: function(/*Event*/e){
        // summary:
        //  Event processor for onmousemove.
        // e:
        //  Mouse event.


        //console.log('dojox.mdnd.PureSource ::: onMouseMove');
        if(this.isDragging){
         return;
        }
        dojox.mdnd.PureSource.superclass.onMouseMove.call(this, e);
        var m = dojo.dnd.manager();
        if(this.mouseDown && !this.isDragging && this.isSource){
         var nodes = this.getSelectedNodes();
         if(nodes.length){
          m.startDrag(this, nodes, this.copyState(dojo.isCopyKey(e)));
          this.isDragging = true;
         }
        }
    • summary
      Event processor for onmousemove.
    • returns
      Boolean
    • chains:
      • dojox.mdnd.PureSource.superclass.onMouseMove: (call)
  • dojox.mdnd.PureSource.onMouseDown

    • type
      Function
    • parameters:
      • e: (typeof Event)
        Mouse event.
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
       },


       markupFactory: function(/*Object*/params, /*DomNode*/node){
        // summary:
        //  Markup methods.
        // params:
        //  ???
        // node:
        //  ???
        // returns:
        //  New dojox.mdnd.PureSource instance.


        //console.log('dojox.mdnd.PureSource ::: markupFactory');
        params._skipStartup = true;
        return new dojox.mdnd.PureSource(node, params);
       },


       onMouseMove: function(/*Event*/e){
        // summary:
        //  Event processor for onmousemove.
        // e:
        //  Mouse event.


        //console.log('dojox.mdnd.PureSource ::: onMouseMove');
        if(this.isDragging){
         return;
        }
        dojox.mdnd.PureSource.superclass.onMouseMove.call(this, e);
        var m = dojo.dnd.manager();
        if(this.mouseDown && !this.isDragging && this.isSource){
         var nodes = this.getSelectedNodes();
         if(nodes.length){
          m.startDrag(this, nodes, this.copyState(dojo.isCopyKey(e)));
          this.isDragging = true;
         }
        }

        
       },

       
       onMouseDown: function(/*Event*/e){
        // summary:
        //  Event processor for onmousedown.
        // e:
        //  Mouse event.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onMouseDown');
        if(this._legalMouseDown(e) && (!this.skipForm || !dojo.dnd.isFormElement(e))){
         this.mouseDown = true;
         this.mouseButton = e.button;
         dojox.mdnd.PureSource.superclass.onMouseDown.call(this, e);
        }
    • summary
      Event processor for onmousedown.
    • returns
      Boolean
    • chains:
      • dojox.mdnd.PureSource.superclass.onMouseDown: (call)
  • dojox.mdnd.PureSource.onMouseUp

    • type
      Function
    • parameters:
      • e: (typeof Event)
        Mouse event
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
       },


       markupFactory: function(/*Object*/params, /*DomNode*/node){
        // summary:
        //  Markup methods.
        // params:
        //  ???
        // node:
        //  ???
        // returns:
        //  New dojox.mdnd.PureSource instance.


        //console.log('dojox.mdnd.PureSource ::: markupFactory');
        params._skipStartup = true;
        return new dojox.mdnd.PureSource(node, params);
       },


       onMouseMove: function(/*Event*/e){
        // summary:
        //  Event processor for onmousemove.
        // e:
        //  Mouse event.


        //console.log('dojox.mdnd.PureSource ::: onMouseMove');
        if(this.isDragging){
         return;
        }
        dojox.mdnd.PureSource.superclass.onMouseMove.call(this, e);
        var m = dojo.dnd.manager();
        if(this.mouseDown && !this.isDragging && this.isSource){
         var nodes = this.getSelectedNodes();
         if(nodes.length){
          m.startDrag(this, nodes, this.copyState(dojo.isCopyKey(e)));
          this.isDragging = true;
         }
        }

        
       },

       
       onMouseDown: function(/*Event*/e){
        // summary:
        //  Event processor for onmousedown.
        // e:
        //  Mouse event.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onMouseDown');
        if(this._legalMouseDown(e) && (!this.skipForm || !dojo.dnd.isFormElement(e))){
         this.mouseDown = true;
         this.mouseButton = e.button;
         dojox.mdnd.PureSource.superclass.onMouseDown.call(this, e);
        }
       },

       
       onMouseUp: function(/*Event*/e){
        // summary:
        //  Event processor for onmouseup.
        // e:
        //  Mouse event
        // tags:
        //  callback


        //console.log('.dnd.PureSource ::: onMouseUp');
        if(this.mouseDown){
         this.mouseDown = false;
         dojox.mdnd.PureSource.superclass.onMouseUp.call(this, e);
        }
    • summary
      Event processor for onmouseup.
    • returns
      Boolean
    • chains:
      • dojox.mdnd.PureSource.superclass.onMouseUp: (call)
  • dojox.mdnd.PureSource.onOverEvent

    • type
      Function
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
       },


       markupFactory: function(/*Object*/params, /*DomNode*/node){
        // summary:
        //  Markup methods.
        // params:
        //  ???
        // node:
        //  ???
        // returns:
        //  New dojox.mdnd.PureSource instance.


        //console.log('dojox.mdnd.PureSource ::: markupFactory');
        params._skipStartup = true;
        return new dojox.mdnd.PureSource(node, params);
       },


       onMouseMove: function(/*Event*/e){
        // summary:
        //  Event processor for onmousemove.
        // e:
        //  Mouse event.


        //console.log('dojox.mdnd.PureSource ::: onMouseMove');
        if(this.isDragging){
         return;
        }
        dojox.mdnd.PureSource.superclass.onMouseMove.call(this, e);
        var m = dojo.dnd.manager();
        if(this.mouseDown && !this.isDragging && this.isSource){
         var nodes = this.getSelectedNodes();
         if(nodes.length){
          m.startDrag(this, nodes, this.copyState(dojo.isCopyKey(e)));
          this.isDragging = true;
         }
        }

        
       },

       
       onMouseDown: function(/*Event*/e){
        // summary:
        //  Event processor for onmousedown.
        // e:
        //  Mouse event.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onMouseDown');
        if(this._legalMouseDown(e) && (!this.skipForm || !dojo.dnd.isFormElement(e))){
         this.mouseDown = true;
         this.mouseButton = e.button;
         dojox.mdnd.PureSource.superclass.onMouseDown.call(this, e);
        }
       },

       
       onMouseUp: function(/*Event*/e){
        // summary:
        //  Event processor for onmouseup.
        // e:
        //  Mouse event
        // tags:
        //  callback


        //console.log('.dnd.PureSource ::: onMouseUp');
        if(this.mouseDown){
         this.mouseDown = false;
         dojox.mdnd.PureSource.superclass.onMouseUp.call(this, e);
        }
       },


       onOverEvent: function(){
        // summary:
        //  Called once, when mouse is over our container.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onOverEvent');
        dojox.mdnd.PureSource.superclass.onOverEvent.call(this);
        dojo.dnd.manager().overSource(this);
    • summary
      Called once, when mouse is over our container.
    • returns
      Boolean
    • chains:
      • dojox.mdnd.PureSource.superclass.onOverEvent: (call)
  • dojox.mdnd.PureSource.onOutEvent

    • type
      Function
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
       },


       markupFactory: function(/*Object*/params, /*DomNode*/node){
        // summary:
        //  Markup methods.
        // params:
        //  ???
        // node:
        //  ???
        // returns:
        //  New dojox.mdnd.PureSource instance.


        //console.log('dojox.mdnd.PureSource ::: markupFactory');
        params._skipStartup = true;
        return new dojox.mdnd.PureSource(node, params);
       },


       onMouseMove: function(/*Event*/e){
        // summary:
        //  Event processor for onmousemove.
        // e:
        //  Mouse event.


        //console.log('dojox.mdnd.PureSource ::: onMouseMove');
        if(this.isDragging){
         return;
        }
        dojox.mdnd.PureSource.superclass.onMouseMove.call(this, e);
        var m = dojo.dnd.manager();
        if(this.mouseDown && !this.isDragging && this.isSource){
         var nodes = this.getSelectedNodes();
         if(nodes.length){
          m.startDrag(this, nodes, this.copyState(dojo.isCopyKey(e)));
          this.isDragging = true;
         }
        }

        
       },

       
       onMouseDown: function(/*Event*/e){
        // summary:
        //  Event processor for onmousedown.
        // e:
        //  Mouse event.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onMouseDown');
        if(this._legalMouseDown(e) && (!this.skipForm || !dojo.dnd.isFormElement(e))){
         this.mouseDown = true;
         this.mouseButton = e.button;
         dojox.mdnd.PureSource.superclass.onMouseDown.call(this, e);
        }
       },

       
       onMouseUp: function(/*Event*/e){
        // summary:
        //  Event processor for onmouseup.
        // e:
        //  Mouse event
        // tags:
        //  callback


        //console.log('.dnd.PureSource ::: onMouseUp');
        if(this.mouseDown){
         this.mouseDown = false;
         dojox.mdnd.PureSource.superclass.onMouseUp.call(this, e);
        }
       },


       onOverEvent: function(){
        // summary:
        //  Called once, when mouse is over our container.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onOverEvent');
        dojox.mdnd.PureSource.superclass.onOverEvent.call(this);
        dojo.dnd.manager().overSource(this);
       },

       
       onOutEvent: function(){
        // summary:
        //  Called once, when mouse is out our container.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onOutEvent');
        dojox.mdnd.PureSource.superclass.onOutEvent.call(this);
        dojo.dnd.manager().outSource(this);
    • summary
      Called once, when mouse is out our container.
    • returns
      Boolean
    • chains:
      • dojox.mdnd.PureSource.superclass.onOutEvent: (call)
  • dojox.mdnd.PureSource._markDndStatus

    • type
      Function
    • parameters:
      • copy: (typeof Boolean)
        Copy status.
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
       },


       markupFactory: function(/*Object*/params, /*DomNode*/node){
        // summary:
        //  Markup methods.
        // params:
        //  ???
        // node:
        //  ???
        // returns:
        //  New dojox.mdnd.PureSource instance.


        //console.log('dojox.mdnd.PureSource ::: markupFactory');
        params._skipStartup = true;
        return new dojox.mdnd.PureSource(node, params);
       },


       onMouseMove: function(/*Event*/e){
        // summary:
        //  Event processor for onmousemove.
        // e:
        //  Mouse event.


        //console.log('dojox.mdnd.PureSource ::: onMouseMove');
        if(this.isDragging){
         return;
        }
        dojox.mdnd.PureSource.superclass.onMouseMove.call(this, e);
        var m = dojo.dnd.manager();
        if(this.mouseDown && !this.isDragging && this.isSource){
         var nodes = this.getSelectedNodes();
         if(nodes.length){
          m.startDrag(this, nodes, this.copyState(dojo.isCopyKey(e)));
          this.isDragging = true;
         }
        }

        
       },

       
       onMouseDown: function(/*Event*/e){
        // summary:
        //  Event processor for onmousedown.
        // e:
        //  Mouse event.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onMouseDown');
        if(this._legalMouseDown(e) && (!this.skipForm || !dojo.dnd.isFormElement(e))){
         this.mouseDown = true;
         this.mouseButton = e.button;
         dojox.mdnd.PureSource.superclass.onMouseDown.call(this, e);
        }
       },

       
       onMouseUp: function(/*Event*/e){
        // summary:
        //  Event processor for onmouseup.
        // e:
        //  Mouse event
        // tags:
        //  callback


        //console.log('.dnd.PureSource ::: onMouseUp');
        if(this.mouseDown){
         this.mouseDown = false;
         dojox.mdnd.PureSource.superclass.onMouseUp.call(this, e);
        }
       },


       onOverEvent: function(){
        // summary:
        //  Called once, when mouse is over our container.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onOverEvent');
        dojox.mdnd.PureSource.superclass.onOverEvent.call(this);
        dojo.dnd.manager().overSource(this);
       },

       
       onOutEvent: function(){
        // summary:
        //  Called once, when mouse is out our container.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onOutEvent');
        dojox.mdnd.PureSource.superclass.onOutEvent.call(this);
        dojo.dnd.manager().outSource(this);
       },

       
       _markDndStatus: function(/*Boolean*/copy){
        // summary:
        //  Changes source's state based on "copy" status.
        // copy:
        //  Copy status.
        // tags:
        //  protected


        //console.log('dojox.mdnd.PureSource ::: _markDndStatus');
        this._changeState("Source", copy ? "Copied" : "Moved");
    • summary
      Changes source's state based on "copy" status.
    • returns
      Boolean
  • dojox.mdnd.PureSource._legalMouseDown

    • type
      Function
    • parameters:
      • e: (typeof Event)
        Mouse event.
    • source: [view]
      dojo.provide("dojox.mdnd.PureSource");


      dojo.require("dojo.dnd.Selector");
      dojo.require("dojo.dnd.Manager");


      dojo.declare(
       "dojox.mdnd.PureSource",
       dojo.dnd.Selector,
      {
       // summary:
       //  A Source Object, which can be used only as a DnD source.
       //  A Source can contained several dnd items.
       //  A dnd item is not a source.

       
       horizontal: false,
       copyOnly: true,
       skipForm: false,
       withHandles: false,
       isSource: true,
       targetState: "Disabled",
       generateText: true,

       
       constructor: function(/*DOMNode|String*/node, /*dojo.dnd.__SourceArgs?*/params){
        // summary:
        //  Initialize a new PureSource.
        // node:
        //  Node or node's id to build the source on.
        // params:
        //  Any property of this class may be configured via the params
        //  object which is mixed-in to the 'dojo.dnd.Source' instance.


        //console.log('dojox.mdnd.PureSource ::: constructor');
        dojo.mixin(this, dojo.mixin({}, params));
        var type = this.accept;

        
        // class-specific variables
        this.isDragging = false;
        this.mouseDown = false;


        // states
        this.sourceState = "";
        dojo.addClass(this.node, "dojoDndSource");
        if(this.horizontal){
         dojo.addClass(this.node, "dojoDndHorizontal");
        }
        // set up events
        this.topics = [
         dojo.subscribe("/dnd/cancel", this, "onDndCancel"),
         dojo.subscribe("/dnd/drop", this, "onDndCancel")
        ];
       },

       
       onDndCancel: function(){
        // summary:
        //  Topic event processor for /dnd/cancel, called to cancel the Dnd
        //  operation.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onDndCancel');
        this.isDragging = false;
        this.mouseDown = false;
        delete this.mouseButton;
       },

       
       copyState: function(/*Boolean*/keyPressed){
        // summary:
        //  Returns true, if we need to copy items, false to move.
        //  It is separated to be overwritten dynamically, if needed.
        // keyPressed:
        //  The "copy" was pressed.
        // returns:
        //  True, if we need to copy items, false to move.


        //console.log('dojox.mdnd.PureSource ::: copyState');
        return this.copyOnly || keyPressed; // Boolean
       },

       
       destroy: function(){
        // summary:
        //  Prepares the object to be garbage-collected.


        //console.log('dojox.mdnd.PureSource ::: destroy');
        dojox.mdnd.PureSource.superclass.destroy.call(this);
        dojo.forEach(this.topics, dojo.unsubscribe);
        this.targetAnchor = null;
       },


       markupFactory: function(/*Object*/params, /*DomNode*/node){
        // summary:
        //  Markup methods.
        // params:
        //  ???
        // node:
        //  ???
        // returns:
        //  New dojox.mdnd.PureSource instance.


        //console.log('dojox.mdnd.PureSource ::: markupFactory');
        params._skipStartup = true;
        return new dojox.mdnd.PureSource(node, params);
       },


       onMouseMove: function(/*Event*/e){
        // summary:
        //  Event processor for onmousemove.
        // e:
        //  Mouse event.


        //console.log('dojox.mdnd.PureSource ::: onMouseMove');
        if(this.isDragging){
         return;
        }
        dojox.mdnd.PureSource.superclass.onMouseMove.call(this, e);
        var m = dojo.dnd.manager();
        if(this.mouseDown && !this.isDragging && this.isSource){
         var nodes = this.getSelectedNodes();
         if(nodes.length){
          m.startDrag(this, nodes, this.copyState(dojo.isCopyKey(e)));
          this.isDragging = true;
         }
        }

        
       },

       
       onMouseDown: function(/*Event*/e){
        // summary:
        //  Event processor for onmousedown.
        // e:
        //  Mouse event.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onMouseDown');
        if(this._legalMouseDown(e) && (!this.skipForm || !dojo.dnd.isFormElement(e))){
         this.mouseDown = true;
         this.mouseButton = e.button;
         dojox.mdnd.PureSource.superclass.onMouseDown.call(this, e);
        }
       },

       
       onMouseUp: function(/*Event*/e){
        // summary:
        //  Event processor for onmouseup.
        // e:
        //  Mouse event
        // tags:
        //  callback


        //console.log('.dnd.PureSource ::: onMouseUp');
        if(this.mouseDown){
         this.mouseDown = false;
         dojox.mdnd.PureSource.superclass.onMouseUp.call(this, e);
        }
       },


       onOverEvent: function(){
        // summary:
        //  Called once, when mouse is over our container.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onOverEvent');
        dojox.mdnd.PureSource.superclass.onOverEvent.call(this);
        dojo.dnd.manager().overSource(this);
       },

       
       onOutEvent: function(){
        // summary:
        //  Called once, when mouse is out our container.
        // tags:
        //  callback


        //console.log('dojox.mdnd.PureSource ::: onOutEvent');
        dojox.mdnd.PureSource.superclass.onOutEvent.call(this);
        dojo.dnd.manager().outSource(this);
       },

       
       _markDndStatus: function(/*Boolean*/copy){
        // summary:
        //  Changes source's state based on "copy" status.
        // copy:
        //  Copy status.
        // tags:
        //  protected


        //console.log('dojox.mdnd.PureSource ::: _markDndStatus');
        this._changeState("Source", copy ? "Copied" : "Moved");
       },


       _legalMouseDown: function(/*Event*/e){
        // summary:
        //  Checks if user clicked on "approved" items.
        // e:
        //  Mouse event.
        // returns:
        //  True if user clicked on "approved" items.
        // tags:
        //   protected


        //console.log('dojox.mdnd.PureSource ::: _legalMouseDown');
        if(!this.withHandles){ return true; }
        for(var node = e.target; node && !dojo.hasClass(node, "dojoDndItem"); node = node.parentNode){
         if(dojo.hasClass(node, "dojoDndHandle")){ return true; }
        }
        return false; // Boolean
    • summary
      Checks if user clicked on "approved" items.
    • return_summary
      True if user clicked on "approved" items.
    • returns
      Boolean
  • dojox.mdnd.PureSource.isDragging

    • summary
  • dojox.mdnd.PureSource.mouseDown

    • summary
  • dojox.mdnd.PureSource.targetAnchor

    • summary
  • dojox.mdnd.PureSource.mouseButton

    • summary
  • dojox.mdnd.PureSource.sourceState

    • summary
  • dojox.mdnd.PureSource.topics

    • summary
  • this

    • mixins:
      • dojo.mixin({}, params): (normal)
    • summary
  • dojox.mdnd

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary