http://www.mediawiki.org/wiki/Special:Code/MediaWiki/55468

Revision: 55468
Author:   dale
Date:     2009-08-22 06:49:47 +0000 (Sat, 22 Aug 2009)

Log Message:
-----------
* Fixed some AMW issues

Modified Paths:
--------------
    trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
    trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
    trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js

Modified: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
===================================================================
--- trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js       
2009-08-22 06:48:32 UTC (rev 55467)
+++ trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js       
2009-08-22 06:49:47 UTC (rev 55468)
@@ -576,6 +576,7 @@
                                var url = 
apiRes.upload.imageinfo.descriptionurl;
                                //check done action:
                                if( _this.done_upload_cb && typeof 
_this.done_upload_cb == 'function'){
+                                       js_log("call done_upload_cb");
                                        //close up shop:
                                        $j('#upProgressDialog').dialog('close');
                                        //call the callback:

Modified: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
===================================================================
--- trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js  2009-08-22 
06:48:32 UTC (rev 55467)
+++ trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js  2009-08-22 
06:49:47 UTC (rev 55468)
@@ -1064,9 +1064,7 @@
        addResourceEditLoader:function(maxWidth, overflow_style){
                var _this = this;
                if(!maxWidth)maxWidth=400;
-               if(!overflow_style)overflow_style='overflow:auto;';
-               //hide the results container
-               $j('#rsd_results_container').hide();                    
+               if(!overflow_style)overflow_style='overflow:auto;';             
                        
                //remove any old instance: 
                $j( _this.target_container 
).find('#rsd_resource_edit').remove();
                //add the edit layout window with loading place holders 
@@ -1123,7 +1121,7 @@
 
 
                //try and keep aspect ratio for the thumbnail that we clicked:
-               var tRatio =   $j('#rsd_edit_img').height() / 
$j('#rsd_edit_img').width();
+               var tRatio =    $j('#rsd_edit_img').width() / 
$j('#rsd_edit_img').height() ;
                if(     ! tRatio )
                        var tRatio = 1; //set ratio to 1 if the width of the 
thumbnail can't be found for some reason
 
@@ -1162,16 +1160,14 @@
                        rObj['width'] = imObj.width;
                        rObj['height'] = imObj.height;
 
-                       //see if we need to animate some transition
-                       var newSize = false;
+                       //see if we need to animate some transition             
        
                        if( size.width != imObj.width ){
                                js_log('loadHQImg:size mismatch: ' + size.width 
+ ' != ' + imObj.width );
-                               newSize={
+                               //set the target id to the new size:
+                               $j('#'+target_img_id).animate( {
                                        'width':imObj.width + 'px',
                                        'height':imObj.height + 'px'
-                               }
-                               //set the target id to the new size:
-                               $j('#'+target_img_id).animate( newSize );
+                               });
                        }else{
                                js_log('using req size: ' + imObj.width + 'x' + 
imObj.height);
                                $j('#'+target_img_id).animate( 
{'width':imObj.width+'px', 'height' : imObj.height + 'px'});
@@ -1679,7 +1675,7 @@
                                 //update if its video or audio:
                                 if( rObj.mime.indexOf('audio')!=-1 ||
                                         rObj.mime.indexOf('video')!=-1 ||
-                                        rObj.mime.indexOf('/ogg') !=-1){
+                                        rObj.mime.indexOf('/ogg') !=-1){       
                                
                                         mvJsLoader.embedVideoCheck(function(){
                                                mv_video_embed();
                                         });

Modified: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js
===================================================================
--- trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js  
2009-08-22 06:48:32 UTC (rev 55467)
+++ trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js  
2009-08-22 06:49:47 UTC (rev 55468)
@@ -296,11 +296,11 @@
                        if( rObj.crop == null)
                                return imgHtml
                        //else do crop output:  
-                       return '<div style="width:' + rObj.crop.wpx +'">' +     
                        
-                               '<div style="width:'+rObj.crop.w +'px;height: ' 
+ rObj.crop.h +'px;overflow:hidden;position:relative">' +
-                               '<div style="position:relative;top:-' + 
rObj.crop.y +'px;left:-' + rObj.crop.x +'px">'+
-                                       imgHtml + 
-                               '</div>';                       
+                               return '<div style="width:'+rObj.crop.w 
+'px;height: ' + rObj.crop.h +'px;overflow:hidden;position:relative">' +
+                                                       '<div 
style="position:relative;top:-' + rObj.crop.y +'px;left:-' + rObj.crop.x 
+'px">'+
+                                                               imgHtml + 
+                                                       '</div>'+
+                                               '</div>';                       
                }
                var ahtml='';
                if(rObj.mime == 'application/ogg' || rObj.mime == 'audio/ogg'){



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to