var _this = this;
//add the parent target_container if not provided or missing
if(!_this.target_container || $j(_this.target_container).length==0){
- $j('body').append('<div id="rsd_modal_target" style="position:absolute;top:30px;left:0px;bottom:33px;right:0px;" title="' + gM('mwe-add_media_wizard') + '" ></div>');
+ $j('body').append('<div id="rsd_modal_target" style="position:absolute;top:3em;left:0px;bottom:3em;right:0px;" title="' + gM('mwe-add_media_wizard') + '" ></div>');
_this.target_container = '#rsd_modal_target';
//js_log('appended: #rsd_modal_target' + $j(_this.target_container).attr('id'));
//js_log('added target id:' + $j(_this.target_container).attr('id'));
$j( _this.target_container ).find('#rsd_resource_edit').remove();
//add the edit layout window with loading place holders
$j( _this.target_container ).append('<div id="rsd_resource_edit" '+
- 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' +
+ 'style="position:absolute;top:0px;left:0px;bottom:0px;right:4px;background-color:#FFF;">' +
'<div id="clip_edit_disp" style="position:absolute;' + overflow_style + 'width:100%;height:100%;padding:5px;'+
'width:' + (maxWidth) + 'px;" >' +
mv_get_loading_img('position:absolute;top:30px;left:30px') +
'cursor':'default',
'opacity':0
});
-
-
- //try and keep aspect ratio for the thumbnail that we clicked:
- var rh = $j('#rsd_edit_img').height();
- var rw = $j('#rsd_edit_img').width();
- var tRatio = rh / rw;
+ //try and keep aspect ratio for the thumbnail that we clicked:
+ var tRatio = rObj.orgheight / rObj.orgwidth;
if( ! tRatio )
var tRatio = 1; //set ratio to 1 if tRatio did not work.
- //js_log('set from ' + $j('#rsd_edit_img').width() + 'x' + $j('#rsd_edit_img').height() + ' to init thumbimage to ' + maxWidth + ' x ' + parseInt( tRatio * maxWidth) );
+ //js_log('set from ' + tRatio + ' to init thumbimage to ' + maxWidth + ' x ' + parseInt( tRatio * maxWidth) );
//scale up image and to swap with high res version
$j('#rsd_edit_img').animate({
'opacity':1,
//archive.org uses solr engine:
-//more about solr here:
+//more about solr here:
//http://lucene.apache.org/solr/
var archiveOrgSearch = function ( iObj){
'desc' : resource.description,
'src' : _this.dnUrl + resource.identifier+'/format=Ogg+video',
'mime' : 'application/ogg',
- //set the licence: (rsd is a pointer to the parent remoteSearchDriver )
+ //set the license: (rsd is a pointer to the parent remoteSearchDriver )
'license' : this.rsd.getLicenceFromUrl( resource.licenseurl ),
'pSobj' :_this
'url':this.cp.api_url
},function(data){
var titleSet = {};
- var titleStr=''
- var pound='';
+ var titleStr = ''
+ var pound = '';
//loop over the data and group by title
if(data.query && data.query.recentchanges){
for(var i in data.query.recentchanges){
}
}
}
- //now run the actual query ( too bad we cant use recentchanges as a gennerator
+ //now run the actual query ( too bad we can't use recentchanges as a generator )
+ //bug 20563
do_api_req({
'data' : {
- 'action':'query',
- 'titles':titleStr,
- 'prop':'imageinfo|revisions|categories',
- 'iiprop':'url|mime|size',
+ 'action' : 'query',
+ 'titles' : titleStr,
+ 'prop' : 'imageinfo|revisions|categories',
+ 'iiprop' : 'url|mime|size',
'iiurlwidth': parseInt( _this.rsd.thumb_width ),
'rvprop':'content'
},
_this.loading = false;
});
},
- //same as below but returns your rObj for convience
+ //same as below but returns your rObj for convenience
addSingleResult:function( data ){
return this.addResults(data, true);
},
'categories':page.categories
}
};
- //attempt to parse out some stuff from the teplate:
+ //attempt to parse out some stuff from the template:
var desc = rObj.desc.match(/\|Description=(([^\n]*\n)*)\|Source=/)
if( desc && desc[1] ){
rObj.desc = $j.trim( desc[1] );
return false;
}
}
- //assuming svg or size is in range: give them requeted size
+ //assuming svg or size is in range: give them requested size
callback({
'url' : baseImgUrl + '?f=' + rObj.titleKey + '&w='+ size.width,
'width' : size.width,
return desc;
}
//else return the title since we could not find the desc:
- js_log('we could not find the Description tag in :' + desc );
- return rObj.title;
+ js_log('Error: No Description Tag, Using::' + desc );
+ return desc;
},
parseWikiTemplate: function( text ){
//@@todo parse wiki Template return object with properties and values
/*the sequence remote search driver
- extends the base remote search driver with sequence specific stuff. could seperate this out into seperate lib.
+ extends the base remote search driver with sequence specific stuff
*/
var seqRemoteSearchDriver = function(iObj){
if(tClip)
var target_order = tClip.order;
}
- //@@todo show watting of sorts.
+ //@@todo show wating of sorts.
//get target order:
var cat = rObj;
"mwe-set_in_out_points" : "Set in-out points",
"mwe-start_time" : "Start time",
"mwe-end_time" : "End time",
- "mwe-preview_inout" : "Preview\/play in-out points"
+ "mwe-preview_inout" : "Preview in-out points"
});
var default_clipedit_values = {
loadGM({
"mwe-loading_plugin" : "loading plugin <blink>...<\/blink>",
"mwe-select_playback" : "Set playback preference",
- "mwe-link_back" : "Link back",
- "mwe-error_load_lib" : "Error: JavaScript $1 was not retrievable or does not define $2",
+ "mwe-link_back" : "Link back",
"mwe-error_swap_vid" : "Error: mv_embed was unable to swap the video tag for the mv_embed interface",
"mwe-add_to_end_of_sequence" : "Add to end of sequence",
"mwe-missing_video_stream" : "The video file for this stream is missing",
return this.media_element.selected_source.URLTimeEncoding;
},
setSliderValue: function(perc, hide_progress){
- if(this.controls){
+ if(this.controls && $j('#mv_play_head_'+this_id).length != 0){
var this_id = (this.pc)?this.pc.pp.id:this.id;
var val = parseInt( perc*1000 );
$j('#mv_play_head_'+this_id).slider('value', val);
this.renderOptions[ i ] = default_render_options[i];
}
}
- //setup the application options (with defaults)
+ //Setup the application options (with defaults)
for(var i in default_FirefoggRender_options ){
if( iObj[ i ] ){
this[ i ] = iObj[ i ];
this[ i ] = default_FirefoggRender_options[i];
}
}
- //set up targets and local vars
-
+ //Set up targets and local vars
if( iObj.target_startRender ){
$j(iObj.target_startRender).click(function(){
js_log("Start render");