r53727 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53726‎ | r53727 | r53728 >
Date:21:19, 24 July 2009
Author:dale
Status:deferred
Tags:
Comment:
depreciated mwAddOnloadHook in favor of js2AddOnloadHook naming (for clear separation of js2 code from old js code)
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/mv_allpages.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_search.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_stream.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/mv_search.js
@@ -1,4 +1,4 @@
2 -mwAddOnloadHook( mv_pre_setup_search);
 2+js2AddOnloadHook( mv_pre_setup_search);
33 var mvSearchSetupFlag =false;
44 var maxFilters = 8;
55 var mv_search_action='';
Index: trunk/extensions/MetavidWiki/skins/mv_allpages.js
@@ -1,6 +1,5 @@
22 //javascript for all pages (adds auto_complete for search, and our linkback logo, and re-writes mvd links)
33 _global = this;
4 -mwAddOnloadHook(mv_setup_allpage);
54 var mv_setup_allpage_flag=false;
65 if( typeof wgServer!='undefined' && typeof wgScript != 'undefined'){
76 var base_roe_url = wgServer + wgScript + '?title=Special:MvExportStream&feed_format=roe&stream_name=';
@@ -15,7 +14,7 @@
1615 var wgScriptPath = '/w';
1716
1817 var gMvd={};
19 -function mv_setup_allpage(){
 18+js2AddOnloadHook(function(){
2019 js_log("mv embed done loading now setup 'all page'");
2120 //make sure we have jQuery and any base required libs:
2221 mvJsLoader.jQueryCheck(function(){
@@ -33,7 +32,7 @@
3433 }
3534 });
3635 });
37 -}
 36+});
3837 function mv_do_sequence_edit_swap(mode){
3938 if(mode=='text'){
4039 $j('#seq_edit_container,#swich_seq_text').hide();
Index: trunk/extensions/MetavidWiki/skins/mv_stream.js
@@ -49,9 +49,9 @@
5050
5151 //@@todo context sensitive init scripts
5252 //init the interface on page load
53 -mwAddOnloadHook(mv_load_interface_libs);
 53+js2AddOnloadHook(mv_load_interface_libs);
5454
55 -function mv_load_interface_libs(){
 55+js2AddOnloadHook( function(){
5656 js_log('f:mv_load_interface_libs');
5757 //make sure the mv_embed stuff is loaded
5858 mvJsLoader.jQueryCheck(function(){
@@ -70,7 +70,7 @@
7171 mv_stream_interface.init();
7272 });
7373 });
74 -}
 74+});
7575 /*
7676 * init_interface (on DOM ready)
7777 *

Status & tagging log