summaryrefslogtreecommitdiff
path: root/lib/dojo/dnd/common.js.uncompressed.js
diff options
context:
space:
mode:
authorRichard Beales <[email protected]>2013-03-18 07:32:01 +0000
committerRichard Beales <[email protected]>2013-03-18 07:32:01 +0000
commit7c97d17aaf373339a8bcd917ad59ca6018148f0d (patch)
tree5a3c04f0f9529be392c1263d3feb75806eb43797 /lib/dojo/dnd/common.js.uncompressed.js
parent70db7424e7068701e60cc5bcdfe8f858be508179 (diff)
parentc670a80ddd9b03bd4ea6d940a9ed682fd26248d7 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lib/dojo/dnd/common.js.uncompressed.js')
-rw-r--r--lib/dojo/dnd/common.js.uncompressed.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/dojo/dnd/common.js.uncompressed.js b/lib/dojo/dnd/common.js.uncompressed.js
new file mode 100644
index 000000000..d59e2ea57
--- /dev/null
+++ b/lib/dojo/dnd/common.js.uncompressed.js
@@ -0,0 +1,42 @@
+define("dojo/dnd/common", ["../_base/connect", "../_base/kernel", "../_base/lang", "../dom"],
+ function(connect, kernel, lang, dom){
+
+// module:
+// dojo/dnd/common
+
+var exports = lang.getObject("dojo.dnd", true);
+/*=====
+// TODO: for 2.0, replace line above with this code.
+var exports = {
+ // summary:
+ // TODOC
+};
+=====*/
+
+exports.getCopyKeyState = connect.isCopyKey;
+
+exports._uniqueId = 0;
+exports.getUniqueId = function(){
+ // summary:
+ // returns a unique string for use with any DOM element
+ var id;
+ do{
+ id = kernel._scopeName + "Unique" + (++exports._uniqueId);
+ }while(dom.byId(id));
+ return id;
+};
+
+exports._empty = {};
+
+exports.isFormElement = function(/*Event*/ e){
+ // summary:
+ // returns true if user clicked on a form element
+ var t = e.target;
+ if(t.nodeType == 3 /*TEXT_NODE*/){
+ t = t.parentNode;
+ }
+ return " button textarea input select option ".indexOf(" " + t.tagName.toLowerCase() + " ") >= 0; // Boolean
+};
+
+return exports;
+});