r51859 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51858‎ | r51859 | r51860 >
Date:03:19, 15 June 2009
Author:dale
Status:deferred
Tags:
Comment:
* stubs for transition editor
* transition menu selector
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/vlcEmbed.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvTimedEffectsEdit.js (added) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/mv_embed.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/php/jsAutoloadLocalClasses.php (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/mv_sequence.css (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js
@@ -30,7 +30,7 @@
3131 }
3232 }
3333 //extend parent_do_refresh_timeline actions:
34 - /*if(!this.pSeq.parent_do_refresh_timeline){
 34+ if(!this.pSeq.parent_do_refresh_timeline){
3535 this.pSeq.parent_do_refresh_timeline = this.pSeq.do_refresh_timeline;
3636 this.pSeq.do_refresh_timeline = function(){
3737 js_log("seqRs refresh chain::" + _this.pSeq.disp_menu_item);
@@ -41,7 +41,7 @@
4242 _this.addResultBindings();
4343 }
4444 }
45 - }*/
 45+ }
4646 },
4747 resourceEdit:function(){
4848 var _this = this;
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js
@@ -494,9 +494,11 @@
495495 $j('#mv_time_'+this.id).html( value );
496496 },
497497 setSliderValue:function(value){
 498+ if(this.cur_clip.embed){
498499 //js_log('calling original embed slider with val: '+value);
499500 this.cur_clip.embed.pe_setSliderValue( value );
500501 //call seq playline update here
 502+ }
501503 },
502504 getPlayHeadPos: function(prec_done){
503505 var plObj = this;
@@ -1596,13 +1598,16 @@
15971599
15981600 this['type'][tObj.type][tObj.subtype].u(tObj,percent);
15991601 },
 1602+ getTransitionIcon:function( type, subtype){
 1603+ return mv_embed_path +'/skins/'+mv_skin_name+'/transition_images/'+ type+'_'+ subtype+ '.png';
 1604+ },
16001605 /*
16011606 * mvTransLib: functional library mapping:
16021607 */
16031608 type:{
16041609 //types:
16051610 fade:{
1606 - fadeFromColor:{
 1611+ fadeFromColor:{
16071612 'init':function(tObj){
16081613 //js_log('f:fadeFromColor: '+tObj.overlay_selector_id +' to color: '+ tObj.fadeColor);
16091614 if(!tObj.fadeColor)
@@ -1644,6 +1649,138 @@
16451650 }
16461651 }
16471652 }
 1653+
 1654+/* object to manage embedding html with smil timings
 1655+ * grabs settings from parent clip
 1656+ */
 1657+var transitionObj = function(element) {
 1658+ this.init(element);
 1659+};
 1660+transitionObj.prototype = {
 1661+ supported_attributes : new Array(
 1662+ 'id',
 1663+ 'type',
 1664+ 'subtype',
 1665+ 'fadeColor',
 1666+ 'dur'
 1667+ ),
 1668+ transAttrType:null, //transIn or transOut
 1669+ overlay_selector_id:null,
 1670+ pClip:null,
 1671+ timerId:null,
 1672+ animation_state:0, //can be 0=unset, 1=running, 2=done
 1673+ interValCount:0, //inter-intervalCount for animating between time updates
 1674+ dur:2, //default duration of 2
 1675+ init:function(element){
 1676+ //load supported attributes:
 1677+ var _this = this;
 1678+ $j.each(this.supported_attributes, function(i, attr){
 1679+ if(element.getAttribute(attr))
 1680+ _this[attr]= element.getAttribute(attr);
 1681+ });
 1682+ //@@todo process duration (for now just strip s) per:
 1683+ //http://www.w3.org/TR/SMIL3/smil-timing.html#Timing-ClockValueSyntax
 1684+ if(_this.dur)
 1685+ _this.dur = smilParseTime(_this.dur);
 1686+ },
 1687+ /*
 1688+ * returns a visual representation of the transition
 1689+ */
 1690+ getIconSrc:function(opt){
 1691+ //@@todo support some arguments
 1692+ return mvTransLib.getTransitionIcon(this.type, this.subtype);
 1693+ },
 1694+ getDuration:function(){
 1695+ return this.dur;
 1696+ },
 1697+ //returns the values of supported_attributes:
 1698+ getAttributeObj:function(){
 1699+ var elmObj = {};
 1700+ for(var i in this.supported_attributes){
 1701+ var attr = this.supported_attributes[i];
 1702+ if(this[attr])
 1703+ elmObj[ attr ] = this[attr];
 1704+ }
 1705+ return elmObj;
 1706+ },
 1707+ /*
 1708+ * the main animation loop called every MV_ANIMATION_CB_RATE or 34ms ~around 30frames per second~
 1709+ */
 1710+ run_transition:function(){
 1711+ //js_log('f:run_transition:' + this.interValCount);
 1712+
 1713+ //update the time from the video if native:
 1714+ if(typeof this.pClip.embed.vid !='undefined'){
 1715+ this.interValCount=0;
 1716+ this.pClip.embed.currentTime = this.pClip.embed.vid.currentTime;
 1717+ }
 1718+
 1719+ //}else{
 1720+ //relay on currentTime update grabs (every 250ms or so) (ie for images)
 1721+ // if(this.prev_curtime!=this.pClip.embed.currentTime){
 1722+ // this.prev_curtime = this.pClip.embed.currentTime;
 1723+ // this.interValCount=0;
 1724+ // }
 1725+ //}
 1726+ //start_time =asigned by doSmilActions
 1727+ //base_cur_time = pClip.embed.currentTime;
 1728+ //dur = asigned by attribute
 1729+ if(this.animation_state==0){
 1730+ mvTransLib.doInitTransition(this);
 1731+ this.animation_state=1;
 1732+ }
 1733+ //set percentage include difrence of currentTime to prev_curTime
 1734+ // ie updated in-between currentTime updates)
 1735+
 1736+ if(this.transAttrType=='transIn')
 1737+ var percentage = ( this.pClip.embed.currentTime +
 1738+ ( (this.interValCount*MV_ANIMATION_CB_RATE)/1000 )
 1739+ ) / this.dur ;
 1740+
 1741+ if(this.transAttrType=='transOut')
 1742+ var percentage = (this.pClip.embed.currentTime +
 1743+ ( (this.interValCount*MV_ANIMATION_CB_RATE)/1000 )
 1744+ - (this.pClip.dur - this.dur)
 1745+ ) /this.dur ;
 1746+
 1747+ /*js_log('percentage = ct:'+this.pClip.embed.currentTime + ' + ic:'+this.interValCount +' * cb:'+MV_ANIMATION_CB_RATE +
 1748+ ' / ' + this.dur + ' = ' + percentage );
 1749+ */
 1750+
 1751+ //js_log('cur percentage of transition: '+percentage);
 1752+ //update state based on current time + cur_time_offset (for now just use pClip.embed.currentTime)
 1753+ mvTransLib.doUpdate(this, percentage);
 1754+
 1755+ if( percentage >= 1 ){
 1756+ js_log("transition done update with percentage "+percentage);
 1757+ this.animation_state=2;
 1758+ clearInterval(this.timerId);
 1759+ mvTransLib.doCloseTransition(this)
 1760+ return true;
 1761+ }
 1762+
 1763+ this.interValCount++;
 1764+ //setInterval in we are still in running state and user is not using the playhead
 1765+ if( this.animation_state==1 ){
 1766+ if(!this.timerId){
 1767+ this.timerId = setInterval('document.getElementById(\'' + this.pClip.pp.id + '\').'+
 1768+ 'run_transition(\'' + this.pClip.pp.cur_clip.order + '\','+
 1769+ '\''+ this.transAttrType + '\')',
 1770+ MV_ANIMATION_CB_RATE);
 1771+ }
 1772+ }else{
 1773+ clearInterval(this.timerId);
 1774+ }
 1775+ return true;
 1776+ },
 1777+ clone:function(){
 1778+ var cObj = new this.constructor();
 1779+ for(var i in this)
 1780+ cObj[i]=this[i];
 1781+ return cObj;
 1782+ }
 1783+}
 1784+
16481785 //very limited smile feature set more details soon:
16491786 //region="video_region" transIn="fromGreen" begin="2s"
16501787 //http://www.w3.org/TR/2007/WD-SMIL3-20070713/smil-extended-media-object.html#edef-ref
@@ -1820,7 +1957,7 @@
18211958 }
18221959 }
18231960 return this;
1824 - },
 1961+ },
