]> source.dussan.org Git - jquery-ui.git/commitdiff
whitespace
authorRichard Worth <rdworth@gmail.com>
Thu, 22 Jan 2009 13:10:18 +0000 (13:10 +0000)
committerRichard Worth <rdworth@gmail.com>
Thu, 22 Jan 2009 13:10:18 +0000 (13:10 +0000)
ui/effects.core.js
ui/effects.pulsate.js
ui/ui.accordion.js
ui/ui.core.js
ui/ui.datepicker.js
ui/ui.draggable.js
ui/ui.resizable.js
ui/ui.slider.js
ui/ui.sortable.js
ui/ui.tabs.js

index 21be00a965187283df0ce6b5e9a2e26a99d8c614..33327c9a003bf1862d3d2af4130180437071e530 100644 (file)
@@ -13,26 +13,26 @@ $.effects = $.effects || {}; //Add the 'effects' scope
 
 $.extend($.effects, {
        version: "@VERSION",
-       
+
        // Saves a set of properties in a data storage
        save: function(element, set) {
                for(var i=0; i < set.length; i++) {
                        if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
                }
        },
-       
+
        // Restores a set of previously saved properties from a data storage
        restore: function(element, set) {
                for(var i=0; i < set.length; i++) {
                        if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
                }
        },
-       
+
        setMode: function(el, mode) {
                if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
                return mode;
        },
-       
+
        getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
                // this should be a little more flexible in the future to handle a string & hash
                var y, x;
@@ -50,7 +50,7 @@ $.extend($.effects, {
                };
                return {x: x, y: y};
        },
-       
+
        // Wraps the element around a wrapper that copies position properties
        createWrapper: function(element) {
 
@@ -134,7 +134,7 @@ $.extend($.effects, {
 
 //Extend the methods of jQuery
 $.fn.extend({
-       
+
        //Save old methods
        _show: $.fn.show,
        _hide: $.fn.hide,
@@ -142,12 +142,12 @@ $.fn.extend({
        _addClass: $.fn.addClass,
        _removeClass: $.fn.removeClass,
        _toggleClass: $.fn.toggleClass,
-       
+
        // New effect methods
        effect: function(fx, options, speed, callback) {
                return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null;
        },
-       
+
        show: function() {
                if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
                        return this._show.apply(this, arguments);
@@ -156,7 +156,7 @@ $.fn.extend({
                        return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
                }
        },
-       
+
        hide: function() {
                if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
                        return this._hide.apply(this, arguments);
@@ -165,7 +165,7 @@ $.fn.extend({
                        return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
                }
        },
-       
+
        toggle: function(){
                if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || (arguments[0].constructor == Function))
                        return this.__toggle.apply(this, arguments);
@@ -174,7 +174,7 @@ $.fn.extend({
                        return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
                }
        },
-       
+
        addClass: function(classNames, speed, easing, callback) {
                return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
        },
@@ -190,7 +190,7 @@ $.fn.extend({
        switchClass: function() {
                return this.morph.apply(this, arguments);
        },
-       
+
        // helper functions
        cssUnit: function(key) {
                var style = this.css(key), val = [];
index 3d842cae6e860cb7c302ee9f425a4b4091b6f799..a82bd7a99273d96dd418a9ec5321331a69fb23d2 100644 (file)
@@ -23,7 +23,7 @@ $.effects.pulsate = function(o) {
                var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
                var times = o.options.times || 5; // Default # of times
                var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
-               
+
                // Adjust
                if (mode == 'hide') times--;
                if (el.is(':hidden')) { // Show fadeIn
index d418cbed02d91ce4d0d44585964ff88cdde47ef2..95fd55f432bfd5c7fc94ce33b0efeacdb824cd30 100644 (file)
@@ -15,7 +15,7 @@
 $.widget("ui.accordion", {
 
        _init: function() {
-               
+
                var o = this.options, self = this;
                this.running = 0;
 
@@ -32,12 +32,12 @@ $.widget("ui.accordion", {
                }
 
                this.element.addClass("ui-accordion ui-widget ui-helper-reset");
-               
+
                this.groups = this.element.children().addClass("ui-accordion-group");
                this.headers = this.groups.find("> :first-child").addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all")
                        .bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); })
                        .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); });
-                       
+
                // wrap content elements in div against animation issues
                this.headers
                        .next()
@@ -48,7 +48,7 @@ $.widget("ui.accordion", {
 
                this.active = this._findActive(this.active || o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
                this.active.parent().addClass('ui-accordion-selected');
-               
+
                //Append icon elements
                $("<span/>").addClass("ui-icon " + o.icons.header).prependTo(this.headers);
                this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);
@@ -92,11 +92,11 @@ $.widget("ui.accordion", {
                if (o.event) {
                        this.element.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event); });
                }
-               
+
        },
 
        destroy: function() {
-               
+
                this.element
                        .removeClass("ui-accordion ui-widget ui-helper-reset")
                        .removeAttr("role")
@@ -108,19 +108,19 @@ $.widget("ui.accordion", {
                        .unbind(".accordion")
                        .removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top")
                        .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");
-               
+
                this.headers.find("a").removeAttr("tabindex");
                this.headers.children(".ui-icon").remove();
                this.headers.next().children().removeClass("ui-accordion-content").each(function() {
                        $(this).parent().replaceWith(this);
                });
-               
+
        },
 
        _keydown: function(event) {
-               
+
                var o = this.options, keyCode = $.ui.keyCode;
-               
+
                if (o.disabled || event.altKey || event.ctrlKey)
                        return;
 
@@ -154,36 +154,36 @@ $.widget("ui.accordion", {
        },
 
        resize: function() {
-               
+
                var o = this.options, maxHeight;
 
                if (o.fillSpace) {
-                       
+
                        maxHeight = this.element.parent().height();
                        this.headers.each(function() {
                                maxHeight -= $(this).outerHeight();
                        });
-                       
+
                        var maxPadding = 0;
                        this.headers.next().each(function() {
                                maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
                        }).height(maxHeight - maxPadding)
                        .css('overflow', 'auto');
-                       
+
                } else if ( o.autoHeight ) {
                        maxHeight = 0;
                        this.headers.next().each(function() {
                                maxHeight = Math.max(maxHeight, $(this).outerHeight());
                        }).height(maxHeight);
                }
-               
+
        },
 
        activate: function(index) {
                // call clickHandler with custom event
                this._clickHandler({ target: this._findActive(index)[0] });
        },
-       
+
        _findActive: function(selector) {
                return selector
                        ? typeof selector == "number"
@@ -193,12 +193,12 @@ $.widget("ui.accordion", {
                                ? $([])
                                : this.headers.filter(":eq(0)");
        },
-       
+
        _clickHandler: function(event) {
-               
+
                var o = this.options;
                if (o.disabled) return false;
-                       
+
                // called only when using activate(false) to close all parts programmatically
                if (!event.target && !o.alwaysOpen) {
                        this.active.parent().toggleClass('ui-accordion-selected');
@@ -216,16 +216,16 @@ $.widget("ui.accordion", {
                        this._toggle(toShow, toHide, data);
                        return false;
                }
-               
+
                // get the click target
                var clicked = $(event.target);
-               
+
                // due to the event delegation model, we have to check if one
                // of the parent elements is our actual header, and find that
                // otherwise stick with the initial target
                clicked = $( clicked.parents(o.header)[0] || clicked );
                var clickedIsActive = clicked[0] == this.active[0];
-               
+
                // if animations are still active, or the active header is the target, ignore click
                if (this.running || (o.alwaysOpen && clickedIsActive)) {
                        return false;
@@ -233,7 +233,7 @@ $.widget("ui.accordion", {
                if (!clicked.is(o.header)) {
                        return;
                }
-               
+
                // switch classes
                this.active.parent().toggleClass('ui-accordion-selected');
                this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
@@ -243,7 +243,7 @@ $.widget("ui.accordion", {
                        clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top")
                                .find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);
                }
-               
+
                // find elements to show and hide
                var toShow = clicked.next(),
                        toHide = this.active.next(),
@@ -255,22 +255,22 @@ $.widget("ui.accordion", {
                                oldContent: toHide
                        },
                        down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
-       
+
                this.active = clickedIsActive ? $([]) : clicked;
                this._toggle(toShow, toHide, data, clickedIsActive, down);
-       
+
                return false;
-               
+
        },
-       
+
        _toggle: function(toShow, toHide, data, clickedIsActive, down) {
 
                var o = this.options, self = this;
-               
+
                this.toShow = toShow;
                this.toHide = toHide;
                this.data = data;
-       
+
                var complete = function() { if(!self) return; return self._completed.apply(self, arguments); };
 
                // trigger changestart event
@@ -280,9 +280,9 @@ $.widget("ui.accordion", {
                this.running = toHide.size() === 0 ? toShow.size() : toHide.size();
 
                if (o.animated) {
-                       
+
                        var animOptions = {};
-       
+
                        if ( !o.alwaysOpen && clickedIsActive ) {
                                animOptions = {
                                        toShow: $([]),
@@ -300,25 +300,25 @@ $.widget("ui.accordion", {
                                        autoHeight: o.autoHeight || o.fillSpace
                                };
                        }
-       
+
                        if (!o.proxied) {
                                o.proxied = o.animated;
                        }
-       
+
                        if (!o.proxiedDuration) {
                                o.proxiedDuration = o.duration;
                        }
-       
+
                        o.animated = $.isFunction(o.proxied) ?
                                o.proxied(animOptions) : o.proxied;
-       
+
                        o.duration = $.isFunction(o.proxiedDuration) ?
                                o.proxiedDuration(animOptions) : o.proxiedDuration;
-       
+
                        var animations = $.ui.accordion.animations,
                                duration = o.duration,
                                easing = o.animated;
-       
+
                        if (!animations[easing]) {
                                animations[easing] = function(options) {
                                        this.slide(options, {
@@ -327,43 +327,43 @@ $.widget("ui.accordion", {
                                        });
                                };
                        }
-       
+
                        animations[easing](animOptions);
-       
+
                } else {
-                       
+
                        if (!o.alwaysOpen && clickedIsActive) {
                                toShow.toggle();
                        } else {
                                toHide.hide();
                                toShow.show();
                        }
-                       
+
                        complete(true);
-                       
+
                }
-               
+
                toHide.prev().attr('aria-expanded','false').attr("tabIndex", "-1");
                toShow.prev().attr('aria-expanded','true').attr("tabIndex", "0").focus();
 
        },
-       
+
        _completed: function(cancel) {
 
                var o = this.options;
-               
+
                this.running = cancel ? 0 : --this.running;
                if (this.running) return;
-               
+
                if (o.clearStyle) {
                        this.toShow.add(this.toHide).css({
                                height: "",
                                overflow: ""
                        });
                }
-               
+
                this._trigger('change', null, this.data);
-               
+
        }
 
 });
index ce93ee778f45b13f293b1c776b04607a7e6355e2..88ee6bc9ffe796428d16bdd94b4c1109655578af 100644 (file)
@@ -454,7 +454,7 @@ $.ui.mouse = {
                // however, in Safari, this causes select boxes not to be selectable
                // anymore, so this fix is needed
                ($.browser.safari || event.preventDefault());
-               
+
                return true;
        },
 
index 4ac3eee68c4833a647ab840f6df62aa8b3b6c412..831cabc9171b940125b18de3d4ab792150a0c5a6 100644 (file)
@@ -610,26 +610,26 @@ $.extend(Datepicker.prototype, {
                if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst)
                        $(inst.input[0]).focus();
        },
-       
+
        /* Check positioning to remain on screen. */
-       _checkOffset: function(inst, offset, isFixed) {         
+       _checkOffset: function(inst, offset, isFixed) {
                var dpWidth = inst.dpDiv.outerWidth();
                var dpHeight = inst.dpDiv.outerHeight();
                var inputWidth = inst.input ? inst.input.outerWidth() : 0;
                var inputHeight = inst.input ? inst.input.outerHeight() : 0;
                var viewWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
                var viewHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
-               
+
                offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
                offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
                offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
-               
+
                // now check if datepicker is showing outside window viewpoint - move to a better place if so.
                offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0;
                offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight*2 - viewHeight) : 0;
-                               
+
                return offset;
-       },      
+       },
 
        /* Find an object's position on the screen. */
        _findPos: function(obj) {
index e9b9142b632cb1eba6e2a7aa74d08858cd8bfd78..d64bf7e674e6c9a49888e2abefb04b858f194fed 100644 (file)
@@ -144,7 +144,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
                var dropped = false;
                if ($.ui.ddmanager && !this.options.dropBehaviour)
                        dropped = $.ui.ddmanager.drop(this, event);
-               
+
                //if a drop comes from outside (a sortable)
                if(this.dropped) {
                        dropped = this.dropped;
@@ -206,7 +206,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
                //Get the offsetParent and cache its position
                this.offsetParent = this.helper.offsetParent();
                var po = this.offsetParent.offset();
-               
+
                // This is a special case where we need to modify a offset calculated on start, since the following happened:
                // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
                // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
@@ -303,7 +303,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
                                - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod
                        )
                };
-               
+
        },
 
        _generatePosition: function(event) {
@@ -317,7 +317,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
                if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
                        this.offset.relative = this._getRelativeOffset();
                }
-               
+
                var pageX = event.pageX;
                var pageY = event.pageY;
 
@@ -325,7 +325,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
                 * - Position constraining -
                 * Constrain the position to a mix of grid, containment.
                 */
-                
+
                if(this.originalPosition) { //If we are not dragging yet, we won't check for options
 
                        if(this.containment) {
@@ -334,7 +334,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
                                if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
                                if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
                        }
-                       
+
                        if(o.grid) {
                                var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
                                pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
@@ -457,18 +457,18 @@ $.ui.plugin.add("draggable", "connectToSortable", {
 
                $.each(inst.sortables, function() {
                        if(this.instance.isOver) {
-                               
+
                                this.instance.isOver = 0;
-                               
+
                                inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
                                this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
-                               
+
                                //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
                                if(this.shouldRevert) this.instance.options.revert = true;
-                               
+
                                //Trigger the stop of the sortable
                                this.instance._mouseStop(event);
-                               
+
                                this.instance.options.helper = this.instance.options._helper;
 
                                //If the helper has been the original item, restore properties in the sortable
index 13bbff57c3f88222f78926c4300023a3a1556184..410d9f7ca0752e6e2841a651feca01d2ef187d9b 100644 (file)
@@ -520,7 +520,7 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
 
        _propagate: function(n, event) {
                $.ui.plugin.call(this, n, [event, this.ui()]);
-               
+
                (n != "resize" && this._trigger(n, event, this.ui()));
        },
 
index 24c6bff581519588cab3fbc26a4dc0d200e91622..199932a29cce60829eebe24eebdb8997b7509455 100644 (file)
@@ -34,7 +34,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
                this.range = $([]);
 
                if (o.range) {
-                       
+
                        if (o.range === true) {
                                this.range = $('<div></div>');
                                if (!o.values) o.values = [this._valueMin(), this._valueMin()];
@@ -54,7 +54,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
                        (o.range == "max") && (this.orientation == "horizontal") && this.range.css({ right : 0 });
                        (o.range == "min") && (this.orientation == "vertical") && this.range.css({ bottom : 0 });
                        (o.range == "max") && (this.orientation == "vertical") && this.range.css({ top : 0 });
-                       
+
                }
 
                if ($(".ui-slider-handle", this.element).length == 0)
@@ -213,25 +213,25 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
        },
 
        _mouseDrag: function(event) {
-               
+
                var position = { x: event.pageX, y: event.pageY };
                var normValue = this._normValueFromMouse(position);
 
                this._slide(event, this._handleIndex, normValue);
 
                return false;
-               
+
        },
 
        _mouseStop: function(event) {
-               
+
                this.handles.removeClass("ui-state-active");
                this._stop(event);
                this._change(event);
                this._handleIndex = null;
 
                return false;
-               
+
        },
 
        _normValueFromMouse: function(position) {
@@ -260,7 +260,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
                        normValue += this.options.step;
 
                return normValue;
-               
+
        },
 
        _start: function(event) {
@@ -270,7 +270,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
        },
 
        _slide: function(event, index, newVal) {
-               
+
                var handle = this.handles[index];
 
                if (this.options.values && this.options.values.length) {
index 54b136efc790993e8ed3073aec3bacaa4354512f..cd41d1de9196fd29800734db2f4ed6600b072511 100644 (file)
@@ -152,17 +152,17 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                        if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
                        $('body').css("cursor", o.cursor);
                }
-               
+
                if(o.opacity) { // opacity option
                        if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
                        this.helper.css("opacity", o.opacity);
                }
-               
+
                if(o.zIndex) { // zIndex option
                        if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
                        this.helper.css("zIndex", o.zIndex);
                }
-               
+
                //Prepare scrolling
                if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
                        this.overflowOffset = this.scrollParent.offset();
@@ -209,31 +209,31 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                if(this.options.scroll) {
                        var o = this.options, scrolled = false;
                        if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
-       
+
                                if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
                                        this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
                                else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
                                        this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
-       
+
                                if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
                                        this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
                                else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
                                        this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
-       
+
                        } else {
-       
+
                                if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
                                        scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
                                else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
                                        scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
-       
+
                                if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
                                        scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
                                else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
                                        scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
-       
+
                        }
-       
+
                        if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
                                $.ui.ddmanager.prepareOffsets(this, event);
                }
@@ -316,7 +316,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
        cancel: function() {
 
                var self = this;
-               
+
                if(this.dragging) {
 
                        this._mouseUp();
@@ -614,11 +614,11 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                                        return el;
                                },
                                update: function(container, p) {
-                                       
+
                                        // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
                                        // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
                                        if(className && !o.forcePlaceholderSize) return;
-                                       
+
                                        //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
                                        if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
                                        if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
@@ -712,7 +712,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                //Get the offsetParent and cache its position
                this.offsetParent = this.helper.offsetParent();
                var po = this.offsetParent.offset();
-               
+
                // This is a special case where we need to modify a offset calculated on start, since the following happened:
                // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
                // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
@@ -807,7 +807,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                                - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod
                        )
                };
-               
+
        },
 
        _generatePosition: function(event) {
@@ -821,7 +821,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
                        this.offset.relative = this._getRelativeOffset();
                }
-               
+
                var pageX = event.pageX;
                var pageY = event.pageY;
 
@@ -829,7 +829,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                 * - Position constraining -
                 * Constrain the position to a mix of grid, containment.
                 */
-                
+
                if(this.originalPosition) { //If we are not dragging yet, we won't check for options
 
                        if(this.containment) {
@@ -838,7 +838,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                                if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
                                if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
                        }
-                       
+
                        if(o.grid) {
                                var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
                                pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
@@ -865,7 +865,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                                + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )
                        )
                };
-               
+
        },
 
        _rearrange: function(event, i, a, hardRefresh) {
@@ -948,7 +948,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
                this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
 
                if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
-               
+
                if(!noPropagation) {
                        for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
                        this._trigger("stop", event, this._uiHash());
index 3d566e5d1f516751ec6796072f9b4d091911f285..bc6f6f0f859b39a9b64b9faa326b44b10dbaa802 100644 (file)
@@ -93,7 +93,7 @@ $.widget("ui.tabs", {
                this.$lis = $('li:has(a[href])', this.list);
                this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
                this.$panels = $([]);
-               
+
                var self = this, o = this.options;
 
                var fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
@@ -103,15 +103,15 @@ $.widget("ui.tabs", {
                        // inline tab
                        if (fragmentId.test(href))
                                self.$panels = self.$panels.add(self._sanitizeSelector(href));
-                               
+
                        // remote tab
                        else if (href != '#') { // prevent loading the page itself if href is just "#"
                                $.data(a, 'href.tabs', href); // required for restore on destroy
-                               
+
                                // TODO until #3808 is fixed strip fragment identifier from url
                                // (IE fails to load from such url)
                                $.data(a, 'load.tabs', href.replace(/#.*$/, '')); // mutable data
-                               
+
                                var id = self._tabId(a);
                                a.href = '#' + id;
                                var $panel = $('#' + id);
@@ -122,7 +122,7 @@ $.widget("ui.tabs", {
                                }
                                self.$panels = self.$panels.add($panel);
                        }
-                       
+
                        // invalid tab href
                        else
                                o.disabled.push(i + 1);