Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/mediaWikiSearch.js |
— | — | @@ -81,14 +81,14 @@ |
82 | 82 | |
83 | 83 | this.resultsObj[page_id]={ |
84 | 84 | 'titleKey' : page.title, |
85 | | - 'link' :page.imageinfo[0].descriptionurl, |
86 | | - 'title' :page.title.replace(/File:|.jpg|.png|.svg|.ogg|.ogv|.oga/ig, ''), |
87 | | - 'poster' :page.imageinfo[0].thumburl, |
88 | | - 'thumbwidth' :page.imageinfo[0].thumbwidth, |
89 | | - 'thumbheight':page.imageinfo[0].thumbheight, |
90 | | - 'mime' :page.imageinfo[0].mime, |
91 | | - 'src' :page.imageinfo[0].url, |
92 | | - 'desc' :page.revisions[0]['*'], |
| 85 | + 'link' : page.imageinfo[0].descriptionurl, |
| 86 | + 'title' : page.title.replace(/File:|.jpg|.png|.svg|.ogg|.ogv|.oga/ig, ''), |
| 87 | + 'poster' : page.imageinfo[0].thumburl, |
| 88 | + 'thumbwidth' : page.imageinfo[0].thumbwidth, |
| 89 | + 'thumbheight': page.imageinfo[0].thumbheight, |
| 90 | + 'mime' : page.imageinfo[0].mime, |
| 91 | + 'src' : page.imageinfo[0].url, |
| 92 | + 'desc' : page.revisions[0]['*'], |
93 | 93 | //add pointer to parent search obj: |
94 | 94 | 'pSobj' :_this, |
95 | 95 | 'meta':{ |
— | — | @@ -195,6 +195,18 @@ |
196 | 196 | } |
197 | 197 | js_log('ERROR:unsupored mime type: ' + rObj.mime); |
198 | 198 | }, |
| 199 | + getInlineDescWiki:function( rObj ){ |
| 200 | + var desc = this.parent_getInlineDescWiki( rObj ); |
| 201 | + //just grab the description tag for inline desc: |
| 202 | + var descMatch = new RegExp(/Description=(\{\{en\|)?([^|]*|)/); |
| 203 | + var dparts = desc.match(descMatch); |
| 204 | + |
| 205 | + if( dparts && dparts.length > 1) |
| 206 | + return (dparts.length == 2)? dparts[1] : dparts[2].replace('}}',''); |
| 207 | + //else return the title since we could not find the desc: |
| 208 | + js_log('we could not find the Description tag in :' + desc ); |
| 209 | + return rObj.title; |
| 210 | + }, |
199 | 211 | //returns the inline wikitext for insertion (template based crops for now) |
200 | 212 | getEmbedWikiText: function( rObj ){ |
201 | 213 | //set default layout to right justified |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | /* |
3 | 3 | * api modes (implementations should call these objects which inherit the mvBaseRemoteSearch |
4 | 4 | */ |
5 | | -var metavidSearch = function(initObj) { |
| 5 | +var metavidSearch = function(initObj) { |
6 | 6 | return this.init(initObj); |
7 | 7 | }; |
8 | 8 | metavidSearch.prototype = { |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvFirefogg.js |
— | — | @@ -374,10 +374,10 @@ |
375 | 375 | //@@todo fix this: |
376 | 376 | //the mediaWiki upload system does not have an API so we can\'t read errors |
377 | 377 | }else{ |
378 | | - var res = mvUploader.grabWikiFormError( result_page ); |
| 378 | + var res = grabWikiFormError( result_page ); |
379 | 379 | |
380 | 380 | if(res.error_txt) |
381 | | - error_txt = opt.error_txt; |
| 381 | + error_txt = res.error_txt; |
382 | 382 | |
383 | 383 | if(res.form_txt) |
384 | 384 | form_txt = res.form_txt; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | 'wiki_commons':{ |
118 | 118 | 'enabled':1, |
119 | 119 | 'checked':1, |
120 | | - 'd' :0, |
| 120 | + 'd' :1, |
121 | 121 | 'title' :'Wikipedia Commons', |
122 | 122 | 'desc' : 'Wikimedia Commons is a media file repository making available public domain '+ |
123 | 123 | 'and freely-licensed educational media content (images, sound and video clips) to all.', |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | 'd' :0, |
144 | 144 | 'title' : 'Archive.org', |
145 | 145 | 'desc' : 'The Internet Archive, a digital library of cultural artifacts', |
146 | | - 'homepage':'http://archive.org', |
| 146 | + 'homepage':'http://www.archive.org/about/about.php', |
147 | 147 | |
148 | 148 | 'api_url':'http://homeserver7.us.archive.org:8983/solr/select', |
149 | 149 | 'lib' : 'archiveOrg', |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | 'metavid':{ |
155 | 155 | 'enabled':1, |
156 | 156 | 'checked':1, |
157 | | - 'd' :1, |
| 157 | + 'd' :0, |
158 | 158 | 'title' :'Metavid.org', |
159 | 159 | 'homepage':'http://metavid.org', |
160 | 160 | 'desc' : 'Metavid hosts thousands of hours of US house and senate floor proceedings', |
— | — | @@ -435,6 +435,7 @@ |
436 | 436 | }); |
437 | 437 | }, |
438 | 438 | runSearch: function(){ |
| 439 | + js_log("f:runSearch"); |
439 | 440 | //draw_direct_flag |
440 | 441 | var draw_direct_flag = true; |
441 | 442 | //set loading div: |
— | — | @@ -470,14 +471,16 @@ |
471 | 472 | } |
472 | 473 | |
473 | 474 | //draw the results without running a query |
474 | | - if(draw_direct_flag) |
475 | | - this.drawOutputResults(); |
| 475 | + if( draw_direct_flag ){ |
| 476 | + js_log('do drawOutputResults direct') |
| 477 | + this.drawOutputResults(); |
| 478 | + } |
476 | 479 | }, |
477 | 480 | //issue a api request & cache the result |
478 | 481 | //this check can be avoided by setting the this.import_url_mode = 'api' | 'form' | insted of 'autodetect' or 'none' |
479 | 482 | checkForCopyURLSupport:function ( callback ){ |
480 | 483 | var _this = this; |
481 | | - js_log('checkForCopyURLSupport'); |
| 484 | + js_log('checkForCopyURLSupport'); |
482 | 485 | if( this.import_url_mode == 'autodetect' ){ |
483 | 486 | do_api_req( { |
484 | 487 | 'data':{ 'action':'paraminfo','modules':'upload' }, |
— | — | @@ -494,9 +497,9 @@ |
495 | 498 | // but might be overkill for now. |
496 | 499 | success: function( form_html ){ |
497 | 500 | if( form_html.indexOf( 'wpUploadFileURL' ) != -1){ |
498 | | - _this.import_url_mode= 'form'; |
| 501 | + _this.import_url_mode= 'form'; |
499 | 502 | }else{ |
500 | | - _this.import_url_mode= 'none'; |
| 503 | + _this.import_url_mode= 'none'; |
501 | 504 | } |
502 | 505 | callback(); |
503 | 506 | }, |
— | — | @@ -574,8 +577,8 @@ |
575 | 578 | return false; |
576 | 579 | } |
577 | 580 | |
578 | | - eval('var libLoadReq = {'+cp.lib+'Search: \'libAddMedia/searchLibs/' +cp.lib + 'Search.js\' };'); |
579 | | - mvJsLoader.doLoad( libLoadReq, function(){ |
| 581 | + eval('var libLoadReq = {'+cp.lib+'Search: \'libAddMedia/searchLibs/' +cp.lib + 'Search.js\' };'); |
| 582 | + mvJsLoader.doLoad( libLoadReq, function(){ |
580 | 583 | //else we need to run the search: |
581 | 584 | var iObj = {'cp':cp, 'rsd':_this}; |
582 | 585 | eval('cp.sObj = new '+cp.lib+'Search( iObj );'); |
— | — | @@ -658,7 +661,7 @@ |
659 | 662 | 'data':reqObj, |
660 | 663 | 'url':this.local_wiki_api_url |
661 | 664 | }, function(data){ |
662 | | - //propogate the rO |
| 665 | + //@@todo propogate the rObj |
663 | 666 | var rObj = {}; |
664 | 667 | } |
665 | 668 | ); |
— | — | @@ -794,11 +797,11 @@ |
795 | 798 | 'style="position:absolute;top:0px;left:0px;width:100%;height:100%;background-color:#FFF;">' + |
796 | 799 | '<h3 id="rsd_resource_title" style="margin:4px;">' + gM('rsd_resource_edit') + ' ' + rObj.title +'</h3>'+ |
797 | 800 | '<div id="clip_edit_disp" style="position:absolute;'+overflow_style+'top:35px;left:5px;bottom:0px;'+ |
798 | | - 'width:' + (maxWidth + 30) + 'px;" >' + |
| 801 | + 'width:' + (maxWidth + 25) + 'px;" >' + |
799 | 802 | mv_get_loading_img('position:absolute;top:30px;left:30px', 'mv_img_loader') + |
800 | 803 | '</div>'+ |
801 | 804 | '<div id="clip_edit_ctrl" style="position:absolute;border:solid thin blue;'+ |
802 | | - 'top:35px;left:' + (maxWidth+30) +'px;bottom:0px;right:0px;padding:5px;overflow:auto;">'+ |
| 805 | + 'top:35px;left:' + ( maxWidth + 30 ) +'px;bottom:0px;right:0px;padding:5px;overflow:auto;">'+ |
803 | 806 | mv_get_loading_img() + |
804 | 807 | '</div>'+ |
805 | 808 | '</div>'); |
— | — | @@ -983,25 +986,26 @@ |
984 | 987 | rObj.pSobj.updateDataForImport( rObj ); |
985 | 988 | |
986 | 989 | //setup the resource description from resource description: |
987 | | - var base_resource_desc = '{{Information '+"\n"+ |
| 990 | + var wt = '{{Information '+"\n"+ |
988 | 991 | '|Description= ' + rObj.pSobj.getImportResourceDescWiki( rObj ); |
989 | 992 | //output person and bill info if |
990 | | - base_resource_desc+='|Source=' + '[' + trimStr( rObj.link ) + ' Original Source]'+ "\n"; |
| 993 | + wt+='|Source=' + '[' + trimStr( rObj.link ) + ' Original Source]'+ "\n"; |
991 | 994 | |
992 | 995 | if( rObj.author ) |
993 | | - base_resource_desc+='|Author=' + rObj.author +"\n"; |
| 996 | + wt+='|Author=' + rObj.author +"\n"; |
994 | 997 | |
995 | 998 | if( rObj.date ) |
996 | | - base_resource_desc+='|Date=' + rObj.date +"\n"; |
| 999 | + wt+='|Date=' + rObj.date +"\n"; |
997 | 1000 | |
998 | 1001 | //add the Permision info: |
999 | | - base_resource_desc+='|Permission=' + rObj.pSobj.getPermissionWikiTag( rObj ) +"\n"; |
| 1002 | + wt+='|Permission=' + rObj.pSobj.getPermissionWikiTag( rObj ) +"\n"; |
1000 | 1003 | |
1001 | 1004 | if( rObj.other_versions ) |
1002 | | - base_resource_desc+='|other_versions=' + rObj.other_versions + "\n"; |
| 1005 | + wt+='|other_versions=' + rObj.other_versions + "\n"; |
1003 | 1006 | |
1004 | | - base_resource_desc+='}}'; |
1005 | | - |
| 1007 | + wt+='}}'; |
| 1008 | + //get any extra categories or helpful links |
| 1009 | + wt+= rObj.pSobj.getExtraResourceDescWiki( rObj ); |
1006 | 1010 | |
1007 | 1011 | |
1008 | 1012 | $j('#rsd_resource_import').remove();//remove any old resource imports |
— | — | @@ -1023,7 +1027,7 @@ |
1024 | 1028 | '<input type="text" size="30" value="' + rObj.target_resource_title + '" readonly="true"><br>'+ |
1025 | 1029 | '<strong>Edit WikiText Resource Description:</strong>(will be replaced by forms soon)'+ |
1026 | 1030 | '<textarea id="rsd_import_ta" id="mv_img_desc" style="width:90%;" rows="8" cols="50">'+ |
1027 | | - base_resource_desc + |
| 1031 | + wt + |
1028 | 1032 | '</textarea><br>'+ |
1029 | 1033 | '<input type="checkbox" value="true" id="wpWatchthis" name="wpWatchthis" tabindex="7"/>'+ |
1030 | 1034 | '<label for="wpWatchthis">Watch this page</label><br>'+ |
— | — | @@ -1034,7 +1038,7 @@ |
1035 | 1039 | //output the rendered and non-renderd version of description for easy swiching: |
1036 | 1040 | '</div>'); |
1037 | 1041 | //load the preview text: |
1038 | | - _this.getParsedWikiText( base_resource_desc, _this.cFileNS +':'+ rObj.target_resource_title, function( o ){ |
| 1042 | + _this.getParsedWikiText( wt, _this.cFileNS +':'+ rObj.target_resource_title, function( o ){ |
1039 | 1043 | $j('#rsd_import_desc').html(o); |
1040 | 1044 | }); |
1041 | 1045 | //add bidings: |
— | — | @@ -1103,22 +1107,24 @@ |
1104 | 1108 | js_log('found: ' + sstring); |
1105 | 1109 | $j('#rsd_resource_import').remove(); |
1106 | 1110 | cir_callback( rObj ); |
1107 | | - }else{ |
| 1111 | + }else{ |
1108 | 1112 | js_log("Error or warning: (did not find: \"" + sstring + ' in output' ); |
1109 | 1113 | pos_etitle = '<h1 class="firstHeading">'; |
1110 | | - var error_txt=''; |
1111 | | - if(data.indexOf(pos_etitle)!=-1){ |
1112 | | - var sp = data.indexOf(pos_etitle) + pos_etitle.length; |
1113 | | - error_txt = data.substr(sp , |
1114 | | - (data.indexOf('</h1>',sp )-sp) |
1115 | | - ); |
1116 | | - } |
1117 | | - //var error_msg = |
1118 | | - $j('#rsd_resource_import').html( |
1119 | | - '<b>error importing asset (we should have better error handling soon)</b><br>'+ |
1120 | | - error_txt + '<br>'+ |
1121 | | - '<a href="#" id="rsd_import_error" >Cancel import</a>' |
| 1114 | + var error_txt = form_txt = ''; |
| 1115 | + var res = grabWikiFormError( data ); |
| 1116 | + |
| 1117 | + if( res.error_txt ) |
| 1118 | + error_txt = res.error_txt; |
| 1119 | + |
| 1120 | + if( res.form_txt ) |
| 1121 | + form_txt = res.form_txt; |
| 1122 | + |
| 1123 | + js_log( 'error text is: ' + error_txt ); |
| 1124 | + $j( '#rsd_resource_import' ).html( '<h3>Error</h3>' + error_txt + '<br>' + form_txt + |
| 1125 | + '<br>'+ |
| 1126 | + '<a href="#" id="rsd_import_error" >Cancel import</a>' |
1122 | 1127 | ); |
| 1128 | + //set up cancel action: |
1123 | 1129 | $j('#rsd_import_error').click(function(){ |
1124 | 1130 | $j('#rsd_resource_import').remove(); |
1125 | 1131 | }); |
— | — | @@ -1218,8 +1224,12 @@ |
1219 | 1225 | var list_dark_url = mv_embed_path + 'skins/' + mv_skin_name + '/images/list_layout_icon_dark.png'; |
1220 | 1226 | var list_light_url = mv_embed_path + 'skins/' + mv_skin_name + '/images/list_layout_icon.png'; |
1221 | 1227 | |
1222 | | - |
1223 | | - $j('#rsd_results').append('<div id="rds_results_bar">'+ |
| 1228 | + var about_desc =''; |
| 1229 | + if( this.content_providers[this.disp_item] ){ |
| 1230 | + var cp = this.content_providers[this.disp_item]; |
| 1231 | + about_desc ='<div style="position:absolute;bottom:0px;left:5px;"><i>About <a href="'+ cp.homepage + '" target="_new" >'+ cp.title +'</a> </i></div>'; |
| 1232 | + } |
| 1233 | + $j('#rsd_results').append( about_desc + '<div id="rds_results_bar">'+ |
1224 | 1234 | '<span style="position:relative;top:-5px;font-style:italic;">'+ |
1225 | 1235 | gM('rsd_layout')+' '+ |
1226 | 1236 | '</span>'+ |
— | — | @@ -1369,7 +1379,7 @@ |
1370 | 1380 | this[i] = initObj[i]; |
1371 | 1381 | } |
1372 | 1382 | return this; |
1373 | | - }, |
| 1383 | + }, |
1374 | 1384 | getSearchResults:function(){ |
1375 | 1385 | //empty out the current results before issuing a request |
1376 | 1386 | this.resultsObj = {}; |
— | — | @@ -1465,7 +1475,7 @@ |
1466 | 1476 | _this.resultsObj[ inx ] = rObj; |
1467 | 1477 | _this.num_results++; |
1468 | 1478 | }); |
1469 | | - }, |
| 1479 | + }, |
1470 | 1480 | //by default just return the existing image with callback |
1471 | 1481 | getImageObj:function( rObj, size, callback){ |
1472 | 1482 | callback( {'url':rObj.poster} ); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvUploader.js |
— | — | @@ -98,35 +98,6 @@ |
99 | 99 | _this.fogg = new mvFirefogg( intFirefoggObj ); |
100 | 100 | |
101 | 101 | }, |
102 | | - grabWikiFormError:function( result_page ){ |
103 | | - var res = {}; |
104 | | - sp = result_page.indexOf('<span class="error">'); |
105 | | - if(sp!=-1){ |
106 | | - se = result_page.indexOf('</span>', sp); |
107 | | - res.error_txt = result_page.substr(sp, (sp-se)) + '</span>'; |
108 | | - }else{ |
109 | | - //look for warning: |
110 | | - sp = result_page.indexOf('<ul class="warning">') |
111 | | - if(sp!=-1){ |
112 | | - se = result_page.indexOf('</ul>', sp); |
113 | | - error_txt = result_page.substr(sp, (se-sp)) + '</ul>'; |
114 | | - //try and add the ignore form item: |
115 | | - sfp = result_page.indexOf('<form method="post"'); |
116 | | - if(sfp!=-1){ |
117 | | - sfe = result_page.indexOf('</form>', sfp); |
118 | | - res.form_txt = result_page.substr(sfp, ( sfe - sfp )) + '</form>'; |
119 | | - } |
120 | | - }else{ |
121 | | - //one more error type check: |
122 | | - sp = result_page.indexOf('class="mw-warning-with-logexcerpt">') |
123 | | - if(sp!=-1){ |
124 | | - se = result_page.indexOf('</div>', sp); |
125 | | - res.error_txt = result_page.substr(sp, ( se - sp )) + '</div>'; |
126 | | - } |
127 | | - } |
128 | | - } |
129 | | - return res; |
130 | | - }, |
131 | 102 | //same add code as specialUpload if($wgEnableFirefogg){ |
132 | 103 | addFirefoggHtml:function(){ |
133 | 104 | var itd_html = $j('#mw-upload-table .mw-input:first').html(); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js |
— | — | @@ -433,16 +433,40 @@ |
434 | 434 | '<span style="display:none" class="mv_crop_msg_load">' + gM('loading_txt') + '</span> '+ |
435 | 435 | '<a href="#" style="display:none" class="mv_apply_crop">' + gM('mv_apply_crop') + '</a> '+ |
436 | 436 | '<a href="#" style="display:none" class="mv_rest_crop">' + gM('mv_reset_crop') + '</a> '+ |
437 | | - '<br style="clear:both"><br>'+ |
438 | | - /*'<div class="mv_edit_button mv_scale_button_base" id="mv_scale_button" alt="crop" title="'+gM('mv_scale')+'"></div>'+ |
| 437 | + '<hr style="clear:both"/><br>'+ |
| 438 | + '<span style="float:left;">Layout:</span>' + |
| 439 | + '<input type="radio" name="mv_layout" id="mv_layout_left" style="float:left"><div id="mv_layout_left_img" title="'+gM('mv_layout_left')+'"/>'+ |
| 440 | + '<input type="radio" name="mv_layout" id="mv_layout_right" style="float:left"><div id="mv_layout_right_img" title="'+gM('mv_layout_left')+'"/>'+ |
| 441 | + '<hr style="clear:both" /><br>' + |
| 442 | + _this.getInsertDescHtml() + |
| 443 | + _this.getInsertAction() |
| 444 | + ); |
| 445 | + /*scale: |
| 446 | + '<div class="mv_edit_button mv_scale_button_base" id="mv_scale_button" alt="crop" title="'+gM('mv_scale')+'"></div>'+ |
439 | 447 | '<a href="#" class="mv_scale_msg">' + gM('mv_scale') + '</a><br>'+ |
440 | 448 | '<a href="#" style="display:none" class="mv_apply_scale">' + gM('mv_apply_scale') + '</a> '+ |
441 | 449 | '<a href="#" style="display:none" class="mv_rest_scale">' + gM('mv_reset_scale') + '</a><br> '+ |
442 | | - */ |
443 | | - _this.getInsertDescHtml() + |
444 | | - _this.getInsertAction() |
445 | | - ); |
446 | | - //add bindings: |
| 450 | + |
| 451 | + */ |
| 452 | + //add bindings: |
| 453 | + |
| 454 | + //make sure the default is reflected: |
| 455 | + if( ! _this.rObj.layout ) |
| 456 | + _this.rObj.layout = 'right'; |
| 457 | + $j('#mv_layout_' + _this.rObj.layout)[0].checked = true; |
| 458 | + |
| 459 | + //left radio click |
| 460 | + $j('#mv_layout_left,#mv_layout_left_img').click(function(){ |
| 461 | + $j('#mv_layout_right')[0].checked = false; |
| 462 | + $j('#mv_layout_left')[0].checked = true; |
| 463 | + _this.rObj.layout = 'left'; |
| 464 | + }); |
| 465 | + //right radio click |
| 466 | + $j('#mv_layout_right,#mv_layout_right_img').click(function(){ |
| 467 | + $j('#mv_layout_left')[0].checked = false; |
| 468 | + $j('#mv_layout_right')[0].checked = true; |
| 469 | + _this.rObj.layout = 'right'; |
| 470 | + }); |
447 | 471 | $j('#mv_crop_button,.mv_crop_msg,.mv_apply_crop').click(function(){ |
448 | 472 | js_log('click:mv_crop_button: base width: ' + _this.rObj.width + ' bh: ' + _this.rObj.height); |
449 | 473 | if($j('#mv_crop_button').hasClass('mv_crop_button_selected')){ |
— | — | @@ -464,7 +488,9 @@ |
465 | 489 | this.applyInsertControlBindings(); |
466 | 490 | }, |
467 | 491 | applyVideoAdj:function(){ |
468 | | - js_log('applyVideoAdj::'); |
| 492 | + js_log('applyVideoAdj::'); |
| 493 | + //be sure to "stop the video (some plugins can't have DOM elements on top of them) |
| 494 | + $j('#embed_vid').get(0).stop(); |
469 | 495 | //update video related keys |
470 | 496 | this.rObj['start_time'] = $j('#mv_start_hr_rsd').val(); |
471 | 497 | this.rObj['end_time'] = $j('#mv_end_hr_rsd').val(); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/image_layout_right.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/image_layout_right.png |
___________________________________________________________________ |
Name: svn:mime-type |
472 | 498 | + application/octet-stream |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/image_layout_left.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/image_layout_left.png |
___________________________________________________________________ |
Name: svn:mime-type |
473 | 499 | + application/octet-stream |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css |
— | — | @@ -612,6 +612,19 @@ |
613 | 613 | height:22px; |
614 | 614 | float:left; |
615 | 615 | } |
| 616 | +#mv_layout_left_img{ |
| 617 | + width:50px; |
| 618 | + height:33px; |
| 619 | + background-image: url('images/image_layout_left.png'); |
| 620 | + float:left; |
| 621 | +} |
| 622 | +#mv_layout_right_img{ |
| 623 | + width:50px; |
| 624 | + height:33px; |
| 625 | + background-image: url('images/image_layout_right.png'); |
| 626 | + float:left; |
| 627 | +} |
| 628 | + |
616 | 629 | .mv_crop_button_base{ |
617 | 630 | background-image: url('images/stock-tool-button-crop.png'); |
618 | 631 | } |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | MV_DO_INIT=false; |
23 | 23 | } |
24 | 24 | //used to grab fresh copies of scripts. (should be changed on commit) |
25 | | -var MV_EMBED_VERSION = '1.0r12'; |
| 25 | +var MV_EMBED_VERSION = '1.0r13'; |
26 | 26 | |
27 | 27 | //the name of the player skin (default is mvpcf) |
28 | 28 | var mv_skin_name = 'mvpcf'; |
— | — | @@ -1154,6 +1154,36 @@ |
1155 | 1155 | loadExternalJs( req_url ); |
1156 | 1156 | } |
1157 | 1157 | } |
| 1158 | + |
| 1159 | +function grabWikiFormError ( result_page ){ |
| 1160 | + var res = {}; |
| 1161 | + sp = result_page.indexOf('<span class="error">'); |
| 1162 | + if(sp!=-1){ |
| 1163 | + se = result_page.indexOf('</span>', sp); |
| 1164 | + res.error_txt = result_page.substr(sp, (sp-se)) + '</span>'; |
| 1165 | + }else{ |
| 1166 | + //look for warning: |
| 1167 | + sp = result_page.indexOf('<ul class="warning">') |
| 1168 | + if(sp != -1){ |
| 1169 | + se = result_page.indexOf('</ul>', sp); |
| 1170 | + res.error_txt = result_page.substr(sp, (se-sp)) + '</ul>'; |
| 1171 | + //try and add the ignore form item: |
| 1172 | + sfp = result_page.indexOf('<form method="post"'); |
| 1173 | + if(sfp!=-1){ |
| 1174 | + sfe = result_page.indexOf('</form>', sfp); |
| 1175 | + res.form_txt = result_page.substr(sfp, ( sfe - sfp )) + '</form>'; |
| 1176 | + } |
| 1177 | + }else{ |
| 1178 | + //one more error type check: |
| 1179 | + sp = result_page.indexOf('class="mw-warning-with-logexcerpt">') |
| 1180 | + if(sp!=-1){ |
| 1181 | + se = result_page.indexOf('</div>', sp); |
| 1182 | + res.error_txt = result_page.substr(sp, ( se - sp )) + '</div>'; |
| 1183 | + } |
| 1184 | + } |
| 1185 | + } |
| 1186 | + return res; |
| 1187 | +} |
1158 | 1188 | //do a "normal" request |
1159 | 1189 | function do_request(req_url, callback){ |
1160 | 1190 | //if we are doing a request to the same domain or relative link do a normal GET: |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_vlcEmbed.js |
— | — | @@ -179,22 +179,11 @@ |
180 | 180 | liveFeedRoll: 0, |
181 | 181 | onPlaying: function(){ |
182 | 182 | if(this.seek_time_sec != 0 && !this.supportsURLTimeEncoding() ) |
183 | | - { |
184 | | - // VLC seems to have a problem seeking into the future this way |
185 | | - var ms_difference = this.seek_time_sec * 1000 - this.vlc.input.time; |
186 | | - if(ms_difference <= 0) |
187 | | - { |
188 | | - js_log('Seeking to ' + this.seek_time_sec); |
189 | | - this.vlc.input.time = this.seek_time_sec * 1000; |
190 | | - this.vlc.input.rate=1.0; |
191 | | - this.seek_time_sec = 0; |
192 | | - } |
193 | | - else if (this.vlc.input.rate == 1.0) |
194 | | - { |
195 | | - var rate = Math.max(2, ms_difference / 500) |
196 | | - js_log('setting rate to: ' + rate); |
197 | | - this.vlc.input.rate=rate; |
198 | | - } |
| 183 | + { |
| 184 | + js_log('Seeking to ' + this.seek_time_sec); |
| 185 | + this.vlc.input.time = this.seek_time_sec * 1000; |
| 186 | + this.vlc.input.rate=1.0; |
| 187 | + this.seek_time_sec = 0; |
199 | 188 | } |
200 | 189 | //for now trust the duration from url over vlc input.length |
201 | 190 | if( ! this.media_element.selected_source.end_ntp && this.vlc.input.length>0) |