Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js |
— | — | @@ -296,11 +296,11 @@ |
297 | 297 | if( rObj.crop == null) |
298 | 298 | return imgHtml |
299 | 299 | //else do crop output: |
300 | | - return '<div style="width:' + rObj.crop.wpx +'">' + |
301 | | - '<div style="width:'+rObj.crop.w +'px;height: ' + rObj.crop.h +'px;overflow:hidden;position:relative">' + |
302 | | - '<div style="position:relative;top:-' + rObj.crop.y +'px;left:-' + rObj.crop.x +'px">'+ |
303 | | - imgHtml + |
304 | | - '</div>'; |
| 300 | + return '<div style="width:'+rObj.crop.w +'px;height: ' + rObj.crop.h +'px;overflow:hidden;position:relative">' + |
| 301 | + '<div style="position:relative;top:-' + rObj.crop.y +'px;left:-' + rObj.crop.x +'px">'+ |
| 302 | + imgHtml + |
| 303 | + '</div>'+ |
| 304 | + '</div>'; |
305 | 305 | } |
306 | 306 | var ahtml=''; |
307 | 307 | if(rObj.mime == 'application/ogg' || rObj.mime == 'audio/ogg'){ |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -1064,9 +1064,7 @@ |
1065 | 1065 | addResourceEditLoader:function(maxWidth, overflow_style){ |
1066 | 1066 | var _this = this; |
1067 | 1067 | if(!maxWidth)maxWidth=400; |
1068 | | - if(!overflow_style)overflow_style='overflow:auto;'; |
1069 | | - //hide the results container |
1070 | | - $j('#rsd_results_container').hide(); |
| 1068 | + if(!overflow_style)overflow_style='overflow:auto;'; |
1071 | 1069 | //remove any old instance: |
1072 | 1070 | $j( _this.target_container ).find('#rsd_resource_edit').remove(); |
1073 | 1071 | //add the edit layout window with loading place holders |
— | — | @@ -1123,7 +1121,7 @@ |
1124 | 1122 | |
1125 | 1123 | |
1126 | 1124 | //try and keep aspect ratio for the thumbnail that we clicked: |
1127 | | - var tRatio = $j('#rsd_edit_img').height() / $j('#rsd_edit_img').width(); |
| 1125 | + var tRatio = $j('#rsd_edit_img').width() / $j('#rsd_edit_img').height() ; |
1128 | 1126 | if( ! tRatio ) |
1129 | 1127 | var tRatio = 1; //set ratio to 1 if the width of the thumbnail can't be found for some reason |
1130 | 1128 | |
— | — | @@ -1162,16 +1160,14 @@ |
1163 | 1161 | rObj['width'] = imObj.width; |
1164 | 1162 | rObj['height'] = imObj.height; |
1165 | 1163 | |
1166 | | - //see if we need to animate some transition |
1167 | | - var newSize = false; |
| 1164 | + //see if we need to animate some transition |
1168 | 1165 | if( size.width != imObj.width ){ |
1169 | 1166 | js_log('loadHQImg:size mismatch: ' + size.width + ' != ' + imObj.width ); |
1170 | | - newSize={ |
| 1167 | + //set the target id to the new size: |
| 1168 | + $j('#'+target_img_id).animate( { |
1171 | 1169 | 'width':imObj.width + 'px', |
1172 | 1170 | 'height':imObj.height + 'px' |
1173 | | - } |
1174 | | - //set the target id to the new size: |
1175 | | - $j('#'+target_img_id).animate( newSize ); |
| 1171 | + }); |
1176 | 1172 | }else{ |
1177 | 1173 | js_log('using req size: ' + imObj.width + 'x' + imObj.height); |
1178 | 1174 | $j('#'+target_img_id).animate( {'width':imObj.width+'px', 'height' : imObj.height + 'px'}); |
— | — | @@ -1679,7 +1675,7 @@ |
1680 | 1676 | //update if its video or audio: |
1681 | 1677 | if( rObj.mime.indexOf('audio')!=-1 || |
1682 | 1678 | rObj.mime.indexOf('video')!=-1 || |
1683 | | - rObj.mime.indexOf('/ogg') !=-1){ |
| 1679 | + rObj.mime.indexOf('/ogg') !=-1){ |
1684 | 1680 | mvJsLoader.embedVideoCheck(function(){ |
1685 | 1681 | mv_video_embed(); |
1686 | 1682 | }); |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js |
— | — | @@ -576,6 +576,7 @@ |
577 | 577 | var url = apiRes.upload.imageinfo.descriptionurl; |
578 | 578 | //check done action: |
579 | 579 | if( _this.done_upload_cb && typeof _this.done_upload_cb == 'function'){ |
| 580 | + js_log("call done_upload_cb"); |
580 | 581 | //close up shop: |
581 | 582 | $j('#upProgressDialog').dialog('close'); |
582 | 583 | //call the callback: |