r44996 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44995‎ | r44996 | r44997 >
Date:11:49, 24 December 2008
Author:dale
Status:deferred
Tags:
Comment:
external media wizard path fixes, fixes to metavid clips import
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/external_media_wizard.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_allpages.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libRemoteMediaSearch/mv_remote_media_search.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/mv_allpages.js
@@ -23,10 +23,12 @@
2424 _global['$j'] = jQuery.noConflict();
2525 js_log('allpage_ did jquery check');
2626
27 - //(@@todo genneralize to a script action taken by the php so its not language specifc)
28 - if(wgCanonicalNamespace=='Sequence' && $j('#ca-edit').hasClass("selected")){
29 - mv_do_sequence_edit_swap('seq');
30 - }
 27+ if(typeof wgCanonicalNamespace != 'undefined'){
 28+ //(@@todo genneralize to a script action taken by the php so its not language specifc)
 29+ if(wgCanonicalNamespace=='Sequence' && $j('#ca-edit').hasClass("selected")){
 30+ mv_do_sequence_edit_swap('seq');
 31+ }
 32+ }
3133
3234 var reqLibs = {'$j.fn.autocomplete':'jquery/plugins/jquery.autocomplete.js',
3335 '$j.fn.hoverIntent':'jquery/plugins/jquery.hoverIntent.js'};
Index: trunk/extensions/MetavidWiki/skins/external_media_wizard.js
@@ -1,7 +1,6 @@
22 //add media wizard integration for mediaWiki
33
44 /* config */
5 -var mv_embed_url = 'http://localhost/wiki/extensions/MetavidWiki/skins/mv_embed/mv_embed.js';
65 //Setup your content providers (see the remoteSearchDriver::content_providers for all options)
76 var wg_content_proivers_config = {
87 'wiki_commons':{
@@ -14,6 +13,8 @@
1514 }
1615 var wg_local_wiki_api_url = wgServer + wgScriptPath + '/api.php';
1716
 17+//if mv_embed is hosted somewhere other than near by the external_media_wizzard you can define it here:
 18+var mv_embed_url = null;
1819
1920 //*code should not have to modify anything below*/
2021 //check if we are on a edit page:
@@ -47,7 +48,10 @@
4849 '<div id="mv_overlay" style="background:#000;cursor:wait;height:100%;left:0;position:fixed;'+
4950 'top:0;width:100%;z-index:5;filter:alpha(opacity=60);-moz-opacity: 0.6;'+
5051 'opacity: 0.6;"/>';
51 -
 52+ //get mv_embed path from _this_ file location:
 53+ if(!mv_embed_url)
 54+ mv_embed_url = getMvEmbedUrl();
 55+
5256 //inject mv_embed
5357 if( typeof MV_EMBED_VERSION == 'undefined'){
5458 var e = document.createElement("script");
@@ -81,6 +85,16 @@
8286 });
8387 }
8488 }
 89+function getMvEmbedUrl(){
 90+ for(var i in document.getElementsByTagName('script')){
 91+ var s = document.getElementsByTagName('script')[i];
 92+ if( s.src.indexOf('external_media_wizard.js') != -1 ){
 93+ //use the path:
 94+ return s.src= s.src.replace('external_media_wizard.js', '') + 'mv_embed/mv_embed.js';
 95+ }
 96+ }
 97+ alert('Error: could not find mv_embed path');
 98+}
