]> git.wh0rd.org - tt-rss.git/blob - lib/dojo/dnd/common.js.uncompressed.js
upgrade dojo to 1.8.3 (refs #570)
[tt-rss.git] / lib / dojo / dnd / common.js.uncompressed.js
1 define("dojo/dnd/common", ["../_base/connect", "../_base/kernel", "../_base/lang", "../dom"],
2 function(connect, kernel, lang, dom){
3
4 // module:
5 // dojo/dnd/common
6
7 var exports = lang.getObject("dojo.dnd", true);
8 /*=====
9 // TODO: for 2.0, replace line above with this code.
10 var exports = {
11 // summary:
12 // TODOC
13 };
14 =====*/
15
16 exports.getCopyKeyState = connect.isCopyKey;
17
18 exports._uniqueId = 0;
19 exports.getUniqueId = function(){
20 // summary:
21 // returns a unique string for use with any DOM element
22 var id;
23 do{
24 id = kernel._scopeName + "Unique" + (++exports._uniqueId);
25 }while(dom.byId(id));
26 return id;
27 };
28
29 exports._empty = {};
30
31 exports.isFormElement = function(/*Event*/ e){
32 // summary:
33 // returns true if user clicked on a form element
34 var t = e.target;
35 if(t.nodeType == 3 /*TEXT_NODE*/){
36 t = t.parentNode;
37 }
38 return " button textarea input select option ".indexOf(" " + t.tagName.toLowerCase() + " ") >= 0; // Boolean
39 };
40
41 return exports;
42 });