* stubs for upload proxy (upload to commons from other wikis edit page & insert your...
authorMichael Dale <dale@users.mediawiki.org>
Fri, 14 Aug 2009 08:15:41 +0000 (08:15 +0000)
committerMichael Dale <dale@users.mediawiki.org>
Fri, 14 Aug 2009 08:15:41 +0000 (08:15 +0000)
* Only firefogg non-proxied api based uploads supported so far.

js2/mwEmbed/example_usage/Player_Simple_Video_Tag.html
js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
js2/mwEmbed/libAddMedia/mvFirefogg.js
js2/mwEmbed/libAddMedia/remoteSearchDriver.js
js2/mwEmbed/libAddMedia/simpleUploadForm.js [new file with mode: 0644]
js2/mwEmbed/libClipEdit/mvClipEdit.js
js2/mwEmbed/libEmbedVideo/embedVideo.js
js2/mwEmbed/mv_embed.js
js2/mwEmbed/mwHostProxy.html [new file with mode: 0644]
js2/mwEmbed/php/jsAutoloadLocalClasses.php
js2/mwRemoteProxy.html [new file with mode: 0644]

index 60a791f..92c4cf7 100644 (file)
@@ -13,7 +13,7 @@ once you include: mv_embed.js on any remote page you can then use the video tag
 <br />
   <table border="1" cellpadding="6" width="600">
                    <tr>
-             <td valign="top"><video duration="26" poster="http://metavid.org/w/index.php?action=ajax&rs=mv_frame_server&stream_id=71&t=1:23:16&size=400x300" src="http://metavidstorage01.ucsc.edu/media/house_proceeding_07-18-06_00.ogg?t=1:23:16/1:23:44"></video></video></td>
+             <td valign="top"><video durationHint="26" poster="http://metavid.org/w/index.php?action=ajax&rs=mv_frame_server&stream_id=71&t=1:23:16&size=400x300" src="http://metavidstorage01.ucsc.edu/media/house_proceeding_07-18-06_00.ogg?t=1:23:16/1:23:44"></video></video></td>
              <td valign="top"><b>Sample Embed</b><br />
              Simple video Embed: 
                <pre>&lt;video poster="http://metavid.org/w/index.php?action=ajax&rs=mv_frame_server&stream_id=71&t=1:23:16&size=400x300" 
index 26d2541..3e87d2e 100644 (file)
@@ -78,7 +78,7 @@ mvBaseUploadInterface.prototype = {
        setupForm:function(){   
                var _this = this;               
                //set up the local pointer to the edit form:
-               _this.editForm = _this.getEditForm();           
+               _this.editForm = _this.getEditForm();                           
                
                if( _this.editForm ){
                        //set up the org_onsubmit if not set: 
@@ -86,7 +86,7 @@ mvBaseUploadInterface.prototype = {
                                _this.org_onsubmit = _this.editForm.onsubmit;                                   
                        
                        //have to define the onsubmit function inline or its hard to pass the "_this" instance
-                       $j( '#mw-upload-form' ).submit( function(){             
+                       $j( _this.editForm ).submit( function(){                
                                //run the original onsubmit (if not run yet set flag to avoid excessive chaining ) 
                                if( typeof( _this.org_onsubmit ) == 'function' ){                                                                 
                                        if( ! _this.org_onsubmit() ){
@@ -95,8 +95,7 @@ mvBaseUploadInterface.prototype = {
                                        }
                                }                               
                                //check for post action override:                                                                                                                       
-                               if( _this.form_post_override ){
-                                       //alert('will submit here');
+                               if( _this.form_post_override ){                                 
                                        return true;
                                }                                                                       
                                //get the input form data in flat json:                                                                                 
index ac5a640..01e59ce 100644 (file)
@@ -150,7 +150,7 @@ mvFirefogg.prototype = { //extends mvBaseUploadInterface
                var out = '';           
                $j.each(default_firefogg_options, function(target, na){                 
                        if(target.substring(0, 6)=='target'){
-                               js_log('check for target html: ' + target);
+                               //js_log('check for target html: ' + target);
                                //check for the target if missing add to the output: 
                                if( _this[target] === false){                                   
                                        out += _this.getTargetHtml(target) + ' ';
@@ -450,7 +450,7 @@ mvFirefogg.prototype = { //extends mvBaseUploadInterface
        //doChunkUpload does both uploading and encoding at the same time and uploads one meg chunks as they are ready
        doChunkUpload : function(){
                js_log('doChunkUpload::');
-               var _this = this;                       
+               var _this = this;                                       
                _this.action_done = false;                                      
                //extension should already be ogg but since its user editable,
                //check again
@@ -466,7 +466,29 @@ mvFirefogg.prototype = { //extends mvBaseUploadInterface
                        _this.formData['wpDestFile'] = sf.replace(extreg, '.ogg');
                }
                //add chunk response hook to build the resultURL when uploading chunks          
-               
+                               
+               //check for editToken:
+               if(!this.etoken){
+                       if( _this.formData['wpEditToken']){
+                               _this.etoken = _this.formData['wpEditToken'];
+                               _this.doChunkWithFormData();
+                       }else{
+                               get_mw_token(
+                                       'File:'+ _this.formData['wpDestFile'], 
+                                       _this.api_url, 
+                                       function( eToken ){                                                                             
+                                               _this.etoken = eToken;
+                                               _this.doChunkWithFormData();
+                                       }
+                               );
+                       }
+               }else{
+                       _this.doChunkWithFormData();
+               }
+       },
+       doChunkWithFormData:function(){
+               var _this = this;
+               js_log("doChunkWithFormData::"  + _this.etoken);
                //build the api url: 
                var aReq ={
                        'action'                : 'upload',
@@ -475,11 +497,8 @@ mvFirefogg.prototype = { //extends mvBaseUploadInterface
                        'comment'               : _this.formData['wpUploadDescription'],
                        'enablechunks'  : 'true'
                };
-               //check for editToken:
-               if(!this.etoken)
-                       this.etoken = _this.formData['wpEditToken'];
-                       
-               if( this.etoken )
+               
+               if( _this.etoken )
                        aReq['token'] = this.etoken;
                
                if( _this.formData['wpWatchthis'] )
@@ -554,7 +573,7 @@ mvFirefogg.prototype = { //extends mvBaseUploadInterface
        },
        doUploadStatus:function() {     
                var _this = this;
-               $j('#up-status-state').html( gM('uploaded-status')  );
+               $j( '#up-status-state' ).html( gM('uploaded-status')  );
                
                _this.oldResponseText = '';
                //setup a local function for timed callback:                             
index 7be8ba1..5da7e34 100644 (file)
@@ -17,7 +17,7 @@ loadGM({
        "rsd_results_prev" : "previous ",
        "rsd_no_results"   : "No search results for <b>$1</b>",
 
-       "mv_upload" : "Upload",
+       "upload_tab" : "Upload",
        "rsd_layout" : "Layout:",
        "rsd_resource_edit" : "Edit Resource: $1",
        "resource_description_page": "Resource Description Page",
@@ -34,7 +34,9 @@ loadGM({
        "no_import_by_url": "This User or Wiki <b>can not</b> import assets from remote URLs. </p><p> Do you need to Login? </p><p> If permissions are set you may have to enable $wgAllowCopyUploads, <a href=\"http://www.mediawiki.org/wiki/Manual:$wgAllowCopyUploads\">more info</a></p>",
        "results_from": "Results from <a href=\"$1\" target=\"_new\" >$2</a>",
        
-       "missing_desc_see_soruce": "This Asset is missing a description. Please see the [$1 orginal source] and help describe it"
+       "missing_desc_see_soruce": "This Asset is missing a description. Please see the [$1 orginal source] and help describe it",
+       
+       "rsd_config_error": "Add media Wizard configuation error: $1"   
 });
 var default_remote_search_options = {
        'profile':'mediawiki_edit',
@@ -63,7 +65,8 @@ var default_remote_search_options = {
        'cFileNS':'File', //what is the cannonical namespace for images
                                          //@@todo (should get that from the api or inpage vars)
                                         
-       'enable_upload_tab':true // if we want to enable an uploads tab:        
+       'enable_upload_tab':true, // if we want to enable an uploads tab:       
+       'upload_api_target'        : 'http://127.0.0.1/wiki_trunk/api.php' // can be local or the url of the upload api.
 }
 if(typeof wgServer == 'undefined')
        wgServer = '';
@@ -93,7 +96,7 @@ remoteSearchDriver.prototype = {
         * sets the default display item:
         * can be any content_providers key or 'all'
         */
-       disp_item : 'this_wiki',
+       disp_item : 'upload',
        /** the default content providers list. 
         *
         * (should be note that special tabs like "upload" and "combined" don't go into the content proviers list:
@@ -330,15 +333,16 @@ remoteSearchDriver.prototype = {
                        }
                }       
                
-               //make sure the selected cp has an api to query against: 
-               if(! this.content_providers[ this.disp_item ].api_url  ){
+               //make sure the selected cp has an api to query against (if its a content_provider              
+               if( this.content_providers[ this.disp_item ] &&
+                       !this.content_providers[ this.disp_item ].api_url  ){
                        for(var inx in this.content_providers){
                                if( this.content_providers[ inx ].api_url ){
                                        this.disp_item = inx;
                                        break;
                                }
                        }
-               }
+               }               
                        
                
                //set up the default model config: 
@@ -554,34 +558,49 @@ remoteSearchDriver.prototype = {
                });     
        },
        doUploadInteface:function(){
-               var _this = this;
-               mv_set_loading('#tab-upload');
-               $j('#tab-upload').html('upload interface goes here ;)');
-       
-               //todo include firefogg support:
-               /*mvJsLoader.doLoad( [
-                               'mvUploader'
-                       ],function(){                   
-                               _this.cUpLoader = new mvUploader({
-                                       'target_div': '#tab-upload',
-                                       'upload_done_action:': function( rTitle){
-                                               //set to loading:
-                                               mv_set_loading('#tab-upload');
-                                               //do a direct api query for resource info (to build rObj
-                                               _this.getResourceFromTitle( rTitle, function(rObj){
-                                                       //call resource Edit:
-                                                       _this.resourceEdit( rObj );
-                                               });
-                                       }                                                                                       
-                       });
-               }); */
+               js_log("doUploadInteface::");           
+               var _this = this;                                       
+               //set it to loading: 
+               mv_set_loading('#tab-upload');                          
+                       
+               //do config variable reality checks:
+               if( _this.upload_api_target == 'local' ){
+                       if( ! _this.local_wiki_api_url ){
+                               $j('#tab-upload').html( gM( 'rsd_config_error', 'missing_local_api_url' ) );
+                               return false;
+                       }else{
+                               _this.upload_api_target = _this.local_wiki_api_url;
+                       }                       
+               }
+               //make sure we have a url for the upload target: 
+               if(  parseUri( _this.upload_api_target ).host ==  _this.upload_api_target ){
+                       $j('#tab-upload').html( gM('rsd_config_error', 'bad_api_url') );
+                       return false;
+               }
+               //output the form 
+               mvJsLoader.doLoad(['$j.fn.simpleUploadForm'],function(){
+                       //set the form action based on domain: 
+                       if( parseUri( document.URL ).host == parseUri( _this.upload_api_target ).host ){
+                               //deal with the api form upload form directly:
+                               $j('#tab-upload').simpleUploadForm({
+                                       "api_target" :  _this.upload_api_target 
+                               })
+                       }else{
+                               //setup the proxy  
+                       }
+               });                                                                     
        },
        runSearch: function(){          
                js_log("f:runSearch::" + this.disp_item);
                //draw_direct_flag
                var draw_direct_flag = true;                                    
-               if( !this.content_providers[this.disp_item] ){
-                       js_log("can't run search for:" + this.disp_item);
+               if( !this.content_providers[this.disp_item] ){                  
+                       //check if its the special upload tab case: 
+                       if( this.disp_item == 'upload'){
+                               this.doUploadInteface();                                
+                       }else{
+                               js_log("can't run search for:" + this.disp_item);                                                       
+                       }
                        return false;
                }                       
                cp = this.content_providers[this.disp_item];    
@@ -792,8 +811,10 @@ remoteSearchDriver.prototype = {
                        }
                        //do an upload tab if enabled:
                        if( this.enable_upload_tab ){                   
-                               o+='<li class="rsd_cp_tab" ><a id="rsd_tab_upload" href="#tab-upload">' + gM('upload') + '</a></li>';
+                               o+='<li class="rsd_cp_tab" ><a id="rsd_tab_upload" href="#tab-upload">' + gM('upload_tab') + '</a></li>';
                                tabc+='<div id="tab-upload" />';                
+                               if(this.disp_item == 'upload')
+                                       selected_tab = inx++;
                        }
                        o+='</ul>';
                        //output the tab content containers:
@@ -1087,31 +1108,36 @@ remoteSearchDriver.prototype = {
                                                                                        
        },
        /*set-up the control actions for clipEdit with relevent callbacks */
-       getClipEditControlActions:function(){
+       getClipEditControlActions:function( cp ){
                var _this = this;
-               return {
-                       'insert' :function(rObj){
-                               _this.insertResource(rObj);
-                       },                      
-                       'preview':function(rObj){
+               var cConf= {};
+               
+               cConf['insert'] = function(rObj){
+                       _this.insertResource(rObj);
+               }
+               //if not directly inserting the resource is support a preview option:
+               if( _this.import_url_mode != 'remote_link'){                    
+                       cConf['preview'] = function(rObj){
                                _this.previewResource( rObj )
-                       },                      
-                       'cancel' :function(){
-                               _this.cancelClipEditCB()
-                       }                               
-               };
+                       };
+               }
+               cConf['cancel'] = function(){                   
+                       _this.cancelClipEditCB()
+               }                                               
+               return cConf;
        },
        //loads the media editor:
        doMediaEdit:function( rObj , mediaType){
-               var _this = this;                                                                       
+               var _this = this;       
+               var cp = rObj.pSobj.cp;                                                         
                var mvClipInit = {
                                'rObj':rObj, //the resource object
-                               'parent_ct':'rsd_modal_target',
-                               'clip_disp_ct':'clip_edit_disp',
-                               'control_ct': 'clip_edit_ctrl',                                                         
-                               'media_type': mediaType,
-                               'p_rsdObj': _this,              
-                               'controlActionsCb':_this.getClipEditControlActions()                                                                                    
+                               'parent_ct'                     : 'rsd_modal_target',
+                               'clip_disp_ct'          : 'clip_edit_disp',
+                               'control_ct'            : 'clip_edit_ctrl',                                                             
+                               'media_type'            : mediaType,
+                               'p_rsdObj'                      : _this,                
+                               'controlActionsCb'      : _this.getClipEditControlActions( cp )                                                                                 
                };      
                
                var clibs = ['mvClipEdit'];
@@ -1501,7 +1527,7 @@ remoteSearchDriver.prototype = {
        updatePreviewText:function( rObj ){
                var _this = this;
                        
-               if(_this.import_url_mode=='remote_link'){
+               if( _this.import_url_mode == 'remote_link' ){
                        _this.cur_embed_code = rObj.pSobj.getEmbedHTML(rObj);
                }else{
                        _this.cur_embed_code = rObj.pSobj.getEmbedWikiCode( rObj );
diff --git a/js2/mwEmbed/libAddMedia/simpleUploadForm.js b/js2/mwEmbed/libAddMedia/simpleUploadForm.js
new file mode 100644 (file)
index 0000000..f1d493a
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * simple form output jquery binding
+ * enables dynamic form output to a given target
+ * 
+ */
+
+loadGM({ 
+       "select_file"                   : "Select File",
+       "more_licence_options"  : "For more licence options view the <a href=\"$1\">normal upload page</a>",
+       "select_ownwork"                : "I am uploading entirely my own work, and licencing it under:",
+       "licence_cc-by-sa"              : "Creative Commons Share Alike (3.0)",         
+       "upload"                                : "Upload File",
+       "destfilename"                  : "Destination filename:",
+       "summary"                               : "Summary"
+});
+var default_form_options = {
+       'enable_fogg'    : true,
+       'licence_options':['cc-by-sa'],
+       'api_target' : false    
+};
+
+(function($) {
+       $.fn.simpleUploadForm = function( opt , callback){
+               //set the options: 
+               for(var i in default_form_options){
+                       if(!opt[i])
+                               opt[i] = default_form_options[i];
+               }
+               
+               //first do a reality check on the options: 
+               if(!opt.api_target){
+                       $(this.selector).html('Error: Missing api target');
+                       return false;
+               }                               
+               
+                                       
+               //@@todo this is just a proof of concept
+               //much todo to improved this web form
+               var o = '<div style="margin: 0 auto;">'+
+                       '<form id="suf-upload" enctype="multipart/form-data" action="" method="post">'  +       
+                       '<label for="wpUploadFile">' + gM('select_file') + '</label><br>'+                                                                      
+                       '<input type="file" style="display: inline;" name="wpUploadFile" id="wpUploadFile" size="10"/><br>' +           
+                       '<label for="wpDestFile">' +gM('destfilename') + '</label><br>'+
+                               '<input type="text" id="wpDestFile" name="wpDestFile" size="30" /><br>'+
+                       '<label for="wpUploadDescription">' + gM('summary') + ':</label><br>' +
+                               '<textarea cols="30" rows="3" id="wpUploadDescription" name="wpUploadDescription" tabindex="3"/><br>'+ 
+                               gM('select_ownwork') + '<br>' + 
+                       '<input type="checkbox" id="wpLicence" name="wpLicence" value="cc-by-sa">' + gM('licence_cc-by-sa') + '<br>' +                  
+                                               
+                       '<input type="submit" accesskey="s" value="' + gM('upload') + '" name="wpUploadBtn" id="wpUploadBtn"  tabindex="9"/>' +
+                       //close the form and div  
+                       '</form></div>';        
+                       
+               //set the target with the form output:
+               $(this.selector).html( o );                     
+               //by default dissable: 
+               $j('#wpUploadBtn').attr('disabled', 'disabled');
+               
+               //set up basic binding:
+               $j('#wpLicence').click(function(){
+                       if( $j(this).is(':checked') ){
+                               $j('#wpUploadBtn').removeAttr('disabled');                              
+                       }else{                          
+                               $j('#wpUploadBtn').attr('disabled', 'disabled');
+                       }                       
+               });
+                       
+               //set up the binding per the config
+               if( opt.enable_fogg ){
+                       $j('#wpUploadFile').firefogg({ 
+                               //an api url (we won't submit directly to action of the form)
+                               'api_url' : opt.api_target,
+                               'form_rewrite': true,   
+                               'target_edit_from' : '#suf-upload',                     
+                               'new_source_cb' : function( orgFilename, oggName ){                                                                                     
+                                               $j('#wpDestFile').val( oggName );
+                                               //@@TODO: 
+                                               //mwUploadHelper.doDestCheck();
+                               }
+                       });             
+               }else{
+                       //simple web form rewrite               
+               }                       
+       }
+})(jQuery);
\ No newline at end of file
index 83a7461..a2cf3ea 100644 (file)
@@ -83,7 +83,7 @@ mvClipEdit.prototype = {
                        this.doDisplayEdit();
                }else{                          
                        //check the media_type:
-                       js_log('mvClipEdit:: media type:' + this.media_type + ' base width: ' + this.rObj.width + ' bh: ' + this.rObj.height);          
+                       //js_log('mvClipEdit:: media type:' + this.media_type + ' base width: ' + this.rObj.width + ' bh: ' + this.rObj.height);                
                        //could seperate out into media Types objects for now just call method
                        if(this.media_type == 'image'){
                                this.setUpImageCtrl();
@@ -466,7 +466,7 @@ mvClipEdit.prototype = {
                var b_target =   _this.p_rsdObj.target_container + '~ .ui-dialog-buttonpane';
                //empty the ui-dialog-buttonpane bar:
                $j(b_target).empty();
-               for(var cbType in _this.controlActionsCb){
+               for( var cbType in _this.controlActionsCb ){
                        switch(cbType){
                                case 'insert_seq':
                                        $j(b_target).append( $j.btnHtml(gM('mv_insert_into_sequence'), 'mv_insert_sequence', 'check' ) + ' ' )
index 49febb1..5dc4824 100644 (file)
@@ -156,7 +156,7 @@ mvEmbed = {
                if( force_id == null && force_id != '' ){
                        var j_selector = 'video,audio,playlist';                                
                }else{
-                       var j_selector = '#'+force_id;
+                       var j_selector = '#' + force_id;
                }
                //process selected elements: 
                //ie8 does not play well with the jQuery video,audio,playlist selector use native: 
@@ -2175,8 +2175,8 @@ embedVideo.prototype = {
                
                 $j("#mv_play_pause_button_" + this_id + ' span').removeClass('ui-icon-play').addClass('ui-icon-pause');                           
                 $j("#mv_play_pause_button_" + this_id).unbind().btnBind().click(function(){                                    
-                  $j('#' + this_id ).get(0).pause();
-                 }).attr('title', gM('pause_clip'));
+                       $j('#' + this_id ).get(0).pause();
+                }).attr('title', gM('pause_clip'));
                   
        },
        load:function(){
@@ -2393,7 +2393,7 @@ embedVideo.prototype = {
                        var val = parseInt( perc*1000 ); 
                        $j('#mv_play_head_'+this_id).slider('value', val);
                        
-                       js_log("embed video set: " + '#mv_play_head_'+this_id + ' to ' + val);
+                       //js_log("embed video set: " + '#mv_play_head_'+this_id + ' to ' + val);
                }
                //js_log('set#mv_seeker_slider_'+this_id + ' perc in: ' + perc + ' * ' + $j('#mv_seeker_'+this_id).width() + ' = set to: '+ val + ' - '+ Math.round(this.mv_seeker_width*perc) );
                //js_log('op:' + offset_perc + ' *('+perc+' * ' + $j('#slider_'+id).width() + ')');
index dc6c974..7ae89a9 100644 (file)
@@ -150,13 +150,14 @@ lcPaths('',{
        '$j.fn.datePicker'      : 'jquery/plugins/jquery.datePicker.js',
        '$j.ui'                         : 'jquery/jquery.ui-1.7.1/ui/ui.core.js',       
        '$j.fn.ColorPicker'     : 'libClipEdit/colorpicker/js/colorpicker.js',
-       '$j.Jcrop'                      : 'libClipEdit/Jcrop/js/jquery.Jcrop.js'
+       '$j.Jcrop'                      : 'libClipEdit/Jcrop/js/jquery.Jcrop.js',
+       '$j.fn.simpleUploadForm': 'libAddMedia/simpleUploadForm.js'
 });    
 //query plugins
 lcPaths( 'jquery/plugins/', [
        '$j.secureEvalJSON',    
        '$j.cookie',
-       '$j.contextMenu',                               
+       '$j.contextMenu'                        
 ]);
 //jquery ui
 lcPaths('jquery/jquery.ui-1.7.1/ui/', [        
@@ -183,7 +184,7 @@ lcPaths('jquery/jquery.ui-1.7.1/ui/', [
        '$j.effects.slide',
        '$j.ui.accordion',
        '$j.ui.draggable',
-       '$j.ui.selectable',
+       '$j.ui.selectable'
 ], 
 {'j_replace':''});
 //add mediaLibs
@@ -192,7 +193,7 @@ lcPaths('libAddMedia/', [
        'mvAdvFirefogg',
     'mvBaseUploadInterface',
        'remoteSearchDriver',
-       'seqRemoteSearchDriver',
+       'seqRemoteSearchDriver' 
 ]);
 //search libs: 
 lcPaths('libAddMedia/searchLibs/', [
@@ -1041,7 +1042,8 @@ function npt2seconds( npt_str ){
  * @param api_url 'optional' the target api url
  * @param callback the callback function to pass the token or "false" to  
  */
-function get_mw_token( title, api_url, callback){
+function get_mw_token( title, api_url, callback){      
+       js_log(':get_mw_token:');
        if(!title && wgUserName){
                title = 'User:' + wgUserName; 
        }
diff --git a/js2/mwEmbed/mwHostProxy.html b/js2/mwEmbed/mwHostProxy.html
new file mode 100644 (file)
index 0000000..48787c9
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+       <title></title>                         
+       <script type="text/javascript">
+       
+       </script> 
+</head>
+<body>
+<h3> This file should be inclued by external sites that want to be proxied: </h3>
+</body>
+</html>
+
index c7e0023..3260103 100644 (file)
@@ -58,6 +58,7 @@ $wgJSAutoloadLocalClasses['j.ui.selectable']  = $wgMwEmbedDirectory . 'jquery/jqu
 // libAddMedia:
 $wgJSAutoloadLocalClasses['mvFirefogg']                = $wgMwEmbedDirectory . 'libAddMedia/mvFirefogg.js';
 $wgJSAutoloadLocalClasses['mvAdvFirefogg']             = $wgMwEmbedDirectory . 'libAddMedia/mvAdvFirefogg.js';
+$wgJSAutoloadLocalClasses['j.fn.simpleUploadForm']     = $wgMwEmbedDirectory . 'libAddMedia/simpleUploadForm.js';
 $wgJSAutoloadLocalClasses['mvBaseUploadInterface'] = $wgMwEmbedDirectory . 'libAddMedia/mvBaseUploadInterface.js';
 $wgJSAutoloadLocalClasses['remoteSearchDriver'] = $wgMwEmbedDirectory . 'libAddMedia/remoteSearchDriver.js';
 $wgJSAutoloadLocalClasses['seqRemoteSearchDriver'] = $wgMwEmbedDirectory . 'libAddMedia/seqRemoteSearchDriver.js';
diff --git a/js2/mwRemoteProxy.html b/js2/mwRemoteProxy.html
new file mode 100644 (file)
index 0000000..7d66d13
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+       <title>Javascript Api Proxy</title>
+       <style type="text/css">
+               body{
+                       font-size:80%;
+               }
+               img  {
+                       border:medium none;
+               }
+       </style>                        
+       <script type="text/javascript">
+               var domainList = [
+                       '127.0.0.1'
+               ];
+       </script> 
+</head>
+<body>
+<h3> This file proxies api and html output for source domains: </h3>
+<div id="domainList"></div>
+       <script type="text/javascript">
+               var o='';
+               for( var i in domainList){
+                       o+='<br><i>'+ domainList[i] + '</i>';
+               }
+       </script>
+</body>
+</html>
+