18251962 //returns the values of supported_attributes:
18261963 getAttributeObj:function(){
18271964 var elmObj = {};
@@ -1852,129 +1989,6 @@
18531990 return fulldur;
18541991 }
18551992 }
1856 -/* object to manage embedding html with smil timings
1857 - * grabs settings from parent clip
1858 - */
1859 -var transitionObj = function(element) {
1860 - this.init(element);
1861 -};
1862 -transitionObj.prototype = {
1863 - supported_attributes : new Array(
1864 - 'id',
1865 - 'type',
1866 - 'subtype',
1867 - 'fadeColor',
1868 - 'dur'
1869 - ),
1870 - transAttrType:null, //transIn or transOut
1871 - overlay_selector_id:null,
1872 - pClip:null,
1873 - timerId:null,
1874 - animation_state:0, //can be 0=unset, 1=running, 2=done
1875 - interValCount:0, //inter-intervalCount for animating between time updates
1876 - dur:2, //default duration of 2
1877 - init:function(element){
1878 - //load supported attributes:
1879 - var _this = this;
1880 - $j.each(this.supported_attributes, function(i, attr){
1881 - if(element.getAttribute(attr))
1882 - _this[attr]= element.getAttribute(attr);
1883 - });
1884 - //@@todo process duration (for now just strip s) per:
1885 - //http://www.w3.org/TR/SMIL3/smil-timing.html#Timing-ClockValueSyntax
1886 - if(_this.dur)
1887 - _this.dur = smilParseTime(_this.dur);
1888 - },
1889 - getDuration:function(){
1890 - return this.dur;
1891 - },
1892 - //returns the values of supported_attributes:
1893 - getAttributeObj:function(){
1894 - var elmObj = {};
1895 - for(var i in this.supported_attributes){
1896 - var attr = this.supported_attributes[i];
1897 - if(this[attr])
1898 - elmObj[ attr ] = this[attr];
1899 - }
1900 - return elmObj;
1901 - },
1902 - /*
1903 - * the main animation loop called every MV_ANIMATION_CB_RATE or 34ms ~around 30frames per second~
1904 - */
1905 - run_transition:function(){
1906 - //js_log('f:run_transition:' + this.interValCount);
1907 -
1908 - //update the time from the video if native:
1909 - if(typeof this.pClip.embed.vid !='undefined'){
1910 - this.interValCount=0;
1911 - this.pClip.embed.currentTime = this.pClip.embed.vid.currentTime;
1912 - }
1913 -
1914 - //}else{
1915 - //relay on currentTime update grabs (every 250ms or so) (ie for images)
1916 - // if(this.prev_curtime!=this.pClip.embed.currentTime){
1917 - // this.prev_curtime = this.pClip.embed.currentTime;
1918 - // this.interValCount=0;
1919 - // }
1920 - //}
1921 - //start_time =asigned by doSmilActions
1922 - //base_cur_time = pClip.embed.currentTime;
1923 - //dur = asigned by attribute
1924 - if(this.animation_state==0){
1925 - mvTransLib.doInitTransition(this);
1926 - this.animation_state=1;
1927 - }
1928 - //set percentage include difrence of currentTime to prev_curTime
1929 - // ie updated in-between currentTime updates)
1930 -
1931 - if(this.transAttrType=='transIn')
1932 - var percentage = ( this.pClip.embed.currentTime +
1933 - ( (this.interValCount*MV_ANIMATION_CB_RATE)/1000 )
1934 - ) / this.dur ;
1935 -
1936 - if(this.transAttrType=='transOut')
1937 - var percentage = (this.pClip.embed.currentTime +
1938 - ( (this.interValCount*MV_ANIMATION_CB_RATE)/1000 )
1939 - - (this.pClip.dur - this.dur)
1940 - ) /this.dur ;
1941 -
1942 - /*js_log('percentage = ct:'+this.pClip.embed.currentTime + ' + ic:'+this.interValCount +' * cb:'+MV_ANIMATION_CB_RATE +
1943 - ' / ' + this.dur + ' = ' + percentage );
1944 - */
1945 -
1946 - //js_log('cur percentage of transition: '+percentage);
1947 - //update state based on current time + cur_time_offset (for now just use pClip.embed.currentTime)
1948 - mvTransLib.doUpdate(this, percentage);
1949 -
1950 - if( percentage >= 1 ){
1951 - js_log("transition done update with percentage "+percentage);
1952 - this.animation_state=2;
1953 - clearInterval(this.timerId);
1954 - mvTransLib.doCloseTransition(this)
1955 - return true;
1956 - }
1957 -
1958 - this.interValCount++;
1959 - //setInterval in we are still in running state and user is not using the playhead
1960 - if( this.animation_state==1 ){
1961 - if(!this.timerId){
1962 - this.timerId = setInterval('document.getElementById(\'' + this.pClip.pp.id + '\').'+
1963 - 'run_transition(\'' + this.pClip.pp.cur_clip.order + '\','+
1964 - '\''+ this.transAttrType + '\')',
1965 - MV_ANIMATION_CB_RATE);
1966 - }
1967 - }else{
1968 - clearInterval(this.timerId);
1969 - }
1970 - return true;
1971 - },
1972 - clone:function(){
1973 - var cObj = new this.constructor();
1974 - for(var i in this)
1975 - cObj[i]=this[i];
1976 - return cObj;
1977 - }
1978 -}
19791993 /*
19801994 * takes an input
19811995 * @time_str input time string
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvTimedEffectsEdit.js
@@ -0,0 +1,44 @@
 2+/*
 3+* mvTimedEffectsEdit
 4+*
 5+* for now just simple single stack transition control
 6+*
 7+*/
 8+
 9+var default_timedeffect_values = {
 10+ 'rObj': null, // the resource object
 11+ 'clip_disp_ct':null,//target clip disp
 12+ 'control_ct':null, //control container
 13+
 14+ 'parent_ct': null, //parent container
 15+
 16+ 'p_seqObj': null, //parent sequence Object
 17+
 18+ 'edit_action': null, //the requested edit action
 19+}
 20+var mvTimedEffectsEdit =function(iObj) {
 21+ return this.init(iObj);
 22+};
 23+//set up the mvSequencer object
 24+mvTimedEffectsEdit.prototype = {
 25+ //the menu_items Object contains: default html, js setup/loader functions
 26+ menu_items : {
 27+ 'transin':{
 28+
 29+ },
 30+ 'transout':{
 31+
 32+ },
 33+ 'effects':{
 34+
 35+ }
 36+ },
 37+ init:function(iObj){
 38+ //init object:
 39+ for(var i in default_clipedit_values){
 40+ if( iObj[i] ){
 41+ this[i] = iObj[i];
 42+ }
 43+ }
 44+ }
 45+}
