Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js |
— | — | @@ -2107,7 +2107,6 @@ |
2108 | 2108 | /* utility functions |
2109 | 2109 | * (could be combined with other stuff) |
2110 | 2110 | */ |
2111 | | - |
2112 | 2111 | function getAbsolutePos(objectId) { |
2113 | 2112 | // Get an object left position from the upper left viewport corner |
2114 | 2113 | o = document.getElementById(objectId); |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvTimedEffectsEdit.js |
— | — | @@ -5,13 +5,20 @@ |
6 | 6 | * |
7 | 7 | */ |
8 | 8 | |
| 9 | +//add our local msgs |
| 10 | +loadGM({ |
| 11 | + "transition_in" : "Transition In", |
| 12 | + "transition_out" : "Transition Out", |
| 13 | + "effects" : "Effects Stack" |
| 14 | +}); |
| 15 | + |
| 16 | + |
9 | 17 | var default_timedeffect_values = { |
10 | 18 | 'rObj': null, // the resource object |
11 | | - 'clip_disp_ct':null,//target clip disp |
| 19 | + 'clip_disp_ct':null, //target clip disp |
12 | 20 | 'control_ct':null, //control container |
13 | 21 | |
14 | 22 | 'parent_ct': null, //parent container |
15 | | - |
16 | 23 | 'p_seqObj': null, //parent sequence Object |
17 | 24 | |
18 | 25 | 'edit_action': null, //the requested edit action |
— | — | @@ -24,13 +31,25 @@ |
25 | 32 | //the menu_items Object contains: default html, js setup/loader functions |
26 | 33 | menu_items : { |
27 | 34 | 'transin':{ |
28 | | - |
| 35 | + 'title':gM('transition_in'), |
| 36 | + 'clip_attr':'transIn', |
| 37 | + 'doEdit':function(_this){ |
| 38 | + _this.doTransitionDisplayEdit('transin'); |
| 39 | + } |
29 | 40 | }, |
30 | 41 | 'transout':{ |
31 | | - |
| 42 | + 'title':gM('transition_out'), |
| 43 | + 'clip_attr':'transOut', |
| 44 | + 'doEdit':function(_this){ |
| 45 | + _this.doTransitionDisplayEdit('transout'); |
| 46 | + } |
32 | 47 | }, |
33 | 48 | 'effects':{ |
34 | | - |
| 49 | + 'title':gM('effects'), |
| 50 | + 'clip_attr':'Effects', |
| 51 | + 'doEdit':function(_this){ |
| 52 | + //display |
| 53 | + } |
35 | 54 | } |
36 | 55 | }, |
37 | 56 | init:function(iObj){ |
— | — | @@ -39,6 +58,86 @@ |
40 | 59 | if( iObj[i] ){ |
41 | 60 | this[i] = iObj[i]; |
42 | 61 | } |
| 62 | + } |
| 63 | + this.doEditMenu(); |
| 64 | + }, |
| 65 | + doEditMenu:function(){ |
| 66 | + var _this = this; |
| 67 | + //add in subMenus if set |
| 68 | + //check for submenu and add to item container |
| 69 | + var o=''; |
| 70 | + var tabc =''; |
| 71 | + o+= '<div id="mv_submenu_timedeffect">'; |
| 72 | + o+='<ul>'; |
| 73 | + var inx =0; |
| 74 | + $j.each(this.menu_items, function(sInx, na){ |
| 75 | + //check if the given editType is valid for our given media type |
| 76 | + o+= '<li>'+ |
| 77 | + '<a id="mv_te_'+sInx+'" href="#te_' + sInx + '">' + gM('te_' + sInx ) + '</a>'+ |
| 78 | + '</li>'; |
| 79 | + tabc += '<div id="te_' + sInx + '" style="overflow:auto;" ></div>'; |
| 80 | + }); |
| 81 | + o+= '</ul>' + tabc; |
| 82 | + o+= '</div>'; |
| 83 | + //add sub menu container with menu html: |
| 84 | + $j('#'+this.control_ct).html( o ) ; |
| 85 | + //set up bindings: |
| 86 | + $j('#mv_submenu_timedeffect').tabs({ |
| 87 | + selected: 0, |
| 88 | + select: function(event, ui) { |
| 89 | + _this.doDisplayEdit( $j(ui.tab).attr('id').replace('mv_te_', '') ); |
| 90 | + } |
| 91 | + }).addClass('ui-tabs-vertical ui-helper-clearfix'); |
| 92 | + //close left: |
| 93 | + $j("#mv_submenu_clipedit li").removeClass('ui-corner-top').addClass('ui-corner-left'); |
| 94 | + |
| 95 | + //update the default edit display (if we have a target) |
| 96 | + var tTarget = 'transin'; |
| 97 | + if(cClip.transOut) |
| 98 | + tTarget = 'transout'; |
| 99 | + if(cClip.effects) |
| 100 | + tTarget = 'effects'; |
| 101 | + |
| 102 | + _this.doDisplayEdit( 'transin' ); |
| 103 | + }, |
| 104 | + doDisplayEdit:function( tab_id ){ |
| 105 | + if( !this.menu_items[ tab_id ] ){ |
| 106 | + js_log('error: doDisplayEdit missing item:' + tab_id); |
| 107 | + }else{ |
| 108 | + //use the menu_item config to map to function display |
| 109 | + this.menu_items[tab_id].doEdit(this); |
| 110 | + } |
| 111 | + }, |
| 112 | + doTransitionDisplayEdit:function(target_item){ |
| 113 | + //check if we have a transition |
| 114 | + if(!cClip[ this.menu_items[ target_item ].clip_attr ]){ |
| 115 | + this.getTransitionList(); |
| 116 | + return ; |
43 | 117 | } |
44 | | - } |
| 118 | + cTran = cClip[ this.menu_items[ target_item ].clip_attr ]; |
| 119 | + var o='<h3>Edit Transition</h3>'; |
| 120 | + o+='Type: ' + |
| 121 | + '<select class="te_select_type">'; |
| 122 | + for(var typeKey in mvTransLib.type){ |
| 123 | + var selAttr = (cTran.type == typeKey)?' selected':''; |
| 124 | + o+='<option value="'+typeKey+'"'+ selAttr +'>'+typeKey+'</option>'; |
| 125 | + } |
| 126 | + o+='</select>'; |
| 127 | + o+='<span class="te_select_subtype">Sub Type:'+ |
| 128 | + '<select class="te_select_subtype">'; |
| 129 | + for(var subTypeKey in mvTransLib.type[ cTran.type ]){ |
| 130 | + var selAttr = (cTran.subtype == typeKey)?' selected':''; |
| 131 | + o+='<option value="'+subTypeKey+'"'+ selAttr +'>'+typeKey+'</option>'; |
| 132 | + } |
| 133 | + o+='</select>'+ |
| 134 | + '</span>'; |
| 135 | + //set up bidings: |
| 136 | + $j(apendTarget).append(o).children('.te_select_type') |
| 137 | + .change(function(){ |
| 138 | + //update subtype listing: |
| 139 | + var o = ''; |
| 140 | + $j(apendTarget + ' .te_select_subtype').html(); |
| 141 | + }); |
| 142 | + $j('te_' + target_item).html(o); |
| 143 | + } |
45 | 144 | } |
\ No newline at end of file |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js |
— | — | @@ -611,7 +611,7 @@ |
612 | 612 | o+=tabc; |
613 | 613 | $j('#'+this.sequence_tools_id).html( o ); |
614 | 614 | |
615 | | - |
| 615 | + |
616 | 616 | $j("#seq_menu").tabs({ |
617 | 617 | selected:selected_tab, |
618 | 618 | select: function(event, ui) { |
— | — | @@ -770,18 +770,20 @@ |
771 | 771 | } |
772 | 772 | }, |
773 | 773 | doEditTransition:function( cObj ){ |
774 | | - var _this = this; |
775 | | - mv_get_loading_img( '#clipedit_ic' ); |
| 774 | + js_log("doEditTransition"); |
| 775 | + var _this = this; |
| 776 | + mv_get_loading_img( '#transitions_ic' ); |
776 | 777 | mvJsLoader.doLoad([ |
777 | 778 | 'mvClipEdit', |
778 | 779 | 'mvTimedEffectsEdit' |
779 | 780 | ],function(){ |
| 781 | + js_log("mvTimedEffectsEdit loaded d") |
780 | 782 | //if mvClipEditor not preset init |
781 | 783 | _this.myEffectEdit = {}; |
782 | 784 | _this.myEffectEdit = new mvTimedEffectsEdit({ |
783 | | - 'rObj' : cObj, |
784 | | - 'control_ct':'transitions_ic', |
785 | | - 'p_SeqObj': _this, |
| 785 | + 'rObj' : cObj, |
| 786 | + 'control_ct' : 'transitions_ic', |
| 787 | + 'p_SeqObj' : _this, |
786 | 788 | }); |
787 | 789 | }) |
788 | 790 | }, |
— | — | @@ -800,12 +802,12 @@ |
801 | 803 | _this.myClipEditor = {}; |
802 | 804 | //setup the cliploader |
803 | 805 | _this.myClipEditor = new mvClipEdit({ |
804 | | - 'rObj' : cObj, |
805 | | - 'control_ct':'clipedit_ic', |
806 | | - 'clip_disp_ct': cObj.id, |
807 | | - 'edit_action':edit_action, |
808 | | - 'p_seqObj': _this, |
809 | | - 'profile':'sequence' |
| 806 | + 'cClip' : cObj, |
| 807 | + 'control_ct' : 'clipedit_ic', |
| 808 | + 'clip_disp_ct' : cObj.id, |
| 809 | + 'edit_action' : edit_action, |
| 810 | + 'p_seqObj' : _this, |
| 811 | + 'profile' : 'sequence' |
810 | 812 | }); |
811 | 813 | }); |
812 | 814 | }, |
— | — | @@ -1136,9 +1138,7 @@ |
1137 | 1139 | //jump to the current clip |
1138 | 1140 | this_seq.plObj.updateCurrentClip( sClipObj ); |
1139 | 1141 | //display the transition edit tab: |
1140 | | - this_seq.disp( 'transition' ); |
1141 | | - //display edit dialog: |
1142 | | - this_seq.doEditTransition( sClipObj ); |
| 1142 | + this_seq.disp( 'transition' ); |
1143 | 1143 | } |
1144 | 1144 | }); |
1145 | 1145 | |
Index: branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js |
— | — | @@ -75,7 +75,8 @@ |
76 | 76 | }else if( this.rObj.type.indexOf("text/") === 0){ |
77 | 77 | this.media_type = 'template'; |
78 | 78 | } |
79 | | - } |
| 79 | + } |
| 80 | + |
80 | 81 | //display control: |
81 | 82 | if(this.profile == 'sequence'){ |
82 | 83 | this.doEditTypesMenu(); |
— | — | @@ -98,7 +99,7 @@ |
99 | 100 | edit_types:{ |
100 | 101 | 'duration':{ |
101 | 102 | 'media':['image','template'], |
102 | | - 'doEdit':function(target, _this ){ |
| 103 | + 'doEdit':function( _this, target ){ |
103 | 104 | //(_this is a smilClip instance) |
104 | 105 | //do clock mouse scroll duration editor |
105 | 106 | $j(target).html( |
— | — | @@ -119,7 +120,7 @@ |
120 | 121 | }, |
121 | 122 | 'inoutpoints':{ |
122 | 123 | 'media':['video'], |
123 | | - 'doEdit':function(target, _this ){ |
| 124 | + 'doEdit':function( _this, target ){ |
124 | 125 | //do clock mouse scroll duration editor |
125 | 126 | var end_ntp = ( _this.rObj.embed.end_ntp) ? _this.rObj.embed.end_ntp : _this.rObj.embed.getDuration(); |
126 | 127 | if(!end_ntp) |
— | — | @@ -140,7 +141,7 @@ |
141 | 142 | }, |
142 | 143 | 'fileopts':{ |
143 | 144 | 'media':['image','video','template'], |
144 | | - 'doEdit':function(target, _this ){ |
| 145 | + 'doEdit':function(_this, target ){ |
145 | 146 | var doEditHtml = function(){ |
146 | 147 | //add html for rObj resource: |
147 | 148 | var o= '<table>' + |
— | — | @@ -273,14 +274,14 @@ |
274 | 275 | }, |
275 | 276 | 'overlays':{ |
276 | 277 | 'media':['image','video'], |
277 | | - 'doEdit':function(target, _this ){ |
| 278 | + 'doEdit':function(_this, target){ |
278 | 279 | //do clock mouse scroll duration editor |
279 | 280 | $j(target).html('<h3>Current Overlays:</h3>Add,Remove,Modify'); |
280 | 281 | } |
281 | 282 | }, |
282 | 283 | 'audio':{ |
283 | 284 | 'media':['image','video', 'template'], |
284 | | - 'doEdit':function(target, _this ){ |
| 285 | + 'doEdit':function(_this, target){ |
285 | 286 | //do clock mouse scroll duration editor |
286 | 287 | $j(target).html('<h3>Audio Volume:</h3>'); |
287 | 288 | } |
— | — | @@ -335,7 +336,7 @@ |
336 | 337 | |
337 | 338 | //do edit interface for that edit type: |
338 | 339 | if( this.edit_types[ edit_type ].doEdit ) |
339 | | - this.edit_types[ edit_type ].doEdit( '#sc_'+edit_type, this ); |
| 340 | + this.edit_types[ edit_type ].doEdit(this, '#sc_'+edit_type ); |
340 | 341 | }, |
341 | 342 | setUpVideoCtrl:function(){ |
342 | 343 | js_log('setUpVideoCtrl:f'); |