8599 /*once we modify the dom we lose the text selection :( so here are some get pos functions */
86100 function getTextCusorStartPos(o){
87101 if (o.createTextRange) {
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js
@@ -57,24 +57,28 @@
5858 '<h3>Edit Video Tools:</h3>' +
5959 '<strong>Set in-out points</strong>'+
6060 '<table border="0" style="background: transparent; width:94%;height:50px;">'+
61 - '<tbody><tr><td width="40">'+
62 - '<span style="font-size: small;" id="track_time_start_rsd">' + eb.start_ntp +'</span>'+
63 - '</td><td><div style="border: 1px solid black; width: 100%; height: 5px; background-color: #888;" '+
64 - 'id="container_track_rsd">'+
65 - '<div id="resize_rsd" class="ui-resizable ui-draggable">'+
66 -
67 - '<div class="ui-resizable-w ui-resizable-handle"'+
68 - ' id="handle1_rsd" unselectable="on"/>'+
69 -
70 - '<div class="ui-resizable-e ui-resizable-handle" '+
71 - ' id="handle2_rsd" unselectable="on"/>'+
72 -
73 - '<div class="ui-dragSpan" id="dragSpan_rsd" style="cursor: move;"/>'+
74 - '</div>'+
75 - '</div>'+
76 - '</td><td width="50">'+
77 - '<span style="font-size: small;" id="track_time_end_rsd">'+ eb.end_ntp +'</span>'+
78 - '</td></tr></tbody>'+
 61+ '<tr>' +
 62+ '<td style="width:50px">'+
 63+ '<span style="font-size: small;" id="track_time_start_rsd">' + eb.start_ntp +'</span>'+
 64+ '</td>' +
 65+ '<td>' +
 66+ '<div style="border: 1px solid black; width: 100%; height: 5px; background-color: #888;" '+
 67+ 'id="container_track_rsd">'+
 68+ '<div id="resize_rsd" class="ui-resizable ui-draggable">'+
 69+ '<div class="ui-resizable-w ui-resizable-handle"'+
 70+ ' id="handle1_rsd" unselectable="on"/>'+
 71+
 72+ '<div class="ui-resizable-e ui-resizable-handle" '+
 73+ ' id="handle2_rsd" unselectable="on"/>'+
 74+
 75+ '<div class="ui-dragSpan" id="dragSpan_rsd" style="cursor: move;"/>'+
 76+ '</div>'+
 77+ '</div>'+
 78+ '</td>' +
 79+ '<td style="width:50px">'+
 80+ '<span style="font-size: small;" id="track_time_end_rsd">'+ eb.end_ntp +'</span>'+
 81+ '</td>' +
 82+ '</tr>' +
7983 '</table>'+
8084 '<span style="float: left;">'+
8185 '<label class="mv_css_form" for="mv_start_hr_rsd"><i>Start time:</i></label>'+
@@ -85,7 +89,7 @@
8690 '<input name="mv_end_hr_rsd" id="mv_end_hr_rsd" value="' + eb.end_ntp + '" maxlength="8" size="8" class="mv_adj_hr"/>'+
8791 '</span>'+
8892 '<div style="clear: both;"/>'+
89 - '<input id="mv_preview_clip" type="button" value="Preview In-out points">'+
 93+ '<input id="mv_preview_clip" type="button" value="Preview/Play In-out points">'+
9094 this.getInsertControl()
9195 );
9296 //setup bindings:
@@ -99,7 +103,8 @@
100104 this.applyInsertControlBindings();
101105 },
102106 getInsertControl:function(){
103 - return '<h3>Inline Caption Description</h3>'+
 107+ return '<h3>Inline Description</h3>' +
 108+ '(you can copy and paste from the transcript by clicking on the cc button below the video)'+
104109 '<textarea style="width:300px;" id="mv_inline_img_desc" rows="4" cols="30"></textarea><br>'+
105110 '<h3>Actions</h3>'+
106111 '<input type="button" class="mv_insert_image_page" value="' + getMsg('mv_insert_image_page') + '"> '+
@@ -170,9 +175,9 @@
171176 this.applyInsertControlBindings();
172177 },
173178 applyVideoAdj:function(){
174 - //update video related keys
175 - _this.rObj['titleKey'] = 'Stream:';
176 - _this.rObj['start_time'] = '';
 179+ //update video related keys
 180+ this.rObj['start_time'] = $j('#mv_start_hr_rsd').val();
 181+ this.rObj['end_time'] = $j('#mv_end_hr_rsd').val();
177182 },
178183 applyCrop:function(){
179184 var _this = this;
@@ -361,8 +366,7 @@
362367 drag:function(e, ui){
363368 mv_slider_update_stats(mvd_id, true);
364369 },
365 - stop:function(e,ui){
366 - $j('#resize_'+mvd_id).css('top', 0);
 370+ stop:function(e,ui){
367371 do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
368372 }
369373 });
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js
@@ -1580,7 +1580,7 @@
15811581 {
15821582 var _this = this;
15831583 js_log('embedFlow: uri:'+ _this.media_element.selected_source.getURI(this.seek_time_sec)
1584 - +' '+ mv_embed_path + 'flowplayer/flowplayer-3.0.1.swf' ) ;
 1584+ +"\n"+ mv_embed_path + 'flowplayer/flowplayer-3.0.1.swf' ) ;
