Revision: 48614
Author:   dale
Date:     2009-03-19 23:31:59 +0000 (Thu, 19 Mar 2009)

Log Message:
-----------
a few bug fixes
style updates

Modified Paths:
--------------
    trunk/extensions/MetavidWiki/includes/MV_Title.php
    trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php
    
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.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/skins/mvpcf/styles.css

Modified: trunk/extensions/MetavidWiki/includes/MV_Title.php
===================================================================
--- trunk/extensions/MetavidWiki/includes/MV_Title.php  2009-03-19 21:48:16 UTC 
(rev 48613)
+++ trunk/extensions/MetavidWiki/includes/MV_Title.php  2009-03-19 23:31:59 UTC 
(rev 48614)
@@ -44,9 +44,10 @@
                // print "mv_title stream name: " . $this->stream_name. "\n";
        }
        function inheritTitle( & $title ) {
-               if( !is_object($title))
-                       return false;
+               if( !is_object($title)){
                        //print_r( debug_backtrace() );
+                       return false;           
+               }
                foreach ( $title as $k => $v ) {
                        $this->$k = $v;
                }

Modified: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php
===================================================================
--- trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php 
2009-03-19 21:48:16 UTC (rev 48613)
+++ trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php 
2009-03-19 23:31:59 UTC (rev 48614)
@@ -583,37 +583,7 @@
                        if( $pmvd->wiki_title){                 
                                $pMvTitle =  new MV_Title( $pmvd->wiki_title );
                                $pAnnoStreamTitle = Title :: MakeTitle( 
MV_NS_STREAM, $pMvTitle->getNearStreamName( 0 ) );
-                               
-                               $parent_clip_desc = 'Parent Clip';
-                               if($pmvd->Speech_by){   
-                                       $personTitle = Title :: newFromText( 
$pmvd->Speech_by );
-                                       $parent_clip_desc = 'Speech By ' . 
$personTitle->getText();
-                               }                                               
                        
-                               $pMvTitle =  new MV_Title( $pmvd->wiki_title );
-                               $pAnnoStreamLink = Title :: MakeTitle( 
MV_NS_STREAM, $pMvTitle->getNearStreamName( 0 ) );
-                               $clip_desc_txt = 'Segment';
-                               if($pmvd->Speech_by){   
-                                       $personTitle = Title :: newFromText( 
$pmvd->Speech_by );
-                                       $clip_desc_txt = 'Speech By ' . 
$personTitle->getText();
-                               }                                       
-                                       
-                               $desc_html.='This clip is part of a '. 
seconds2Description ( $pMvTitle->getSegmentDuration() ). ' ' . 
-                                       $sk->makeKnownLinkObj($pAnnoStreamLink, 
$clip_desc_txt );
-                               if($pmvd->category){
-                                       $desc_html.=' <br>Covering: ';
-                                       $coma='';
-                                       foreach($pmvd->category as 
$cat_titlekey ){
-                                               $cTitle = $cTitle = Title :: 
MakeTitle( NS_CATEGORY, $cat_titlekey );
-                                               $desc_html .= $coma . 
$sk->makeKnownLinkObj( $cTitle, $cTitle->getText() );
-                                               $coma=', ';
-                                       }
-                               }
-                               if($pmvd->Bill){
-                                       $desc_html.=' <br>Bill: ';              
                                
-                                       $bTitle = Title :: newFromText( 
$pmvd->Bill );
-                                       $desc_html .= $sk->makeKnownLinkObj( 
$bTitle, $bTitle->getText() );                                     
-                               }                                       
-                       }       
+                       }                       
                }
                
                
@@ -661,20 +631,27 @@
 <?php echo mvRSSFeed::xmlEncode( $talkpage->getFullUrl() )?>
 </comments>
 <?php
+$person='';
+if($pmvd && $pmvd->Speech_by ){
+       $personTitle = Title :: newFromText( $pmvd->Speech_by );                
                
+?>
+<media:person label="<?php echo $personTitle->getText() ?>" url="<?php echo 
mvRSSFeed::xmlEncode( $personTitle->getFullURL() ); ?>
+<?php
+}
 //handle any parent clip tag info: 
 if( $pmvd ){ ?>
-       <media:parent_clip label="<?php echo $parent_clip_desc ?>" url="<?php 
echo mvRSSFeed::xmlEncode( $pAnnoStreamTitle->getFullUrl() )  ?>" />
+<media:parent_clip label="<?php echo $parent_clip_desc ?>" url="<?php echo 
mvRSSFeed::xmlEncode( $pAnnoStreamTitle->getFullUrl() )  ?>" />
        <?php if( $pmvd->Bill ){                
                $bTitle = Title :: newFromText( $pmvd->Bill );
                ?>
-               <media:bill label="<?php echo $bTitle->getText() ?>" url="<?php 
echo mvRSSFeed::xmlEncode( $bTitle->getFullURL() );?>" />               
-       <?php }
+<media:bill label="<?php echo $bTitle->getText() ?>" url="<?php echo 
mvRSSFeed::xmlEncode( $bTitle->getFullURL() );?>" />              
+<?php }
        if( $pmvd->category ){  
                foreach($pmvd->category as $cat_titlekey ){ 
                        $cTitle = $cTitle = Title :: MakeTitle( NS_CATEGORY, 
$cat_titlekey );
                ?>
-               <media:category label="<?php echo $cTitle->getText() ?> 
url=<?php echo mvRSSFeed::xmlEncode( $cTitle->getFullUrl())  ?>" />
-               <?php
+               <media:category label="<?php echo $cTitle->getText()?>" 
url=<?php echo mvRSSFeed::xmlEncode( $cTitle->getFullUrl())  ?>" />
+<?php
                }
        }
 }

