a:21:{s:9:"#provides";s:23:"dijit._tree.dndSelector";s:9:"#resource";s:20:"_tree/dndSelector.js";s:9:"#requires";a:2:{i:0;a:3:{i:0;s:6:"common";i:1;s:15:"dojo.dnd.common";i:2;s:4:"dojo";}i:1;a:2:{i:0;s:6:"common";i:1;s:24:"dijit._tree.dndContainer";}}s:23:"dijit._tree.dndSelector";a:8:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:24:"dijit._tree.dndContainer";}s:4:"call";a:1:{i:0;s:24:"dijit._tree.dndContainer";}}s:7:"summary";s:14:"Initialization";s:10:"parameters";a:2:{s:4:"tree";a:1:{s:4:"type";s:0:"";}s:6:"params";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:245:" this.selection={}; this.anchor = null; this.simpleSelection=false; this.events.push( dojo.connect(this.tree.domNode, "onmousedown", this,"onMouseDown"), dojo.connect(this.tree.domNode, "onmouseup", this,"onMouseUp") );";s:4:"tags";s:7:"private";s:14:"private_parent";b:1;s:9:"classlike";b:1;}s:32:"dijit._tree.dndSelector.singular";a:5:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"tags";a:1:{i:0;s:8:"readonly";}s:4:"type";s:7:"Boolean";s:7:"summary";s:252:"Apparently this is indicates whether a single or multiple elements are selected, but AFAIK Tree doesn't support multiple selection, so it doesn't do anything. (There is, however, a bunch of dead code that would only run if singular == true) methods";s:14:"private_parent";b:1;}s:40:"dijit._tree.dndSelector.getSelectedItems";a:5:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:6:"source";s:1460:"dojo.provide("dijit._tree.dndSelector"); dojo.require("dojo.dnd.common"); dojo.require("dijit._tree.dndContainer"); dojo.declare("dijit._tree.dndSelector", dijit._tree.dndContainer, { // summary: // This is a base class for `dijit._tree.dndSource` , and isn't meant to be used directly. // It's based on `dojo.dnd.Selector`. // tags: // protected constructor: function(tree, params){ // summary: // Initialization // tags: // private this.selection={}; this.anchor = null; this.simpleSelection=false; this.events.push( dojo.connect(this.tree.domNode, "onmousedown", this,"onMouseDown"), dojo.connect(this.tree.domNode, "onmouseup", this,"onMouseUp") ); }, // singular: [readonly] Boolean // Apparently this is indicates whether a single or multiple elements are // selected, but AFAIK Tree doesn't support multiple selection, so it doesn't // do anything. (There is, however, a bunch of dead code that would only run // if singular == true) singular: false, // is singular property // methods getSelectedItems: function(){ // summary: // Returns selected items, for which there is only one for Tree? // tags: // private // TODO: apparently no one is calling this; get rid of it? var selectedItems = []; for (var i in this.selection){ selectedItems.push(dijit.getEnclosingWidget(this.selection[i]).item); } return selectedItems;";s:7:"summary";s:61:"Returns selected items, for which there is only one for Tree?";s:14:"private_parent";b:1;}s:40:"dijit._tree.dndSelector.getSelectedNodes";a:6:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:6:"source";s:25:" return this.selection;";s:7:"summary";s:76:"Returns the set of selected nodes. Used by dndSource on the start of a drag.";s:4:"tags";s:9:"protected";s:14:"private_parent";b:1;}s:34:"dijit._tree.dndSelector.selectNone";a:7:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:6:"source";s:58:" return this._removeSelection()._removeAnchor(); // self";s:7:"summary";s:19:"Unselects all items";s:4:"tags";s:7:"private";s:7:"returns";s:4:"self";s:14:"private_parent";b:1;}s:35:"dijit._tree.dndSelector.insertItems";a:7:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:6:"parent";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:2183:"dojo.provide("dijit._tree.dndSelector"); dojo.require("dojo.dnd.common"); dojo.require("dijit._tree.dndContainer"); dojo.declare("dijit._tree.dndSelector", dijit._tree.dndContainer, { // summary: // This is a base class for `dijit._tree.dndSource` , and isn't meant to be used directly. // It's based on `dojo.dnd.Selector`. // tags: // protected constructor: function(tree, params){ // summary: // Initialization // tags: // private this.selection={}; this.anchor = null; this.simpleSelection=false; this.events.push( dojo.connect(this.tree.domNode, "onmousedown", this,"onMouseDown"), dojo.connect(this.tree.domNode, "onmouseup", this,"onMouseUp") ); }, // singular: [readonly] Boolean // Apparently this is indicates whether a single or multiple elements are // selected, but AFAIK Tree doesn't support multiple selection, so it doesn't // do anything. (There is, however, a bunch of dead code that would only run // if singular == true) singular: false, // is singular property // methods getSelectedItems: function(){ // summary: // Returns selected items, for which there is only one for Tree? // tags: // private // TODO: apparently no one is calling this; get rid of it? var selectedItems = []; for (var i in this.selection){ selectedItems.push(dijit.getEnclosingWidget(this.selection[i]).item); } return selectedItems; }, getSelectedNodes: function(){ // summary: // Returns the set of selected nodes. // Used by dndSource on the start of a drag. // tags: // protected return this.selection; }, selectNone: function(){ // summary: // Unselects all items // tags: // private return this._removeSelection()._removeAnchor(); // self }, insertItems: function(item, parent){ // summary: // Inserts new data items (see Container's insertNodes method for details). // Apparently an unused method. // tags: // private // TODO: this isn't used anywhere, delete it //we actually need to add things to the store here instead of adding nodes directly to the tree ";s:7:"summary";s:101:"Inserts new data items (see Container's insertNodes method for details). Apparently an unused method.";s:7:"returns";s:4:"self";s:14:"private_parent";b:1;}s:31:"dijit._tree.dndSelector.destroy";a:6:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:6:"source";s:97:" dijit._tree.dndSelector.superclass.destroy.call(this); this.selection = this.anchor = null;";s:7:"summary";s:43:"Prepares the object to be garbage-collected";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:42:"dijit._tree.dndSelector.superclass.destroy";}}s:14:"private_parent";b:1;}s:35:"dijit._tree.dndSelector.onMouseDown";a:8:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:2:{s:4:"type";s:5:"Event";s:7:"summary";s:11:"mouse event";}}s:6:"source";s:2090:" if(!this.current){ return; } if(e.button == 2){ return; } // ignore right-click var item = dijit.getEnclosingWidget(this.current).item; var id = this.tree.model.getIdentity(item); if (!this.current.id) { this.current.id=id; } if (!this.current.type) { this.current.type="data"; } if(!this.singular && !dojo.dnd.getCopyKeyState(e) && !e.shiftKey && (this.current.id in this.selection)){ this.simpleSelection = true; dojo.stopEvent(e); return; } if(this.singular){ if(this.anchor == this.current){ if(dojo.dnd.getCopyKeyState(e)){ this.selectNone(); } }else{ this.selectNone(); this.anchor = this.current; this._addItemClass(this.anchor, "Anchor"); this.selection[this.current.id] = this.current; } }else{ if(!this.singular && e.shiftKey){ if (dojo.dnd.getCopyKeyState(e)){ //TODO add range to selection }else{ //TODO select new range from anchor } }else{ if(dojo.dnd.getCopyKeyState(e)){ if(this.anchor == this.current){ delete this.selection[this.anchor.id]; this._removeAnchor(); }else{ if(this.current.id in this.selection){ this._removeItemClass(this.current, "Selected"); delete this.selection[this.current.id]; }else{ if(this.anchor){ this._removeItemClass(this.anchor, "Anchor"); this._addItemClass(this.anchor, "Selected"); } this.anchor = this.current; this._addItemClass(this.current, "Anchor"); this.selection[this.current.id] = this.current; } } }else{ // TODO: item and id are already declared and set above, remove these lines? var item = dijit.getEnclosingWidget(this.current).item; var id = this.tree.model.getIdentity(item); if(!(id in this.selection)){ this.selectNone(); this.anchor = this.current; this._addItemClass(this.current, "Anchor"); this.selection[id] = this.current; } } } } dojo.stopEvent(e);";s:7:"summary";s:31:"Event processor for onmousedown";s:4:"tags";s:9:"protected";s:7:"returns";s:18:"ignore right-click";s:14:"private_parent";b:1;}s:33:"dijit._tree.dndSelector.onMouseUp";a:7:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:2:{s:4:"type";s:5:"Event";s:7:"summary";s:11:"mouse event";}}s:6:"source";s:251:" if(!this.simpleSelection){ return; } this.simpleSelection = false; this.selectNone(); if(this.current){ this.anchor = this.current; this._addItemClass(this.anchor, "Anchor"); this.selection[this.current.id] = this.current; }";s:7:"summary";s:29:"Event processor for onmouseup";s:4:"tags";s:9:"protected";s:14:"private_parent";b:1;}s:40:"dijit._tree.dndSelector._removeSelection";a:8:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:6:"source";s:227:" var e = dojo.dnd._empty; for(var i in this.selection){ if(i in e){ continue; } var node = dojo.byId(i); if(node){ this._removeItemClass(node, "Selected"); } } this.selection = {}; return this; // self";s:7:"summary";s:19:"Unselects all items";s:4:"tags";s:7:"private";s:7:"returns";s:4:"self";s:7:"private";b:1;s:14:"private_parent";b:1;}s:37:"dijit._tree.dndSelector._removeAnchor";a:8:{s:9:"prototype";s:23:"dijit._tree.dndSelector";s:4:"type";s:8:"Function";s:6:"source";s:122:" if(this.anchor){ this._removeItemClass(this.anchor, "Anchor"); this.anchor = null; } return this; // self";s:7:"summary";s:253:"Removes the Anchor CSS class from a node. According to `dojo.dnd.Selector`, anchor means that "an item is selected, and is an anchor for a 'shift' selection". It's not relevant for Tree at this point, since we don't support multiple selection.";s:4:"tags";s:7:"private";s:7:"returns";s:4:"self";s:7:"private";b:1;s:14:"private_parent";b:1;}s:33:"dijit._tree.dndSelector.selection";a:3:{s:8:"instance";s:23:"dijit._tree.dndSelector";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:34:"dijit._tree.dndSelector.current.id";a:3:{s:8:"instance";s:23:"dijit._tree.dndSelector";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dijit._tree.dndSelector.current.type";a:3:{s:8:"instance";s:23:"dijit._tree.dndSelector";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:39:"dijit._tree.dndSelector.simpleSelection";a:3:{s:8:"instance";s:23:"dijit._tree.dndSelector";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:30:"dijit._tree.dndSelector.anchor";a:3:{s:8:"instance";s:23:"dijit._tree.dndSelector";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:11:"dijit._tree";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:5:"dijit";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}