\ No newline at end of file
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js
@@ -19,9 +19,9 @@
2020 */
2121
2222 loadGM({
23 - "menu_clipedit" : "Edit Selected Resource",
24 - "menu_cliplib" : "Add Resource",
25 - "menu_transition" : "Transitions Effects",
 23+ "menu_clipedit" : "Edit Media",
 24+ "menu_transition" : "Transitions & Effects",
 25+ "menu_cliplib" : "Add Media",
2626 "menu_resource_overview" : "Resource Overview",
2727 "menu_options" : "Options",
2828
@@ -50,7 +50,7 @@
5151
5252 "mv_welcome_to_sequencer" : "<h3>Welcome to the sequencer demo</h3> very <b>limited</b> functionality right now. Not much documentation yet either",
5353
54 - "no_selected_resource" : "<h3>No Resource selected</h3> Select a Clip to enable resource editing",
 54+ "no_selected_resource" : "<h3>No Resource selected</h3> Select a Clip to enable editing",
5555 "error_edit_multiple" : "<h3>Multiple Resources Selected</h3> Select a single clip to edit it",
5656
5757 "mv_editor_options" : "Editor options",
@@ -58,7 +58,9 @@
5959 "mv_simple_editor_desc" : "simple editor (iMovie style)",
6060 "mv_advanced_editor_desc" : "advanced editor (Final Cut style)",
6161 "mv_other_options" : "Other Options",
62 - "mv_contextmenu_opt" : "Enable Context Menus"
 62+ "mv_contextmenu_opt" : "Enable Context Menus",
 63+
 64+ "mv_sequencer_credit_line":"Developed by <a href=\"http://kaltura.com\">Kaltura, Inc.</a> in partnership with the <a href=\"http://wikimediafoundation.org/wiki/Home\">Wikimedia Foundation</a> ( <a href=\"#\">more info</a> )"
6365 });
6466 //used to set default values and validate the passed init object
6567 var sequencerDefaultValues = {
@@ -116,11 +118,7 @@
117119 edit_stack:new Array(),
118120 disp_menu_item:null,
119121 //trackObj used to payload playlist Track Object (when inline not present)
120 - tracks:{},
121 -
122 - about_html:'Developed by <a href="http://kaltura.com">Kaltura, Inc.</a>' +
123 - 'in partnership with the <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> ' +
124 - '( <a href="#">more info</a> )'
 122+ tracks:{}
125123 }
126124 var mvSequencer = function(iObj) {
127125 return this.init(iObj);
@@ -139,6 +137,17 @@
140138 this_seq.doEditSelectedClip();
141139 }
142140 },
 141+ 'transition':{
 142+ 'd':0,
 143+ 'html' : '<h3>' + gM('menu_transition') + '</h3>',
 144+ 'js':function(this_seq){
 145+ this_seq.doEditTransitionSelectedClip();
 146+ },
 147+ 'click_js':function(this_seq){
 148+ //highlight the transition of the selected clip:
 149+ this_seq.doEditTransitionSelectedClip();
 150+ }
 151+ },
