r59804 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59803‎ | r59804 | r59805 >
Date:21:28, 7 December 2009
Author:catrope
Status:ok
Tags:
Comment:
Yet more fixes for r59799: fix typo, JS error in js2stopgap, reminify.
Modified paths:
  • /trunk/phase3/js2/js2stopgap.js (modified) (history)
  • /trunk/phase3/js2/js2stopgap.min.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/js2stopgap.js
@@ -9467,7 +9467,7 @@
94689468 /**
94699469 * Provides js2 compatible mw functions
94709470 */
9471 -if( !mw ){
 9471+if( typeof mw == 'undefined' || !mw ){
94729472 mw = { };
94739473 /**
94749474 * Provides js2 compatible onload hook
@@ -9477,7 +9477,7 @@
94789478 $j(document).ready( func );
94799479 }
94809480 // Define a dummy mw.load function:
9481 - mw.load = function( callback) { callbcak() };
 9481+ mw.load = function( deps, callback ) { callback(); };
94829482
94839483 // Creates global message object if not already in existence
94849484 if ( !gMsg ) var gMsg = {};
@@ -9515,4 +9515,4 @@
95169516 }
95179517 }
95189518
9519 -}
\ No newline at end of file
 9519+}
Index: trunk/phase3/js2/js2stopgap.min.js
@@ -775,8 +775,7 @@
776776 target[name]=props[name];return target;};function isArray(a){return(a&&(($.browser.safari&&typeof a=='object'&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))));};$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find('body').append($.datepicker.dpDiv);$.datepicker.initialized=true;}
777777 var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=='string'&&(options=='isDisabled'||options=='getDate'))
778778 return $.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this[0]].concat(otherArgs));if(options=='option'&&arguments.length==2&&typeof arguments[1]=='string')
779 -return $.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this[0]].concat(otherArgs));return this.each(function(){typeof options=='string'?$.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$;})(jQuery);if(!gMsg)var gMsg={};function loadGM(msgSet){for(var i in msgSet){gMsg[i]=msgSet[i];}}
 779+return $.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this[0]].concat(otherArgs));return this.each(function(){typeof options=='string'?$.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$;})(jQuery);$j=jQuery.noConflict();if(typeof mw=='undefined'||!mw){mw={};mw.addOnloadHook=function(func){$j(document).ready(func);}
 780+mw.load=function(deps,callback){callback();};if(!gMsg)var gMsg={};mw.addMessages=function(msgSet){for(var i in msgSet){gMsg[i]=msgSet[i];}}
780781 function gM(key,args){var ms='';if(key in gMsg){ms=gMsg[key];if(typeof args=='object'||typeof args=='array'){for(var v in args){var rep='\$'+(parseInt(v)+1);ms=ms.replace(rep,args[v]);}}else if(typeof args=='string'||typeof args=='number'){ms=ms.replace(/\$1/,args);}
781 -return ms;}else{return'['+key+']';}}
782 -$j=jQuery.noConflict();function js2AddOnloadHook(func){$j(document).ready(func);}
783 -mvJsLoader={doLoad:function(deps,callback){callback();}};
\ No newline at end of file
 782+return ms;}else{return'['+key+']';}}}
\ No newline at end of file

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59799* updated js2 stopgap stubs to reflect new function name...dale19:56, 7 December 2009

Status & tagging log