Skip to content

TagSpaces is an offline, open source, document manager with tagging support

updating jquery ui to 1.10.4

Ilian90e7adab72c2
diff --git a/data/libs/jqueryui/jquery.ui.core.js b/data/libs/jqueryui/jquery.ui.core.js
index 91ca5ff50..a32905abd 100644
--- a/data/libs/jqueryui/jquery.ui.core.js
+++ b/data/libs/jqueryui/jquery.ui.core.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Core 1.10.3
+ * jQuery UI Core @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -17,7 +17,7 @@ var uuid = 0,
$.ui = $.ui || {};
$.extend( $.ui, {
- version: "1.10.3",
+ version: "@VERSION",
keyCode: {
BACKSPACE: 8,
diff --git a/data/libs/jqueryui/jquery.ui.datepicker.js b/data/libs/jqueryui/jquery.ui.datepicker.js
index 8afddbdcd..cc9a3af27 100644
--- a/data/libs/jqueryui/jquery.ui.datepicker.js
+++ b/data/libs/jqueryui/jquery.ui.datepicker.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Datepicker 1.10.3
+ * jQuery UI Datepicker @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -13,7 +13,7 @@
*/
(function( $, undefined ) {
-$.extend($.ui, { datepicker: { version: "1.10.3" } });
+$.extend($.ui, { datepicker: { version: "@VERSION" } });
var PROP_NAME = "datepicker",
instActive;
@@ -2033,6 +2033,6 @@ $.fn.datepicker = function(options){
$.datepicker = new Datepicker(); // singleton instance
$.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime();
-$.datepicker.version = "1.10.3";
+$.datepicker.version = "@VERSION";
})(jQuery);
diff --git a/data/libs/jqueryui/jquery.ui.draggable.js b/data/libs/jqueryui/jquery.ui.draggable.js
index a52519b67..f3f9dfdb5 100644
--- a/data/libs/jqueryui/jquery.ui.draggable.js
+++ b/data/libs/jqueryui/jquery.ui.draggable.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Draggable 1.10.3
+ * jQuery UI Draggable @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -16,7 +16,7 @@
(function( $, undefined ) {
$.widget("ui.draggable", $.ui.mouse, {
- version: "1.10.3",
+ version: "@VERSION",
widgetEventPrefix: "drag",
options: {
addClasses: true,
diff --git a/data/libs/jqueryui/jquery.ui.droppable.js b/data/libs/jqueryui/jquery.ui.droppable.js
index 24337d0ef..7e17a8a77 100644
--- a/data/libs/jqueryui/jquery.ui.droppable.js
+++ b/data/libs/jqueryui/jquery.ui.droppable.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Droppable 1.10.3
+ * jQuery UI Droppable @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -21,7 +21,7 @@ function isOverAxis( x, reference, size ) {
}
$.widget("ui.droppable", {
- version: "1.10.3",
+ version: "@VERSION",
widgetEventPrefix: "drop",
options: {
accept: "*",
@@ -41,7 +41,8 @@ $.widget("ui.droppable", {
},
_create: function() {
- var o = this.options,
+ var proportions,
+ o = this.options,
accept = o.accept;
this.isover = false;
@@ -51,8 +52,20 @@ $.widget("ui.droppable", {
return d.is(accept);
};
- //Store the droppable's proportions
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+ this.proportions = function( /* valueToWrite */ ) {
+ if ( arguments.length ) {
+ // Store the droppable's proportions
+ proportions = arguments[ 0 ];
+ } else {
+ // Retrieve or derive the droppable's proportions
+ return proportions ?
+ proportions :
+ proportions = {
+ width: this.element[ 0 ].offsetWidth,
+ height: this.element[ 0 ].offsetHeight
+ };
+ }
+ };
// Add the reference and positions to the manager
$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
@@ -198,10 +211,14 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
}
var draggableLeft, draggableTop,
- x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
- l = droppable.offset.left, r = l + droppable.proportions.width,
- t = droppable.offset.top, b = t + droppable.proportions.height;
+ x1 = (draggable.positionAbs || draggable.position.absolute).left,
+ y1 = (draggable.positionAbs || draggable.position.absolute).top,
+ x2 = x1 + draggable.helperProportions.width,
+ y2 = y1 + draggable.helperProportions.height,
+ l = droppable.offset.left,
+ t = droppable.offset.top,
+ r = l + droppable.proportions().width,
+ b = t + droppable.proportions().height;
switch (toleranceMode) {
case "fit":
@@ -214,7 +231,7 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
case "pointer":
draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
- return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
+ return isOverAxis( draggableTop, t, droppable.proportions().height ) && isOverAxis( draggableLeft, l, droppable.proportions().width );
case "touch":
return (
(y1 >= t && y1 <= b) || // Top edge touching
@@ -254,7 +271,7 @@ $.ui.ddmanager = {
// Filter out elements in the current dragged item
for (j=0; j < list.length; j++) {
if(list[j] === m[i].element[0]) {
- m[i].proportions.height = 0;
+ m[i].proportions().height = 0;
continue droppablesLoop;
}
}
@@ -269,8 +286,8 @@ $.ui.ddmanager = {
m[i]._activate.call(m[i], event);
}
- m[i].offset = m[i].element.offset();
- m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+ m[ i ].offset = m[ i ].element.offset();
+ m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight });
}
diff --git a/data/libs/jqueryui/jquery.ui.mouse.js b/data/libs/jqueryui/jquery.ui.mouse.js
index 62022cedf..44bf3a3c8 100644
--- a/data/libs/jqueryui/jquery.ui.mouse.js
+++ b/data/libs/jqueryui/jquery.ui.mouse.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Mouse 1.10.3
+ * jQuery UI Mouse @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -19,7 +19,7 @@ $( document ).mouseup( function() {
});
$.widget("ui.mouse", {
- version: "1.10.3",
+ version: "@VERSION",
options: {
cancel: "input,textarea,button,select,option",
distance: 1,
diff --git a/data/libs/jqueryui/jquery.ui.position.js b/data/libs/jqueryui/jquery.ui.position.js
index 3fcdf2536..ec6ed0d51 100644
--- a/data/libs/jqueryui/jquery.ui.position.js
+++ b/data/libs/jqueryui/jquery.ui.position.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Position 1.10.3
+ * jQuery UI Position @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -70,7 +70,7 @@ $.position = {
return cachedScrollbarWidth;
}
var w1, w2,
- div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
+ div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
innerDiv = div.children()[0];
$( "body" ).append( div );
@@ -88,8 +88,10 @@ $.position = {
return (cachedScrollbarWidth = w1 - w2);
},
getScrollInfo: function( within ) {
- var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
- overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
+ var overflowX = within.isWindow || within.isDocument ? "" :
+ within.element.css( "overflow-x" ),
+ overflowY = within.isWindow || within.isDocument ? "" :
+ within.element.css( "overflow-y" ),
hasOverflowX = overflowX === "scroll" ||
( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
hasOverflowY = overflowY === "scroll" ||
@@ -101,10 +103,12 @@ $.position = {
},
getWithinInfo: function( element ) {
var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] );
+ isWindow = $.isWindow( withinElement[0] ),
+ isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
return {
element: withinElement,
isWindow: isWindow,
+ isDocument: isDocument,
offset: withinElement.offset() || { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
@@ -436,7 +440,7 @@ $.ui.position = {
}
}
else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
+ newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
position.top += myOffset + atOffset + offset;
}
diff --git a/data/libs/jqueryui/jquery.ui.resizable.js b/data/libs/jqueryui/jquery.ui.resizable.js
index f0077325d..e88ad127b 100644
--- a/data/libs/jqueryui/jquery.ui.resizable.js
+++ b/data/libs/jqueryui/jquery.ui.resizable.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Resizable 1.10.3
+ * jQuery UI Resizable @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -24,7 +24,7 @@ function isNumber(value) {
}
$.widget("ui.resizable", $.ui.mouse, {
- version: "1.10.3",
+ version: "@VERSION",
widgetEventPrefix: "resize",
options: {
alsoResize: false,
@@ -293,7 +293,7 @@ $.widget("ui.resizable", $.ui.mouse, {
//Store needed variables
this.offset = this.helper.offset();
this.position = { left: curleft, top: curtop };
- this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() };
this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
this.originalPosition = { left: curleft, top: curtop };
this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
@@ -774,8 +774,8 @@ $.ui.plugin.add("resizable", "containment", {
isParent = that.containerElement.get(0) === that.element.parent().get(0);
isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
- if(isParent && isOffsetRelative) {
- woset -= that.parentData.left;
+ if ( isParent && isOffsetRelative ) {
+ woset -= Math.abs( that.parentData.left );
}
if (woset + that.size.width >= that.parentData.width) {
@@ -956,10 +956,20 @@ $.ui.plugin.add("resizable", "grid", {
that.size.height = newHeight;
that.position.left = op.left - ox;
} else {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- that.position.left = op.left - ox;
+ if ( newHeight - gridY > 0 ) {
+ that.size.height = newHeight;
+ that.position.top = op.top - oy;
+ } else {
+ that.size.height = gridY;
+ that.position.top = op.top + os.height - gridY;
+ }
+ if ( newWidth - gridX > 0 ) {
+ that.size.width = newWidth;
+ that.position.left = op.left - ox;
+ } else {
+ that.size.width = gridX;
+ that.position.left = op.left + os.width - gridX;
+ }
}
}
diff --git a/data/libs/jqueryui/jquery.ui.selectable.js b/data/libs/jqueryui/jquery.ui.selectable.js
index e99ecb695..b4c320f52 100644
--- a/data/libs/jqueryui/jquery.ui.selectable.js
+++ b/data/libs/jqueryui/jquery.ui.selectable.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Selectable 1.10.3
+ * jQuery UI Selectable @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -16,7 +16,7 @@
(function( $, undefined ) {
$.widget("ui.selectable", $.ui.mouse, {
- version: "1.10.3",
+ version: "@VERSION",
options: {
appendTo: "body",
autoRefresh: true,
diff --git a/data/libs/jqueryui/jquery.ui.sortable.js b/data/libs/jqueryui/jquery.ui.sortable.js
index c9f2c9021..d8c0a65c3 100644
--- a/data/libs/jqueryui/jquery.ui.sortable.js
+++ b/data/libs/jqueryui/jquery.ui.sortable.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Sortable 1.10.3
+ * jQuery UI Sortable @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -15,8 +15,6 @@
*/
(function( $, undefined ) {
-/*jshint loopfunc: true */
-
function isOverAxis( x, reference, size ) {
return ( x > reference ) && ( x < ( reference + size ) );
}
@@ -26,7 +24,7 @@ function isFloating(item) {
}
$.widget("ui.sortable", $.ui.mouse, {
- version: "1.10.3",
+ version: "@VERSION",
widgetEventPrefix: "sort",
ready: false,
options: {
@@ -367,12 +365,12 @@ $.widget("ui.sortable", $.ui.mouse, {
}
// Only put the placeholder inside the current Container, skip all
- // items form other containers. This works because when moving
+ // items from other containers. This works because when moving
// an item from one container to another the
// currentContainer is switched before the placeholder is moved.
//
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
- // beetween the outer and inner container.
+ // Without this, moving items in "sub-sortables" can cause
+ // the placeholder to jitter beetween the outer and inner container.
if (item.instance !== this.currentContainer) {
continue;
}
@@ -640,10 +638,11 @@ $.widget("ui.sortable", $.ui.mouse, {
queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
+ function addItems() {
+ items.push( this );
+ }
for (i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- items.push(this);
- });
+ queries[i][0].each( addItems );
}
return $(items);
@@ -1201,12 +1200,17 @@ $.widget("ui.sortable", $.ui.mouse, {
//Post events to containers
+ function delayEvent( type, instance, container ) {
+ return function( event ) {
+ container._trigger( type, event, instance._uiHash( instance ) );
+ };
+ }
for (i = this.containers.length - 1; i >= 0; i--){
- if(!noPropagation) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ if (!noPropagation) {
+ delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
}
if(this.containers[i].containerCache.over) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
this.containers[i].containerCache.over = 0;
}
}
diff --git a/data/libs/jqueryui/jquery.ui.widget.js b/data/libs/jqueryui/jquery.ui.widget.js
index 916a6ad73..9374defbc 100644
--- a/data/libs/jqueryui/jquery.ui.widget.js
+++ b/data/libs/jqueryui/jquery.ui.widget.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Widget 1.10.3
+ * jQuery UI Widget @VERSION
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -106,7 +106,7 @@ $.widget = function( name, base, prototype ) {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
+ widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
@@ -315,12 +315,12 @@ $.Widget.prototype = {
curOption = curOption[ parts[ i ] ];
}
key = parts.pop();
- if ( value === undefined ) {
+ if ( arguments.length === 1 ) {
return curOption[ key ] === undefined ? null : curOption[ key ];
}
curOption[ key ] = value;
} else {
- if ( value === undefined ) {
+ if ( arguments.length === 1 ) {
return this.options[ key ] === undefined ? null : this.options[ key ];
}
options[ key ] = value;