15851585 var flowConfig = {
15861586 clip: {
15871587 url: _this.media_element.selected_source.getURI(this.seek_time_sec),
@@ -1627,6 +1627,11 @@
16281628 this.parent_play();
16291629 if( this.fla ){
16301630 this.fla.play();
 1631+
 1632+ //on a resume make sure volume and opacity are correct
 1633+ this.fla.setVolume(90);
 1634+ $f().getPlugin('screen').css({'opacity':'1.0'});
 1635+
16311636 setTimeout('$j(\'#'+this.id+'\').get(0).monitor()', 250);
16321637 }
16331638 },
@@ -1658,7 +1663,11 @@
16591664 if( this.fla['pause'] ){
16601665 if( ! this.fla.isPaused() ){
16611666 js_log('calling plugin pause');
1662 - this.fla.pause();
 1667+ this.fla.pause();
 1668+
 1669+ //restore volume and opacity
 1670+ this.fla.setVolume(90);
 1671+ $f().getPlugin('screen').css({'opacity':'1.0'});
16631672 }
16641673 }
16651674 }
@@ -1681,7 +1690,11 @@
16821691 if( typeof flash_state == 'undefined' ){
16831692 var flash_state = {
16841693 "time" : this.fla.getTime()
1685 - };
 1694+ };
 1695+ //we are not getting buffered data restore volume and opacity
 1696+ this.fla.setVolume(90);
 1697+ $f().getPlugin('screen').css({'opacity':'1.0'});
 1698+
