1 if(!dojo._hasResource["dojo.dnd.common"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
2 dojo._hasResource["dojo.dnd.common"] = true;
3 dojo.provide("dojo.dnd.common");
5 dojo.dnd._copyKey = navigator.appVersion.indexOf("Macintosh") < 0 ? "ctrlKey" : "metaKey";
7 dojo.dnd.getCopyKeyState = function(e) {
8 // summary: abstracts away the difference between selection on Mac and PC,
9 // and returns the state of the "copy" key to be pressed.
10 // e: Event: mouse event
11 return e[dojo.dnd._copyKey]; // Boolean
14 dojo.dnd._uniqueId = 0;
15 dojo.dnd.getUniqueId = function(){
16 // summary: returns a unique string for use with any DOM element
19 id = dojo._scopeName + "Unique" + (++dojo.dnd._uniqueId);
20 }while(dojo.byId(id));
26 dojo.dnd.isFormElement = function(/*Event*/ e){
27 // summary: returns true, if user clicked on a form element
29 if(t.nodeType == 3 /*TEXT_NODE*/){
32 return " button textarea input select option ".indexOf(" " + t.tagName.toLowerCase() + " ") >= 0; // Boolean