143152 'cliplib':{
144153 'd':0,
145154 'html': gM('loading_txt'),
@@ -152,14 +161,7 @@
153162 this_seq.mySearch.doInitDisplay();
154163 });
155164 }
156 - },
157 - 'transition':{
158 - 'd':0,
159 - 'html' : '<h3>' + gM('menu_transition') + '</h3>',
160 - 'js':function(this_seq){
161 - this_seq.renderTransitionsSet('transition_ic');
162 - }
163 - },
 165+ },
164166 'options':{
165167 'd':0,
166168 'html' : '<h3>' + gM('menu_options') + '</h3>' +
@@ -205,21 +207,16 @@
206208 this[i] = iObj[i];
207209 }
208210 }
209 - if(!this.target_sequence_container){
210 - js_log('Error: no target_sequence_container');
211 - return false;
212 - }
213 -
 211+
214212 //check for sequence_container
215 - if(this.target_sequence_container=='null'){
 213+ if($j(this.target_sequence_container).length === 0){
216214 js_log("Error: missing target_sequence_container");
217215 return false;
218216 }
219217
220218 //$j(this.target_sequence_container).css('position', 'relative');
221219 this['base_width'] = $j(this.target_sequence_container).width();
222 - this['base_height'] = $j(this.target_sequence_container).height();
223 -
 220+ this['base_height'] = $j(this.target_sequence_container).height();
224221
225222 //add the container divs (with basic layout ~universal~
226223 $j(this.target_sequence_container).html(''+
@@ -234,11 +231,13 @@
235232 gM('loading_user_rights') +
236233 '</div>'+
237234 '<div class="about_editor" style="position:absolute;right:5px;bottom:7px;">' +
238 - this.about_html +
 235+ gM('mv_sequencer_credit_line') +
239236 '</div>'+
240237 '<div id="'+this.sequence_tools_id+'" style="position:absolute;' +
241238 'left:0px;right:'+(this.video_width+15)+'px;top:0px;height:'+(this.video_height+23)+'px;"/>'
242 - );
 239+ ).css({
 240+ 'min-width':'850px'
 241+ });
