1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 21:55:56 +00:00

upgrade Dojo to 1.6.1

This commit is contained in:
Andrew Dolgov
2011-11-08 20:40:44 +04:00
parent 870a70e109
commit 81bea17aef
680 changed files with 51915 additions and 74107 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
@@ -8,9 +8,9 @@
if(!dojo._hasResource["dojo.dnd.Moveable"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.dnd.Moveable"] = true;
dojo.provide("dojo.dnd.Moveable");
dojo.require("dojo.dnd.Mover");
/*=====
dojo.declare("dojo.dnd.__MoveableArgs", [], {
// handle: Node||String
@@ -54,6 +54,7 @@ dojo.declare("dojo.dnd.Moveable", null, {
this.mover = params.mover ? params.mover : dojo.dnd.Mover;
this.events = [
dojo.connect(this.handle, "onmousedown", this, "onMouseDown"),
dojo.connect(this.handle, "ontouchstart", this, "onMouseDown"),
// cancel text selection and text dragging
dojo.connect(this.handle, "ondragstart", this, "onSelectStart"),
dojo.connect(this.handle, "onselectstart", this, "onSelectStart")
@@ -76,17 +77,20 @@ dojo.declare("dojo.dnd.Moveable", null, {
// mouse event processors
onMouseDown: function(e){
// summary:
// event processor for onmousedown, creates a Mover for the node
// event processor for onmousedown/ontouchstart, creates a Mover for the node
// e: Event
// mouse event
// mouse/touch event
if(this.skip && dojo.dnd.isFormElement(e)){ return; }
if(this.delay){
this.events.push(
dojo.connect(this.handle, "onmousemove", this, "onMouseMove"),
dojo.connect(this.handle, "onmouseup", this, "onMouseUp")
dojo.connect(this.handle, "ontouchmove", this, "onMouseMove"),
dojo.connect(this.handle, "onmouseup", this, "onMouseUp"),
dojo.connect(this.handle, "ontouchend", this, "onMouseUp")
);
this._lastX = e.pageX;
this._lastY = e.pageY;
var pos = e.touches ? e.touches[0] : e;
this._lastX = pos.pageX;
this._lastY = pos.pageY;
}else{
this.onDragDetected(e);
}
@@ -94,10 +98,11 @@ dojo.declare("dojo.dnd.Moveable", null, {
},
onMouseMove: function(e){
// summary:
// event processor for onmousemove, used only for delayed drags
// event processor for onmousemove/ontouchmove, used only for delayed drags
// e: Event
// mouse event
if(Math.abs(e.pageX - this._lastX) > this.delay || Math.abs(e.pageY - this._lastY) > this.delay){
// mouse/touch event
var pos = e.touches ? e.touches[0] : e;
if(Math.abs(pos.pageX - this._lastX) > this.delay || Math.abs(pos.pageY - this._lastY) > this.delay){
this.onMouseUp(e);
this.onDragDetected(e);
}
@@ -134,8 +139,8 @@ dojo.declare("dojo.dnd.Moveable", null, {
// summary:
// called before every move operation
dojo.publish("/dnd/move/start", [mover]);
dojo.addClass(dojo.body(), "dojoMove");
dojo.addClass(this.node, "dojoMoveItem");
dojo.addClass(dojo.body(), "dojoMove");
dojo.addClass(this.node, "dojoMoveItem");
},
onMoveStop: function(/* dojo.dnd.Mover */ mover){
// summary: