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
//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
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'});
//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();
});
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'){