Revision: 48499
Author:   dale
Date:     2009-03-17 21:50:22 +0000 (Tue, 17 Mar 2009)

Log Message:
-----------
revamping of license tagging / images via creative commons urls. 
updates to archive.org search system.
improved ?debug handling in mv_embed
style updates for licensee display

Modified Paths:
--------------
    
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js
    
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/mediaWikiSearch.js
    
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js
    trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js
    trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
    trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css

Added Paths:
-----------
    
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/archiveOrgSearch.js

Removed Paths:
-------------
    
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/solrArchiveSearch.js

Modified: 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js
===================================================================
--- 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js   
    2009-03-17 21:49:13 UTC (rev 48498)
+++ 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js   
    2009-03-17 21:50:22 UTC (rev 48499)
@@ -23,9 +23,9 @@
                "cc_nc_title": "Noncommercial",
                "cc_nd_title": "No Derivative Works",
                "cc_sa_title": "Share Alike",
-               "cc_pd_title": "Public Domain"
+               "cc_pd_title": "Public Domain",
+               "unknown_license": "Unknown License"
 });
-
 var default_remote_search_options = {
        'profile':'mediawiki_edit',     
        'target_id':null, //the div that will hold the search interface
@@ -137,7 +137,7 @@
                        'homepage':'http://archive.org',
                        
                        
'api_url':'http://homeserver7.us.archive.org:8983/solr/select',
-                       'lib'   : 'solrArchive',
+                       'lib'   : 'archiveOrg',
                        'local' : false,
                        'resource_prefix': 'AO_',
                        'tab_img':true
@@ -208,28 +208,65 @@
                        }
                }
        },
-       getlicenseImgSet:function( license_key ){               
+       /*
+       * getlicenseImgSet
+       * @param license_key  the license key (ie "by-sa" or "by-nc-sa" etc) 
+       */
+       getlicenseImgSet: function( licenseObj ){               
+               //js_log('output images: '+ imgs);
+               return '<div class="rsd_license" title="'+ licenseObj.title + 
'" >' +
+                                       '<a target="_new" href="'+ 
licenseObj.lurl +'" ' + 
+                                       'title="' + licenseObj.title + '">'+ 
+                                                       licenseObj.img_html +
+                                       '</a>'+ 
+                               '</div>';
+       },
+       /*
+       * getLicenceKeyFromKey
+       * @param license_key the key of the license (must be defined in: 
this.licenses.cc.licenses)
+       */
+       getLicenceFromKey:function( license_key , force_url){
                if( typeof( this.licenses.cc.licenses[ license_key ]) == 
'undefined')
-                       return js_error('only cc licencs presently supported, 
could not find:' + license_key);
+                       return js_error('could not find:' + license_key);
                //set the current license pointer: 
                var cl = this.licenses.cc;
                var title = gM('cc_title');
                var imgs = '';          
                var license_set = license_key.split('-');               
                for(var i=0;i < license_set.length; i++){                       
-                       lkey =  license_set[i];                                 
                                                        
-                       title += gM( lkey + '_desc');
-                       imgs +='<img width="20" src="' + cl.base_img_url +
+                       lkey =  license_set[i];                                 
                        
+                       title += ' ' + gM( 'cc_' + lkey + '_title');
+                       imgs +='<img class="license_desc" width="20" src="' + 
cl.base_img_url +
                                cl.license_img[ lkey ].im + '">';
                }
-               js_log('output images: '+ imgs);
-               return '<div class="rsd_license" title="'+ title + '" >' +
-                                       '<a target="_new" href="'+ 
cl.base_license_url + cl.licenses[ lkey ] +
-                                               '" title="' + title + '">'+ 
-                                                       imgs +
-                                       '</a>'+ 
-                               '</div>';
+               return {
+                       'title': title,
+                       'img_html':imgs,
+                       'lurl':cl.base_license_url + cl.licenses[ lkey ]
+               };
        },
+       /*
+       * getLicenceKeyFromUrl
+       * @param licence_url the url of the license
+       */
+       getLicenceFromUrl: function( license_url ){
+               //first do a direct lookup check: 
+               for(var i in this.licenses.cc.licenses){
+                       var lkey = this.licenses.cc.licenses[i].split('/')[0];
+                       //guess by url trim
+                       js_log('looking for:/' + lkey +'/  in:' + 
parseUri(license_url).path );
+                       if( parseUri(license_url).path.indexOf('/'+ lkey +'/') 
!= -1){
+                               js_log("FOUND");
+                               return this.getLicenceFromKey( i , license_url);
+                       }
+               }
+               //could not find it return unknown_license
+               return {
+                       'title'         : gM('unknown_license'),
+                       'img_html'      : '<span>' + gM('unknown_license') + 
'</span>',
+                       'lurl'          : license_url
+               };
+       },
        //some default layout values:           
        thumb_width             : 80,
        image_edit_width        : 600,
@@ -388,7 +425,9 @@
                        );
                });  
        },
