r58702 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58701‎ | r58702 | r58703 >
Date:13:13, 7 November 2009
Author:dale
Status:deferred
Tags:
Comment:
* fixed rewrite ogg handler
Modified paths:
  • /trunk/phase3/js2/mwEmbed/skins/mvpcf/playerSkin.css (modified) (history)
  • /trunk/phase3/js2/remoteMwEmbed.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/skins/mvpcf/playerSkin.css
@@ -140,7 +140,7 @@
141141 float: left;
142142 display: inline;
143143 height: 10px;
144 - margin-left:10px;
 144+ margin-left:8px;
145145 margin-top:10px;
146146 position:relative;
147147 }
Index: trunk/phase3/js2/remoteMwEmbed.js
@@ -62,15 +62,9 @@
6363 }
6464 // will be depreciated in favor of updates to OggHandler
6565 function rewrite_for_OggHandler( vidIdList ){
66 - function procVidId(vidId){
67 - if( $j( '#'+vidId).length == 0){
68 - if(vidIdList.length != 0){
69 - setTimeout( function(){
70 - procVidId( vidIdList.pop() )
71 - }, 1);
72 - }
73 - return ;
74 - }
 66+ function procVidId( vidId ){
 67+ js_log('vidIdList length: ' + vidIdList.length + ' left in the set: ' + vidIdList );
 68+
7569 // Grab the thumbnail and src of the video
7670 var pimg = $j( '#' + vidId + ' img' );
7771 var poster_attr = 'poster = "' + pimg.attr( 'src' ) + '" ';
@@ -90,9 +84,8 @@
9185
9286 // Parsed values:
9387 var src = '';
94 - var duration = '';
95 - var wikiTitleKey = $j( '#'+vidId + ' img').attr('alt').replace(' ', '_');
96 -
 88+ var duration = '';
 89+ var wikiTitleKey = $j( '#'+vidId + ' img').filter(':first').attr('alt').replace(/ /g, '_');
9790 var re = new RegExp( /videoUrl(":?\s*)*([^&]*)/ );
9891 src = re.exec( $j( '#'+vidId ).html() )[2];
9992
@@ -117,24 +110,24 @@
118111 }else{
119112 html_out='<video' + common_attr +
120113 poster_attr + ' ' +
121 - 'style="width:' + pwidth + 'px;height:' +
122 - pheight + 'px;">'
 114+ 'style="width:' + pwidth + 'px;height:' + pheight + 'px;">' +
123115 '</video>';
124116 }
125117 //set the video tag inner html and update the height
126118 $j( '#' + vidId ).html( html_out )
127119 .css('height', pheight + 30);
128120
129 - }
130 - rewrite_by_id( 'vid_' + i, function(){
 121+ }
 122+ rewrite_by_id( vidId, function(){
131123 if(vidIdList.length != 0){
 124+ alert('did first rewite now doing another');
132125 setTimeout( function(){
133126 procVidId( vidIdList.pop() )
134127 }, 1);
135128 }
136129 });
137130 };
138 - //proccess each item in the vidIdList (with setTimeout to avoid locking)
 131+ //process each item in the vidIdList (with setTimeout to avoid locking)
139132 setTimeout( function(){
140133 procVidId( vidIdList.pop() )
141134 }, 1);

Status & tagging log