r105619 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105618‎ | r105619 | r105620 >
Date:23:54, 8 December 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Update jquery.effects
Modified paths:
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.blind.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.bounce.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.clip.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.core.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.drop.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.explode.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.fade.js (added) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.fold.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.highlight.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.pulsate.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.scale.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.shake.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.slide.js (modified) (history)
  • /trunk/phase3/resources/jquery.effects/jquery.effects.transfer.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/Resources.php
@@ -449,6 +449,11 @@
450450 'dependencies' => 'jquery.effects.core',
451451 'group' => 'jquery.ui',
452452 ),
 453+ 'jquery.effects.fade' => array(
 454+ 'scripts' => 'resources/jquery.effects/jquery.effects.fade.js',
 455+ 'dependencies' => 'jquery.effects.core',
 456+ 'group' => 'jquery.ui',
 457+ ),
453458 'jquery.effects.fold' => array(
454459 'scripts' => 'resources/jquery.effects/jquery.effects.fold.js',
455460 'dependencies' => 'jquery.effects.core',
Index: trunk/phase3/resources/jquery.effects/jquery.effects.blind.js
@@ -1,23 +1,23 @@
22 /*
3 - * jQuery UI Effects Blind 1.8.2
 3+ * jQuery UI Effects Blind 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Blind
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.blind = function(o) {
1717
1818 return this.queue(function() {
1919
2020 // Create element
21 - var el = $(this), props = ['position','top','left'];
 21+ var el = $(this), props = ['position','top','bottom','left','right'];
2222
2323 // Set options
2424 var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
Index: trunk/phase3/resources/jquery.effects/jquery.effects.core.js
@@ -1,13 +1,13 @@
22 /*
3 - * jQuery UI Effects 1.8.2
 3+ * jQuery UI Effects 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/
1010 */
11 -;jQuery.effects || (function($) {
 11+;jQuery.effects || (function($, undefined) {
1212
1313 $.effects = {};
1414
@@ -19,7 +19,7 @@
2020
2121 // override the animation for color styles
2222 $.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
23 - 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'],
 23+ 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
2424 function(i, attr) {
2525 $.fx.step[attr] = function(fx) {
2626 if (!fx.colorInit) {
@@ -52,7 +52,7 @@
5353 return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
5454
5555 // Look for rgb(num%,num%,num%)
56 - if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)%\s*,\s*([0-9]+(?:\.[0-9]+)?)%\s*\)/.exec(color))
 56+ if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
5757 return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
5858
5959 // Look for #a0b1c2
@@ -231,13 +231,12 @@
232232 easing = null;
233233 }
234234
235 - return this.each(function() {
236 -
 235+ return this.queue(function() {
237236 var that = $(this),
238237 originalStyleAttr = that.attr('style') || ' ',
239238 originalStyle = filterStyles(getElementStyles.call(this)),
240239 newStyle,
241 - className = that.attr('className');
 240+ className = that.attr('class');
242241
243242 $.each(classAnimationActions, function(i, action) {
244243 if (value[action]) {
@@ -245,20 +244,26 @@
246245 }
247246 });
248247 newStyle = filterStyles(getElementStyles.call(this));
249 - that.attr('className', className);
 248+ that.attr('class', className);
250249
251 - that.animate(styleDifference(originalStyle, newStyle), duration, easing, function() {
252 - $.each(classAnimationActions, function(i, action) {
253 - if (value[action]) { that[action + 'Class'](value[action]); }
254 - });
255 - // work around bug in IE by clearing the cssText before setting it
256 - if (typeof that.attr('style') == 'object') {
257 - that.attr('style').cssText = '';
258 - that.attr('style').cssText = originalStyleAttr;
259 - } else {
260 - that.attr('style', originalStyleAttr);
 250+ that.animate(styleDifference(originalStyle, newStyle), {
 251+ queue: false,
 252+ duration: duration,
 253+ easing: easing,
 254+ complete: function() {
 255+ $.each(classAnimationActions, function(i, action) {
 256+ if (value[action]) { that[action + 'Class'](value[action]); }
 257+ });
 258+ // work around bug in IE by clearing the cssText before setting it
 259+ if (typeof that.attr('style') == 'object') {
 260+ that.attr('style').cssText = '';
 261+ that.attr('style').cssText = originalStyleAttr;
 262+ } else {
 263+ that.attr('style', originalStyleAttr);
 264+ }
 265+ if (callback) { callback.apply(this, arguments); }
 266+ $.dequeue( this );
261267 }
262 - if (callback) { callback.apply(this, arguments); }
263268 });
264269 });
265270 };
@@ -301,7 +306,7 @@
302307 /******************************************************************************/
303308
304309 $.extend($.effects, {
305 - version: "1.8.2",
 310+ version: "1.8.16",
306311
307312 // Saves a set of properties in a data storage
308313 save: function(element, set) {
@@ -362,9 +367,16 @@
363368 border: 'none',
364369 margin: 0,
365370 padding: 0
366 - });
 371+ }),
 372+ active = document.activeElement;
367373
368374 element.wrap(wrapper);
 375+
 376+ // Fixes #7595 - Elements lose focus when wrapped.
 377+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
 378+ $( active ).focus();
 379+ }
 380+
369381 wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
370382
371383 // transfer positioning properties to the wrapper
@@ -382,15 +394,25 @@
383395 props[pos] = 'auto';
384396 }
385397 });
386 - element.css({position: 'relative', top: 0, left: 0 });
 398+ element.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' });
387399 }
388400
389401 return wrapper.css(props).show();
390402 },
391403
392404 removeWrapper: function(element) {
393 - if (element.parent().is('.ui-effects-wrapper'))
394 - return element.parent().replaceWith(element);
 405+ var parent,
 406+ active = document.activeElement;
 407+
 408+ if (element.parent().is('.ui-effects-wrapper')) {
 409+ parent = element.parent().replaceWith(element);
 410+ // Fixes #7595 - Elements lose focus when wrapped.
 411+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
 412+ $( active ).focus();
 413+ }
 414+ return parent;
 415+ }
 416+
395417 return element;
396418 },
397419
@@ -418,44 +440,72 @@
419441 speed = null;
420442 options = {};
421443 }
 444+ if (typeof options == 'number' || $.fx.speeds[options]) {
 445+ callback = speed;
 446+ speed = options;
 447+ options = {};
 448+ }