-       runSearch: function(){                          
+       runSearch: function(){  
+               //draw_direct_flag
+               var draw_direct_flag = true;                    
                //set loading div: 
                mv_set_loading('#rsd_results');                 
                //get a remote search object for each search provider and run 
the search
@@ -405,12 +444,23 @@
                                
                        //check if we need to update: 
                        if( typeof cp.sObj != 'undefined' ){
-                               if(cp.sObj.last_query == $j('#rsd_q').val() && 
cp.sObj.last_offset == cp.offset)
-                                       continue;                               
        
+                               if(cp.sObj.last_query == $j('#rsd_q').val() && 
cp.sObj.last_offset == cp.offset){
+                                       js_log('last query is: ' + 
cp.sObj.last_query + ' matches: ' +  $j('#rsd_q').val());                       
             
+                               }else{
+                                       js_log('last query is: ' + 
cp.sObj.last_query + ' not match: ' +  $j('#rsd_q').val());
+                                       draw_direct_flag = false;
+                               }
+                       }else{
+                               draw_direct_flag = false;
                        }
-                       //make sure the search library is loaded and do the 
search: 
-                       this.getLibSearchResults( cp );                 
-               }                       
+                       if( !draw_direct_flag ){                        
+                               //make sure the search library is loaded and 
issue the search request 
+                               this.getLibSearchResults( cp );
+                       }                       
+               }
+               //draw the reulsts without runing a query
+               if(draw_direct_flag)
+                       this.drawOutputResults();               
        },      
        getLibSearchResults:function( cp ){
                var _this = this;               
@@ -425,8 +475,8 @@
                        //inherit defaults if not set: 
                        cp.limit = (cp.limit) ? cp.limit : cp.sObj.limit;
                        cp.offset = (cp.offset) ? cp.offset : cp.sObj.offset;
-                       
-                       //do search:
+                                               
+                       //do search             
                        cp.sObj.getSearchResults();
                        _this.checkResultsDone();                               
                });     
@@ -750,7 +800,7 @@
                        //rewrite by id handldes getting any libs we are 
