Index: trunk/extensions/MetavidWiki/skins/external_media_wizard.js |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | 'local':true //this will change the output from [[embed:StreamName]] to [[remoteEmbed:roe_url]] |
13 | 13 | } |
14 | 14 | } |
15 | | -var wg_local_wiki_api_url = 'http://localhost/wiki/api.php'; |
| 15 | +var wg_local_wiki_api_url = wgServer + wgScriptPath + '/api.php'; |
16 | 16 | |
17 | 17 | |
18 | 18 | //*code should not have to modify anything below*/ |
— | — | @@ -28,11 +28,12 @@ |
29 | 29 | } |
30 | 30 | var caret_pos={}; |
31 | 31 | function mv_do_load_wiz(){ |
32 | | - caret_pos={}; |
33 | | - tb = document.getElementById('wpTextbox1'); |
34 | | - caret_pos.s = getTextCusorStartPos( tb ); |
35 | | - caret_pos.e = getTextCusorEndPos( tb ); |
36 | | - |
| 32 | + caret_pos={}; |
| 33 | + var txtarea = document.editform.wpTextbox1; |
| 34 | + caret_pos.s = getTextCusorStartPos( txtarea ); |
| 35 | + caret_pos.e = getTextCusorEndPos( txtarea ); |
| 36 | + caret_pos.text = txtarea.value; |
| 37 | + |
37 | 38 | //show the loading screen: |
38 | 39 | var body_elm = document.getElementsByTagName("body")[0]; |
39 | 40 | body_elm.innerHTML = body_elm.innerHTML + ''+ |
— | — | @@ -62,6 +63,10 @@ |
63 | 64 | if( typeof MV_EMBED_VERSION == 'undefined'){ |
64 | 65 | setTimeout('check_for_mv_embed();', 25); |
65 | 66 | }else{ |
| 67 | + //restore text value: |
| 68 | + var txtarea = document.editform.wpTextbox1; |
| 69 | + txtarea.value = caret_pos.text; |
| 70 | + //do the remote search interface: |
66 | 71 | mv_do_remote_search({ |
67 | 72 | 'target_id':'modalbox', |
68 | 73 | 'profile':'mediawiki_edit', |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | '<textarea id="mv_img_desc" rows="4" cols="30"></textarea><br>'+ |
70 | 70 | '<h3>Actions</h3>'+ |
71 | 71 | '<input type="button" class="mv_insert_image_page" value="' + getMsg('mv_insert_image_page') + '"> '+ |
72 | | - '<input type="button" class="mv_preview_insert" value="' + getMsg('mv_preview_insert')+ '"> '+ |
| 72 | + '<input type="button" style="font-weight:bold" class="mv_preview_insert" value="' + getMsg('mv_preview_insert')+ '"> '+ |
73 | 73 | '<a href="#" class="mv_cancel_img_edit" title="' + getMsg('mv_cancel_image_insert')+'">' + getMsg('mv_cancel_image_insert') + '</a> ' |
74 | 74 | ); |
75 | 75 | //add bidings: |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css |
— | — | @@ -494,15 +494,15 @@ |
495 | 495 | display:inline; |
496 | 496 | list-style-image:none; |
497 | 497 | list-style-position:outside; |
498 | | - list-style-type:none; |
499 | | - margin:0; |
500 | | - padding:0; |
| 498 | + list-style-type:none; |
| 499 | + z-index:2; |
501 | 500 | } |
502 | 501 | ul.rsd_cp_tabs li.rsd_selected { |
503 | 502 | background:#FFFFFF none repeat scroll 0 0; |
504 | 503 | border-bottom:0; |
505 | 504 | padding-bottom:1px; |
506 | 505 | padding-top:12px; |
| 506 | + top:40px; |
507 | 507 | } |
508 | 508 | ul.rsd_cp_tabs li { |
509 | 509 | display:inline; |
— | — | @@ -527,16 +527,18 @@ |
528 | 528 | border-top:0; |
529 | 529 | border:1px solid #777; |
530 | 530 | position:relative; |
531 | | - background:#FFF; |
532 | | - |
533 | | - position:absolute; |
| 531 | + background:#FFF; |
534 | 532 | left:2px; |
535 | 533 | right:2px; |
536 | | - top:66px; |
537 | 534 | bottom:2px; |
538 | 535 | z-index:-1; |
539 | 536 | overflow:auto; |
| 537 | + position:absolute; |
| 538 | + top:75px; |
540 | 539 | } |
| 540 | +#rsd_resource_edit{ |
| 541 | + z-index:2; |
| 542 | +} |
541 | 543 | .mv_clip_box_result{ |
542 | 544 | padding:10px; |
543 | 545 | float:left; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -132,7 +132,9 @@ |
133 | 133 | return '[' + key + ']'; |
134 | 134 | } |
135 | 135 | } |
136 | | -function mv_get_loading_img( style, class){ |
| 136 | + |
| 137 | +function mv_get_loading_img( style , class ){ |
| 138 | + var style_txt = (style)?style:''; |
137 | 139 | var class_attr = (class)?'class="'+class+'"':'class="mv_loading_img"'; |
138 | 140 | return '<img '+class_attr+' style="' + style +'" src="'+ |
139 | 141 | mv_embed_path + 'skins/' + mv_skin_name + '/images/loading_ani.gif">'; |
— | — | @@ -2922,26 +2924,26 @@ |
2923 | 2925 | api_url = wgServer +((wgServer == null) ? parseUri(document.URL).host + (wgScriptPath + "/api.php") : parseUri(document.URL).host + wgScript); |
2924 | 2926 | //update to api.php (if index.php was in the wgScript path): |
2925 | 2927 | api_url = api_url.replace('index.php', 'api.php'); |
2926 | | - } |
2927 | | - |
2928 | | - //build request string: (force the format to json): |
2929 | | - var req_url = api_url + '?format=json'; |
2930 | | - for(var i in req_param){ |
2931 | | - req_url += '&' + encodeURIComponent( i ) + '=' + encodeURIComponent( req_param[i] ); |
2932 | | - } |
2933 | | - |
| 2928 | + } |
| 2929 | + //build request string: (force the format to json): |
| 2930 | + var req_url = api_url + '?format=json'; |
2934 | 2931 | if( parseUri(document.URL).host == parseUri(api_url).host ){ |
2935 | 2932 | //local request do api request directly |
2936 | 2933 | $j.ajax({ |
2937 | | - type: "GET", |
| 2934 | + type: "POST", |
2938 | 2935 | url:req_url, |
| 2936 | + data: req_param, |
2939 | 2937 | async: false, |
2940 | 2938 | success:function(data){ |
2941 | 2939 | eval('var result_data=' + data ); |
2942 | 2940 | callback( result_data ); |
2943 | 2941 | } |
2944 | 2942 | }); |
2945 | | - }else{ |
| 2943 | + }else{ |
| 2944 | + //put all the values into the GET req: |
| 2945 | + for(var i in req_param){ |
| 2946 | + req_url += '&' + encodeURIComponent( i ) + '=' + encodeURIComponent( req_param[i] ); |
| 2947 | + } |
2946 | 2948 | var fname = 'mycpfn_' + ( global_cb_count++ ); |
2947 | 2949 | _global[ fname ] = callback ; |
2948 | 2950 | req_url += '&callback=' + fname; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libRemoteMediaSearch/mv_remote_media_search.js |
— | — | @@ -73,12 +73,12 @@ |
74 | 74 | 'title' :'Wikipedia Commons', |
75 | 75 | 'desc' : 'Wikimedia Commons is a media file repository making available public domain '+ |
76 | 76 | 'and freely-licensed educational media content (images, sound and video clips) to all.', |
77 | | - 'hompage': 'http://commons.wikimedia.org/wiki/Main_Page', |
| 77 | + 'homepage': 'http://commons.wikimedia.org/wiki/Main_Page', |
78 | 78 | 'api_url':'http://commons.wikimedia.org/w/api.php', |
79 | 79 | 'lib' :'mediaWiki', |
80 | 80 | 'search_title':false, //disable title search |
81 | 81 | 'local' :false, |
82 | | - 'resource_prefix': '' //what prefix to use on imported resources |
| 82 | + 'resource_prefix': 'WC_' //prefix on imported resources (not applicable if the repository is local) |
83 | 83 | }, |
84 | 84 | 'metavid':{ |
85 | 85 | 'enabled':1, |
— | — | @@ -138,10 +138,10 @@ |
139 | 139 | this.add_interface_bindings(); |
140 | 140 | }, |
141 | 141 | //gets the in and out points for insert position or grabs the selected text for search |
142 | | - getTexboxSelection:function(){ |
| 142 | + getTexboxSelection:function(){ |
143 | 143 | if(this.caret_pos.s && this.caret_pos.e && |
144 | 144 | (this.caret_pos.s != this.caret_pos.e)) |
145 | | - this.default_query = $j('#'+this.target_textbox).val().substring(this.caret_pos.s, this.caret_pos.e).replace(/ /g, '\xa0') || '\xa0' |
| 145 | + this.default_query = caret_pos.text.substring(this.caret_pos.s, this.caret_pos.e).replace(/ /g, '\xa0') || '\xa0' |
146 | 146 | }, |
147 | 147 | //sets up the initial html interface |
148 | 148 | init_interface_html:function(){ |
— | — | @@ -272,7 +272,7 @@ |
273 | 273 | drawTabs: function(){ |
274 | 274 | var _this = this; |
275 | 275 | //add the tabs to the rsd_results container: |
276 | | - var o= '<ul class="rsd_cp_tabs" >'; |
| 276 | + var o= '<ul class="rsd_cp_tabs" style="margin-bottom:2px;">'; //no idea why margin-bottom does not work in the css file |
277 | 277 | o+='<li id="rsd_tab_combined" ><img src="' + mv_embed_path + 'skins/'+mv_skin_name+ '/remote_search/combined_tab.png"></li>'; |
278 | 278 | for(var cp_id in this.content_providers){ |
279 | 279 | var cp = this.content_providers[cp_id]; |
— | — | @@ -475,83 +475,168 @@ |
476 | 476 | _this.cEdit = new mvClipEdit( mvClipInit ); |
477 | 477 | }); |
478 | 478 | }, |
479 | | - checkImportResource:function( rObj, callback){ |
| 479 | + checkImportResource:function( rObj, cir_callback){ |
480 | 480 | //check if the resource is "locally accesible" |
481 | 481 | if( rObj.pSobj.local ){ |
482 | | - callback( rObj ); |
| 482 | + js_log("checkImportResource:local"); |
| 483 | + cir_callback( rObj ); |
483 | 484 | }else{ |
484 | 485 | var _this = this; |
485 | 486 | var cp = rObj.pSobj.cp; |
486 | 487 | |
487 | 488 | //first check if the resource is not already on this wiki: |
488 | | - var target_resource_title = cp.resource_prefix + rObj.titleKey; |
489 | | - reqObj={'action':'query', titles:target_resource_title}; |
490 | | - do_api_req( reqObj, this.local_wiki_api_url, function(data){ |
491 | | - if( ! data.query.pages['-1'] ){ |
492 | | - //resource is already present: |
493 | | - callback( rObj ); |
| 489 | + //@@todo get the File Msg |
| 490 | + var cFileNS= 'Image' |
| 491 | + var target_resource_title = cp.resource_prefix + rObj.titleKey.substr( cFileNS.length + 1 ); |
| 492 | + reqObj={'action':'query', titles: cFileNS + ':' + target_resource_title + '|' + rObj.titleKey}; |
| 493 | + do_api_req( reqObj, this.local_wiki_api_url, function(data){ |
| 494 | + var found_title = false; |
| 495 | + for(var i in data.query.pages){ |
| 496 | + if(i>0) |
| 497 | + found_title=true; |
| 498 | + } |
| 499 | + if( found_title ){ |
| 500 | + //resource is already present (or resource with same name is already present) |
| 501 | + js_log("checkImportResource:resource is already present: {"+ |
| 502 | + cp.resource_prefix + '}' + rObj.titleKey); |
| 503 | + cir_callback( rObj ); |
494 | 504 | }else{ |
495 | | - var base_resource_desc = '{Information '+ |
| 505 | + js_log("resource not present: update:"+ cFileNS + ':' + target_resource_title); |
| 506 | + |
| 507 | + //setup the resource description from resource description: |
| 508 | + var base_resource_desc = '{{Information '+"\n"+ |
496 | 509 | '|Description= ' + rObj.title + ' imported from ' + '[' + cp.homepage + |
497 | 510 | ' ' + cp.title+']' + "\n" + |
498 | | - '|Source=' + '[' + rObj.link +' Original Source]'+ "\n" + |
499 | | - '|Author= US government' +"\n"+ |
500 | | - '|Date= October 1st 2008' +"\n"+ |
501 | | - '|Permission=' +"\n"+ |
502 | | - '|other_versions=' +"\n"+ |
503 | | - '}}'; |
| 511 | + '|Source=' + '[' + rObj.link +' Original Source]'+ "\n"; |
| 512 | + |
| 513 | + if( rObj.author ) |
| 514 | + base_resource_desc+='|Author= US government' +"\n"; |
| 515 | + |
| 516 | + if( rObj.date ) |
| 517 | + base_resource_desc+='|Date= October 1st 2008' +"\n"; |
| 518 | + |
| 519 | + if( rObj.permission ) |
| 520 | + base_resource_desc+='|Permission=' +"\n"; |
| 521 | + |
| 522 | + if( rObj.other_versions ) |
| 523 | + base_resource_desc+='|other_versions=' +"\n"; |
| 524 | + |
| 525 | + base_resource_desc+='}}'; |
| 526 | + $j('#rsd_resource_import').remove();//remove any old resource imports |
504 | 527 | //@@ show user dialog to import the resource |
505 | 528 | $j( '#'+ _this.target_id ).append('<div id="rsd_resource_import" '+ |
506 | | - 'style="position:absolute;top:0px;left:0px;width:100%;height:100%;background-color:#FFF;">' + |
507 | | - '<h3>Resource: ' + rObj.title + ' needs to be imported to this wiki</h3>'+ |
508 | | - rObj.pSobj.getEmbedHTML( rObj, {'max_height':'300'} )+ //get embedHTML: |
509 | | - '<br>'+ |
510 | | - //output the rendered and non-renderd version of description for easy swiching: |
511 | | - '<strong>Resource Description:</strong>'+ |
512 | | - '<a id="rsd_import_aedit" href="#">Edit</a>'+ |
513 | | - '<a style="display:none;" id="rsd_import_apreview" href="#">Preview</a>'+ |
514 | | - '<div id="rsd_impoart_desc" syle="width:60%;border:solid thin black;height:300px;overflow:auto;">'+ |
515 | | - mv_get_loading_img('position:absolute;top:5px;left:5px', 'mv_img_loader') + |
516 | | - '</div>'+ |
517 | | - '<textarea id="rsd_import_ta" style="display:none" id="mv_img_desc" rows="4" cols="30">'+ |
518 | | - base_resource_desc + |
519 | | - '</textarea><br>'+ |
520 | | - '<input id="rsd_import_doimport" type="button" value="Do Import Resource">'+ |
521 | | - '<a href="#">Cancel Import</a>'+ |
| 529 | + 'style="position:absolute;top:50px;left:50px;right:50px;bottom:50px;background-color:#FFF;border:solid thick red;z-index:3">' + |
| 530 | + '<h3 style="color:red">Resource: <span style="color:black">' + rObj.title + '</span> needs to be imported</h3>'+ |
| 531 | + '<div id="rsd_preview_import_container" style="position:absolute;width:50%;bottom:0px;left:0px;overflow:auto;top:30px;">' + |
| 532 | + rObj.pSobj.getEmbedHTML( rObj, {'max_height':'200'} )+ //get embedHTML with small thumb: |
| 533 | + '<br style="clear both">'+ |
| 534 | + '<strong>Resource Page Description:</strong>'+ |
| 535 | + '<div id="rsd_import_desc" syle="display:inline;">'+ |
| 536 | + mv_get_loading_img('position:absolute;top:5px;left:5px', 'mv_img_loader') + |
| 537 | + '</div>'+ |
| 538 | + '</div>'+ |
| 539 | + '<div id="rds_edit_import_container" style="position:absolute;left:50%;' + |
| 540 | + 'bottom:0px;top:30px;right:0px;overflow:auto;">'+ |
| 541 | + '<strong>Local Resource Title:</strong><br>'+ |
| 542 | + '<input type="text" size="30" value="' + target_resource_title + '" readonly="true"><br>'+ |
| 543 | + '<strong>Edit WikiText Resource Description:</strong>(will be replaced by forms soon)'+ |
| 544 | + '<textarea id="rsd_import_ta" id="mv_img_desc" rows="8" cols="50">'+ |
| 545 | + base_resource_desc + |
| 546 | + '</textarea><br>'+ |
| 547 | + '<input type="checkbox" value="true" id="wpWatchthis" name="wpWatchthis" tabindex="7"/>'+ |
| 548 | + '<label for="wpWatchthis">Watch this page</label><br>'+ |
| 549 | + '<input id="rsd_import_apreview" type="button" value="Update Preview"> ' + |
| 550 | + '<input style="font-weight: bold" id="rsd_import_doimport" type="button" value="Do Import Resource"> '+ |
| 551 | + '<a id="rsd_import_acancel" href="#">Cancel Import</a>'+ |
| 552 | + '</div>'+ |
| 553 | + //output the rendered and non-renderd version of description for easy swiching: |
522 | 554 | '</div>'); |
523 | | - //load the preview text: |
524 | | - _this.getParsedWikiText( base_resource_desc, function( o ){ |
525 | | - $j('#rsd_impoart_desc').html(o); |
| 555 | + //load the preview text: |
| 556 | + _this.getParsedWikiText( base_resource_desc, cFileNS +':'+ target_resource_title, function( o ){ |
| 557 | + $j('#rsd_import_desc').html(o); |
526 | 558 | }); |
527 | | - //add bidings: |
528 | | - $j('#rsd_import_aedit').click(function(){ |
529 | | - $j(this).hide(); |
530 | | - $j('#rsd_impoart_desc').hide(); |
531 | | - $j('#rsd_import_apreview,#rsd_import_ta').show(); |
532 | | - }); |
| 559 | + //add bidings: |
533 | 560 | $j('#rsd_import_apreview').click(function(){ |
534 | | - $j(this).hide(); |
535 | | - $j('#rsd_impoart_desc').show().html( |
536 | | - mv_get_loading_img('position:absolute;top:5px;left:5px', 'mv_img_loader') |
| 561 | + $j('#rsd_import_desc').show().html( |
| 562 | + mv_get_loading_img() |
537 | 563 | ); |
538 | 564 | //load the preview text: |
539 | | - _this.getParsedWikiText( $j('#rsd_import_ta').val() , function( o ){ |
540 | | - $j('#rsd_impoart_desc').html(o); |
| 565 | + _this.getParsedWikiText( $j('#rsd_import_ta').val(), cFileNS +':'+ target_resource_title, function( o ){ |
| 566 | + js_log('got updated preivew: '+ o); |
| 567 | + $j('#rsd_import_desc').html(o); |
541 | 568 | }); |
542 | 569 | }); |
543 | 570 | $j('#rsd_import_doimport').click(function(){ |
544 | 571 | //replace the parent with progress bar: |
545 | 572 | $j('rsd_resource_import').html( |
546 | 573 | '<h3>Importing asset</h3>'+ |
547 | | - mv_get_loading_img('position:absolute;top:5px;left:5px', 'mv_img_loader') |
| 574 | + mv_get_loading_img() |
548 | 575 | ); |
549 | 576 | //get an edittoken: |
550 | 577 | var reqObj = {'action':'query','prop':'info','intoken':'edit','titles': rObj.titleKey }; |
551 | | - do_api_req( reqObj, cp.api_url,function(data){ |
552 | | - js_log('edit token: ' + data.page[0]['edittoken']); |
| 578 | + do_api_req( reqObj, _this.local_wiki_api_url, function(data){ |
| 579 | + //could recheck if it has been created in the mean time |
| 580 | + if( data.query.pages[-1] ){ |
| 581 | + var editToken = data.query.pages[-1]['edittoken']; |
| 582 | + if(!editToken){ |
| 583 | + //@@todo give an ajax login or be more friendly in some way: |
| 584 | + js_error("You don't have permision to upload (are you logged in?)"); |
| 585 | + //remove top level: |
| 586 | + $j('#modalbox').fadeOut("normal",function(){ |
| 587 | + $j(this).remove(); |
| 588 | + $j('#mv_overlay').remove(); |
| 589 | + }); |
| 590 | + }else{ |
| 591 | + //not sure if we can do remote url uploads (so just do a local post) |
| 592 | + js_log('got token for new page:' +editToken); |
| 593 | + var postVars = { |
| 594 | + 'wpSourceType' :'web', |
| 595 | + 'wpUploadFileURL' : rObj.url, |
| 596 | + 'wpDestFile' : target_resource_title, |
| 597 | + 'wpUploadDescription':$j('#rsd_import_ta').val(), |
| 598 | + 'wpWatchthis' : $j('#wpWatchthis').val(), |
| 599 | + 'wpUpload' : 'Upload file' |
| 600 | + } |
| 601 | + //set to uploading: |
| 602 | + $j('#rsd_resource_import').append('<div id="rsd_import_progress"'+ |
| 603 | + 'style="position:abolute;top:0px;"'+ |
| 604 | + 'left:0px;width:100%;height:100%;'+ |
| 605 | + 'z-index:4;background:#555;">'+ |
| 606 | + '<div style="left:30%;right:30%">Importing Asset' + |
| 607 | + mv_get_loading_img() + |
| 608 | + '</dvi>'+ |
| 609 | + '</div>' |
| 610 | + ); |
| 611 | + |
| 612 | + $j.ajax({ |
| 613 | + type:"POST", |
| 614 | + url: wgArticlePath.replace(/\$1/,'Special:Upload'), |
| 615 | + data: postVars, |
| 616 | + sucess:function(data, textStatus){ |
| 617 | + js_log('success in uploading: '+target_resource_title +' textStatus:'+ textStatus); |
| 618 | + //cir_callback with pointer to local resource: |
| 619 | + cObj.target_resource_title = target_resource_title; |
| 620 | + cir_callback( rObj ) |
| 621 | + }, |
| 622 | + error:function(XMLHttpRequest, textStatus, errorThrown){ |
| 623 | + js_log('error httpReq:' + ' status:' + XMLHttpRequest.status) |
| 624 | + }, |
| 625 | + complete:function(XMLHttpRequest, textStatus){ |
| 626 | + js_log('completed request:' + textStatus + ' status:'+ XMLHttpRequest.status); |
| 627 | + rObj.target_resource_title = target_resource_title; |
| 628 | + cir_callback( rObj ) |
| 629 | + } |
| 630 | + }); |
| 631 | + } |
| 632 | + } |
553 | 633 | }); |
554 | 634 | |
555 | | - }); |
| 635 | + }); |
| 636 | + $j('#rsd_import_acancel').click(function(){ |
| 637 | + $j('#rsd_resource_import').fadeOut("fast",function(){ |
| 638 | + $j(this).remove(); |
| 639 | + }) |
| 640 | + }) |
556 | 641 | } |
557 | 642 | }); |
558 | 643 | } |
— | — | @@ -585,8 +670,8 @@ |
586 | 671 | 'action':'parse', |
587 | 672 | 'text':wikitext |
588 | 673 | }; |
589 | | - do_api_req( reqObj, this.local_wiki_api_url, function(data){ |
590 | | - callback( data.parse['*'] ); |
| 674 | + do_api_req( reqObj, this.local_wiki_api_url, function(data){ |
| 675 | + callback( data.parse.text['*'] ); |
591 | 676 | }); |
592 | 677 | }, |
593 | 678 | insertResource:function( rObj){ |
— | — | @@ -863,7 +948,7 @@ |
864 | 949 | var page = data.query.pages[ page_id ]; |
865 | 950 | this.resultsObj[page_id]={ |
866 | 951 | 'titleKey':page.title, |
867 | | - 'link':'null', |
| 952 | + 'link':page.imageinfo[0].descriptionurl, |
868 | 953 | 'title':page.title.replace(/File:|.jpg|.png|.svg|.ogg|.ogv/ig, ''), |
869 | 954 | 'poster':page.imageinfo[0].thumburl, |
870 | 955 | 'thumbwidth':page.imageinfo[0].thumbwidth, |
— | — | @@ -897,7 +982,6 @@ |
898 | 983 | //build the query to get the req size image: |
899 | 984 | var reqObj = { |
900 | 985 | 'action':'query', |
901 | | - 'format':'json', |
902 | 986 | 'titles':rObj.titleKey, |
903 | 987 | 'prop':'imageinfo', |
904 | 988 | 'iiprop':'url|size|mime' |