From: Michael Dale Date: Sat, 22 Aug 2009 06:49:47 +0000 (+0000) Subject: * Fixed some AMW issues X-Git-Tag: 1.31.0-rc.0~40129 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=5b94e8633efd40306b9f21b5982649efb18c2d25;p=lhc%2Fweb%2Fwiklou.git * Fixed some AMW issues --- diff --git a/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js b/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js index 1618e3f69b..438b563b41 100644 --- a/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js +++ b/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js @@ -576,6 +576,7 @@ mvBaseUploadInterface.prototype = { 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: diff --git a/js2/mwEmbed/libAddMedia/remoteSearchDriver.js b/js2/mwEmbed/libAddMedia/remoteSearchDriver.js index 63fdb64b5e..5ef8d1a038 100644 --- a/js2/mwEmbed/libAddMedia/remoteSearchDriver.js +++ b/js2/mwEmbed/libAddMedia/remoteSearchDriver.js @@ -1064,9 +1064,7 @@ remoteSearchDriver.prototype = { 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 @@ remoteSearchDriver.prototype = { //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 @@ remoteSearchDriver.prototype = { 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 @@ remoteSearchDriver.prototype = { //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(); }); diff --git a/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js b/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js index 896e8c1e3a..b7223ffc00 100644 --- a/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js +++ b/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js @@ -296,11 +296,11 @@ mediaWikiSearch.prototype = { if( rObj.crop == null) return imgHtml //else do crop output: - return '
' + - '
' + - '
'+ - imgHtml + - '
'; + return '
' + + '
'+ + imgHtml + + '
'+ + '
'; } var ahtml=''; if(rObj.mime == 'application/ogg' || rObj.mime == 'audio/ogg'){