16861699 }else{
16871700 //simplification of buffer state ... should move to support returning time rages like:
16881701 //http://www.whatwg.org/specs/web-apps/current-work/#normalized-timeranges-object
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libRemoteMediaSearch/mv_remote_media_search.js
@@ -72,7 +72,7 @@
7373 'wiki_commons':{
7474 'enabled':1,
7575 'checked':1,
76 - 'd' :0,
 76+ 'd' :1,
7777 'title' :'Wikipedia Commons',
7878 'desc' : 'Wikimedia Commons is a media file repository making available public domain '+
7979 'and freely-licensed educational media content (images, sound and video clips) to all.',
@@ -88,7 +88,7 @@
8989 'metavid':{
9090 'enabled':1,
9191 'checked':1,
92 - 'd' :1,
 92+ 'd' :0,
9393 'title' :'Metavid.org',
9494 'homepage':'http://metavid.org',
9595 'desc' : 'Metavid hosts thousands of hours of US house and senate floor proceedings',
@@ -97,8 +97,9 @@
9898 'local' :false, //if local set to true we can use local
9999 'resource_prefix': 'MV_', //what prefix to use on imported resources
100100
101 - 'local_copy': true //if local_copy set to true if we should download assets
102 - //(else just remote embed copy)
 101+ 'local_copy': true, //if local_copy set to true if we should download assets
 102+ //(else just remote embed the metavid stream (recomended) )
 103+ 'target_source_id':'mv_ogg_low_quality' // the source id/name to import
103104 },
104105 'archive_org':{
105106 'enabled':0,
@@ -277,7 +278,8 @@
278279 drawTabs: function(){
279280 var _this = this;
280281 //add the tabs to the rsd_results container:
281 - var o= '<ul class="rsd_cp_tabs" style="margin: 1em 0 0 1em;position:absolute;top:42px;padding:0;">'; //no idea why margin does not overwrite from the css
 282+ var o='<div class="rsd_tabs_container" style="position:absolute;top:53px;width:100%;left:12px;">';
 283+ o+= '<ul class="rsd_cp_tabs" style="margin: 0 0 0 0;position:absolute;top:0px;padding:0;">'; //no idea why margin does not overwrite from the css
282284 o+='<li id="rsd_tab_combined" ><img src="' + mv_embed_path + 'skins/'+mv_skin_name+ '/remote_search/combined_tab.png"></li>';
283285 for(var cp_id in this.content_providers){
284286 var cp = this.content_providers[cp_id];
@@ -287,6 +289,7 @@
288290 }
289291 }
290292 o+='</ul>';
 293+ o+='</div>';
291294 //outout the resource results holder
292295 o+='<div id="rsd_results" />';
293296 $j('#rsd_results_container').html(o);
@@ -482,9 +485,13 @@
483486 });
484487 }
485488 if( mediaType == 'video'){
486 - $j('#clip_edit_disp').append('<video id="embed_vid" roe="'+ rObj['roe_url']+'"></video>');
 489+ $j('#clip_edit_disp').append(
 490+ rObj.pSobj.getEmbedHTML( rObj, {id:'embed_vid'})
 491+ );
487492 //rewrite by id hanldes getting any libs we are missing:
488493 rewrite_by_id('embed_vid',function(){
 494+ //grab any information that we got from the ROE xml or parsed from the media file
 495+ rObj = rObj.pSobj.getEmbedObjParsedInfo(rObj, 'embed_vid');
489496 //add the resizable to the doLoad request:
490497 loadLibs['$j.ui.resizable'] = 'jquery/jquery.ui-1.5.2/ui/minified/ui.resizable.min.js',
491498 mvJsLoader.doLoad( loadLibs,function(){
@@ -505,9 +512,9 @@
506513
507514 //first check if the resource is not already on this wiki:
508515 //@@todo get the File/Image namespace name:
509 - rObj.target_resource_title = rObj.titleKey.replace(/File:|Image:/,'');
 516+ rObj.target_resource_title = cp.resource_prefix + rObj.titleKey.replace(/File:|Image:/,'');
510517
511 - reqObj={'action':'query', titles: _this.cFileNS + ':' + rObj.target_resource_title + '|' + rObj.titleKey};
 518+ reqObj={'action':'query', titles: _this.cFileNS + ':' + rObj.target_resource_title};
512519 do_api_req( reqObj, this.local_wiki_api_url, function(data){
513520 var found_title = false;
514521 for(var i in data.query.pages){
@@ -516,40 +523,51 @@
517524 found_title=data.query.pages[i]['title'];
518525 }
519526 }
520 - if( found_title ){
 527+ if( found_title ){
521528 js_log("checkImportResource:found title:" + found_title);
522529 //resource is already present (or resource with same name is already present)
523 - rObj.target_resource_title = found_title.replace(/File:|Image:/,'');
 530+ rObj.target_resource_title = found_title.replace(/File:|Image:/,'');
 531+ //@@todo give user option to write over it
524532 cir_callback( rObj );
525533 }else{
526534 js_log("resource not present: update:"+ _this.cFileNS + ':' + rObj.target_resource_title);
527535
 536+ //update the rObj with import info
 537+ rObj.pSobj.updateDataForImport( rObj );
 538+
528539 //setup the resource description from resource description:
529540 var base_resource_desc = '{{Information '+"\n"+
530541 '|Description= ' + rObj.title + ' imported from ' + '[' + cp.homepage +
531542 ' ' + cp.title+']' + "\n" +
532 - '|Source=' + '[' + rObj.link +' Original Source]'+ "\n";
 543+ '|Source=' + '[' + rObj.link.replace(/^\s\s*/, '').replace(/\s\s*$/, '') +' Original Source]'+ "\n";
533544
534545 if( rObj.author )
535 - base_resource_desc+='|Author= US government' +"\n";
 546+ base_resource_desc+='|Author= ' + rObj.author +"\n";
536547
537548 if( rObj.date )
538 - base_resource_desc+='|Date= October 1st 2008' +"\n";
 549+ base_resource_desc+='|Date=' + rObj.date +"\n";
539550
540551 if( rObj.permission )
541 - base_resource_desc+='|Permission=' +"\n";
 552+ base_resource_desc+='|Permission='+ rObj.permission +"\n";
542553
543554 if( rObj.other_versions )
544 - base_resource_desc+='|other_versions=' +"\n";
 555+ base_resource_desc+='|Other_versions=' + rObj.other_versions + "\n";
545556
546557 base_resource_desc+='}}';
 558+
 559+ //add in licence template tag:
 560+ if( rObj.licence_template_tag )
 561+ base_resource_desc += "\n" +
 562+ '== [[Commons:Copyright tags|Licensing]]: ==' +"\n"+
 563+ '{{' + rObj.licence_template_tag + '}}';
 564+
547565 $j('#rsd_resource_import').remove();//remove any old resource imports
548566 //@@ show user dialog to import the resource
549567 $j( '#'+ _this.target_id ).append('<div id="rsd_resource_import" '+
550568 'style="position:absolute;top:50px;left:50px;right:50px;bottom:50px;background-color:#FFF;border:solid thick red;z-index:3">' +
551569 '<h3 style="color:red">Resource: <span style="color:black">' + rObj.title + '</span> needs to be imported</h3>'+
552570 '<div id="rsd_preview_import_container" style="position:absolute;width:50%;bottom:0px;left:0px;overflow:auto;top:30px;">' +
553 - rObj.pSobj.getEmbedHTML( rObj, {'max_height':'200'} )+ //get embedHTML with small thumb:
 571+ rObj.pSobj.getEmbedHTML( rObj, {'max_height':'200','only_poster':true} )+ //get embedHTML with small thumb:
554572 '<br style="clear both">'+
555573 '<strong>Resource Page Description:</strong>'+
556574 '<div id="rsd_import_desc" syle="display:inline;">'+
@@ -561,7 +579,7 @@
562580 '<strong>Local Resource Title:</strong><br>'+
563581 '<input type="text" size="30" value="' + rObj.target_resource_title + '" readonly="true"><br>'+
564582 '<strong>Edit WikiText Resource Description:</strong>(will be replaced by forms soon)'+
565 - '<textarea id="rsd_import_ta" id="mv_img_desc" rows="8" cols="50">'+
 583+ '<textarea id="rsd_import_ta" id="mv_img_desc" style="width:90%;" rows="8" cols="50">'+
566584 base_resource_desc +
567585 '</textarea><br>'+
568586 '<input type="checkbox" value="true" id="wpWatchthis" name="wpWatchthis" tabindex="7"/>'+
@@ -642,8 +660,18 @@
643661 cir_callback( rObj );
644662 }else{
645663 js_log("Error or warning: (did not find: \"" + sstring + ' in output' );
 664+ pos_etitle = '<h1 class="firstHeading">';
 665+ var error_txt='';
 666+ if(data.indexOf(pos_etitle)!=-1){
 667+ var sp = data.indexOf(pos_etitle) + pos_etitle.length;
 668+ error_txt = data.substr(sp ,
 669+ (data.indexOf('</h1>',sp )-sp)
 670+ );
 671+ }
 672+ //var error_msg =
646673 $j('#rsd_resource_import').html(
647674 '<b>error importing asset (we should have better error handling soon)</b><br>'+
 675+ error_txt + '<br>'+
648676 '<a href="#" id="rsd_import_error" >Cancel import</a>'
649677 );
650678 $j('#rsd_import_error').click(function(){
@@ -881,6 +909,22 @@
882910 //by default just return the existing image:
883911 getImageObj:function( rObj, size, callback){
884912 callback( {'url':rObj.poster} );
 913+ },
 914+ getEmbedWikiText:function(rObj){
 915+ var layout = ( rObj.layout)? rObj.layout:"right"
 916+ var o= '[[' + this.rsd.cFileNS + ':' + rObj.target_resource_title + '|thumb|'+layout;
 917+
 918+ if(rObj.target_width)
 919+ o+='|' + rObj.target_width + 'px';
 920+
 921+ if( rObj.inlineDesc )
 922+ o+='|' + rObj.inlineDesc;
 923+
 924+ o+=']]';
 925+ return o;
 926+ },
 927+ updateDataForImport:function( rObj ){
 928+ return rObj;
885929 }
886930 }
887931 /*
@@ -911,7 +955,7 @@
912956 _this.loading= 1;
913957 js_log('metavidSearch::getSearchResults()');
914958 //proccess all options
915 - url = this.cp.api_url;
 959+ var url = this.cp.api_url;
916960 //add on the req_param
917961 for(var i in this.reqObj){
918962 url += '&' + i + '=' + this.reqObj[i];
@@ -922,15 +966,65 @@
923967 do_request(url, function(data){
924968 //should have an xml rss data object:
925969 _this.addRSSData( data , url );
926 - //do some metavid specific pos proccessing:
 970+ //do some metavid specific pos proccessing on the rObj data:
927971 for(var i in _this.resultsObj){
928 - var rObj = _this.resultsObj[i];
929 - }
930 -
 972+ var rObj = _this.resultsObj[i];
 973+ var proe = parseUri( rObj['roe_url'] );
 974+ rObj['start_time'] = proe.queryKey['t'].split('/')[0];
 975+ rObj['end_time'] = proe.queryKey['t'].split('/')[1];
 976+ //transform the title into a wiki_safe title:
 977+ rObj['titleKey'] = proe.queryKey['stream_name'] + '_' + rObj['start_time'].replace(/:/g,'.') + '_' + rObj['end_time'].replace(/:/g,'.') + '.ogg';
 978+ }
931979 //done loading:
932980 _this.loading=0;
933981 });
934 - }
 982+ },
 983+ getEmbedWikiText:function(rObj, options){
 984+ //if we are using a local copy do the standard b:
 985+ if( this.cp.local_copy == true)
 986+ return this.parent_getEmbedWikiText(rObj, options);
 987+
 988+ //if local_copy is false and embed metavid extension is enabled:
 989+
 990+ return
 991+ },
 992+ getEmbedHTML:function( rObj , options ){
 993+ var id_attr = (options['id'])?' id = "' + options['id'] +'" ': '';
 994+ var style_attr = (options['max_width'])?' style="width:'+options['max_width']+'px;"':'';
 995+ if(options['only_poster']){
 996+ return '<img ' + id_attr + ' src="' + rObj['poster']+'" ' + style_attr + '>';
 997+ }else{
 998+ return '<video ' + id_attr + ' roe="' + rObj['roe_url'] + '"></video>';
 999+ }
 1000+ },
 1001+ getEmbedObjParsedInfo:function(rObj, eb_id){
 1002+ var sources = $j('#'+eb_id).get(0).media_element.getSources();
 1003+ rObj.other_versions ='*[' + rObj['roe_url'] + ' XML of all Video Formats and Timed Text]'+"\n";
 1004+ for(var i in sources){
 1005+ var cur_source = sources[i];
 1006+ //rObj.other_versions += '*['+cur_source.getURI() +' ' + cur_source.title +']' + "\n";
 1007+ if( cur_source.id == this.cp.target_source_id)
 1008+ rObj['url'] = cur_source.getURI();
 1009+ }
 1010+ js_log('set url to: ' + rObj['url']);
 1011+ return rObj;
 1012+ },
 1013+ //update rObj for import:
 1014+ updateDataForImport:function( rObj ){
 1015+ rObj['author']='US Government';
 1016+ //convert data to UTC type date:
 1017+ var dateExp = new RegExp(/_([0-9]+)\-([0-9]+)\-([0-9]+)/);
 1018+ var dParts = rObj.link.match (dateExp);
 1019+ var d = new Date();
 1020+ var year_full = (dParts[3].length==2)?'20'+dParts[3].toString():dParts[3];
 1021+ d.setFullYear(year_full, dParts[1]-1, dParts[2]);
 1022+ rObj['date'] = d.toDateString();
 1023+ rObj['licence_template_tag']='PD-USGov';
 1024+
 1025+ js_log('url is: '+rObj.url);
 1026+
 1027+ return rObj;
 1028+ }
9351029 }
9361030
9371031 var mediaWikiSearch = function( initObj ) {
@@ -1078,21 +1172,12 @@
10791173 getEmbedWikiText: function( rObj ){
10801174 //set default layout to right justified
10811175 var layout = ( rObj.layout)? rObj.layout:"right"
1082 - //if crop is null do simple output:
1083 - if( rObj.crop == null){
1084 - var o= '[[' + this.rsd.cFileNS + ':' + rObj.target_resource_title + '|thumb|'+layout;
1085 -
1086 - if(rObj.target_width)
1087 - o+='|' + rObj.target_width + 'px';
1088 -
1089 - if( rObj.inlineDesc )
1090 - o+='|' + rObj.inlineDesc;
1091 -
1092 - o+=']]';
1093 - return o;
1094 - }
 1176+ //if crop is null do base output:
 1177+ if( rObj.crop == null)
 1178+ return this.parent_getEmbedWikiText( rObj );
 1179+
10951180 //using the preview crop template: http://en.wikipedia.org/wiki/Template:Preview_Crop
1096 - //should be replaced with server side cropping
 1181+ //@@todo should be replaced with server side cropping
10971182 return '{{Preview Crop ' + "\n" +
10981183 '|Image = ' + rObj.target_resource_title + "\n" +
10991184 '|bSize = ' + rObj.width + "\n" +

Status & tagging log