r55468 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55467‎ | r55468 | r55469 >
Date:06:49, 22 August 2009
Author:dale
Status:deferred
Tags:
Comment:
* Fixed some AMW issues
Modified paths:
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js
@@ -296,11 +296,11 @@
297297 if( rObj.crop == null)
298298 return imgHtml
299299 //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>';
305305 }
306306 var ahtml='';
307307 if(rObj.mime == 'application/ogg' || rObj.mime == 'audio/ogg'){
Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -1064,9 +1064,7 @@
10651065 addResourceEditLoader:function(maxWidth, overflow_style){
10661066 var _this = this;
10671067 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;';
10711069 //remove any old instance:
10721070 $j( _this.target_container ).find('#rsd_resource_edit').remove();
10731071 //add the edit layout window with loading place holders
@@ -1123,7 +1121,7 @@
11241122
11251123
11261124 //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() ;
11281126 if( ! tRatio )
11291127 var tRatio = 1; //set ratio to 1 if the width of the thumbnail can't be found for some reason
11301128
@@ -1162,16 +1160,14 @@
11631161 rObj['width'] = imObj.width;
11641162 rObj['height'] = imObj.height;
11651163
1166 - //see if we need to animate some transition
1167 - var newSize = false;
 1164+ //see if we need to animate some transition
11681165 if( size.width != imObj.width ){
11691166 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( {
11711169 'width':imObj.width + 'px',
11721170 'height':imObj.height + 'px'
1173 - }
1174 - //set the target id to the new size:
1175 - $j('#'+target_img_id).animate( newSize );
 1171+ });
11761172 }else{
11771173 js_log('using req size: ' + imObj.width + 'x' + imObj.height);
11781174 $j('#'+target_img_id).animate( {'width':imObj.width+'px', 'height' : imObj.height + 'px'});
@@ -1679,7 +1675,7 @@
16801676 //update if its video or audio:
16811677 if( rObj.mime.indexOf('audio')!=-1 ||
16821678 rObj.mime.indexOf('video')!=-1 ||
1683 - rObj.mime.indexOf('/ogg') !=-1){
 1679+ rObj.mime.indexOf('/ogg') !=-1){
16841680 mvJsLoader.embedVideoCheck(function(){
16851681 mv_video_embed();
16861682 });
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
@@ -576,6 +576,7 @@
577577 var url = apiRes.upload.imageinfo.descriptionurl;
578578 //check done action:
579579 if( _this.done_upload_cb && typeof _this.done_upload_cb == 'function'){
 580+ js_log("call done_upload_cb");
580581 //close up shop:
581582 $j('#upProgressDialog').dialog('close');
582583 //call the callback:

Status & tagging log