422449 if ($.isFunction(speed)) {
423450 callback = speed;
424451 speed = null;
425452 }
426 - if (typeof options == 'number' || $.fx.speeds[options]) {
427 - callback = speed;
428 - speed = options;
429 - options = {};
430 - }
431453
432454 options = options || {};
433455
434456 speed = speed || options.duration;
435457 speed = $.fx.off ? 0 : typeof speed == 'number'
436 - ? speed : $.fx.speeds[speed] || $.fx.speeds._default;
 458+ ? speed : speed in $.fx.speeds ? $.fx.speeds[speed] : $.fx.speeds._default;
437459
438460 callback = callback || options.complete;
439461
440462 return [effect, options, speed, callback];
441463 }
442464
 465+function standardSpeed( speed ) {
 466+ // valid standard speeds
 467+ if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
 468+ return true;
 469+ }
 470+
 471+ // invalid strings - treat as "normal" speed
 472+ if ( typeof speed === "string" && !$.effects[ speed ] ) {
 473+ return true;
 474+ }
 475+
 476+ return false;
 477+}
 478+
443479 $.fn.extend({
444480 effect: function(effect, options, speed, callback) {
445481 var args = _normalizeArguments.apply(this, arguments),
446 - // TODO: make effects takes actual parameters instead of a hash
 482+ // TODO: make effects take actual parameters instead of a hash
447483 args2 = {
448484 options: args[1],
449485 duration: args[2],
450486 callback: args[3]
451487 },
 488+ mode = args2.options.mode,
452489 effectMethod = $.effects[effect];
453490
454 - return effectMethod && !$.fx.off ? effectMethod.call(this, args2) : this;
 491+ if ( $.fx.off || !effectMethod ) {
 492+ // delegate to the original method (e.g., .show()) if possible
 493+ if ( mode ) {
 494+ return this[ mode ]( args2.duration, args2.callback );
 495+ } else {
 496+ return this.each(function() {
 497+ if ( args2.callback ) {
 498+ args2.callback.call( this );
 499+ }
 500+ });
 501+ }
 502+ }
 503+
 504+ return effectMethod.call(this, args2);
455505 },
456506
457507 _show: $.fn.show,
458508 show: function(speed) {
459 - if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {
 509+ if ( standardSpeed( speed ) ) {
460510 return this._show.apply(this, arguments);
461511 } else {
462512 var args = _normalizeArguments.apply(this, arguments);
@@ -466,7 +516,7 @@
467517
468518 _hide: $.fn.hide,
469519 hide: function(speed) {
470 - if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {
 520+ if ( standardSpeed( speed ) ) {
471521 return this._hide.apply(this, arguments);
472522 } else {
473523 var args = _normalizeArguments.apply(this, arguments);
@@ -475,11 +525,10 @@
476526 }
477527 },
478528
479 - // jQuery core overloads toggle and create _toggle
 529+ // jQuery core overloads toggle and creates _toggle
480530 __toggle: $.fn.toggle,
481531 toggle: function(speed) {
482 - if (!speed || typeof speed == 'number' || $.fx.speeds[speed] ||
483 - typeof speed == 'boolean' || $.isFunction(speed)) {
 532+ if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
484533 return this.__toggle.apply(this, arguments);
485534 } else {
486535 var args = _normalizeArguments.apply(this, arguments);
Index: trunk/phase3/resources/jquery.effects/jquery.effects.bounce.js
@@ -1,23 +1,23 @@
22 /*
3 - * jQuery UI Effects Bounce 1.8.2
 3+ * jQuery UI Effects Bounce 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Bounce
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.bounce = function(o) {
1717
1818 return this.queue(function() {
1919
2020 // Create element
21 - var el = $(this), props = ['position','top','left'];
 21+ var el = $(this), props = ['position','top','bottom','left','right'];
2222
2323 // Set options
2424 var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
Index: trunk/phase3/resources/jquery.effects/jquery.effects.shake.js
@@ -1,23 +1,23 @@
22 /*
3 - * jQuery UI Effects Shake 1.8.2
 3+ * jQuery UI Effects Shake 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Shake
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.shake = function(o) {
1717
1818 return this.queue(function() {
1919
2020 // Create element
21 - var el = $(this), props = ['position','top','left'];
 21+ var el = $(this), props = ['position','top','bottom','left','right'];
2222
2323 // Set options
2424 var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
Index: trunk/phase3/resources/jquery.effects/jquery.effects.pulsate.js
@@ -1,16 +1,16 @@
22 /*
3 - * jQuery UI Effects Pulsate 1.8.2
 3+ * jQuery UI Effects Pulsate 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Pulsate
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.pulsate = function(o) {
1717 return this.queue(function() {
Index: trunk/phase3/resources/jquery.effects/jquery.effects.fade.js
@@ -0,0 +1,32 @@
 2+/*
 3+ * jQuery UI Effects Fade 1.8.16
 4+ *
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
 8+ *
 9+ * http://docs.jquery.com/UI/Effects/Fade
 10+ *
 11+ * Depends:
 12+ * jquery.effects.core.js
 13+ */
 14+(function( $, undefined ) {
 15+
 16+$.effects.fade = function(o) {
 17+ return this.queue(function() {
 18+ var elem = $(this),
 19+ mode = $.effects.setMode(elem, o.options.mode || 'hide');
 20+
 21+ elem.animate({ opacity: mode }, {
 22+ queue: false,
 23+ duration: o.duration,
 24+ easing: o.options.easing,
 25+ complete: function() {
 26+ (o.callback && o.callback.apply(this, arguments));
 27+ elem.dequeue();
 28+ }
 29+ });
 30+ });
 31+};
 32+
 33+})(jQuery);
Property changes on: trunk/phase3/resources/jquery.effects/jquery.effects.fade.js
___________________________________________________________________
Added: svn:eol-style
134 + native
Index: trunk/phase3/resources/jquery.effects/jquery.effects.explode.js
@@ -1,16 +1,16 @@
22 /*
3 - * jQuery UI Effects Explode 1.8.2
 3+ * jQuery UI Effects Explode 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Explode
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.explode = function(o) {
1717
Index: trunk/phase3/resources/jquery.effects/jquery.effects.slide.js
@@ -1,23 +1,23 @@
22 /*
3 - * jQuery UI Effects Slide 1.8.2
 3+ * jQuery UI Effects Slide 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Slide
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.slide = function(o) {
1717
1818 return this.queue(function() {
1919
2020 // Create element
21 - var el = $(this), props = ['position','top','left'];
 21+ var el = $(this), props = ['position','top','bottom','left','right'];
2222
2323 // Set options
2424 var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
@@ -29,7 +29,7 @@
3030 var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
3131 var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
3232 var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
33 - if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift
 33+ if (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance); // Shift
3434
3535 // Animation
3636 var animation = {};
Index: trunk/phase3/resources/jquery.effects/jquery.effects.drop.js
@@ -1,23 +1,23 @@
22 /*
3 - * jQuery UI Effects Drop 1.8.2
 3+ * jQuery UI Effects Drop 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Drop
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.drop = function(o) {
1717
1818 return this.queue(function() {
1919
2020 // Create element
21 - var el = $(this), props = ['position','top','left','opacity'];
 21+ var el = $(this), props = ['position','top','bottom','left','right','opacity'];
2222
2323 // Set options
2424 var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
Index: trunk/phase3/resources/jquery.effects/jquery.effects.fold.js
@@ -1,23 +1,23 @@
22 /*
3 - * jQuery UI Effects Fold 1.8.2
 3+ * jQuery UI Effects Fold 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Fold
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.fold = function(o) {
1717
1818 return this.queue(function() {
1919
2020 // Create element
21 - var el = $(this), props = ['position','top','left'];
 21+ var el = $(this), props = ['position','top','bottom','left','right'];
2222
2323 // Set options
2424 var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
Index: trunk/phase3/resources/jquery.effects/jquery.effects.transfer.js
@@ -1,16 +1,16 @@
22 /*
3 - * jQuery UI Effects Transfer 1.8.2
 3+ * jQuery UI Effects Transfer 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Transfer
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.transfer = function(o) {
1717 return this.queue(function() {
Index: trunk/phase3/resources/jquery.effects/jquery.effects.clip.js
@@ -1,23 +1,23 @@
22 /*
3 - * jQuery UI Effects Clip 1.8.2
 3+ * jQuery UI Effects Clip 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Clip
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.clip = function(o) {
1717
1818 return this.queue(function() {
1919
2020 // Create element
21 - var el = $(this), props = ['position','top','left','height','width'];
 21+ var el = $(this), props = ['position','top','bottom','left','right','height','width'];
2222
2323 // Set options
2424 var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
Index: trunk/phase3/resources/jquery.effects/jquery.effects.highlight.js
@@ -1,16 +1,16 @@
22 /*
3 - * jQuery UI Effects Highlight 1.8.2
 3+ * jQuery UI Effects Highlight 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Highlight
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.highlight = function(o) {
1717 return this.queue(function() {
Index: trunk/phase3/resources/jquery.effects/jquery.effects.scale.js
@@ -1,16 +1,16 @@
22 /*
3 - * jQuery UI Effects Scale 1.8.2
 3+ * jQuery UI Effects Scale 1.8.16
44 *
5 - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
 5+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 6+ * Dual licensed under the MIT or GPL Version 2 licenses.
 7+ * http://jquery.org/license
88 *
99 * http://docs.jquery.com/UI/Effects/Scale
1010 *
1111 * Depends:
1212 * jquery.effects.core.js
1313 */
14 -(function($) {
 14+(function( $, undefined ) {
1515
1616 $.effects.puff = function(o) {
1717 return this.queue(function() {
@@ -84,8 +84,8 @@
8585 return this.queue(function() {
8686
8787 // Create element
88 - var el = $(this), props = ['position','top','left','width','height','overflow','opacity'];
89 - var props1 = ['position','top','left','overflow','opacity']; // Always restore
 88+ var el = $(this), props = ['position','top','bottom','left','right','width','height','overflow','opacity'];
 89+ var props1 = ['position','top','bottom','left','right','overflow','opacity']; // Always restore
9090 var props2 = ['width','height','overflow']; // Copy for children
9191 var cProps = ['fontSize'];
9292 var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];

Follow-up revisions

RevisionCommit summaryAuthorDate
r105672Followup r105575, r105619, r105671 Add RELEASE-NOTES-1.19reedy14:48, 9 December 2011

Comments

#Comment by Nikerabbit (talk | contribs)   07:51, 9 December 2011

Made me curious, what for is this new pattern:

-(function($) {
+(function( $, undefined ) {
#Comment by Krinkle (talk | contribs)   11:09, 30 December 2011

It's upstream, but we do it as well. It ensures "undefined" is undefined because unfortunately JavaScript allows a variable to be named "undefined", both locally and globally. So if anywhere down the line between global scope and here someone thought it would be funny to do that, there's a problem. I think this is rather far fetched, but people seem to do it quite often (especially in plugins and frameworks that need to work "everywhere").

Another minor advantage (not a justification for this thought) is the scope. Normally "undefined" is global variable set to undefined, now it is a local variable instead of a global variable, which might speed up scripts that do a lot of comparisons which would otherwise have to bubble up the scope chain for each time "undefined" is referenced.

#Comment by Krinkle (talk | contribs)   11:11, 30 December 2011

As of ECMAScript 5 undefined has become a non-writable global property.

Status & tagging log