Modified: 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js
===================================================================
--- 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js   
    2009-03-19 21:48:16 UTC (rev 48613)
+++ 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js   
    2009-03-19 23:31:59 UTC (rev 48614)
@@ -794,7 +794,7 @@
                                                
mv_get_loading_img('position:absolute;top:30px;left:30px', 'mv_img_loader') + 
                                '</div>'+
                                '<div id="clip_edit_ctrl" 
style="position:absolute;border:solid thin blue;'+
-                                       'top:35px;left:' + (maxWidth+30) 
+'px;bottom:0px;right:0px;">'+
+                                       'top:35px;left:' + (maxWidth+30) 
+'px;bottom:0px;right:0px;padding:5px;overflow:auto;">'+
                                        mv_get_loading_img() +                  
                        
                                '</div>'+
                        '</div>');
@@ -1364,7 +1364,7 @@
                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
        * @param $data XML data to parse
@@ -1432,6 +1432,14 @@
        getImageObj:function( rObj, size, callback){
                callback( {'url':rObj.poster} );
        },
+       //by default just return the rObj.desc
+       getInlineDescWiki:function( rObj ){
+               //return striped html  & trim white space 
+               if(rObj.desc)
+                       return 
rObj.desc.replace(/(<([^>]+)>)/ig,"").replace(/^\s+|\s+$/g,"");
+               //no desc avaliable: 
+               return '';
+       },
        //by default just return the poster (clients can overide) 
        getImageTransform:function(rObj, opt){
                return rObj.poster;

Modified: 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js
===================================================================
--- 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js
 2009-03-19 21:48:16 UTC (rev 48613)
+++ 
trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js
 2009-03-19 23:31:59 UTC (rev 48614)
@@ -62,12 +62,18 @@
                });
        },
        getEmbedWikiText:function(rObj, options){
-               //if we are using a local copy do the standard b:  
+               //if we are using a local copy do the standard embed:  
                if( this.cp.local_copy == true)
                        return this.parent_getEmbedWikiText(rObj, options);     
                                                        
-               //if local_copy is false and embed metavid extension is 
enabled:                
-               return 
+               //else get using the updated property id::              
+               js_log('getEmbedWikiText missing embed method for 
this.cp.local_copy==false');
        },
+       //format is "quote" followed by [[name of person]]
+       getInlineDescWiki:function( rObj ){             
+               var desc_val = this.parent_getInlineDescWiki(rObj);
+               var desc_parts = desc_val.split(':',2);
+               return '"' + desc_parts[1].replace(/^\s+|\s+$/g,"") + '" by [[' 
+ desc_parts[0].replace(/^\s+|\s+$/g,"") + ']]';
+       },
        getEmbedHTML:function( rObj , options ){
                var id_attr = (options['id'])?' id = "' + options['id'] +'" ': 
'';
                var style_attr = (options['max_width'])?' 
style="width:'+options['max_width']+'px;"':'';        

Modified: trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js       
2009-03-19 21:48:16 UTC (rev 48613)
+++ trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js       
2009-03-19 23:31:59 UTC (rev 48614)
@@ -379,9 +379,15 @@
                        '<div style="clear: both;"/>'+          
                        '<input id="mv_preview_clip" type="button" 
value="Preview/Play In-out points">';
        },
-       getInsertDesc:function(){
-               return '<h3>Inline Description</h3><br>'+                       
        
-                                       '<textarea style="width:300px;" 
id="mv_inline_img_desc" rows="4" cols="30"></textarea><br>';
+       getInsertDesc:function(){               
+               var o= '<h3>Inline Description</h3>'+                           
+                                       '<textarea style="width:375px;" 
id="mv_inline_img_desc" rows="5" cols="30">';                           
+               if( this.p_rsdObj ){
+                       //if we have a parent remote search driver let it parse 
the inline description          
+                       o+= this.rObj.pSobj.getInlineDescWiki( this.rObj );
+               }
+               o+='</textarea><br>';           
+               return o;
        },
        getInsertAction:function(){
                return '<h3>Actions</h3>'+
@@ -457,7 +463,7 @@
                this.applyInsertControlBindings();
        },
        applyVideoAdj:function(){               
-               js_log('applyVideoAdj::');              
+               js_log('applyVideoAdj::');                              
                //update video related keys             
                this.rObj['start_time'] = $j('#mv_start_hr_rsd').val();
                this.rObj['end_time'] = $j('#mv_end_hr_rsd').val();

Modified: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css  
2009-03-19 21:48:16 UTC (rev 48613)
+++ trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css  
2009-03-19 23:31:59 UTC (rev 48614)
@@ -563,7 +563,6 @@
        position:absolute;
        bottom:0px;
        left:0px;
-       width:100%;
 }
 .rsd_license img{
        float:left;



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

Reply via email to