summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/libs/jqueryui/mouse.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-02-26 23:44:34 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-02-26 23:44:34 +0100
commit52ad2e19bf824cbaa6e6f96d6c8e71561e865819 (patch)
tree2f2bf5dde7ef9bf5c987513be996f06c8421b021 /module/web/static/js/libs/jqueryui/mouse.js
parentimproved file view, added default plugin icon (diff)
downloadpyload-52ad2e19bf824cbaa6e6f96d6c8e71561e865819.tar.xz
updated js libraries, cleaned jquery-ui
Diffstat (limited to 'module/web/static/js/libs/jqueryui/mouse.js')
-rw-r--r--module/web/static/js/libs/jqueryui/mouse.js76
1 files changed, 39 insertions, 37 deletions
diff --git a/module/web/static/js/libs/jqueryui/mouse.js b/module/web/static/js/libs/jqueryui/mouse.js
index e2f1695bc..4f9fb7178 100644
--- a/module/web/static/js/libs/jqueryui/mouse.js
+++ b/module/web/static/js/libs/jqueryui/mouse.js
@@ -1,12 +1,13 @@
define(['jquery','./widget'], function (jQuery) {
/*!
- * jQuery UI Mouse 1.8.23
+ * jQuery UI Mouse 1.10.1
+ * http://jqueryui.com
*
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
+ * Copyright 2013 jQuery Foundation and other contributors
+ * Released under the MIT license.
* http://jquery.org/license
*
- * http://docs.jquery.com/UI/Mouse
+ * http://api.jqueryui.com/mouse/
*
* Depends:
* jquery.ui.widget.js
@@ -14,26 +15,27 @@ define(['jquery','./widget'], function (jQuery) {
(function( $, undefined ) {
var mouseHandled = false;
-$( document ).mouseup( function( e ) {
+$( document ).mouseup( function() {
mouseHandled = false;
});
$.widget("ui.mouse", {
+ version: "1.10.1",
options: {
- cancel: ':input,option',
+ cancel: "input,textarea,button,select,option",
distance: 1,
delay: 0
},
_mouseInit: function() {
- var self = this;
+ var that = this;
this.element
- .bind('mousedown.'+this.widgetName, function(event) {
- return self._mouseDown(event);
+ .bind("mousedown."+this.widgetName, function(event) {
+ return that._mouseDown(event);
})
- .bind('click.'+this.widgetName, function(event) {
- if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, self.widgetName + '.preventClickEvent');
+ .bind("click."+this.widgetName, function(event) {
+ if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
+ $.removeData(event.target, that.widgetName + ".preventClickEvent");
event.stopImmediatePropagation();
return false;
}
@@ -45,28 +47,28 @@ $.widget("ui.mouse", {
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
_mouseDestroy: function() {
- this.element.unbind('.'+this.widgetName);
+ this.element.unbind("."+this.widgetName);
if ( this._mouseMoveDelegate ) {
$(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+ .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+ .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
}
},
_mouseDown: function(event) {
// don't let more than one widget handle mouseStart
- if( mouseHandled ) { return };
+ if( mouseHandled ) { return; }
// we may have missed mouseup (out of window)
(this._mouseStarted && this._mouseUp(event));
this._mouseDownEvent = event;
- var self = this,
- btnIsLeft = (event.which == 1),
+ var that = this,
+ btnIsLeft = (event.which === 1),
// event.target.nodeName works around a bug in IE 8 with
// disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+ elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
return true;
}
@@ -74,7 +76,7 @@ $.widget("ui.mouse", {
this.mouseDelayMet = !this.options.delay;
if (!this.mouseDelayMet) {
this._mouseDelayTimer = setTimeout(function() {
- self.mouseDelayMet = true;
+ that.mouseDelayMet = true;
}, this.options.delay);
}
@@ -87,30 +89,30 @@ $.widget("ui.mouse", {
}
// Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, this.widgetName + '.preventClickEvent');
+ if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
+ $.removeData(event.target, this.widgetName + ".preventClickEvent");
}
// these delegates are required to keep context
this._mouseMoveDelegate = function(event) {
- return self._mouseMove(event);
+ return that._mouseMove(event);
};
this._mouseUpDelegate = function(event) {
- return self._mouseUp(event);
+ return that._mouseUp(event);
};
$(document)
- .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+ .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+ .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
event.preventDefault();
-
+
mouseHandled = true;
return true;
},
_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
- if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
+ if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
return this._mouseUp(event);
}
@@ -130,14 +132,14 @@ $.widget("ui.mouse", {
_mouseUp: function(event) {
$(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+ .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+ .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
if (this._mouseStarted) {
this._mouseStarted = false;
- if (event.target == this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + '.preventClickEvent', true);
+ if (event.target === this._mouseDownEvent.target) {
+ $.data(event.target, this.widgetName + ".preventClickEvent", true);
}
this._mouseStop(event);
@@ -154,15 +156,15 @@ $.widget("ui.mouse", {
);
},
- _mouseDelayMet: function(event) {
+ _mouseDelayMet: function(/* event */) {
return this.mouseDelayMet;
},
// These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(event) {},
- _mouseDrag: function(event) {},
- _mouseStop: function(event) {},
- _mouseCapture: function(event) { return true; }
+ _mouseStart: function(/* event */) {},
+ _mouseDrag: function(/* event */) {},
+ _mouseStop: function(/* event */) {},
+ _mouseCapture: function(/* event */) { return true; }
});
})(jQuery);