r54563 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54562‎ | r54563 | r54564 >
Date:01:32, 7 August 2009
Author:dale
Status:deferred
Tags:
Comment:
fixed infinite loop bug on removing all clips from sequence
Modified paths:
  • /trunk/phase3/js2/editPage.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libSequencer/mvPlayList.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libSequencer/mvSequencer.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/mv_embed.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js
@@ -31,13 +31,14 @@
3232 if(!this.pSeq.parent_do_refresh_timeline){
3333 this.pSeq.parent_do_refresh_timeline = this.pSeq.do_refresh_timeline;
3434 this.pSeq.do_refresh_timeline = function(){
35 - js_log("seqRs refresh chain::" + _this.pSeq.disp_menu_item);
 35+ js_log("seqRemoteSearchDriver::" + _this.pSeq.disp_menu_item);
3636 //call the parent
3737 _this.pSeq.parent_do_refresh_timeline();
3838 //add our local bindings if our window is 'active'
3939 if(_this.pSeq.disp_menu_item == 'cliplib'){
4040 _this.addResultBindings();
4141 }
 42+ return true;
4243 }
4344 }
4445 },
@@ -70,7 +71,7 @@
7172 $j(".mv_clip_drag").droppable( 'destroy' ).droppable({
7273 accept: '.rsd_res_item',
7374 over:function(event, ui){
74 - js_log("over : mv_clip_drag: " + $j(this).attr('id') );
 75+ //js_log("over : mv_clip_drag: " + $j(this).attr('id') );
7576 $j(this).css('border-right', 'solid thick red');
7677 },
7778 out:function(event, ui){
Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -356,9 +356,11 @@
357357 if( $j(this.target_invocation).length==0 ){
358358 js_log("RemoteSearchDriver:: no target invocation provided (will have to run your own doInitDisplay() )");
359359 }else{
360 - $j(this.target_invocation).css('cursor','pointer').attr('title', gM('add_media_wizard')).click(function(){
361 - _this.doInitDisplay();
362 - });
 360+ if(this.target_invocation){
 361+ $j(this.target_invocation).css('cursor','pointer').attr('title', gM('add_media_wizard')).click(function(){
 362+ _this.doInitDisplay();
 363+ });
 364+ }
363365 }
364366 },
365367 doInitDisplay:function(){
@@ -445,7 +447,7 @@
446448 js_log('closed modal');
447449 $j(this).parents('.ui-dialog').fadeOut('slow');
448450 }
449 - }).css({'height':'100%'}).parent('.ui-dialog').css( _this.dmodalCss )
 451+ }).parent('.ui-dialog').css( _this.dmodalCss )
450452 //@@bind on resize to disable css dialog to update dmodelCss
451453 .bind('resizestart', function(event, ui) {
452454 _this.dmodalCss = {};
@@ -974,7 +976,7 @@
975977 var overflow_style = ( mediaType =='video' )?'':'overflow:auto;';
976978 //append to the top level of model window:
977979 $j( _this.target_container ).append('<div id="rsd_resource_edit" '+
978 - 'style="position:absolute;top:0px;left:0px;bottom:75px;right:4px;background-color:#FFF;">' +
 980+ 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' +
979981 '<div id="clip_edit_disp" style="position:absolute;' + overflow_style + 'width:100%;height:100%;padding:5px;'+
980982 'width:' + (maxWidth) + 'px;" >' +
981983 mv_get_loading_img('position:absolute;top:30px;left:30px') +
Index: trunk/phase3/js2/mwEmbed/libSequencer/mvPlayList.js
@@ -203,9 +203,11 @@
204204 }
205205 }
206206 },
207 - doNativeWarningCheck:function(){
 207+ doNativeWarningCheck:function(){
208208 var clip = this.default_track.clips[0];
209 - return clip.embed.doNativeWarningCheck();
 209+ if(clip){
 210+ return clip.embed.doNativeWarningCheck();
 211+ }
210212 },
211213 doWhenParseDone:function(){
212214 js_log('f:doWhenParseDone');
@@ -511,7 +513,7 @@
512514 },
513515 updateBaseStatus:function(){
514516 var _this = this;
515 - js_log('f:updateBaseStatus');
 517+ js_log('Playlist:updateBaseStatus');
516518 $j('#ptitle_'+this.id).html(''+
517519 '<b>' + this.title + '</b> '+
518520 this.getClipCount()+' clips, <i>'+
Index: trunk/phase3/js2/mwEmbed/libSequencer/mvSequencer.js
@@ -1418,13 +1418,13 @@
14191419 }
14201420 },
14211421 //renders cnt_time
1422 - render_playheadhead_seeker:function(){
 1422+ render_playheadhead_seeker:function(){
 1423+ js_log('render_playheadhead_seeker');
14231424 //render out time stamps and time "jump" links
14241425 //first get total width
14251426
14261427 //remove the old one if its still there
1427 - $j('#'+this.timeline_id +'_pl_control').remove();
1428 - js_log('output controls to: ' + this.target_sequence_container);
 1428+ $j('#'+this.timeline_id +'_pl_control').remove();
14291429 //render out a playlist clip wide and all the way to the right (only playhead and play button) (outside of timeline)
14301430 $j(this.target_sequence_container).append('<div id="'+ this.timeline_id +'_pl_control"'+
14311431 ' style="position:absolute;top:' + (this.plObj.height) +'px;'+
@@ -1479,7 +1479,8 @@
14801480 this.do_refresh_timeline();
14811481 js_log('zoom out: '+this.timeline_scale);
14821482 },
1483 - do_refresh_timeline:function( preserve_selection ){
 1483+ do_refresh_timeline:function( preserve_selection ){
 1484+ js_log('Sequencer:do_refresh_timeline()');
14841485 //@@todo should "lock" interface while refreshing timeline
14851486 var pSelClips = [];
14861487 if(preserve_selection){
Index: trunk/phase3/js2/mwEmbed/mv_embed.js
@@ -777,7 +777,7 @@
778778 '$j.ui.tabs',
779779 '$j.ui.sortable'
780780 ]
781 - ], function(){
 781+ ], function(){
782782 iObj['instance_name']= 'rsdMVRS';
783783 _global['rsdMVRS'] = new remoteSearchDriver( iObj );
784784 if( callback ){
Index: trunk/phase3/js2/editPage.js
@@ -23,7 +23,7 @@
2424 var mwEditPageHelper = {
2525 init:function(){
2626 var _this = this;
27 - //@@todo check for new version of toolbar and add properly:
 27+ //@@todo check for new version of toolbar and via toolbar api:
2828 if(typeof $j.fn.toolbar == 'undefined'){
2929 //add the add-media-wizard button for old toolbar:
3030 $j('#toolbar').append('<img style="cursor:pointer" id="btn-add-media-wiz" src="' + mv_skin_img_path + 'Button_add_media.png">');

Status & tagging log