* (bug 20364) Fixed regression in GIF metadata loading
[mediawiki.git] / js2 / editPage.js
blobe7055ba053baedd905ad8a7e6435308dfa84e7ab
1 /*
2  * js2 style replacement for mediaWiki edit.js 
3  */
4 //setup configuration vars: 
5 if(!mwAddMediaConfig)
6         var mwAddMediaConfig = {
7                         'profile':'mediawiki_edit',                     
8                         'target_textbox': '#wpTextbox1',                        
9                         //note selections in the textbox will take over the default query
10                         'default_query': wgTitle,
11                         'target_title':wgPageName,                      
12                         //here we can setup the conten provider overides
13                         'cpconfig': {},                                 
14                         
15                         //the local wiki api url: 
16                         'local_wiki_api_url': wgServer + wgScriptPath + '/api.php'
17                 };
20 js2AddOnloadHook( function(){
21         mwEditPageHelper.init();        
22 });
23 var mwEditPageHelper = {        
24         init:function(){
25                 var _this = this;
26                 //@@todo check for new version of toolbar and via toolbar api:
27                                         
28                 //add the add-media-wizard button for old toolbar: 
29                 $j('#toolbar').append('<img style="cursor:pointer" id="btn-add-media-wiz" src="' + mv_skin_img_path + 'Button_add_media.png">');
30                 $j('#btn-add-media-wiz').addMediaWiz( 
31                                 mwAddMediaConfig 
32                 );              
33                                 
34                 //add to new toolbar (need to use api) 
35                 /*$j('[rel=insert] tool-file').addMediaWiz( 
36                                 mwAddMediaConfig 
37                 );*/                            
38         }