summaryrefslogtreecommitdiff
path: root/xstatic/pkg/jquery_ui/data/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
Diffstat (limited to 'xstatic/pkg/jquery_ui/data/ui/jquery.ui.mouse.js')
-rw-r--r--xstatic/pkg/jquery_ui/data/ui/jquery.ui.mouse.js42
1 files changed, 22 insertions, 20 deletions
diff --git a/xstatic/pkg/jquery_ui/data/ui/jquery.ui.mouse.js b/xstatic/pkg/jquery_ui/data/ui/jquery.ui.mouse.js
index 52a1786..250365f 100644
--- a/xstatic/pkg/jquery_ui/data/ui/jquery.ui.mouse.js
+++ b/xstatic/pkg/jquery_ui/data/ui/jquery.ui.mouse.js
@@ -1,11 +1,12 @@
/*!
- * jQuery UI Mouse 1.8.24
+ * jQuery UI Mouse 1.9.2
+ * http://jqueryui.com
*
- * Copyright 2012, 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.2",
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;
}
@@ -54,18 +56,18 @@ $.widget("ui.mouse", {
_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;
}
@@ -73,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);
}
@@ -92,24 +94,24 @@ $.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)
.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 >= 9) && !event.button) {
return this._mouseUp(event);
}
@@ -135,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);