r45790 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45789‎ | r45790 | r45791 >
Date:23:57, 15 January 2009
Author:dale
Status:deferred
Tags:
Comment:
* bug fixes in the add_media_wizard
* source image reorganization
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/add_media_wizard.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/images/Button_add_media.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/firefogg.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mv_remote_media_search.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/Button_add_media.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/archive_org_tab.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/archive_org_logo_17.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/archive_org_logo_80.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/cc-flickr.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/combined_tab.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/metavid_logo_17.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/metavid_tab.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/this_wiki_logo_17.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/this_wiki_tab.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_logo_17.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_logo_80.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_tab.png (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/tab-bg.png (added) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/add_media_wizard.js
@@ -6,40 +6,45 @@
77
88 var wg_local_wiki_api_url = wgServer + wgScriptPath + '/api.php';
99
10 -//if mv_embed is hosted somewhere other than near by the external_media_wizzard you can define it here:
11 -var mv_embed_url = null;
 10+//if mv_embed is hosted somewhere other than near by the add_media_wizard you can define it here:
 11+var mv_add_media_wizard_path = 'http://mvbox2.cse.ucsc.edu/w/extensions/MetavidWiki/skins/';
1212
1313 //*code should not have to modify anything below*/
1414 //check if we are on a edit page:
1515 if(wgAction=='edit'){
1616 //add onPage ready request:
17 - addOnloadHook( function(){
18 - var toolbar = document.getElementById("toolbar");
 17+ addOnloadHook( function(){
1918 var imE = document.createElement('img');
2019 imE.style.cursor = 'pointer';
21 - imE.id = 'mv-add_media';
22 - imE.src = 'http://upload.wikimedia.org/wikipedia/commons/8/86/Button_add_media.png';
23 - toolbar.appendChild(imE);
24 - //imE.setAttribute('onClick', 'mv_do_load_wiz()');
25 - //addHandler only works once cuz of dom manipluations
 20+ imE.id = 'mv-add_media';
 21+ imE.src = wgScriptPath + '/extensions/MetavidWiki/skins/mv_embed/images/Button_add_media.png';
 22+
 23+ var toolbar = document.getElementById("toolbar");
 24+ toolbar.appendChild(imE);
 25+
2626 addHandler( imE, 'click', function() {
2727 mv_do_load_wiz();
2828 });
2929 });
3030 }
3131 //add firefog support to Special Upload page:
32 -if(wgPageName== "Special:Upload"){
33 - addOnloadHook( function(){
 32+if(wgPageName== "Special:Upload"){
 33+ addOnloadHook( function(){
 34+ js_log("!!upload hook");
3435 load_mv_embed( function(){
 36+ js_log('!!loaded mv_embed');
3537 //load jQuery and what not (we need to refactor the loading system for mv_embed)
3638 mvEmbed.load_libs(function(){
 39+ js_log('!!loaded load libs');
3740 mvJsLoader.doLoad({'mvUploader' : 'libAddMedia/mv_upload.js'},function(){
 41+ js_log("!!make uploaer");
3842 mvUp = new mvUploader();
3943 });
4044 });
4145 });
4246 });
4347 }
 48+
4449 var caret_pos={};
4550 function mv_do_load_wiz(){
4651 caret_pos={};
@@ -109,38 +114,48 @@
110115 });
111116 return false;
112117 }
113 -function load_mv_embed( callback ){
114 - //get mv_embed path from _this_ file location:
115 - if(!mv_embed_url)
116 - mv_embed_url = getMvEmbedUrl();
117 -
118 - //inject mv_embed
119 - if( typeof MV_EMBED_VERSION == 'undefined'){
 118+function load_mv_embed( callback ){
 119+ //inject mv_embed if needed:
 120+ if( typeof mvEmbed == 'undefined'){
 121+ //get mv_embed path from _this_ file location:
 122+ var mv_embed_url = getAddMediaPath( 'mv_embed/mv_embed.js' );
 123+ //make sure its not already there:
 124+ for(var i=0; i < document.getElementsByTagName('script').length; i++){
 125+ var s = document.getElementsByTagName('script')[i];
 126+ if(s.src == mv_embed_url){
 127+ check_for_mv_embed( callback );
 128+ return ;
 129+ }
 130+ }
120131 var e = document.createElement("script");
121132 e.setAttribute('src', mv_embed_url);
122133 e.setAttribute('type',"text/javascript");
123134 document.getElementsByTagName("head")[0].appendChild(e);
124 - setTimeout('check_for_mv_embed();', 25);
125 - }else{
 135+ setTimeout('check_for_mv_embed(callback);', 25);
 136+ }else{
126137 check_for_mv_embed( callback );
127138 }
128139 }
129140
130141 function check_for_mv_embed( callback ){
131 - if( typeof MV_EMBED_VERSION == 'undefined'){
132 - setTimeout('check_for_mv_embed();', 25);
 142+ js_log('check_for_mv_embed');
 143+ if( typeof mvEmbed == 'undefined'){
 144+ setTimeout('check_for_mv_embed( callback );', 25);
133145 }else{
134146 callback();
135147 }
136148 }
137 -function getMvEmbedUrl(){
 149+function getAddMediaPath( replace_str ){
 150+ if(!replace_str)
 151+ replace_str = '';
138152 for(var i=0; i < document.getElementsByTagName('script').length; i++){
139153 var s = document.getElementsByTagName('script')[i];
140154 if( s.src.indexOf('add_media_wizard.js') != -1 ){
141155 //use the external_media_wizard path:
142 - return s.src= s.src.replace('add_media_wizard.js', '') + 'mv_embed/mv_embed.js';
 156+ return s.src.replace('add_media_wizard.js', replace_str);
143157 }
144158 }
145 - alert('Error: could not find mv_embed path');
 159+ js_log('Error: could not find add media path force config:');
 160+ return mv_add_media_wizard_path + replace_str;
146161 }
147162
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/firefogg.js
@@ -50,7 +50,7 @@
5151 }
5252
5353 var default_firefogg_options = {
54 - 'add_done_action':'redirect',
 54+ 'upload_done_action':'redirect',
5555 'enabled':false
5656 }
5757 var upFirefogg = function(iObj){
@@ -187,13 +187,13 @@
188188 }
189189 //upload sucsefull, state can also be 'upload failed'
190190 else if(_this.ogg.state == 'upload done') {
191 - js_log('upload done');
 191+ //js_log('upload done: ' + JSON.parse(_this.ogg.uploadstatus()).responseText);
192192 //@@todo handle errors same problem as #695 in mv_remote_media_search.js
193193 //we need to add image uploading to the api rather than parse the HTML output of the pages
194194 var result_page = JSON.parse(_this.ogg.uploadstatus()).responseText;
195195 var sstring = 'var wgTitle = "' + data['wpDestFile'].replace('_',' ');
196196 if( result_page.toLowerCase().indexOf( sstring.toLowerCase() ) != -1){
197 - js_log('upload done got redirect found: ' +sstring);
 197+ js_log('upload done got redirect found: ' +sstring + ' r:' + _this.upload_done_action);
198198 if(_this.upload_done_action == 'redirect'){
199199 window.location = wgArticlePath.replace(/\$1/, 'File:' + data['wpDestFile'] );
200200 }else{
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mv_remote_media_search.js
@@ -56,29 +56,38 @@
5757 content_providers:{
5858 /*content_providers documentation:
5959 @enabled: whether the search provider can be selected
60 - @checked: whether the search provideer will show up as seletable tab (todo: user prefrence)
61 - @d: if the current cp should be displayed (only one should be the default)
 60+ @checked: whether the search provider will show up as seleatable tab (todo: user prefrence)
 61+ @d: default: if the current cp should be displayed (only one should be the default)
6262 @title: the title of the search provider
6363 @desc: can use html... todo: need to localize
6464 @api_url: the url to query against given the library type:
6565 @lib: the search library to use corresponding to the
6666 search object ie: 'mediaWiki' = new mediaWikiSearchSearch()
67 - @local : if the content provider assets need to be imported or not.
68 - */
 67+ @tab_img: the tab image (if set to false use title text)
 68+ if === "ture" use standard location skin/images/{cp_id}_tab.png
 69+ if === string use as url for image
 70+
 71+ @linkback_icon default is: /wiki/skins/common/images/magnify-clip.png
 72+
 73+ //domain insert: two modes: simple config or domain list:
 74+ @local : if the content provider assets need to be imported or not.
 75+ @local_domains : sets of domains for which the content is local
 76+ */
6977 'this_wiki':{
70 - 'enabled':0,
71 - 'checked':0,
72 - 'd' :0,
73 - 'title' :'The Current Wiki',
74 - 'desc' : '(should be updated with the proper text)',
75 - 'api_url': wgScriptPath + '/api.php',
76 - 'lib' :'mediaWiki',
77 - 'local' :true
 78+ 'enabled':1,
 79+ 'checked':1,
 80+ 'd' :1,
 81+ 'title' :'This Wiki',
 82+ 'desc' : '(should be updated with the proper text) maybe import from some config value',
 83+ 'api_url': wgServer + wgScriptPath + '/api.php',
 84+ 'lib' :'mediaWiki',
 85+ 'local' :true,
 86+ 'tab_img':false
7887 },
7988 'wiki_commons':{
8089 'enabled':1,
8190 'checked':1,
82 - 'd' :1,
 91+ 'd' :0,
8392 'title' :'Wikipedia Commons',
8493 'desc' : 'Wikimedia Commons is a media file repository making available public domain '+
8594 'and freely-licensed educational media content (images, sound and video clips) to all.',
@@ -87,13 +96,15 @@
8897 'lib' :'mediaWiki',
8998 'resource_prefix': 'WC_', //prefix on imported resources (not applicable if the repository is local)
9099
91 - //list all the domains where commons is local? or set this some other way
 100+ //list all the domains where commons is local? or set this some other way by doing an api query
 101+ //or by seeding this config when calling the remote search
92102 'local_domains': ['wikimedia','wikipedia','wikibooks'],
93103 //specific to wiki commons config:
94104 'search_title':false, //disable title search
95105 //set up default range limit
96106 'offset' : 0,
97 - 'limit' : 30
 107+ 'limit' : 30,
 108+ 'tab_img':true
98109 },
99110 'metavid':{
100111 'enabled':1,
@@ -113,8 +124,9 @@
114125 'stream_import_key': 'mv_ogg_low_quality', // which stream to import, could be mv_ogg_high_quality
115126 //or flash stream, see ROE xml for keys
116127
117 - 'remote_embed_ext': false //if running the remoteEmbed extension no need to copy local
118 - //syntax will be [remoteEmbed:roe_url link title]
 128+ 'remote_embed_ext': false, //if running the remoteEmbed extension no need to copy local
 129+ //syntax will be [remoteEmbed:roe_url link title]
 130+ 'tab_img':true
119131 },
120132 'archive_org':{
121133 'enabled':0,
@@ -125,17 +137,18 @@
126138 'homepage':'http://archive.org',
127139 'lib' : 'archive',
128140 'local' : false,
129 - 'resource_prefix': 'AO_'
 141+ 'resource_prefix': 'AO_',
 142+ 'tab_img':false
130143 }
131144 },
132145 //some default layout values:
133146 thumb_width : 80,
134147 image_edit_width : 600,
135148 video_edit_width : 400,
136 - insert_text_pos : 0, //insert at the start (will be overwiten by the user cursor pos)
137 - result_display_mode : 'box', //box or list or preview
 149+ insert_text_pos : 0, //insert at the start (will be overwitten by the user cursor pos)
 150+ result_display_mode : 'box', //box or list
138151
139 - cUpLoader : null,
 152+ cUpLoader : null,
140153 cEdit : null,
141154
142155 init:function( initObj ){
@@ -209,7 +222,7 @@
210223 ' style="float:left;cursor:pointer;">'+
211224 '<input class="mv_cps_input" type="checkbox" name="mv_cps" '+ checked_attr+'>';
212225
213 - out+= '<img alt="'+cp.title+'" src="' + mv_embed_path + 'skins/' + mv_skin_name + '/remote_search/' + cp_id + '_tab.png">';
 226+ out+= '<img alt="'+cp.title+'" src="' + mv_embed_path + 'skins/' + mv_skin_name + '/images/remote_cp/' + cp_id + '_tab.png">';
214227 out+='</div>';
215228 }
216229 out+='<div style="clear:both"/><a id="mso_selprovider_close" href="#">'+getMsg('close')+'</a></div>';
@@ -228,7 +241,7 @@
229242 },
230243 add_interface_bindings:function(){
231244 var _this = this;
232 - js_log("add_interface_bindings:");
 245+ js_log("f:add_interface_bindings:");
233246 //setup for this.main_search_options:
234247 $j('#mso_cancel').click(function(){
235248 _this.closeAll();
@@ -335,12 +348,19 @@
336349 //add the tabs to the rsd_results container:
337350 var o='<div class="rsd_tabs_container" style="position:absolute;top:49px;width:100%;left:12px;height:25px;">';
338351 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
339 - o+='<li id="rsd_tab_combined" ><img src="' + mv_embed_path + 'skins/'+mv_skin_name+ '/remote_search/combined_tab.png"></li>';
 352+ o+='<li id="rsd_tab_combined" ><img src="' + mv_embed_path + 'skins/'+mv_skin_name+ '/images/remote_cp/combined_tab.png"></li>';
340353 for(var cp_id in this.content_providers){
341354 var cp = this.content_providers[cp_id];
342355 if( cp.enabled && cp.checked){
343356 var class_attr = (cp.d)?'class="rsd_selected"':'';
344 - o+='<li id="rsd_tab_'+cp_id+'" ' + class_attr + '><img src="' + mv_embed_path + 'skins/' + mv_skin_name + '/remote_search/' + cp_id + '_tab.png"></li>';
 357+ o+='<li id="rsd_tab_'+cp_id+'" ' + class_attr + '>';
 358+ if(cp.tab_img === true){
 359+ o+='<img alt="' + cp.title +'" src="' + mv_embed_path + 'skins/' + mv_skin_name + '/images/remote_cp/' + cp_id + '_tab.png"></li>';
 360+ }else if(typeof cp.tab_img=='string'){
 361+ o+='<img alt="' + cp.title +'" src="' + cp.tab_img + '"></li>';
 362+ }else if(cp.tab_img === false){
 363+ o+= cp.title;
 364+ }
345365 }
346366 }
347367 //do an upload tab if enabled:
@@ -404,8 +424,11 @@
405425 var disp = ( cp.d ) ? '' : 'display:none;';
406426 if( _this.result_display_mode == 'box' ){
407427 o+='<div id="mv_result_' + rInx + '" class="mv_clip_box_result" style="' + disp + 'width:' +
408 - _this.thumb_width + 'px;height:'+ (_this.thumb_width-20) +'px">';
 428+ _this.thumb_width + 'px;height:'+ (_this.thumb_width-20) +'px;position:relative;">';
409429 o+='<img title="'+rItem.title+'" class="rsd_res_item" id="res_' + rInx +'" style="width:' + _this.thumb_width + 'px;" src="' + rItem.poster + '">';
 430+ //add a linkback to resource page in lower left:
 431+ if(rItem.link)
 432+ o+='<a target="_new" style="position:absolute;top:0px;right:0px" title="' + getMsg('Resource Description Page') + '" href="' + rItem.link + '"><img src="' + wgScriptPath + '/skins/common/images/magnify-clip.png"></a>';
410433 o+='</div>';
411434 }else if(_this.result_display_mode == 'list'){
412435 o+='<div id="mv_result_' + rInx + '" class="mv_clip_list_result" style="' + disp + 'width:90%">';
@@ -431,15 +454,17 @@
432455 $j(this).removeClass('mv_clip_'+_this.result_display_mode+'_result_over');
433456 });
434457 //resource click action: (bring up the resource editor)
435 - $j('.rsd_res_item').click(function(){
 458+ $j('.rsd_res_item').click(function(){
436459 //get the resource obj:
437460 var rObj = _this.getResourceFromId( this.id );
438 - _this.resourceEdit( rObj );
 461+ _this.resourceEdit( rObj, this );
439462 });
440463 },
441 - resourceEdit:function( rObj ){
 464+ resourceEdit:function( rObj, rsdElement){
 465+ js_log('f:resourceEdit');
 466+ var _this = this;
442467 //remove any existing resource edit interface:
443 - $j('#rsd_resource_edit').remove();
 468+ $j('#rsd_resource_edit').remove();
444469 //set the media type:
445470 if(rObj.mime.indexOf('image')!=-1){
446471 //set width to default image_edit_width
@@ -465,12 +490,15 @@
466491 mv_get_loading_img() +
467492 '</div>'+
468493 '</div>');
 494+
 495+ js_log('did append to: '+ _this.target_id );
 496+
469497 $j('#rsd_resource_edit').css('opacity',0);
470498
471499 $j('#rsd_edit_img').remove();//remove any existing rsd_edit_img
472500
473501 //left side holds the image right size the controls /
474 - $j(this).clone().attr('id', 'rsd_edit_img').appendTo('#clip_edit_disp').css({
 502+ $j(rsdElement).clone().attr('id', 'rsd_edit_img').appendTo('#clip_edit_disp').css({
475503 'position':'absolute',
476504 'top':'40%',
477505 'left':'20%',
@@ -478,7 +506,7 @@
479507 });
480508
481509 //assume we keep aspect ratio for the thumbnail that we clicked:
482 - var tRatio = $j(this).height() / $j(this).width();
 510+ var tRatio = $j(rsdElement).height() / $j(rsdElement).width();
483511 if( ! tRatio )
484512 var tRatio = 1; //set ratio to 1 if the width of the thumbnail can't be found for some reason
485513
@@ -501,6 +529,8 @@
502530 'background-color':'#FFF',
503531 'z-index':99
504532 });
 533+ js_log('do load the media editor:');
 534+ //do load the media Editor
505535 _this.doMediaEdit( rObj , mediaType );
506536 },
507537 loadHQImg:function(rObj, size, target_img_id, callback){
@@ -586,18 +616,23 @@
587617 var cp = rObj.pSobj.cp;
588618 var _this = this;
589619 rObj.target_resource_title = rObj.titleKey.replace(/File:|Image:/,'');
590 -
591 - //check if we can embed the content locally per a domain name check:
592 - var local_embed_ref=false;
593 - var local_host = parseUri(this.local_wiki_api_url).host;
594 - if( rObj.pSobj.cp.local_domains ) {
595 - for(var i=0;i < rObj.pSobj.cp.local_domains.length; i++){
596 - var ld = rObj.pSobj.cp.local_domains[i];
597 - if( local_host.indexOf( ld ) != -1)
598 - local_embed_ref=true;
599 - }
600 - }
601 - //locally embeddalbe jump to callback:
 620+
 621+ //first do the simple check
 622+ if( rObj.pSobj.cp.local ){
 623+ local_embed_ref=true;
 624+ }else{
 625+ //check if we can embed the content locally per a domain name check:
 626+ var local_embed_ref=false;
 627+ var local_host = parseUri(this.local_wiki_api_url).host;
 628+ if( rObj.pSobj.cp.local_domains ) {
 629+ for(var i=0;i < rObj.pSobj.cp.local_domains.length; i++){
 630+ var ld = rObj.pSobj.cp.local_domains[i];
 631+ if( local_host.indexOf( ld ) != -1)
 632+ local_embed_ref=true;
 633+ }
 634+ }
 635+ }
 636+ //locally embed jump to callback:
602637 if( local_embed_ref ){
603638 cir_callback( rObj );
604639 }else{
@@ -903,11 +938,14 @@
904939 $j(target).html('no paging for combined results');
905940 return ;
906941 }
907 - for(var cp_id in this.content_providers){
908 - var cp = this.content_providers[ cp_id ];
909 - if(this.disp_item == cp_id){
910 - js_log('getPaging:'+ cp_id);
911 - var out = getMsg('rsd_results_desc') + (cp.offset+1) + ' to ' + (cp.offset + cp.limit);
 942+ for(var cp_id in this.content_providers){
 943+ if(this.disp_item == cp_id){
 944+ var cp = this.content_providers[ cp_id ];
 945+ //js_log('getPaging:'+ cp_id + ' len: ' + cp.sObj.num_results);
 946+ var to_num = ( cp.limit > cp.sObj.num_results )?
 947+ (cp.offset + cp.sObj.num_results):
 948+ (cp.offset + cp.limit);
 949+ var out = getMsg('rsd_results_desc') + (cp.offset+1) + ' to ' + to_num;
912950 //check if we have more results (next prev link)
913951 if( cp.offset >= cp.limit )
914952 out+=' <a href="#" id="rsd_pprev">' + getMsg('rsd_results_prev') + cp.limit + '</a>';
@@ -983,7 +1021,7 @@
9841022 offset :0,
9851023 limit :20,
9861024 more_results :false,
987 - num_results :null,
 1025+ num_results :0,
9881026
9891027 //init the object:
9901028 init:function( initObj ){
@@ -1052,8 +1090,9 @@
10531091
10541092 rObj['pSobj'] = _this;
10551093 //add the result to the result set:
1056 - _this.resultsObj[inx] = rObj;
1057 - });
 1094+ _this.resultsObj[inx] = rObj;
 1095+ _this.num_results++;
 1096+ });
10581097 },
10591098 //by default just return the existing image:
10601099 getImageObj:function( rObj, size, callback){
@@ -1203,7 +1242,7 @@
12041243 getSearchResults:function(){
12051244 var _this = this;
12061245 this.loading=true;
1207 - js_log('f:getSearchResults for:' + $j('#'+this.target_input).val() );
 1246+ js_log('f:getSearchResults for:' + $j('#rsd_q').val() );
12081247 //empty out the current results:
12091248 this.resultsObj={};
12101249 //do two queries against the Image / File / MVD namespace:
@@ -1242,11 +1281,15 @@
12431282 });
12441283 },
12451284 addResults:function( data ){
1246 - var _this = this
 1285+ js_log("f:addResults");
 1286+ var _this = this
12471287 //check if we have
1248 - if( typeof data['query-continue'].search != 'undefined')
1249 - this.more_results = true;
 1288+ if( typeof data['query-continue'] != 'undefined'){
 1289+ if( typeof data['query-continue'].search != 'undefined')
 1290+ this.more_results = true;
 1291+ }
12501292 //make sure we have pages to iderate:
 1293+
12511294 if(data.query && data.query.pages){
12521295 for(var page_id in data.query.pages){
12531296 var page = data.query.pages[ page_id ];
@@ -1257,23 +1300,24 @@
12581301 }
12591302
12601303 this.resultsObj[page_id]={
1261 - 'titleKey':page.title,
1262 - 'link':page.imageinfo[0].descriptionurl,
1263 - 'title':page.title.replace(/File:|.jpg|.png|.svg|.ogg|.ogv/ig, ''),
1264 - 'poster':page.imageinfo[0].thumburl,
 1304+ 'titleKey' : page.title,
 1305+ 'link' :page.imageinfo[0].descriptionurl,
 1306+ 'title' :page.title.replace(/File:|.jpg|.png|.svg|.ogg|.ogv/ig, ''),
 1307+ 'poster' :page.imageinfo[0].thumburl,
12651308 'thumbwidth':page.imageinfo[0].thumbwidth,
12661309 'thumbheight':page.imageinfo[0].thumbheight,
1267 - 'mime':page.imageinfo[0].mime,
1268 - 'src':page.imageinfo[0].url,
1269 - 'desc':page.revisions[0]['*'],
1270 - //add pointer to parent serach obj:
1271 - 'pSobj':_this,
 1310+ 'mime' :page.imageinfo[0].mime,
 1311+ 'src' :page.imageinfo[0].url,
 1312+ 'desc' :page.revisions[0]['*'],
 1313+ //add pointer to parent search obj:
 1314+ 'pSobj' :_this,
12721315 'meta':{
12731316 'categories':page.categories
12741317 }
12751318 }
 1319+ this.num_results++;
12761320 //for(var i in this.resultsObj[page_id]){
1277 - // js_log('added '+ i +' '+ this.resultsObj[page_id][i]);
 1321+ // js_log('added: '+ i +' '+ this.resultsObj[page_id][i]);
12781322 //}
12791323 }
12801324 }else{
@@ -1348,7 +1392,7 @@
13491393 return '<video ' + id_attr +
13501394 ' src="' + rObj.src + '" ' +
13511395 style_attr +
1352 - ' poster="'+ outOpt.url + '" '+
 1396+ ' poster="'+ rObj.poster + '" '+
13531397 ' ></video>';
13541398 }
13551399 js_log('ERROR:unsupored mime type: ' + rObj.mime);
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/Button_add_media.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/Button_add_media.png
___________________________________________________________________
Name: svn:mime-type
13561400 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/cc-flickr.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/cc-flickr.png
___________________________________________________________________
Name: svn:mime-type
13571401 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/archive_org_logo_17.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/archive_org_logo_17.png
___________________________________________________________________
Name: svn:mime-type
13581402 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/archive_org_logo_80.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/archive_org_logo_80.png
___________________________________________________________________
Name: svn:mime-type
13591403 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/metavid_tab.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/metavid_tab.png
___________________________________________________________________
Name: svn:mime-type
13601404 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/metavid_logo_17.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/metavid_logo_17.png
___________________________________________________________________
Name: svn:mime-type
13611405 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/this_wiki_tab.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/this_wiki_tab.png
___________________________________________________________________
Name: svn:mime-type
13621406 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/this_wiki_logo_17.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/this_wiki_logo_17.png
___________________________________________________________________
Name: svn:mime-type
13631407 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_tab.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_tab.png
___________________________________________________________________
Name: svn:mime-type
13641408 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_logo_17.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_logo_17.png
___________________________________________________________________
Name: svn:mime-type
13651409 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_logo_80.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/wiki_commons_logo_80.png
___________________________________________________________________
Name: svn:mime-type
13661410 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/combined_tab.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/remote_cp/combined_tab.png
___________________________________________________________________
Name: svn:mime-type
13671411 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/tab-bg.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/tab-bg.png
___________________________________________________________________
Name: svn:mime-type
13681412 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/archive_org_tab.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/archive_org_tab.png
___________________________________________________________________
Name: svn:mime-type
13691413 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -1520,7 +1520,7 @@
15211521 for(var i=0; i < playable_sources.length; i++){
15221522 if( i==index ){
15231523 this.selected_source = playable_sources[i];
1524 - //update the user prefrance:
 1524+ //update the user selected format:
15251525 embedTypes.players.userSelectFormat( playable_sources[i].mime_type);
15261526 break;
15271527 }
Index: trunk/extensions/MetavidWiki/skins/mv_embed/images/Button_add_media.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/images/Button_add_media.png
___________________________________________________________________
Name: svn:mime-type
15281528 + application/octet-stream

Status & tagging log