tt-rss/lib/dojo/dnd/common.js.uncompressed.js

36 lines
787 B
JavaScript
Raw Normal View History

2012-08-14 16:59:10 +02:00
define("dojo/dnd/common", ["../main"], function(dojo) {
// module:
// dojo/dnd/common
// summary:
// TODOC
dojo.getObject("dnd", true, dojo);
dojo.dnd.getCopyKeyState = dojo.isCopyKey;
dojo.dnd._uniqueId = 0;
dojo.dnd.getUniqueId = function(){
// summary:
// returns a unique string for use with any DOM element
var id;
do{
id = dojo._scopeName + "Unique" + (++dojo.dnd._uniqueId);
}while(dojo.byId(id));
return id;
};
dojo.dnd._empty = {};
dojo.dnd.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 dojo.dnd;
});