Index: trunk/extensions/MetavidWiki/includes/MV_EditSequencePage.php |
— | — | @@ -19,11 +19,11 @@ |
20 | 20 | mvAddGlobalJSVariables( array( 'mvSeqExportUrl' => $seqPlayer->getExportUrl() ) ); |
21 | 21 | //add the "switch" link to the top of the page |
22 | 22 | $wgOut->addHTML('<span id="swich_seq_links"> |
23 | | - <a id="swich_seq_text" |
| 23 | + <a id="swich_seq_text" style="display:none" |
24 | 24 | href="javascript:mv_do_sequence_edit_swap(\'text\')">'. |
25 | 25 | wfMsg('mv_sequence_edit_text') . |
26 | 26 | '</a>' . |
27 | | - '<a id="switch_seq_wysiwyg" style="display:none" |
| 27 | + '<a id="switch_seq_wysiwyg" |
28 | 28 | href="javascript:mv_do_sequence_edit_swap(\'seq_update\')">' . |
29 | 29 | wfMsg('mv_sequence_edit_visual_editor') . |
30 | 30 | '</a>' . |
Index: trunk/extensions/MetavidWiki/skins/external_media_wizard.js |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | imE.src = 'http://upload.wikimedia.org/wikipedia/commons/8/86/Button_add_media.png'; |
22 | 22 | toolbar.appendChild(imE); |
23 | 23 | imE.setAttribute('onClick', 'mv_do_load_wiz()'); |
24 | | - //addHandler only works once |
| 24 | + //addHandler only works once cuz of dom manipluations |
25 | 25 | /*addHandler( imE, 'click', function() { |
26 | 26 | mv_do_load_wiz(); |
27 | 27 | });*/ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_playlist.js |
— | — | @@ -372,10 +372,10 @@ |
373 | 373 | |
374 | 374 | //add the playlist controls: |
375 | 375 | $j('#dc_'+plObj.id).append( |
376 | | - '<div class="videoPlayer" style="position:absolute;top:'+(plObj.height+plObj.pl_layout.title_bar_height)+'px">' + |
| 376 | + '<div class="videoPlayer" style="position:absolute;top:'+(plObj.height+plObj.pl_layout.title_bar_height+4)+'px">' + |
377 | 377 | '<div id="mv_embedded_controls_'+plObj.id+'" ' + |
378 | 378 | 'style="postion:relative;top:'+(plObj.height+plObj.pl_layout.title_bar_height)+'px;' + |
379 | | - 'width:'+plObj.width+'px" ' + |
| 379 | + 'width:' + ( plObj.width + 2 ) + 'px" ' + |
380 | 380 | 'class="controls">' + |
381 | 381 | plObj.getControlsHTML() + |
382 | 382 | '</div>'+ |
— | — | @@ -460,8 +460,14 @@ |
461 | 461 | $j('#ptitle_'+this.id).html(''+ |
462 | 462 | '<b>' + this.title + '</b> '+ |
463 | 463 | this.getClipCount()+' clips, <i>'+ |
464 | | - seconds2ntp( this.getDuration() ) + '</i>' + |
465 | | - '<a href="#" onclick="$j(\'#'+this.id+'\').get(0).doEditor();" style="position:absolute;top:0px;right:0px">edit</a>'); |
| 464 | + seconds2ntp( this.getDuration() ) + '</i>'); |
| 465 | + |
| 466 | + //only show the inline edit button if mediaWiki write API is enabled: |
| 467 | + if(wgEnableWriteAPI==true) |
| 468 | + $j('#ptitle_'+this.id).append( |
| 469 | + '<a href="#" onclick="$j(\'#'+this.id+'\').get(0).doEditor();"'+ |
| 470 | + 'style="position:absolute;top:0px;right:0px">edit</a>' |
| 471 | + ); |
466 | 472 | //render out the dividers on the timeline: |
467 | 473 | this.colorPlayHead(); |
468 | 474 | //update status: |
— | — | @@ -584,11 +590,7 @@ |
585 | 591 | //navtive support: |
586 | 592 | // * pre-loads clips |
587 | 593 | // * mv_playlist smil extension, manages transitions animations overlays etc. |
588 | | - js_log('clip obj supports playlist swap_loader (ie playlist controlled playback)'); |
589 | | - //update cur clip based if sequence playhead set: |
590 | | - var d = new Date(); |
591 | | - this.clockStartTime = d.getTime(); |
592 | | - this.monitor(); |
| 594 | + js_log('clip obj supports playlist swap_loader (ie playlist controlled playback)'); |
593 | 595 | //@@todo pre-load each clip: |
594 | 596 | this.cur_clip.embed.play(); |
595 | 597 | }else if(this.cur_clip.embed.supports['playlist_driver']){ |
— | — | @@ -601,6 +603,8 @@ |
602 | 604 | //play cur_clip |
603 | 605 | this.cur_clip.embed.play(); |
604 | 606 | } |
| 607 | + //start up the playlist monitor |
| 608 | + this.monitor(); |
605 | 609 | }, |
606 | 610 | toggleMute:function(){ |
607 | 611 | this.cur_clip.embed.toggleMute(); |
— | — | @@ -1244,8 +1248,7 @@ |
1245 | 1249 | *****************************/ |
1246 | 1250 | /*playlist driver extensions to the playlist object*/ |
1247 | 1251 | mvPlayList.prototype.monitor = function(){ |
1248 | | - //js_log('pl:monitor'); |
1249 | | - //js_log('mvPlayList:monitor trueTime: '+ ( (ct.getTime() - this.clockStartTime )/1000)); |
| 1252 | + //js_log('pl:monitor'); |
1250 | 1253 | //if paused stop updates |
1251 | 1254 | if( this.paused ){ |
1252 | 1255 | //clearInterval( this.smil_monitorTimerId ); |
— | — | @@ -1258,6 +1261,7 @@ |
1259 | 1262 | |
1260 | 1263 | //update the playlist current time: |
1261 | 1264 | this.currentTime = this.cur_clip.dur_offset + this.cur_clip.embed.currentTime; |
| 1265 | + |
1262 | 1266 | //update slider: |
1263 | 1267 | if(!this.userSlide){ |
1264 | 1268 | this.setStatus(seconds2ntp(this.currentTime) + '/' + seconds2ntp(this.getDuration()) ); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_sequencer.js |
— | — | @@ -414,7 +414,11 @@ |
415 | 415 | }, |
416 | 416 | //once playlist is ready continue |
417 | 417 | checkReadyPlObj:function(){ |
| 418 | + //set up pointers from sequencer to pl obj |
418 | 419 | this.plObj = $j('#'+ this.plObj_id ).get(0); |
| 420 | + //& from seq obj to sequencer |
| 421 | + this.plObj.pSeq = this; |
| 422 | + |
419 | 423 | if( this.plObj ) |
420 | 424 | if( ! this.plObj.loading ) |
421 | 425 | this.plReadyInit(); |
— | — | @@ -437,7 +441,7 @@ |
438 | 442 | //give the playlist a pointer to its parent seq: |
439 | 443 | this.plObj['seqObj'] = this; |
440 | 444 | |
441 | | - //update playlist (since if its empty right now) |
| 445 | + //update playlist (if its empty right now) |
442 | 446 | if(this.plObj.getClipCount()==0){ |
443 | 447 | $j('#'+this.plObj_id).html('empty playlist'); |
444 | 448 | } |
— | — | @@ -546,7 +550,7 @@ |
547 | 551 | |
548 | 552 | //set up key bidnings |
549 | 553 | $j().keydown(function(e){ |
550 | | - js_log('pushed down on:' + e.which); |
| 554 | + js_log('pushed down on:' + e.which); |
551 | 555 | if( e.which == 16 ) |
552 | 556 | this_seq.key_shift_down = true; |
553 | 557 | |
— | — | @@ -563,8 +567,8 @@ |
564 | 568 | this_seq.pasteClipBoardClips(); |
565 | 569 | |
566 | 570 | }); |
567 | | - $j().keyup(function(e){ |
568 | | - js_log('key up on ' + e.which); |
| 571 | + $j().keyup(function(e){ |
| 572 | + js_log('key up on ' + e.which); |
569 | 573 | //user let go of "shift" turn off multi-select |
570 | 574 | if( e.which == 16 ) |
571 | 575 | this_seq.key_shift_down = false; |
— | — | @@ -573,7 +577,7 @@ |
574 | 578 | this_seq.key_ctrl_down = false; |
575 | 579 | |
576 | 580 | //backspace or delete key: |
577 | | - if( e.which == 8 || e.which == 46 ){ |
| 581 | + if( e.which == 8 || e.which == 46 ){ |
578 | 582 | this_seq.removeSelectedClips(); |
579 | 583 | } |
580 | 584 | }); |
— | — | @@ -737,7 +741,8 @@ |
738 | 742 | //grab the track index from the id (assumes track_#_clip_# |
739 | 743 | remove_clip_ary.push ( $j(this).parent().attr('id').replace('track_','').replace('clip_','').split('_') ); |
740 | 744 | }); |
741 | | - this.removeClips(remove_clip_ary); |
| 745 | + if(remove_clip_ary.length !=0 ) |
| 746 | + this.removeClips(remove_clip_ary); |
742 | 747 | }, |
743 | 748 | //add a single or set of clips |
744 | 749 | //to a given position and track_inx |
— | — | @@ -1334,11 +1339,22 @@ |
1335 | 1340 | //do specific mods:(controls and title are managed by the sequencer) |
1336 | 1341 | this.pl_layout.title_bar_height=0; |
1337 | 1342 | this.pl_layout.control_height=0; |
1338 | | - }, |
1339 | | - //update the timeline playhead and passalong to parent |
| 1343 | + }, |
1340 | 1344 | setSliderValue:function( perc ){ |
1341 | | - js_log("set " + perc + ' of cur_clip: ' + this.cur_clip.order ); |
1342 | | - //$j('#'+ this.seqObj.timeline_id + '_playline').css('left') |
| 1345 | + //get the track_clipThumb_height from parent mvSequencer |
| 1346 | + var frame_width = Math.round( this.pSeq.track_clipThumb_height * 1.3333333 ); |
| 1347 | + var container_width = frame_width+60; |
| 1348 | + |
| 1349 | + var perc_clip = this.cur_clip.embed.currentTime / this.cur_clip.getDuration(); |
| 1350 | + |
| 1351 | + var left_px = parseInt( (this.cur_clip.order * container_width) + (frame_width*perc_clip) ) + 'px'; |
| 1352 | + js_log("set " + perc + ' of cur_clip: ' + this.cur_clip.order + ' lp:'+left_px); |
| 1353 | + |
| 1354 | + |
| 1355 | + //update the timeline playhead and |
| 1356 | + $j('#'+ this.seqObj.timeline_id + '_playline').css('left', left_px); |
| 1357 | + |
| 1358 | + //pass update request to parent: |
1343 | 1359 | this.parent_setSliderValue( perc ); |
1344 | 1360 | }, |
1345 | 1361 | getControlsHTML:function(){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css |
— | — | @@ -526,7 +526,7 @@ |
527 | 527 | right:2px; |
528 | 528 | top:100px; |
529 | 529 | bottom:2px; |
530 | | - z-index:-1; |
| 530 | + z-index:200; |
531 | 531 | overflow:auto; |
532 | 532 | } |
533 | 533 | #rsd_results { |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -2222,7 +2222,7 @@ |
2223 | 2223 | if(this.controls) |
2224 | 2224 | { |
2225 | 2225 | js_log("f:getHTML:AddControls"); |
2226 | | - html_code +='<div id="mv_embedded_controls_'+this.id+'" class="controls" style="width:'+this.width+'px">'; |
| 2226 | + html_code +='<div id="mv_embedded_controls_' + this.id + '" class="controls" style="width:' + this.width + 'px">'; |
2227 | 2227 | html_code += this.getControlsHTML(); |
2228 | 2228 | html_code +='</div>'; |
2229 | 2229 | //block out some space by encapulating the top level div |
— | — | @@ -2716,6 +2716,8 @@ |
2717 | 2717 | }else{ |
2718 | 2718 | this.pause(); |
2719 | 2719 | } |
| 2720 | + //reset the currentTime: |
| 2721 | + this.currentTime=0; |
2720 | 2722 | //check if thumbnail is being displayed in which case do nothing |
2721 | 2723 | if(this.thumbnail_disp){ |
2722 | 2724 | //already in stooped state |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_vlcEmbed.js |
— | — | @@ -217,7 +217,8 @@ |
218 | 218 | //js_log('set buffer: ' + flash_state.bufferEnd + ' at time: ' + flash_state.time +' of total dur: ' + this.getDuration()); |
219 | 219 | }else{ |
220 | 220 | this.currentTime = (this.vlc.input.time/1000) + this.media_element.selected_source.start_offset; |
221 | | - } |
| 221 | + } |
| 222 | + //js_log('cur vlc:time: ' + this.currentTime); |
222 | 223 | if( this.duration > 0 || this.vlc.input.time > 0){ |
223 | 224 | this.start_offset=this.media_element.selected_source.start_offset; |
224 | 225 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libRemoteMediaSearch/mv_remote_media_search.js |
— | — | @@ -367,9 +367,9 @@ |
368 | 368 | }else if(_this.result_display_mode == 'list'){ |
369 | 369 | o+='<div id="mv_result_' + rInx + '" class="mv_clip_list_result" style="' + disp + 'width:90%">'; |
370 | 370 | o+='<img title="'+rItem.title+'" class="rsd_res_item" id="res_' + rInx +'" style="float:left;width:' + _this.thumb_width + 'px; padding:5px;" src="' + rItem.poster + '">'; |
371 | | - o+= rItem.desc ; |
372 | | - o+='</div>'; |
373 | | - o+='<div style="clear:both" />'; |
| 371 | + o+= rItem.desc ; |
| 372 | + o+='<div style="clear:both" />'; |
| 373 | + o+='</div>'; |
374 | 374 | } |
375 | 375 | }); |
376 | 376 | } |
Index: trunk/extensions/MetavidWiki/skins/mv_allpages.js |
— | — | @@ -21,15 +21,8 @@ |
22 | 22 | //make sure we have jQuery and any base required libs: |
23 | 23 | mvJsLoader.doLoad(mvEmbed.lib_jquery, function(){ |
24 | 24 | _global['$j'] = jQuery.noConflict(); |
25 | | - js_log('allpage_ did jquery check'); |
| 25 | + js_log('allpage_ did jquery check'); |
26 | 26 | |
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 | | - } |
33 | | - |
34 | 27 | var reqLibs = {'$j.fn.autocomplete':'jquery/plugins/jquery.autocomplete.js', |
35 | 28 | '$j.fn.hoverIntent':'jquery/plugins/jquery.hoverIntent.js'}; |
36 | 29 | mvJsLoader.doLoad( |