243242
244243 /*js_log('set: '+this.target_sequence_container + ' html to:'+ "\n"+
245244 $j(this.target_sequence_container).html()
@@ -349,18 +348,19 @@
350349 })
351350 },
352351 //display a menu item (hide the rest)
353 - disp:function( item ){
 352+ disp:function( item, dispCall ){
354353 js_log('menu_item disp: ' + item);
355 - this.disp_menu_item = item;
 354+ this.disp_menu_item = item;
356355 //update the display and item state:
357 - for(var i in this.menu_items){
358 - if(i==item){
359 - $j('#'+i+'_ic').fadeIn("fast");
360 - this.menu_items[i].d = 1;
361 - //do any click_js actions:getInsertControl
362 - if( this.menu_items[i].click_js )
363 - this.menu_items[i].click_js( this );
364 - }
 356+ if(this.menu_items[item]){
 357+ //update the tabs display:
 358+ if(!dispCall)
 359+ $j("#seq_menu").tabs('select', this.menu_items[item].inx);
 360+
 361+ this.menu_items[item].d = 1;
 362+ //do any click_js actions:getInsertControl
 363+ if( this.menu_items[item].click_js )
 364+ this.menu_items[item].click_js( this );
365365 }
366366 },
367367 //setup the menu items:
@@ -378,18 +378,16 @@
379379 js_log('f:renderTransitionsSet:' + target_id);
380380 var o = '';
381381 if(typeof mvTransLib == 'undefined'){
382 - js_log('Error: missing mvTransLib');
 382+ js_error('Error: missing mvTransLib');
383383 return false;
384384 }
385 - for(var i in mvTransLib['type']){
 385+ for(var type in mvTransLib['type']){
386386 js_log('on tran type: ' + i);
387387 var base_trans_name = i;
388 - var tLibSet = mvTransLib['type'][ i ];
389 - for(var j in tLibSet){
390 - trans_name=base_trans_name+'_'+j;
391 - js_log('adding tname: ' + trans_name);
 388+ var tLibSet = mvTransLib['type'][ type ];
 389+ for(var subtype in tLibSet){
392390 o+='<img style="float:left;padding:10px;" '+
393 - 'src="'+mv_embed_path +'/skins/'+mv_skin_name+'/transition_images/'+ trans_name + '.png">';
 391+ 'src="' + mvTransLib.getTransitionIcon(type, subtype)+ '">';
394392 }
395393 }
396394 js_log('should set: ' + target_id + ' to: ' + o);
@@ -592,7 +590,9 @@
593591 var tabc ='';
594592 var o='<div id="seq_menu" style="width:100%;height:100%">';
595593 o+='<ul>';
596 - $j.each(this.menu_items, function(tab_id, menu_item){
 594+ for(var tab_id in this.menu_items){
 595+ menu_item = this.menu_items[tab_id];
 596+ menu_item.inx = inx;
597597 if(menu_item.d){
598598 selected_tab=inx;
599599 _this.disp_menu_item =tab_id;
@@ -606,7 +606,7 @@
607607 tabc += (menu_item.html) ? menu_item.html : '<h3>' + gM('menu_'+tab_id) + '</h3>';
608608 tabc +='</div>';
609609 inx++;
610 - });
 610+ };
611611 o+='</ul>';
612612 o+=tabc;
613613 $j('#'+this.sequence_tools_id).html( o );
@@ -615,7 +615,7 @@
616616 $j("#seq_menu").tabs({
617617 selected:selected_tab,
618618 select: function(event, ui) {
619 - _this.disp( $j(ui.tab).attr('id').replace('mv_menu_item_', '') );
 619+ _this.disp( $j(ui.tab).attr('id').replace('mv_menu_item_', ''), true );
620620 }
621621 //add sorting
622622 }).find(".ui-tabs-nav").sortable({ axis : 'x' });
@@ -723,7 +723,7 @@
724724 for(var j in cAttr){
725725 var val = (j=='transIn' || j=='transOut') ? cAttr[j].id : cAttr[j];
726726 o+=lt + j+'="' + val + '"';
727 - lt ="\n\t\t\t";
 727+ lt ="\n\t\t";
728728 }
729729 o+=">\n" //close the clip
730730 for(var pName in curClip.params){
@@ -744,27 +744,50 @@
745745 var cObj = this.plObj.tracks[ track_inx ].clips[ clip_inx ];
746746 this.doEditClip( cObj );
747747 },
 748+ doEditTransitionSelectedClip:function(){
 749+ js_log("f:doEditTransitionSelectedClip:" + $j('.mv_selected_clip').length);
 750+ if( $j('.mv_selected_clip').length == 1){
 751+ this.doEditTransition( this.getClipFromSeqID( $j('.mv_selected_clip').parent().attr('id') ) );
 752+ }else if( $j('.mv_selected_clip').length === 0){
 753+ //no clip selected warning:
 754+ $j('#transition_ic').html( gM('no_selected_resource') );
 755+ }else{
 756+ //multiple clip selected warning:
 757+ $j('#transition_ic').html( gM('error_edit_multiple') );
 758+ }
 759+ },
748760 doEditSelectedClip:function(){
749 - js_log("f:doEditSelectedClip:");
750 - var this_seq = this;
751 - //and only one clip selected
752 - var num_sel = $j('.mv_selected_clip').length
753 - if( num_sel == 1){
754 - $j('.mv_selected_clip').each(function(){
755 - this_seq.doEditClip( this_seq.getClipFromSeqID( $j(this).parent().attr('id') ) );
756 - });
757 - }else if( num_sel === 0){
 761+ js_log("f:doEditSelectedClip:");
 762+ //and only one clip selected
 763+ if( $j('.mv_selected_clip').length == 1){
 764+ this.doEditClip( this.getClipFromSeqID( $j('.mv_selected_clip').parent().attr('id') ) );
 765+ }else if( $j('.mv_selected_clip').length === 0){
758766 //no clip selected warning:
759767 $j('#clipedit_ic').html( gM('no_selected_resource') );
760 - }else if( num_sel > 1){
 768+ }else{
761769 //multiple clip selected warning:
762770 $j('#clipedit_ic').html( gM('error_edit_multiple') );
763 - }
764 -
 771+ }
765772 },
 773+ doEditTransition:function( cObj ){
 774+ var _this = this;
 775+ mv_get_loading_img( '#clipedit_ic' );
 776+ mvJsLoader.doLoad([
 777+ 'mvClipEdit',
 778+ 'mvTimedEffectsEdit'
 779+ ],function(){
 780+ //if mvClipEditor not preset init
 781+ _this.myEffectEdit = {};
 782+ _this.myEffectEdit = new mvTimedEffectsEdit({
 783+ 'rObj' : cObj,
 784+ 'control_ct':'transitions_ic',
 785+ 'p_SeqObj': _this,
 786+ });
 787+ })
 788+ },
766789 //updates the clip details div if edit resource is set
767790 doEditClip:function( cObj){
768 - var this_seq = this;
 791+ var _this = this;
769792
770793 //set default edit action (maybe edit_action can be sent via by context click)
771794 var edit_action = 'fileopts';
@@ -774,13 +797,14 @@
775798 mvJsLoader.doLoad( [
776799 'mvClipEdit'
777800 ], function(){
 801+ _this.myClipEditor = {};
778802 //setup the cliploader
779 - this_seq.myClipEditor = new mvClipEdit({
 803+ _this.myClipEditor = new mvClipEdit({
780804 'rObj' : cObj,
781805 'control_ct':'clipedit_ic',
782806 'clip_disp_ct': cObj.id,
783807 'edit_action':edit_action,
784 - 'p_seqObj': this_seq,
 808+ 'p_seqObj': _this,
785809 'profile':'sequence'
786810 });
787811 });
@@ -791,13 +815,9 @@
792816 },
793817 closeModEditor:function(){
794818 //unset the sequencer
795 - _global['mvSeq'] = null;
796 - $j('#sequencer_target,.ui-widget-overlay').remove();
 819+ _global['mvSeq'] = null;
 820+ $j(this.target_sequence_container + ',.ui-widget-overlay').remove();
797821 },
798 - closeModWindow:function(){
799 - $j('#modal_window').hide();
800 - $j('#modalbox').show();
801 - },
802822 pasteClipBoardClips:function(){
803823 js_log('f:pasteClipBoardClips');
804824 //@@todo query the server for updated clipboard
@@ -1011,7 +1031,7 @@
10121032
10131033 //set up some constants for timeline_mode == storyboard:
10141034 if(this.timeline_mode == 'storyboard'){
1015 - var frame_width = Math.round(this.track_clipThumb_height*1.3333333);
 1035+ var frame_width = Math.round( this.track_clipThumb_height * 1.3333333 );
10161036 var container_width = frame_width+60;
10171037 }
10181038
@@ -1019,17 +1039,17 @@
10201040 for(var j in track.clips){
10211041 clip = track.clips[j];
10221042 //var img = clip.getClipImg('icon');
1023 - if(this.timeline_mode == 'storyboard'){
 1043+ if( this.timeline_mode == 'storyboard' ){
10241044 clip.left_px = j*container_width;
10251045 clip.width_px = container_width;
10261046 var base_id = 'track_'+track_id+'_clip_'+j;
1027 - track_html+='<span id="'+base_id+'" '+
 1047+ track_html += '<span id="'+base_id+'" '+
10281048 'class="mv_storyboard_container mv_clip_drag" '+
10291049 'style="'+
10301050 'left:'+clip.left_px+'px;'+
10311051 'height:' + (this.track_clipThumb_height+30) + 'px;' +
10321052 'width:'+(container_width)+'px;" >';
1033 - track_html+=clip.embed.renderTimelineThumbnail({
 1053+ track_html += clip.embed.renderTimelineThumbnail({
10341054 'width' : frame_width,
10351055 'thumb_class' : 'mv_clip_thumb',
10361056 'height':this.track_clipThumb_height,
@@ -1037,9 +1057,23 @@
10381058 });
10391059 //render out edit button
10401060 /*track_html+='<div class="clip_edit_button clip_edit_base clip_control"/>';*/
1041 -
 1061+
 1062+ //check if the clip has transitions
 1063+ var imgHtml = '';
 1064+ var imsrc = '';
 1065+ if(clip.transIn || clip.transOut){
 1066+ if( clip.transIn )
 1067+ imsrc = clip.transIn.getIconSrc();
 1068+ //@@todo put transOut somewhere else
 1069+ if( clip.transOut )
 1070+ imsrc = clip.transOut.getIconSrc();
 1071+ if(imsrc != '')
 1072+ imgHtml = '<img style="width:32px;height:32px" src="' + imsrc + '" />';
 1073+ }
