a:31:{s:9:"#provides";s:17:"dojo.dnd.Selector";s:9:"#resource";s:15:"dnd/Selector.js";s:9:"#requires";a:2:{i:0;a:2:{i:0;s:6:"common";i:1;s:15:"dojo.dnd.common";}i:1;a:2:{i:0;s:6:"common";i:1;s:18:"dojo.dnd.Container";}}s:17:"dojo.dnd.Selector";a:6:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:18:"dojo.dnd.Container";}s:4:"call";a:1:{i:0;s:18:"dojo.dnd.Container";}}s:7:"summary";s:29:"a constructor of the Selector";s:10:"parameters";a:2:{s:4:"node";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:42:"node or node's id to build the selector on";}s:6:"params";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:48:"a dict of parameters, recognized parameters are:";}}s:6:"source";s:372:" if(!params){ params = {}; } this.singular = params.singular; this.autoSync = params.autoSync; // class-specific variables this.selection = {}; this.anchor = null; this.simpleSelection = false; // set up events this.events.push( dojo.connect(this.node, "onmousedown", this, "onMouseDown"), dojo.connect(this.node, "onmouseup", this, "onMouseUp"));";s:9:"classlike";b:1;}s:26:"dojo.dnd.Selector.singular";a:4:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:8:"instance";s:17:"dojo.dnd.Selector";s:4:"type";s:7:"Boolean";s:7:"summary";s:96:"allows selection of only one element, if true the rest of parameters are passed to the container";}s:34:"dojo.dnd.Selector.getSelectedNodes";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:166:" var t = new dojo.NodeList(); var e = dojo.dnd._empty; for(var i in this.selection){ if(i in e){ continue; } t.push(dojo.byId(i)); } return t; // Array";s:7:"summary";s:43:"returns a list (an array) of selected nodes";s:7:"returns";s:5:"Array";}s:28:"dojo.dnd.Selector.selectNone";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:57:" return this._removeSelection()._removeAnchor(); // self";s:7:"summary";s:19:"unselects all items";s:7:"returns";s:4:"self";}s:27:"dojo.dnd.Selector.selectAll";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:165:" this.forInItems(function(data, id){ this._addItemClass(dojo.byId(id), "Selected"); this.selection[id] = 1; }, this); return this._removeAnchor(); // self";s:7:"summary";s:17:"selects all items";s:7:"returns";s:4:"self";}s:37:"dojo.dnd.Selector.deleteSelectedNodes";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:222:" var e = dojo.dnd._empty; for(var i in this.selection){ if(i in e){ continue; } var n = dojo.byId(i); this.delItem(i); dojo.destroy(n); } this.anchor = null; this.selection = {}; return this; // self";s:7:"summary";s:26:"deletes all selected items";s:7:"returns";s:4:"self";}s:36:"dojo.dnd.Selector.forInSelectedItems";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"f";a:1:{s:4:"type";s:8:"Function";}s:1:"o";a:2:{s:8:"optional";b:1;s:4:"type";s:6:"Object";}}s:6:"source";s:160:" o = o || dojo.global; var s = this.selection, e = dojo.dnd._empty; for(var i in s){ if(i in e){ continue; } f.call(o, this.getItem(i), i, this); }";s:7:"summary";s:77:"iterates over selected items, see dojo.dnd.Container.forInItems() for details";}s:22:"dojo.dnd.Selector.sync";a:6:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:430:" dojo.dnd.Selector.superclass.sync.call(this); // fix the anchor if(this.anchor){ if(!this.getItem(this.anchor.id)){ this.anchor = null; } } // fix the selection var t = [], e = dojo.dnd._empty; for(var i in this.selection){ if(i in e){ continue; } if(!this.getItem(i)){ t.push(i); } } dojo.forEach(t, function(i){ delete this.selection[i]; }, this); return this; // self";s:7:"summary";s:40:"synch up the node list with the data map";s:7:"returns";s:4:"self";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:33:"dojo.dnd.Selector.superclass.sync";}}}s:29:"dojo.dnd.Selector.insertNodes";a:8:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:11:"addSelected";a:2:{s:4:"type";s:7:"Boolean";s:7:"summary";s:85:"all new nodes will be added to selected items, if true, no selection change otherwise";}s:4:"data";a:2:{s:4:"type";s:5:"Array";s:7:"summary";s:71:"a list of data items, which should be processed by the creator function";}s:6:"before";a:2:{s:4:"type";s:7:"Boolean";s:7:"summary";s:65:"insert before the anchor, if true, and after the anchor otherwise";}s:6:"anchor";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:50:"the anchor node to be used as a point of insertion";}}s:6:"source";s:738:" var oldCreator = this._normalizedCreator; this._normalizedCreator = function(item, hint){ var t = oldCreator.call(this, item, hint); if(addSelected){ if(!this.anchor){ this.anchor = t.node; this._removeItemClass(t.node, "Selected"); this._addItemClass(this.anchor, "Anchor"); }else if(this.anchor != t.node){ this._removeItemClass(t.node, "Anchor"); this._addItemClass(t.node, "Selected"); } this.selection[t.node.id] = 1; }else{ this._removeItemClass(t.node, "Selected"); this._removeItemClass(t.node, "Anchor"); } return t; }; dojo.dnd.Selector.superclass.insertNodes.call(this, data, before, anchor); this._normalizedCreator = oldCreator; return this; // self";s:7:"summary";s:71:"inserts new data items (see Container's insertNodes method for details)";s:7:"returns";s:4:"self";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:40:"dojo.dnd.Selector.superclass.insertNodes";}}s:9:"classlike";b:1;}s:25:"dojo.dnd.Selector.destroy";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:89:" dojo.dnd.Selector.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:36:"dojo.dnd.Selector.superclass.destroy";}}}s:31:"dojo.dnd.Selector.markupFactory";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"params";a:1:{s:4:"type";s:0:"";}s:4:"node";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:75:" params._skipStartup = true; return new dojo.dnd.Selector(node, params);";s:7:"summary";s:0:"";}s:29:"dojo.dnd.Selector.onMouseDown";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";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:2357:" if(this.autoSync){ this.sync(); } if(!this.current){ return; } if(!this.singular && !dojo.dnd.getCopyKeyState(e) && !e.shiftKey && (this.current.id in this.selection)){ this.simpleSelection = true; if(e.button === dojo.dnd._lmb){ // accept the left button and stop the event // for IE we don't stop event when multiple buttons are pressed dojo.stopEvent(e); } return; } if(!this.singular && e.shiftKey){ if(!dojo.dnd.getCopyKeyState(e)){ this._removeSelection(); } var c = this.getAllNodes(); if(c.length){ if(!this.anchor){ this.anchor = c[0]; this._addItemClass(this.anchor, "Anchor"); } this.selection[this.anchor.id] = 1; if(this.anchor != this.current){ var i = 0; for(; i < c.length; ++i){ var node = c[i]; if(node == this.anchor || node == this.current){ break; } } for(++i; i < c.length; ++i){ var node = c[i]; if(node == this.anchor || node == this.current){ break; } this._addItemClass(node, "Selected"); this.selection[node.id] = 1; } this._addItemClass(this.current, "Selected"); this.selection[this.current.id] = 1; } } }else{ 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] = 1; } }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] = 1; } } }else{ if(!(this.current.id in this.selection)){ this.selectNone(); this.anchor = this.current; this._addItemClass(this.current, "Anchor"); this.selection[this.current.id] = 1; } } } } dojo.stopEvent(e);";s:7:"summary";s:31:"event processor for onmousedown";}s:27:"dojo.dnd.Selector.onMouseUp";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";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:232:" 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] = 1; }";s:7:"summary";s:29:"event processor for onmouseup";}s:29:"dojo.dnd.Selector.onMouseMove";a:5:{s:9:"prototype";s:17:"dojo.dnd.Selector";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:31:" this.simpleSelection = false;";s:7:"summary";s:31:"event processor for onmousemove";}s:29:"dojo.dnd.Selector.onOverEvent";a:4:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:86:" this.onmousemoveEvent = dojo.connect(this.node, "onmousemove", this, "onMouseMove");";s:7:"summary";s:62:"this function is called once, when mouse is over our container";}s:28:"dojo.dnd.Selector.onOutEvent";a:4:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:73:" dojo.disconnect(this.onmousemoveEvent); delete this.onmousemoveEvent;";s:7:"summary";s:64:"this function is called once, when mouse is out of our container";}s:34:"dojo.dnd.Selector._removeSelection";a:6:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:219:" 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:7:"returns";s:4:"self";s:7:"private";b:1;}s:31:"dojo.dnd.Selector._removeAnchor";a:6:{s:9:"prototype";s:17:"dojo.dnd.Selector";s:4:"type";s:8:"Function";s:6:"source";s:117:" if(this.anchor){ this._removeItemClass(this.anchor, "Anchor"); this.anchor = null; } return this; // self";s:7:"returns";s:4:"self";s:7:"private";b:1;s:7:"summary";s:0:"";}s:24:"dojo.dnd.Selector.anchor";a:2:{s:8:"instance";s:17:"dojo.dnd.Selector";s:7:"summary";s:0:"";}s:27:"dojo.dnd.Selector.selection";a:2:{s:8:"instance";s:17:"dojo.dnd.Selector";s:7:"summary";s:0:"";}s:36:"dojo.dnd.Selector._normalizedCreator";a:3:{s:8:"instance";s:17:"dojo.dnd.Selector";s:7:"private";b:1;s:7:"summary";s:0:"";}s:48:"dojo.dnd.Selector.insertNodes._normalizedCreator";a:7:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:4:"hint";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:499:" var t = oldCreator.call(this, item, hint); if(addSelected){ if(!this.anchor){ this.anchor = t.node; this._removeItemClass(t.node, "Selected"); this._addItemClass(this.anchor, "Anchor"); }else if(this.anchor != t.node){ this._removeItemClass(t.node, "Anchor"); this._addItemClass(t.node, "Selected"); } this.selection[t.node.id] = 1; }else{ this._removeItemClass(t.node, "Selected"); this._removeItemClass(t.node, "Anchor"); } return t;";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:10:"oldCreator";}}s:8:"instance";s:29:"dojo.dnd.Selector.insertNodes";s:7:"private";b:1;s:7:"summary";s:0:"";}s:36:"dojo.dnd.Selector.insertNodes.anchor";a:3:{s:8:"instance";s:29:"dojo.dnd.Selector.insertNodes";s:4:"type";s:4:"Node";s:7:"summary";s:50:"the anchor node to be used as a point of insertion";}s:33:"dojo.dnd.Selector.simpleSelection";a:2:{s:8:"instance";s:17:"dojo.dnd.Selector";s:7:"summary";s:0:"";}s:34:"dojo.dnd.Selector.onmousemoveEvent";a:2:{s:8:"instance";s:17:"dojo.dnd.Selector";s:7:"summary";s:0:"";}s:26:"dojo.dnd.Selector.autoSync";a:3:{s:8:"instance";s:17:"dojo.dnd.Selector";s:4:"type";s:7:"Boolean";s:7:"summary";s:72:"autosynchronizes the source with its list of DnD nodes, false by default";}s:8:"dojo.dnd";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:4:"dojo";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}