|
1936 | 1936 | }());
|
1937 | 1937 |
|
1938 | 1938 | /* ===================================================
|
1939 |
| - * jquery-sortable.js v0.9.13 |
| 1939 | + * jquery-sortable.js v0.9.12 |
1940 | 1940 | * http://johnny.github.com/jquery-sortable/
|
1941 | 1941 | * ===================================================
|
1942 | 1942 | * Copyright (c) 2012 Jonas von Andrian
|
|
1964 | 1964 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1965 | 1965 | * ========================================================== */
|
1966 | 1966 |
|
1967 |
| - |
1968 | 1967 | !function ( $, window, pluginName, undefined){
|
1969 |
| - var containerDefaults = { |
| 1968 | + var eventNames, |
| 1969 | + containerDefaults = { |
1970 | 1970 | // If true, items can be dragged from this container
|
1971 | 1971 | drag: true,
|
1972 | 1972 | // If true, items can be droped onto this container
|
|
2023 | 2023 | // The Placeholder has not been moved yet.
|
2024 | 2024 | onDrag: function ($item, position, _super, event) {
|
2025 | 2025 | $item.css(position)
|
| 2026 | + event.preventDefault() |
2026 | 2027 | },
|
2027 | 2028 | // Called after the drag has been started,
|
2028 |
| - // that is the mouse button is being held down and |
| 2029 | + // that is the mouse button is beeing held down and |
2029 | 2030 | // the mouse is moving.
|
2030 | 2031 | // The container is the closest initialized container.
|
2031 | 2032 | // Therefore it might not be the container, that actually contains the item.
|
2032 | 2033 | onDragStart: function ($item, container, _super, event) {
|
2033 | 2034 | $item.css({
|
2034 |
| - height: $item.outerHeight(), |
2035 |
| - width: $item.outerWidth() |
| 2035 | + height: $item.height(), |
| 2036 | + width: $item.width() |
2036 | 2037 | })
|
2037 | 2038 | $item.addClass(container.group.options.draggedClass)
|
2038 | 2039 | $("body").addClass(container.group.options.bodyClass)
|
2039 | 2040 | },
|
2040 |
| - // Called when the mouse button is being released |
| 2041 | + // Called when the mouse button is beeing released |
2041 | 2042 | onDrop: function ($item, container, _super, event) {
|
2042 | 2043 | $item.removeClass(container.group.options.draggedClass).removeAttr("style")
|
2043 | 2044 | $("body").removeClass(container.group.options.bodyClass)
|
|
2046 | 2047 | // Ignore if element clicked is input, select or textarea
|
2047 | 2048 | onMousedown: function ($item, _super, event) {
|
2048 | 2049 | if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) {
|
2049 |
| - event.preventDefault() |
| 2050 | + if (event.type.match(/^mouse/)) event.preventDefault() |
2050 | 2051 | return true
|
2051 | 2052 | }
|
2052 | 2053 | },
|
|
2191 | 2192 | this.item = closestItem;
|
2192 | 2193 | this.itemContainer = itemContainer;
|
2193 | 2194 | if (this.item.is(this.options.exclude) || !this.options.onMousedown(this.item, groupDefaults.onMousedown, e)) {
|
2194 |
| - return; |
| 2195 | + return; |
2195 | 2196 | }
|
2196 | 2197 | this.setPointer(e);
|
2197 | 2198 | this.toggleListeners('on');
|
|
2338 | 2339 | ) >= this.options.distance)
|
2339 | 2340 | },
|
2340 | 2341 | getPointer: function(e) {
|
2341 |
| - var o = e.originalEvent || e.originalEvent.touches && e.originalEvent.touches[0] |
| 2342 | + var o = e.originalEvent, |
| 2343 | + t = (e.originalEvent.touches && e.originalEvent.touches[0]) || {}; |
2342 | 2344 | return {
|
2343 |
| - left: e.pageX || o.pageX, |
2344 |
| - top: e.pageY || o.pageY |
| 2345 | + left: e.pageX || o.pageX || t.pageX, |
| 2346 | + top: e.pageY || o.pageY || t.pageY |
2345 | 2347 | }
|
2346 | 2348 | },
|
2347 | 2349 | setupDelayTimer: function () {
|
|
0 commit comments