10421074 //render out transition edit box
1043 - track_html+='<div id="tb_' + base_id + '" style="" class="clip_trans_box"/>';
 1075+ track_html += '<div id="tb_' + base_id + '" class="clip_trans_box">' +
 1076+ imgHtml +
 1077+ '</div>'
10441078
10451079 //render out adjustment text
10461080 /*track_html+='<div id="' + base_id + '_adj' + '" class="mv_adj_text" style="top:'+ (this.track_clipThumb_height+10 )+'px;">'+
@@ -1055,6 +1089,7 @@
10561090 if(this.timeline_mode == 'time'){
10571091 clip.left_px = Math.round( cur_clip_time/this.timeline_scale);
10581092 clip.width_px = Math.round( Math.round( clip.getDuration() )/this.timeline_scale);
 1093+ clip.height_px = 60;
10591094 js_log('at time:' + cur_clip_time + ' left: ' +clip.left_px + ' clip dur: ' + Math.round( clip.getDuration() ) + ' clip width:' + clip.width_px);
10601095
10611096 //for every clip_width pixle output image
@@ -1089,6 +1124,23 @@
10901125 //js_log("new htmL for track i: "+track_id + ' html:'+track_html);
10911126 $j('#container_track_'+track_id).html( track_html );
10921127
 1128+ //apply transition click action
 1129+ $j('.clip_trans_box').click(function(){
 1130+ if($j(this).hasClass('mv_selected_transition')){
 1131+ $j(this).removeClass('mv_selected_transition');
 1132+ this_seq.deselectClip( $j(this).siblings('.mv_clip_thumb').get(0) );
 1133+ }else{
 1134+ $j(this).addClass("mv_selected_transition");
 1135+ $j(this).siblings('.mv_clip_thumb').addClass("mv_selected_clip");
 1136+ var sClipObj = this_seq.getClipFromSeqID( $j(this).parent().attr('id') );
 1137+ //jump to the current clip
 1138+ this_seq.plObj.updateCurrentClip( sClipObj );
 1139+ //display the transition edit tab:
 1140+ this_seq.disp( 'transition' );
 1141+ //display edit dialog:
 1142+ this_seq.doEditTransition( sClipObj );
 1143+ }
 1144+ });
10931145
10941146 //apply edit button mouse over effect:
10951147 $j('.clip_edit_button').hover(function(){
@@ -1099,7 +1151,8 @@
11001152 //deselect everything else:
11011153 $j('.mv_selected_clip').each(function(inx, selected_clip){
11021154 this_seq.deselectClip( this );
1103 - });
 1155+ });
 1156+
11041157 var sClipObj = this_seq.getClipFromSeqID( $j(this).parent().attr('id') );
11051158 this_seq.plObj.updateCurrentClip( sClipObj );
11061159 //get the clip (siblings with mv_clip_thumb class)
@@ -1132,8 +1185,7 @@
11331186
11341187 //jump to clip time
11351188 var sClipObj = this_seq.getClipFromSeqID( $j(this).parent().attr('id') );
1136 - this_seq.plObj.updateCurrentClip( sClipObj );
1137 -
 1189+ this_seq.plObj.updateCurrentClip( sClipObj );
11381190 if( $j(this).hasClass("mv_selected_clip") ){
11391191 $j(this).removeClass("mv_selected_clip");
11401192 $j('#' + $j(this).parent().attr("id") + '_adj').fadeOut("fast");
@@ -1310,6 +1362,8 @@
13111363 },
13121364 deselectClip:function( clipElm ){
13131365 $j(clipElm).removeClass("mv_selected_clip");
 1366+ //make sure the transition sibling is removed:
 1367+ $j(clipElm).siblings('.clip_trans_box').removeClass( 'mv_selected_transition' );
13141368 $j('#' + $j(clipElm).parent().attr("id") + '_adj').fadeOut("fast");
13151369 },
13161370 getClipFromSeqID:function( clip_seq_id ){
Index: branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js
@@ -16,11 +16,10 @@
1717 "mv_cancel_image_insert": "Cancel Insert",
1818
1919 "sc_fileopts":"Clip Detail Edit",
20 - "sc_inoutpoints":"Set In-Out points",
21 - "sc_panzoom":"Pan Zoom Crop",
 20+ "sc_inoutpoints":"Set In-Out points",
2221 "sc_overlays":"Overlays",
2322 "sc_audio":"Audio Control",
24 - "sc_duration":"Duration",
 23+ "sc_duration":"Duration",
2524
2625 "mv_template_properties":"Template Properties",
2726 "mv_custom_title":"Custom Title",
@@ -47,8 +46,7 @@
4847 'controlActionsCb' : null, //the object that configures control Action callbacks
4948
5049 'edit_action': null, //the requested edit action
51 - 'profile': 'inpage' //the given profile either "inpage" or "sequence"
52 - //timeline invokes the timeline editor (letting you set keyframes)
 50+ 'profile': 'inpage' //the given profile either "inpage" or "sequence"
5351 }
5452 var mvClipEdit = function(iObj) {
5553 return this.init(iObj);
@@ -90,7 +88,7 @@
9189 this.setUpImageCtrl();
9290 }else if(this.media_type=='video'){
9391 this.setUpVideoCtrl();
94 - }
 92+ }
9593 }
9694 },
9795
@@ -273,13 +271,6 @@
274272 }
275273 }
276274 },
277 - 'panzoom':{
278 - 'media':['image','video'],
279 - 'doEdit':function(target, _this ){
280 - //do clock mouse scroll duration editor
281 - $j(target).html('<h3>Set Position</h3><h3>Set Zoom</h3><h3>Set Crop</h3><h3>Set Aspect</h3>');
282 - }
283 - },
284275 'overlays':{
285276 'media':['image','video'],
286277 'doEdit':function(target, _this ){
Index: branches/new-upload/phase3/js2/mwEmbed/php/jsAutoloadLocalClasses.php
@@ -53,9 +53,7 @@
5454 //libAddMedia:
5555 $wgJSAutoloadLocalClasses['mvFirefogg'] = $wgMwEmbedDirectory . 'libAddMedia/mvFirefogg.js';
5656 $wgJSAutoloadLocalClasses['mvAdvFirefogg'] = $wgMwEmbedDirectory . 'libAddMedia/mvAdvFirefogg.js';
57 -
5857 $wgJSAutoloadLocalClasses['mvBaseUploadInterface'] = $wgMwEmbedDirectory . 'libAddMedia/mvBaseUploadInterface.js';
59 -
6058 $wgJSAutoloadLocalClasses['remoteSearchDriver'] = $wgMwEmbedDirectory . 'libAddMedia/remoteSearchDriver.js';
6159 $wgJSAutoloadLocalClasses['seqRemoteSearchDriver'] = $wgMwEmbedDirectory . 'libAddMedia/seqRemoteSearchDriver.js';
6260 $wgJSAutoloadLocalClasses['baseRemoteSearch'] = $wgMwEmbedDirectory . 'libAddMedia/searchLibs/baseRemoteSearch.js';
@@ -80,7 +78,8 @@
8179 //libSequencer:
8280 $wgJSAutoloadLocalClasses['mvPlayList'] = $wgMwEmbedDirectory . 'libSequencer/mvPlayList.js';
8381 $wgJSAutoloadLocalClasses['mvSequencer'] = $wgMwEmbedDirectory . 'libSequencer/mvSequencer.js';
 82+ $wgJSAutoloadLocalClasses['mvSequencer'] = $wgMwEmbedDirectory . 'libSequencer/mvSequencer.js';
8483
8584 //libTimedText:
86 - $wgJSAutoloadLocalClasses['mvTextInterface'] = $wgMwEmbedDirectory . 'libTimedText/mvTextInterface.js';
 85+ $wgJSAutoloadLocalClasses['mvTimedEffectsEdit'] = $wgMwEmbedDirectory . 'libTimedText/mvTimedEffectsEdit.js';
8786 ?>
\ No newline at end of file
Index: branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/mv_sequence.css
@@ -133,6 +133,9 @@
134134 .mv_selected_clip{
135135 border:solid #9F9;
136136 }
 137+.mv_selected_transition{
 138+ border:solid #9F9;
 139+}
137140 .mv_adj_text{
138141 font-weight: strong;
139142 font-size:small;
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js
@@ -211,7 +211,8 @@
212212 //libSequencer:
213213 lcPaths( 'libSequencer/', [
214214 'mvPlayList',
215 - 'mvSequencer'
 215+ 'mvSequencer',
 216+ 'mvTimedEffectsEdit'
216217 ])
217218 //libTimedText:
218219 lcPaths( 'libTimedText/', [
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/vlcEmbed.js
@@ -30,7 +30,8 @@
3131 getEmbedObj:function(){
3232 var embed_code = '<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" '+
3333 'codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0" '+
34 - 'id="' + this.pid + '" events="True" height="'+this.height+'" width="'+this.width+'">'+
 34+ 'id="' + this.pid + '" events="True" height="'+this.height+'" width="'+this.width+'"' +
 35+ '>'+
3536 '<param name="MRL" value="">'+
3637 '<param name="ShowDisplay" value="True">'+
3738 '<param name="AutoLoop" value="False">'+
@@ -38,7 +39,11 @@
3940 '<param name="Volume" value="50">'+
4041 '<param name="StartTime" value="0">'+
4142 '<embed pluginspage="http://www.videolan.org" type="application/x-vlc-plugin" '+
42 - 'progid="VideoLAN.VLCPlugin.2" name="' + this.pid + '" height="'+this.height+'" width="'+this.width+'">'+
 43+ 'progid="VideoLAN.VLCPlugin.2" name="' + this.pid + '" '+
 44+ 'height="'+this.height+'" width="'+this.width+'" ' +
 45+ //set the style too 'just to be sure'
 46+ 'style="width:'+this.width+'px;height:'+this.height+'px;" '+
 47+ '>'+
4348 '</object>';
4449 js_log('embed with: ' + embed_code);
4550 return embed_code;
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -175,7 +175,7 @@
176176 mvEmbed.swapEmbedVideoElement( pl_element, seqObj );
177177 }
178178 );
179 - }else{
 179+ }else{
180180 //create new playlist interface:
181181 var plObj = new mvPlayList( this );
182182 mvEmbed.swapEmbedVideoElement(this, plObj);
@@ -276,7 +276,7 @@
277277 'borders':true
278278 },
279279 getControls:function( embedObj ){
280 - js_log('f:controlsBuilder');
 280+ js_log('f:controlsBuilder:: opt:' + this.options);
281281 this.id = (embedObj.pc)?embedObj.pc.pp.id:embedObj.id;
282282 this.avaliable_width=embedObj.playerPixelWidth();
283283 //make pointer to the embedObj
@@ -309,7 +309,7 @@
310310 js_log('not enough space for control component:'+i);
311311 }
312312 }
313 - }
 313+ }
314314 return o;
315315 },
316316 /*

Status & tagging log