missing:               
                        rewrite_by_id('embed_vid',function(){
                                //grab any information that we got from the ROE 
xml or parsed from the media file
-                               rObj = rObj.pSobj.getEmbedObjParsedInfo(rObj, 
'embed_vid');                                     
+                               rObj = rObj.pSobj.getEmbedObjParsedInfo( rObj, 
'embed_vid' );                                   
                                //add the re-sizable to the doLoad request: 
                                loadLibs['$j.ui.resizable']       = 
'jquery/jquery.ui-1.5.2/ui/minified/ui.resizable.min.js',
                                loadLibs['$j.fn.hoverIntent'] = 
'jquery/plugins/jquery.hoverIntent.js';
@@ -1185,17 +1235,25 @@
        num_results             :0,     
        
        //init the object: 
-       init:function( initObj ){               
+       init: function( initObj ){              
                js_log('mvBaseRemoteSearch:init');
                for(var i in initObj){
                        this[i] = initObj[i];
                }
                return this;
        },
+       getSearchResults:function(){
+               //empty out the current results before issuing a request 
+               this.resultsObj = {};
+               //do global getSearchResults bindings
+               this.last_query = $j('#rsd_q').val();
+               this.last_offset = this.cp.offset;
+               //@@todo its possible that video rss is the "default" format we 
could put that logic here: 
+       },
        /*
        * Parses and adds video rss based input format
-       * @data XML             data to parse
-       * @provider_url         the source url (used to generate absolute 
links)  
+       * @param $data XML data to parse
+       * @param provider_url   the source url (used to generate absolute 
links)  
        */
        addRSSData:function( data , provider_url ){
                var _this = this;
@@ -1204,7 +1262,7 @@
                if(provider_url){
                        pUrl =  parseUri( provider_url );
                        http_host = pUrl.protocol +'://'+ pUrl.authority;  
-                       http_path = pUrl.directory;
+                       http_path = pUrl.directory;     
                }
                items = data.getElementsByTagName('item');
                $j.each(data.getElementsByTagName('item'), function(inx, item){ 
        
@@ -1283,4 +1341,3 @@
                return rObj;
        }
 }
-

Copied: 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/archiveOrgSearch.js
 (from rev 48488, 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/solrArchiveSearch.js)
===================================================================
--- 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/archiveOrgSearch.js
                              (rev 0)
+++ 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/archiveOrgSearch.js
      2009-03-17 21:50:22 UTC (rev 48499)
@@ -0,0 +1,96 @@
+//archive.org uses solr engine: 
+//more about solr here: 
+//http://lucene.apache.org/solr/
+
+var archiveOrgSearch = function ( initObj){
+       return this.init( initObj );
+}
+archiveOrgSearch.prototype = {
+       init:function( initObj ){
+               //init base class and inherit: 
+               var baseSearch = new mvBaseRemoteSearch( initObj );
+               for(var i in baseSearch){
+                       if(typeof this[i] =='undefined'){
+                               this[i] = baseSearch[i];
+                       }else{
+                               this['parent_'+i] =  baseSearch[i];
+                       }
+               }
+               //inherit the cp settings for 
+       },
+       getSearchResults:function(){
+               //call parent: 
+               this.parent_getSearchResults();
+               
+               var _this = this;               
+               this.loading=true;
+               js_log('f:getSearchResults for:' + $j('#rsd_q').val() );        
        
+               //build the query var
+               var q = $j('#rsd_q').val();
+               //@@todo check advanced options: include audio and images media 
types
+               //for now force (Ogg video) & a creativecommons license
+               q+=' format:(Ogg video)';
+               q+=' licenseurl:(http\\:\\/\\/creativecommons\\.org*)';
+               var reqObj = {
+                       'q': q, //just search for video atm
+                       
'fl':"description,title,identifier,licenseurl,format,license,thumbnail",        
                
+                       'wt':'json',                    
+                       'rows':'30',
+                       'indent':'yes'                  
+               }                                                               
        
+               do_api_req( {
+                       'data':reqObj, 
+                       'url':this.cp.api_url,
+                       'jsonCB':'json.wrf'
+                       }, function(data){                              
+                               _this.addResults( data);
+                               _this.loading = false;
+                       }
+               );
+       },
+       addResults:function( data ){            
+               var _this = this;                       
+               if(data.response && data.response.docs){
+                       //set result info: 
+                       this.num_results = data.response.numFound;
+               
+                       for(var resource_id in data.response.docs){
+                               var resource = data.response.docs[resource_id];
+                               //make sure the reop is shared
+                               rObj = {
+                                       'titleKey'       :resource.identifier,
+                                       'link'           
:'http://www.archive.org/details/' + resource.identifier,                       
       
+                                       'title'          :resource.title
+                               };                      
+                               
rObj['poster']='http://www.archive.org/download/' + 
resource.identifier+'/format=thumbnail';
+                               
rObj['poster_ani']='http://www.archive.org/download/' + 
resource.identifier+'/format=Animated+Gif';
+                               
+                               rObj['thumbwidth']=160;
+                               rObj['thumbheight']=110;                        
        
+                               rObj['src']='http://www.archive.org/download/' 
+ resource.identifier+'/format=Ogg+video';
+                               rObj['mime']='application/ogg';
+                               rObj['pSobj']=_this;                            
+                               
+                               //set the licence: (rsd is a pointer to the 
parent remoteSearchDriver ) 
+                               rObj['license'] = this.rsd.getLicenceFromUrl( 
resource.licenseurl );                                                          
   
+                               
+                               this.resultsObj[ resource_id ] =rObj;
+                               
+                               //likely a audio clip if no poster and type 
application/ogg 
+                               //@@todo we should return audio/ogg for the 
mime type or some other way to specify its "audio" 
+                                               
+                               //this.num_results++;   
+                               //for(var i in this.resultsObj[page_id]){
+                               //      js_log('added: '+ i +' '+ 
this.resultsObj[page_id][i]);
+                               //}
+                       }
+               }               
+       },
+       getEmbedHTML: function( rObj , options) {
+               js_log('getEmbedHTML:: ' + rObj.poster );
+               var id_attr = (options['id'])?' id = "' + options['id'] +'" ': 
'';
+               if(rObj.mime == 'application/ogg' || rObj.mime == 'audio/ogg' 
|| rObj.mime=='video/ogg'){
+                       return '<video ' + id_attr + ' src="' + rObj.src + '" 
poster="' + rObj.poster + '" type="video/ogg"></video>';
+               }
+       },              
+}
\ No newline at end of file


Property changes on: 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/archiveOrgSearch.js
___________________________________________________________________
Added: svn:mergeinfo
   + 
Added: svn:eol-style
   + native

Modified: 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/mediaWikiSearch.js
===================================================================
--- 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/mediaWikiSearch.js
       2009-03-17 21:49:13 UTC (rev 48498)
+++ 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/mediaWikiSearch.js
       2009-03-17 21:50:22 UTC (rev 48499)
@@ -15,11 +15,12 @@
                //inherit the cp settings for 
        },
        getSearchResults:function(){
+               //call parent: 
+               this.parent_getSearchResults();
+               
                var _this = this;
                this.loading=true;
                js_log('f:getSearchResults for:' + $j('#rsd_q').val() );        
        
-               //empty out the current results: 
-               this.resultsObj={};
                //do two queries against the Image / File / MVD namespace:
                                                                                
                //build the image request object: 
@@ -38,8 +39,7 @@
                };                              
                //set up the number of request: 
                this.completed_req=0;
-               this.num_req=1;
-               this.last_query = $j('#rsd_q').val();
+               this.num_req=1;         
                //setup the number of requests result flag:                     
                                                                
                //also do a request for page titles (would be nice if api could 
query both at the same time) 
                reqObj['gsrwhat']='text';

