aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-10-12 20:32:30 +0000
committerrvelices <rv-github@modusoptimus.com>2012-10-12 20:32:30 +0000
commit97294dac5ac27b43cb6a116d2852578376efa58d (patch)
treea983e1fd5930a65d2c750278c84f768b59cc70c5 /themes/default/js/ui/jquery.ui.mouse.js
parent267c548896d1e16ace40b6c1cb4df5913ac0bfa4 (diff)
feature 2771: upgrade jquery from 1.7.2 to 1.8.2 and jquery.ui from 1.8.16 to 1.9.0
Attention plugins: jquery ui effect script ids change when using combine_script because file names changed ... git-svn-id: http://piwigo.org/svn/trunk@18630 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/js/ui/jquery.ui.mouse.js')
-rw-r--r--themes/default/js/ui/jquery.ui.mouse.js43
1 files changed, 25 insertions, 18 deletions
diff --git a/themes/default/js/ui/jquery.ui.mouse.js b/themes/default/js/ui/jquery.ui.mouse.js
index 62fcd2b20..e1b9d5fa3 100644
--- a/themes/default/js/ui/jquery.ui.mouse.js
+++ b/themes/default/js/ui/jquery.ui.mouse.js
@@ -1,11 +1,12 @@
/*!
- * jQuery UI Mouse 1.8.16
+ * jQuery UI Mouse 1.9.0
+ * http://jqueryui.com
*
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
+ * Copyright 2012 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
@@ -18,21 +19,22 @@ $( document ).mouseup( function( e ) {
});
$.widget("ui.mouse", {
+ version: "1.9.0",
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);
+ return that._mouseDown(event);
})
.bind('click.'+this.widgetName, function(event) {
- if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, self.widgetName + '.preventClickEvent');
+ if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, that.widgetName + '.preventClickEvent');
event.stopImmediatePropagation();
return false;
}
@@ -45,22 +47,27 @@ $.widget("ui.mouse", {
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind('.'+this.widgetName);
+ if ( this._mouseMoveDelegate ) {
+ $(document)
+ .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;
}
@@ -68,7 +75,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,10 +94,10 @@ $.widget("ui.mouse", {
// 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)
@@ -130,8 +137,8 @@ $.widget("ui.mouse", {
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);