Modified: 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js
===================================================================
--- 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js
 2009-03-17 21:49:13 UTC (rev 48498)
+++ 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js
 2009-03-17 21:50:22 UTC (rev 48499)
@@ -21,6 +21,9 @@
                }
        },      
        getSearchResults:function(){
+               //call parent: 
+               this.parent_getSearchResults();
+               
                var _this = this;
                //start loading:
                _this.loading= 1;
@@ -30,21 +33,18 @@
                //add on the req_param
                for(var i in this.reqObj){
                        url += '&' + i + '=' + this.reqObj[i];
-               }
-               //do basic query:
-               this.last_query = $j('#rsd_q').val();
-               this.last_offset = this.cp.offset;
+               }               
                url += '&f[0][t]=match&f[0][v]=' + $j('#rsd_q').val();
                //add offset limit: 
                url+='&limit=' + this.cp.limit;
-               url+='&offset=' + this.cp.offset;
+               url+='&offset=' + this.cp.offset;                               
                
                do_request(url, function(data){ 
                        //should have an xml rss data object:
                        _this.addRSSData( data , url );
-                       //do some metavid specific pos processing on the rObj 
data: 
-                       for(var i in _this.resultsObj){
-                               var rObj = _this.resultsObj[i]; 
+                       //do some metavid specific pos processing on the rObj 
data:
+                       for(var i in _this.resultsObj){                         
+                               var rObj = _this.resultsObj[i];                 
        
                                var proe = parseUri( rObj['roe_url'] );         
                
                                rObj['start_time'] = 
proe.queryKey['t'].split('/')[0];
                                rObj['end_time'] = 
proe.queryKey['t'].split('/')[1];    

Deleted: 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/solrArchiveSearch.js
===================================================================
--- 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/solrArchiveSearch.js
     2009-03-17 21:49:13 UTC (rev 48498)
+++ 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/solrArchiveSearch.js
     2009-03-17 21:50:22 UTC (rev 48499)
@@ -1,90 +0,0 @@
-//archive.org uses solr engine: 
-//more about solr here: 
-//http://lucene.apache.org/solr/
-//if we ever have another remote repository using solr we could abstract 
thouse pieces into a seperate lib
-
-var solrArchiveSearch = function ( initObj){
-       return this.init( initObj );
-}
-solrArchiveSearch.prototype = {
-       init:function( initObj ){
-               //init base class and inherit: 
-               var baseSearch = new mvBaseRemoteSearch( initObj );
-               for(var i in baseSearch){
-                       if(typeof this[i] =='undefined'){
-                               this[i] = baseSearch[i];
-                       }else{
-                               this['parent_'+i] =  baseSearch[i];
-                       }
-               }
-               //inherit the cp settings for 
-       },
-       getSearchResults:function(){
-               var _this = this;
-               this.loading=true;
-               js_log('f:getSearchResults for:' + $j('#rsd_q').val() );
-               //build the query var
-               var q = $j('#rsd_q').val();
-               //@@todo check advanced options: include audio and images media 
types
-               //for now force (Ogg video) & a creativecommons license
-               q+=' format:(Ogg video)';
-               q+=' licenseurl:(http\\:\\/\\/creativecommons\\.org*)';
-               var reqObj = {
-                       'q': q, //just search for video atm
-                       
'fl':"description,title,identifier,licenseurl,format,license,thumbnail",        
                
-                       'wt':'json',                    
-                       'rows':'30',
-                       'indent':'yes'                  
-               }                                                               
        
-               do_api_req( {
-                       'data':reqObj, 
-                       'url':this.cp.api_url,
-                       'jsonCB':'json.wrf'
-                       }, function(data){
-                               _this.addResults( data);
-                               _this.loading = false;
-                       }
-               );
-       },
-       addResults:function( data ){            
-               var _this = this;       
-               if(data.response && data.response.docs){
-                       for(var resource_id in data.response.docs){
-                               var resource = data.response.docs[resource_id];
-                               //make sure the reop is shared
-                               rObj = {
-                                       'titleKey'       :resource.identifier,
-                                       'link'           
:'http://www.archive.org/details/' + resource.identifier,                       
       
-                                       'title'          :resource.title
-                               };                      
-                               
rObj['poster']='http://www.archive.org/download/' + 
resource.identifier+'/format=thumbnail';
-                               
rObj['poster_ani']='http://www.archive.org/download/' + 
resource.identifier+'/format=Animated+Gif';
-                               
-                               rObj['thumbwidth']=160;
-                               rObj['thumbheight']=110;                        
        
-                               rObj['src']='http://www.archive.org/download/' 
+ resource.identifier+'/format=Ogg+video';
-                               rObj['mime']='application/ogg';
-                               rObj['pSobj']=_this;                            
-                               
-                               //set the licence: 
-                               
-                               this.resultsObj[ resource_id ] =rObj;
-                               
-                               //likely a audio clip if no poster and type 
application/ogg 
-                               //@@todo we should return audio/ogg for the 
mime type or some other way to specify its "audio" 
-                                               
-                               //this.num_results++;   
-                               //for(var i in this.resultsObj[page_id]){
-                               //      js_log('added: '+ i +' '+ 
this.resultsObj[page_id][i]);
-                               //}
-                       }
-               }               
-       },
-       getEmbedHTML: function( rObj , options) {
-               js_log('getEmbedHTML:: ' + rObj.poster );
-               var id_attr = (options['id'])?' id = "' + options['id'] +'" ': 
'';
-               if(rObj.mime == 'application/ogg' || rObj.mime == 'audio/ogg' 
|| rObj.mime=='video/ogg'){
-                       return '<video ' + id_attr + ' src="' + rObj.src + '" 
poster="' + rObj.poster + '" type="video/ogg"></video>';
-               }
-       },              
-}
\ No newline at end of file

Modified: trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js       
2009-03-17 21:49:13 UTC (rev 48498)
+++ trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js       
2009-03-17 21:50:22 UTC (rev 48499)
@@ -326,7 +326,7 @@
                }
                $j('#'+this.control_ct).append( this.getInsertDesc() );
                
-               $j('#'+this.control_ct).append( '<b>Metavid clip inserts not 
yet supported</b>' +
+               $j('#'+this.control_ct).append( '<b>Remote Clip inserts not yet 
supported</b>' +
                        '<a href="#" class="mv_cancel_img_edit" title="' + 
gM('mv_cancel_image_insert')+'">' + gM('mv_cancel_image_insert') + '</a> ');    
                             
                //$j('#'+this.control_ct).append( this.getInsertDesc() + 
this.getInsertAction() );                              
                

Modified: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js     2009-03-17 
21:49:13 UTC (rev 48498)
+++ trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js     2009-03-17 
21:50:22 UTC (rev 48499)
@@ -54,11 +54,6 @@
 if( !mv_embed_path ){
        var mv_embed_path = getMvEmbedPath();
 }
-//js_log("mv embed path:"+ mv_embed_path);
-//set the unique request id (for ensuring fresh copies of scripts on updates) 
-if( !mv_embed_urid ){
-       var mv_embed_urid = getMvUniqueReqId();
-}
 
 var mvLoadEvent = new Array() //the onReady global event.. @@todo should be 
removed and use jquery style document.ready stuff insted
 //the default thumbnail for missing images:
@@ -220,7 +215,7 @@
         load_error:false,//load error flag (false by default)
         load_time:0,    
         callbacks:new Array(),                  
-        doLoad:function(libs, callback){
+        doLoad:function(libs, callback){               
                this.ctime++;
                if(libs){ //setup this.libs:                                    
        
                        //first check if we already have this lib loaded
@@ -235,8 +230,7 @@
                                js_log('all libs already loaded skipping...' + 
libs);
                                callback();
                                return ;
-                       }                                               
-                       debug_attr = (parseUri( 
getMvEmbedURL()).queryKey)?'&debug=true':'';    
+                       }                                                       
                                
                        //check if we should use the script loader to combine 
all the requests into one:
                        if( MV_USE_SCRIPT_LOADER ){             
                                var class_set = '';
@@ -252,7 +246,7 @@
                                }                                               
                                
                                this.libs[ last_class ] = 
'mvwScriptLoader.php?class=' + class_set +
                                                                        
'&urid='+ getMvUniqueReqId()+
-                                                                       
debug_attr;                     
+                                                                       
(parseUri( getMvEmbedURL() ).queryKey['debug'])?'&debug=true':'';               
        
                        }else{                                                  
                                                 
                                //do many requests:
                                for(var i in libs){ //for in loop oky on object
@@ -1201,8 +1195,7 @@
        global_req_cb[response['cb_inx']]( response['pay_load'] );
 }
 //load external js via dom injection
-//@@todo swich over to jQuery injection
-function loadExternalJs(url, callback){
+function loadExternalJs( url ){
        js_log('load js: '+ url);
     //if(window['$j']) //use jquery call:    
        /*$j.ajax({
@@ -1232,7 +1225,7 @@
 }
 function loadExternalCss(url){
        if( url.indexOf('?') == -1 ){
-               url+='?'+mv_embed_urid;
+               url+='?'+getMvUniqueReqId();
        }
    js_log('load css: ' + url);
    var e = document.createElement("link");
@@ -1255,7 +1248,13 @@
 }
 //gets a unique request id to ensure fresh javascript 
 function getMvUniqueReqId(){
-       var mv_embed_url = getMvEmbedURL();
+       var mv_embed_url = getMvEmbedURL();             
+       //if in debug mode get a fresh unique request key: 
+       if(  parseUri( mv_embed_url ).queryKey['debug'] == 'true'){
+               var d = new Date();
+               return d.getTime()
+       }
+       //if we have a uri retun that: 
        var urid = parseUri( mv_embed_url).queryKey['urid']
        if( urid )
                return urid;

Modified: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css  
2009-03-17 21:49:13 UTC (rev 48498)
+++ trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css  
2009-03-17 21:50:22 UTC (rev 48499)
@@ -568,6 +568,15 @@
 .rsd_license img{
        float:left;
 }
+.rsd_license span{
+       float:left;
+       background:#FFF;
+       color:#200;
+       font-size:x-small;
+       filter:alpha(opacity=70);
+       -moz-opacity:0.7;
+       opacity:0.7;
+}
 .mv_clip_box_result{
        padding:10px;
        float:left;



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to