Index: branches/new-upload/phase3/js2/mwEmbed/example_usage/Sequence_Editor.html |
— | — | @@ -4,31 +4,20 @@ |
5 | 5 | <head> |
6 | 6 | <title>Simple SMIL example</title> |
7 | 7 | <script type="text/javascript" src="../mv_embed.js"></script> |
| 8 | + <script type="text/javascript"> |
| 9 | + mwAddOnloadHook(function(){ |
| 10 | + $j('#seqcontainer').sequencer({ |
| 11 | + 'mv_pl_src':'media/sample_smil.xml' |
| 12 | + }); |
| 13 | + }); |
| 14 | + </script> |
8 | 15 | </head> |
9 | 16 | <body> |
10 | 17 | <h3> Simple SMIL example</h3> |
11 | | - |
12 | | -<span id="default_attr"> |
13 | | -</span> <br /> |
14 | | -<br /> |
15 | | - <table border="1" cellpadding="6" width="600"> |
16 | | - <tr> |
17 | | - <td valign="top"><playlist id="smil_pl" src="media/sample_smil.xml"></td> |
18 | | - |
19 | | - <td valign="top"><b>Sample Embed 8</b><br /> |
20 | | - <br><b>Crossfading Videos</b><br/> |
21 | | - The first video fades up from green when it starts to play, |
22 | | - and the second video fades down to green when it ends. |
23 | | - When the first video stops and the second video starts, |
24 | | - though, the two videos crossfade into each other<br><iframe width="500" height="200" src="sample_smil.xml">sample smil here</iframe><br /> |
25 | | - <-- code used: <br /> |
26 | | - <pre> <playlist id="smil_pl" src="media/sample_smil.xml"></pre> |
27 | | - |
28 | | - </td> |
29 | | - </tr> |
30 | | - |
31 | | - </table> |
32 | | - <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> |
| 18 | + <div id="seqcontainer" style="position:absolute;top:50px;bottom:10px;left:10px;right:10px;border:solid thin black"> |
| 19 | + Loading sequence editor <blink>...</blink> |
| 20 | + </div> |
| 21 | + |
33 | 22 | </body> |
34 | 23 | </html> |
35 | 24 | |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js |
— | — | @@ -1,10 +1,10 @@ |
2 | | -var mediaWikiSearch = function( initObj ) { |
3 | | - return this.init( initObj ); |
| 2 | +var mediaWikiSearch = function( iObj ) { |
| 3 | + return this.init( iObj ); |
4 | 4 | }; |
5 | 5 | mediaWikiSearch.prototype = { |
6 | | - init:function( initObj ){ |
| 6 | + init:function( iObj ){ |
7 | 7 | //init base class and inherit: |
8 | | - var baseSearch = new baseRemoteSearch( initObj ); |
| 8 | + var baseSearch = new baseRemoteSearch( iObj ); |
9 | 9 | for(var i in baseSearch){ |
10 | 10 | if(typeof this[i] =='undefined'){ |
11 | 11 | this[i] = baseSearch[i]; |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/baseRemoteSearch.js |
— | — | @@ -20,8 +20,8 @@ |
21 | 21 | 'category' : '.media:category@label|url' |
22 | 22 | } |
23 | 23 | |
24 | | -var baseRemoteSearch = function(initObj) { |
25 | | - return this.init(initObj); |
| 24 | +var baseRemoteSearch = function(iObj) { |
| 25 | + return this.init(iObj); |
26 | 26 | }; |
27 | 27 | baseRemoteSearch.prototype = { |
28 | 28 | |
— | — | @@ -37,10 +37,10 @@ |
38 | 38 | num_results :0, |
39 | 39 | |
40 | 40 | //init the object: |
41 | | - init: function( initObj ){ |
| 41 | + init: function( iObj ){ |
42 | 42 | js_log('mvBaseRemoteSearch:init'); |
43 | | - for(var i in initObj){ |
44 | | - this[i] = initObj[i]; |
| 43 | + for(var i in iObj){ |
| 44 | + this[i] = iObj[i]; |
45 | 45 | } |
46 | 46 | return this; |
47 | 47 | }, |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/archiveOrgSearch.js |
— | — | @@ -2,16 +2,16 @@ |
3 | 3 | //more about solr here: |
4 | 4 | //http://lucene.apache.org/solr/ |
5 | 5 | |
6 | | -var archiveOrgSearch = function ( initObj){ |
7 | | - return this.init( initObj ); |
| 6 | +var archiveOrgSearch = function ( iObj){ |
| 7 | + return this.init( iObj ); |
8 | 8 | } |
9 | 9 | archiveOrgSearch.prototype = { |
10 | 10 | //archive.org constants: |
11 | 11 | dnUrl:'http://www.archive.org/download/', |
12 | 12 | dtUrl:'http://www.archive.org/details/', |
13 | | - init:function( initObj ){ |
| 13 | + init:function( iObj ){ |
14 | 14 | //init base class and inherit: |
15 | | - var baseSearch = new baseRemoteSearch( initObj ); |
| 15 | + var baseSearch = new baseRemoteSearch( iObj ); |
16 | 16 | for(var i in baseSearch){ |
17 | 17 | if(typeof this[i] =='undefined'){ |
18 | 18 | this[i] = baseSearch[i]; |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/metavidSearch.js |
— | — | @@ -4,17 +4,17 @@ |
5 | 5 | loadGM( { |
6 | 6 | "mv_stream_title" : "$1 $2 to $3" |
7 | 7 | }); |
8 | | -var metavidSearch = function(initObj) { |
9 | | - return this.init(initObj); |
| 8 | +var metavidSearch = function(iObj) { |
| 9 | + return this.init(iObj); |
10 | 10 | }; |
11 | 11 | metavidSearch.prototype = { |
12 | 12 | reqObj:{ //set up the default request paramaters |
13 | 13 | 'order':'recent', |
14 | 14 | 'feed_format':'rss' |
15 | 15 | }, |
16 | | - init:function( initObj ){ |
| 16 | + init:function( iObj ){ |
17 | 17 | //init base class and inherit: |
18 | | - var baseSearch = new baseRemoteSearch( initObj ); |
| 18 | + var baseSearch = new baseRemoteSearch( iObj ); |
19 | 19 | for(var i in baseSearch){ |
20 | 20 | if(typeof this[i] =='undefined'){ |
21 | 21 | this[i] = baseSearch[i]; |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/flickrSearch.js |
— | — | @@ -1,10 +1,10 @@ |
2 | | -var flickrOrgSearch = function ( initObj){ |
3 | | - return this.init( initObj ); |
| 2 | +var flickrOrgSearch = function ( iObj){ |
| 3 | + return this.init( iObj ); |
4 | 4 | } |
5 | 5 | flickrOrgSearch.prototype = { |
6 | | - init:function( initObj ){ |
| 6 | + init:function( iObj ){ |
7 | 7 | //init base class and inherit: |
8 | | - var baseSearch = new baseRemoteSearch( initObj ); |
| 8 | + var baseSearch = new baseRemoteSearch( iObj ); |
9 | 9 | for(var i in baseSearch){ |
10 | 10 | if(typeof this[i] =='undefined'){ |
11 | 11 | this[i] = baseSearch[i]; |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | /* |
3 | | -* Adds advanced firefogg support (let you control and structure advanced controls over many aspects of video editing) |
| 3 | +* Adds advanced firefogg support (let you control and structure advanced controls over many aspects of video encoding) |
4 | 4 | */ |
5 | 5 | |
6 | 6 | //@@todo put all msg text into loadGM json |
— | — | @@ -15,8 +15,8 @@ |
16 | 16 | |
17 | 17 | }); |
18 | 18 | |
19 | | -var mvAdvFirefogg = function( initObj ){ |
20 | | - return this.init( initObj ); |
| 19 | +var mvAdvFirefogg = function( iObj ){ |
| 20 | + return this.init( iObj ); |
21 | 21 | } |
22 | 22 | var default_mvAdvFirefogg_config = { |
23 | 23 | //which config groups to include |
— | — | @@ -231,15 +231,15 @@ |
232 | 232 | 'help' : "Contact link" |
233 | 233 | } |
234 | 234 | }, |
235 | | - init:function( initObj ){ |
236 | | - //setup a "supported" initObj: |
237 | | - for(var i in initObj){ |
| 235 | + init:function( iObj ){ |
| 236 | + //setup a "supported" iObj: |
| 237 | + for(var i in iObj){ |
238 | 238 | if( typeof default_mvAdvFirefogg_config [i] != 'undefined' ){ |
239 | | - this[i] = initObj[i]; |
| 239 | + this[i] = iObj[i]; |
240 | 240 | } |
241 | 241 | } |
242 | 242 | //inherit the base mvFirefogg class: |
243 | | - var myFogg = new mvFirefogg( initObj ); |
| 243 | + var myFogg = new mvFirefogg( iObj ); |
244 | 244 | for(var i in myFogg){ |
245 | 245 | if( typeof this[i] != 'undefined'){ |
246 | 246 | this[ 'basefogg_' + i ] = myFogg[i]; |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js |
— | — | @@ -1,12 +1,13 @@ |
2 | 2 | /*the sequence remote search driver |
3 | 3 | extends the base remote search driver with sequence specific stuff. could seperate this out into seperate lib. |
4 | 4 | */ |
5 | | -var seqRemoteSearchDriver = function(initObj){ |
6 | | - return this.init( initObj ) |
| 5 | +var seqRemoteSearchDriver = function(iObj){ |
| 6 | + return this.init( iObj ) |
7 | 7 | } |
8 | 8 | seqRemoteSearchDriver.prototype = { |
9 | | - init:function( initObj ){ |
10 | | - //inherit the remoteSearchDriver properties:n var tmpRSD = new remoteSearchDriver( initObj ); |
| 9 | + init:function( iObj ){ |
| 10 | + //inherit the remoteSearchDriver properties:n |
| 11 | + var tmpRSD = new remoteSearchDriver( iObj ); |
11 | 12 | for(var i in tmpRSD){ |
12 | 13 | if(this[i]){ |
13 | 14 | this['parent_'+i] = tmpRSD[i]; |
— | — | @@ -27,7 +28,7 @@ |
28 | 29 | var clip_key =''; |
29 | 30 | |
30 | 31 | //@@todo support multiple target tracks |
31 | | - $j('.mv_clip_box_result').draggable({ |
| 32 | + $j( '.mv_clip_box_result' ).draggable({ |
32 | 33 | start:function(){ |
33 | 34 | source_pos = $j(this).offset(); |
34 | 35 | js_log("update pos of: #clone_" + this.id + ' to l:' +source_pos.left + ' t:' + source_pos.top ); |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js |
— | — | @@ -54,8 +54,8 @@ |
55 | 55 | } |
56 | 56 | |
57 | 57 | |
58 | | -var mvFirefogg = function(initObj){ |
59 | | - return this.init( initObj ); |
| 58 | +var mvFirefogg = function(iObj){ |
| 59 | + return this.init( iObj ); |
60 | 60 | } |
61 | 61 | mvFirefogg.prototype = { //extends mvBaseUploadInterface |
62 | 62 | |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -68,8 +68,8 @@ |
69 | 69 | /* |
70 | 70 | * base remoteSearch Driver interface |
71 | 71 | */ |
72 | | -var remoteSearchDriver = function(initObj){ |
73 | | - return this.init( initObj ); |
| 72 | +var remoteSearchDriver = function(iObj){ |
| 73 | + return this.init( iObj ); |
74 | 74 | } |
75 | 75 | remoteSearchDriver.prototype = { |
76 | 76 | results_cleared:false, |
— | — | @@ -296,12 +296,12 @@ |
297 | 297 | cUpLoader : null, |
298 | 298 | cEdit : null, |
299 | 299 | |
300 | | - init: function( initObj ){ |
| 300 | + init: function( iObj ){ |
301 | 301 | var _this = this; |
302 | 302 | js_log('remoteSearchDriver:init'); |
303 | 303 | for( var i in default_remote_search_options ) { |
304 | | - if( initObj[i]){ |
305 | | - this[ i ] = initObj[i]; |
| 304 | + if( iObj[i]){ |
| 305 | + this[ i ] = iObj[i]; |
306 | 306 | }else{ |
307 | 307 | this[ i ] = default_remote_search_options[i]; |
308 | 308 | } |
— | — | @@ -1096,7 +1096,7 @@ |
1097 | 1097 | //or if import mode if just "linking" |
1098 | 1098 | if( this.checkRepoLocal( cp ) || this.import_url_mode == 'remote_html_embed'){ |
1099 | 1099 | //local repo jump directly to check Import Resource callback: |
1100 | | - cir_callback( rObj ); |
| 1100 | + cir_callback( rObj ); |
1101 | 1101 | }else{ |
1102 | 1102 | //not a local domain update target resource name with the prefix: |
1103 | 1103 | rObj.target_resource_title = cp.resource_prefix +rObj.target_resource_title; |
— | — | @@ -1370,10 +1370,10 @@ |
1371 | 1371 | var _this = this; |
1372 | 1372 | |
1373 | 1373 | if(_this.import_url_mode=='remote_html_embed'){ |
1374 | | - _this.cur_embed_code = rObj.pSobj.getEmbedHTML(rObj); |
| 1374 | + _this.cur_embed_code = rObj.pSobj.getEmbedHTML(rObj); |
1375 | 1375 | }else{ |
1376 | | - _this.cur_embed_code = rObj.pSobj.getEmbedWikiCode( rObj ); |
1377 | | - } |
| 1376 | + _this.cur_embed_code = rObj.pSobj.getEmbedWikiCode( rObj ); |
| 1377 | + } |
1378 | 1378 | |
1379 | 1379 | //insert at start if textInput cursor has not been set (ie == length) |
1380 | 1380 | if( _this.caret_pos && _this.caret_pos.text){ |
— | — | @@ -1410,12 +1410,12 @@ |
1411 | 1411 | |
1412 | 1412 | //also update the render area: |
1413 | 1413 | if(_this.target_render_area && _this.cur_embed_code){ |
1414 | | - //output with some padding: |
1415 | | - $j(_this.target_render_area).append( _this.cur_embed_code + '<div style="clear:both;height:10px">') |
1416 | | - //update if its |
1417 | | - mv_video_embed(function(){ |
1418 | | - _this.closeAll(); |
1419 | | - }); |
| 1414 | + //output with some padding: |
| 1415 | + $j(_this.target_render_area).append( _this.cur_embed_code + '<div style="clear:both;height:10px">') |
| 1416 | + //update if its |
| 1417 | + mv_video_embed(function(){ |
| 1418 | + _this.closeAll(); |
| 1419 | + }); |
1420 | 1420 | } |
1421 | 1421 | }); |
1422 | 1422 | }, |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mediaWikiUploadHelper.OFF.js |
— | — | @@ -38,8 +38,8 @@ |
39 | 39 | 'api_url':false |
40 | 40 | } |
41 | 41 | |
42 | | -var mediaWikiUploadHelper = function(initObj){ |
43 | | - return this.init( initObj ); |
| 42 | +var mediaWikiUploadHelper = function(iObj){ |
| 43 | + return this.init( iObj ); |
44 | 44 | } |
45 | 45 | mediaWikiUploadHelper.prototype = { |
46 | 46 | init:function( iObj ){ |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js |
— | — | @@ -129,10 +129,9 @@ |
130 | 130 | debugger; |
131 | 131 | */ |
132 | 132 | //load sequencer: |
133 | | - mv_do_sequence({ |
134 | | - "sequence_container_id":'modalbox', |
135 | | - "mv_pl_src":this.src |
136 | | - }); |
| 133 | + $j("#modalbox").sequencer({ |
| 134 | + "mv_pl_src":this.src |
| 135 | + }); |
137 | 136 | |
138 | 137 | }, |
139 | 138 | selectPlaybackMethod:function(){ |
— | — | @@ -387,10 +386,11 @@ |
388 | 387 | '</div>'+ |
389 | 388 | '</div>' |
390 | 389 | ); |
| 390 | + |
391 | 391 | //add the play button: |
392 | | - $j('#dc_'+plObj.id).append( |
393 | | - this.cur_clip.embed.getPlayButton() |
394 | | - ); |
| 392 | + $j('#dc_'+plObj.id).append( |
| 393 | + this.cur_clip.embed.getPlayButton() |
| 394 | + ); |
395 | 395 | //once the controls are in the DOM add hooks: |
396 | 396 | ctrlBuilder.addControlHooks(this); |
397 | 397 | |
— | — | @@ -463,11 +463,13 @@ |
464 | 464 | seconds2npt( this.getDuration() ) + '</i>'); |
465 | 465 | |
466 | 466 | //only show the inline edit button if mediaWiki write API is enabled: |
| 467 | + |
| 468 | + //should probably be based on if we have a provider api url |
467 | 469 | if( typeof wgEnableWriteAPI != 'undefined'){ |
468 | 470 | $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 | + $j.btnHtml('edit', 'edit_'+this.id, 'pencil', {'style':'float:right;font-size:x-small;height:15px;'} ) |
471 | 472 | ); |
| 473 | + //do binding: |
472 | 474 | } |
473 | 475 | //render out the dividers on the timeline: |
474 | 476 | this.colorPlayHead(); |
— | — | @@ -2017,8 +2019,8 @@ |
2018 | 2020 | return this.clipList; |
2019 | 2021 | } |
2020 | 2022 | } |
2021 | | - var trackObj = function( initObj ){ |
2022 | | - return this.init( initObj ); |
| 2023 | + var trackObj = function( iObj ){ |
| 2024 | + return this.init( iObj ); |
2023 | 2025 | } |
2024 | 2026 | var supported_track_attr = |
2025 | 2027 | trackObj.prototype = { |
— | — | @@ -2030,16 +2032,16 @@ |
2031 | 2033 | 'desc:' |
2032 | 2034 | ), |
2033 | 2035 | disp_mode:'timeline_thumb', |
2034 | | - init : function(initObj){ |
2035 | | - if(!initObj) |
2036 | | - initObj={}; |
| 2036 | + init : function(iObj){ |
| 2037 | + if(!iObj) |
| 2038 | + iObj={}; |
2037 | 2039 | //make sure clips is new: |
2038 | 2040 | this.clips = new Array(); |
2039 | 2041 | |
2040 | 2042 | var _this = this; |
2041 | 2043 | $j.each(this.supported_attributes, function(i, attr){ |
2042 | | - if(initObj[attr]) |
2043 | | - _this[attr] = initObj[attr]; |
| 2044 | + if(iObj[attr]) |
| 2045 | + _this[attr] = iObj[attr]; |
2044 | 2046 | }); |
2045 | 2047 | }, |
2046 | 2048 | //returns the values of supported_attributes: |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js |
— | — | @@ -7,8 +7,10 @@ |
8 | 8 | * @author Michael Dale |
9 | 9 | * @email dale@ucsc.edu |
10 | 10 | * @url http://metavid.org |
11 | | - * |
12 | 11 | * |
| 12 | + * @further developed in open source collaboration with kaltura. |
| 13 | + * more info at http://kaltura.com |
| 14 | + * |
13 | 15 | * mv_sequencer.js |
14 | 16 | * is a basic embeddeble sequencer. |
15 | 17 | * extends the playlist with drag/drop/sortable/add/remove functionality |
— | — | @@ -62,7 +64,14 @@ |
63 | 65 | var sequencerDefaultValues = { |
64 | 66 | |
65 | 67 | instance_name:'mvSeq', //for now only one instance by name mvSeq is allowed |
66 | | - sequence_container_id:'null',//text value (so that its a valid property) |
| 68 | + |
| 69 | + target_sequence_container:null,//text value (so that its a valid property) |
| 70 | + target_form_text: null, |
| 71 | + |
| 72 | + //what is our save mode: |
| 73 | + // can save to 'api' url or 'form' |
| 74 | + saveMode : 'api', |
| 75 | + |
67 | 76 | video_container_id:'mv_video_container', |
68 | 77 | |
69 | 78 | video_width : 400, |
— | — | @@ -91,8 +100,10 @@ |
92 | 101 | //stores the clipboard edit token (if user has rights to edit their User page) |
93 | 102 | clipboardEditToken:null, |
94 | 103 | //stores the sequence edit token (if user has rights to edit the current sequence) |
95 | | - sequenceEditToken:null, |
| 104 | + sequenceEditToken:null, |
| 105 | + |
96 | 106 | |
| 107 | + |
97 | 108 | //Msg are all the language specific values ... |
98 | 109 | // (@@todo overwrite by msg values preloaded in the page) |
99 | 110 | //tack/clips can be pushed via json or inline playlist format |
— | — | @@ -105,8 +116,8 @@ |
106 | 117 | //trackObj used to payload playlist Track Object (when inline not present) |
107 | 118 | tracks:{} |
108 | 119 | } |
109 | | -var mvSequencer = function(initObj) { |
110 | | - return this.init(initObj); |
| 120 | +var mvSequencer = function(iObj) { |
| 121 | + return this.init(iObj); |
111 | 122 | }; |
112 | 123 | //set up the mvSequencer object |
113 | 124 | mvSequencer.prototype = { |
— | — | @@ -176,53 +187,53 @@ |
177 | 188 | key_ctrl_down:false, |
178 | 189 | inputFocus:false, |
179 | 190 | |
180 | | - init:function( initObj ){ |
| 191 | + init:function( iObj ){ |
181 | 192 | //set up pointer to this_seq for current scope: |
182 | 193 | var this_seq = this; |
183 | 194 | //set the default values: |
184 | 195 | for(var i in sequencerDefaultValues){ |
185 | 196 | this[ i ] = sequencerDefaultValues[i]; |
186 | 197 | } |
187 | | - for(var i in initObj){ |
188 | | - //js_log('on '+ i + ' :' + initObj[i]); |
189 | | - if(sequencerDefaultValues[i]){ //make sure its a valid property |
190 | | - this[i] = initObj[i]; |
| 198 | + for(var i in iObj){ |
| 199 | + //js_log('on '+ i + ' :' + iObj[i]); |
| 200 | + if(typeof sequencerDefaultValues[i] != 'undefined'){ //make sure its a valid property |
| 201 | + this[i] = iObj[i]; |
191 | 202 | } |
192 | 203 | } |
193 | | - if(this.sequence_container_id==null){ |
194 | | - js_log('Error: no sequence_container_id'); |
| 204 | + if(!this.target_sequence_container){ |
| 205 | + js_log('Error: no target_sequence_container'); |
195 | 206 | return false; |
196 | 207 | } |
197 | 208 | |
198 | 209 | //check for sequence_container |
199 | | - if(this.sequence_container_id=='null'){ |
200 | | - js_log("Error: missing sequence_container_id"); |
| 210 | + if(this.target_sequence_container=='null'){ |
| 211 | + js_log("Error: missing target_sequence_container"); |
201 | 212 | return false; |
202 | 213 | } |
203 | 214 | |
204 | | - //$j('#'+this.sequence_container_id).css('position', 'relative'); |
205 | | - this['base_width'] = $j('#'+this.sequence_container_id).width(); |
206 | | - this['base_height'] = $j('#'+this.sequence_container_id).height(); |
| 215 | + //$j(this.target_sequence_container).css('position', 'relative'); |
| 216 | + this['base_width'] = $j(this.target_sequence_container).width(); |
| 217 | + this['base_height'] = $j(this.target_sequence_container).height(); |
207 | 218 | |
208 | 219 | |
209 | 220 | //add the container divs (with basic layout ~universal~ |
210 | | - $j('#'+this.sequence_container_id).html(''+ |
| 221 | + $j(this.target_sequence_container).html(''+ |
211 | 222 | '<div id="'+this.video_container_id+'" style="position:absolute;right:0px;top:0px;' + |
212 | 223 | 'width:'+this.video_width+'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+ |
213 | 224 | '<div id="'+this.sequence_tools_id+'" style="position:absolute;' + |
214 | | - 'left:0px;right:'+(this.video_width+10)+'px;top:0px;height:'+(this.video_height+28)+'px;border:solid thin black;"/>'+ |
| 225 | + 'left:0px;right:'+(this.video_width+15)+'px;top:0px;height:'+(this.video_height+23)+'px;"/>'+ |
215 | 226 | '<div id="'+this.timeline_id+'" style="position:absolute;' + |
216 | 227 | 'left:0px;right:0px;top:'+(this.video_height+10)+'px;bottom:25px;overflow:auto;">'+ |
217 | 228 | gM('loading_timeline')+ '</div>'+ |
218 | | - '<div id="' + this.sequence_container_id + '_status" style="position:absolute;left:0px;width:300px;"></div>'+ |
219 | | - '<div id="' + this.sequence_container_id + '_save_cancel" style="position:absolute;'+ |
| 229 | + '<div id="' + this.target_sequence_container + '_status" style="position:absolute;left:0px;width:300px;"></div>'+ |
| 230 | + '<div id="' + this.target_sequence_container + '_save_cancel" style="position:absolute;'+ |
220 | 231 | 'right:0px;bottom:0px;height:25px;overflow:hidden;">'+ |
221 | 232 | gM('loading_user_rights') + |
222 | 233 | '</div>' |
223 | 234 | ); |
224 | 235 | |
225 | | - js_log('set: '+this.sequence_container_id + ' html to:'+ "\n"+ |
226 | | - $j('#'+this.sequence_container_id).html() |
| 236 | + js_log('set: '+this.target_sequence_container + ' html to:'+ "\n"+ |
| 237 | + $j(this.target_sequence_container).html() |
227 | 238 | ); |
228 | 239 | //first check if we got a cloned PL object: |
229 | 240 | //(when the editor is invoked with the plalylist already on the page) |
— | — | @@ -258,7 +269,7 @@ |
259 | 270 | 'solid gray;font-size:1.2em;" ">' + |
260 | 271 | gM('edit_cancel') + '</a> '; |
261 | 272 | if( this.sequenceEditToken ){ |
262 | | - $j('#'+this.sequence_container_id+'_save_cancel').html( cancel_button + |
| 273 | + $j(this.target_sequence_container+'_save_cancel').html( cancel_button + |
263 | 274 | '<a style="border:solid gray;font-size:1.2em;" href="#" onClick="'+this.instance_name+'.getSeqOutputJSON()">'+ |
264 | 275 | 'Preview Json Output'+ |
265 | 276 | '</a>' + |
— | — | @@ -266,7 +277,7 @@ |
267 | 278 | 'Preview XML Output (will be save shortly) ' + |
268 | 279 | '</a>'); |
269 | 280 | }else{ |
270 | | - $j('#'+this.sequence_container_id+'_save_cancel').html( cancel_button + gM('no_edit_permissions') ); |
| 281 | + $j(this.target_sequence_container+'_save_cancel').html( cancel_button + gM('no_edit_permissions') ); |
271 | 282 | } |
272 | 283 | //assing bindings |
273 | 284 | $j('#mv_cancel_seq_button').unbind().click(function(){ |
— | — | @@ -462,7 +473,7 @@ |
463 | 474 | //propagate the edit tokens |
464 | 475 | //if on an edit page just grab from the form: |
465 | 476 | this.sequenceEditToken = $j('input[wpEditToken]').val(); |
466 | | - if(typeof this.sequenceEditToken == 'undefined'){ |
| 477 | + if(typeof this.sequenceEditToken == 'undefined' && this.getLocalApiUrl()!=null){ |
467 | 478 | var reqObj = { |
468 | 479 | 'action':'query', |
469 | 480 | 'prop':'info', |
— | — | @@ -523,31 +534,46 @@ |
524 | 535 | } |
525 | 536 | |
526 | 537 | |
527 | | - //render the menu: |
528 | | - var menu_html = '<ul id="seq_menu">'; |
| 538 | + //render the menu tabs:: |
529 | 539 | var item_containers =''; |
530 | | - |
531 | | - $j.each(this.menu_items, function(inx, menu_item){ |
532 | | - var disp_style = (menu_item.d)?'inline':'none'; |
533 | | - var sel_class = (menu_item.d)?'class="mv_selected_item"':''; |
534 | | - menu_html+='<li '+sel_class+' id="mv_menu_item_'+inx+'">' + gM('menu_' + inx ) +'</li>'; |
535 | | - item_containers += '<div class="seq_control_container" id="' + inx + |
536 | | - '_ic" style="display:' + disp_style +';">' |
537 | | - item_containers += (menu_item.html) ? menu_item.html : '<h3>' + gM('menu_'+inx) + '</h3>'; |
538 | | - item_containers +='</div>'; |
| 540 | + var inx = 0; |
| 541 | + var selected_tab = 0; |
| 542 | + var tabc =''; |
| 543 | + var o='<div id="seq_menu" style="width:100%;height:100%">'; |
| 544 | + o+='<ul>'; |
| 545 | + $j.each(this.menu_items, function(tab_id, menu_item){ |
| 546 | + if(menu_item.d) |
| 547 | + selected_tab=inx; |
| 548 | + |
| 549 | + o+='<li>' + |
| 550 | + '<a id="mv_menu_item_'+tab_id+'" href="#tab-ic-' + tab_id + '">'+gM('menu_' + tab_id )+ |
| 551 | + '</li>'; |
| 552 | + |
| 553 | + tabc += '<div id="tab-ic-' + tab_id + '" >'; |
| 554 | + tabc += (menu_item.html) ? menu_item.html : '<h3>' + gM('menu_'+tab_id) + '</h3>'; |
| 555 | + tabc +='</div>'; |
| 556 | + |
| 557 | + inx++; |
539 | 558 | }); |
540 | | - menu_html+='</ul>'; |
541 | | - |
542 | | - item_containers+='<div class="seq_control_container" id="welcome_ic">' + gM('mv_welcome_to_sequencer') + '</div>'; |
| 559 | + o+='</ul>'; |
| 560 | + o+=tabc; |
543 | 561 | |
544 | | - $j('#'+this.sequence_tools_id).html( menu_html + item_containers ); |
| 562 | + $j('#'+this.sequence_tools_id).html( o ); |
545 | 563 | |
| 564 | + $j("#seq_menu").tabs({ |
| 565 | + selected:selected_tab, |
| 566 | + select: function(event, ui) { |
| 567 | + this_seq.disp( $j(ui.tab).attr('id').replace('mv_menu_item_', '') ); |
| 568 | + } |
| 569 | + //add sorting |
| 570 | + }).find(".ui-tabs-nav").sortable({axis:'x'}); |
| 571 | + |
546 | 572 | //add binding for menu |
547 | | - $j('#seq_menu li').click(function(){ |
| 573 | + /*$j('#seq_menu li').click(function(){ |
548 | 574 | $j('#seq_menu li').removeClass('mv_selected_item'); |
549 | 575 | $j(this).addClass('mv_selected_item'); |
550 | 576 | this_seq.disp( $j(this).attr('id').replace('mv_menu_item_','') ); |
551 | | - }); |
| 577 | + });*/ |
552 | 578 | |
553 | 579 | //load init content into containers |
554 | 580 | this.setupMenuItems(); |
— | — | @@ -1332,10 +1358,10 @@ |
1333 | 1359 | //remove the old one if its still there |
1334 | 1360 | $j('#'+this.timeline_id +'_pl_control').remove(); |
1335 | 1361 | //render out a playlist clip wide and all the way to the right (only playhead and play button) (outside of timeline) |
1336 | | - $j('#'+this.sequence_container_id).append('<div id="'+ this.timeline_id +'_pl_control"'+ |
| 1362 | + $j(this.target_sequence_container).append('<div id="'+ this.timeline_id +'_pl_control"'+ |
1337 | 1363 | ' style="position:absolute;top:' + (this.plObj.height) +'px;'+ |
1338 | 1364 | 'right:1px;width:'+this.plObj.width+'px;height:'+this.plObj.org_control_height+'" '+ |
1339 | | - 'class="videoPlayer"><div class="controls">'+ |
| 1365 | + 'class="videoPlayer"><div class="ui-widget ui-corner-bottom ui-state-default controls">'+ |
1340 | 1366 | this.plObj.getControlsHTML() + |
1341 | 1367 | '</div>'+ |
1342 | 1368 | '</div>'); |
Index: branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js |
— | — | @@ -47,8 +47,8 @@ |
48 | 48 | 'profile': 'inpage' //the given profile either "inpage" or "sequence" |
49 | 49 | //timeline invokes the timeline editor (letting you set keyframes) |
50 | 50 | } |
51 | | -var mvClipEdit = function(initObj) { |
52 | | - return this.init(initObj); |
| 51 | +var mvClipEdit = function(iObj) { |
| 52 | + return this.init(iObj); |
53 | 53 | }; |
54 | 54 | mvClipEdit.prototype = { |
55 | 55 | |
— | — | @@ -56,11 +56,11 @@ |
57 | 57 | crop: null, //the crop values |
58 | 58 | base_img_src:null, |
59 | 59 | |
60 | | - init:function( initObj){ |
| 60 | + init:function( iObj){ |
61 | 61 | //init object: |
62 | 62 | for(var i in default_clipedit_values){ |
63 | | - if( initObj[i] ){ |
64 | | - this[i] = initObj[i]; |
| 63 | + if( iObj[i] ){ |
| 64 | + this[i] = iObj[i]; |
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
Index: branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/mv_sequence.css |
— | — | @@ -144,7 +144,7 @@ |
145 | 145 | .mv_adjust_click{ |
146 | 146 | cursor:pointer; |
147 | 147 | } |
148 | | - |
| 148 | +/* |
149 | 149 | #seq_menu{ |
150 | 150 | list-style-type:none; |
151 | 151 | list-style-position:outside; |
— | — | @@ -161,6 +161,7 @@ |
162 | 162 | #seq_menu li a{ |
163 | 163 | color:#fff; |
164 | 164 | } |
| 165 | +*/ |
165 | 166 | .seq_control_container{ |
166 | 167 | position:absolute; |
167 | 168 | top:40px; |
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -615,14 +615,14 @@ |
616 | 616 | mvJsLoader.jQueryCheck(function(){ |
617 | 617 | //load search specifc extra stuff |
618 | 618 | mvJsLoader.doLoad({ |
619 | | - 'remoteSearchDriver' : 'libAddMedia/remoteSearchDriver.js', |
620 | | - '$j.cookie' : 'jquery/' + jQueryUiVN + '/external/cookie/jquery.cookie.js', |
621 | | - '$j.ui' : 'jquery/' + jQueryUiVN + '/ui/ui.core.js', |
622 | | - '$j.ui.resizable' : 'jquery/' + jQueryUiVN + '/ui/ui.resizable.js', |
623 | | - '$j.ui.draggable' : 'jquery/' + jQueryUiVN + '/ui/ui.draggable.js', |
624 | | - '$j.ui.dialog' : 'jquery/' + jQueryUiVN + '/ui/ui.dialog.js', |
625 | | - '$j.ui.tabs' : 'jquery/' + jQueryUiVN + '/ui/ui.tabs.js', |
626 | | - '$j.ui.sortable' : 'jquery/' + jQueryUiVN + '/ui/ui.sortable.js' |
| 619 | + 'remoteSearchDriver' : 'libAddMedia/remoteSearchDriver.js', |
| 620 | + '$j.cookie' : 'jquery/' + jQueryUiVN + '/external/cookie/jquery.cookie.js', |
| 621 | + '$j.ui' : 'jquery/' + jQueryUiVN + '/ui/ui.core.js', |
| 622 | + '$j.ui.resizable' : 'jquery/' + jQueryUiVN + '/ui/ui.resizable.js', |
| 623 | + '$j.ui.draggable' : 'jquery/' + jQueryUiVN + '/ui/ui.draggable.js', |
| 624 | + '$j.ui.dialog' : 'jquery/' + jQueryUiVN + '/ui/ui.dialog.js', |
| 625 | + '$j.ui.tabs' : 'jquery/' + jQueryUiVN + '/ui/ui.tabs.js', |
| 626 | + '$j.ui.sortable' : 'jquery/' + jQueryUiVN + '/ui/ui.sortable.js' |
627 | 627 | }, function(){ |
628 | 628 | iObj['instance_name']= 'rsdMVRS'; |
629 | 629 | _global['rsdMVRS'] = new remoteSearchDriver( iObj ); |
— | — | @@ -631,7 +631,37 @@ |
632 | 632 | }); |
633 | 633 | }); |
634 | 634 | } |
635 | | - |
| 635 | + $.fn.sequencer = function( iObj, callback){ |
| 636 | + //debugger; |
| 637 | + iObj['target_sequence_container'] = this.selector; |
| 638 | + //issue a request to get the css file (if not already included): |
| 639 | + loadExternalCss( mv_jquery_skin_path + 'jquery-ui-1.7.1.custom.css'); |
| 640 | + loadExternalCss( mv_embed_path+'skins/'+mv_skin_name+'/mv_sequence.css'); |
| 641 | + //make sure we have the required mv_embed libs (they are not loaded when no video element is on the page) |
| 642 | + mvJsLoader.embedVideoCheck(function(){ |
| 643 | + //load playlist object and drag,drop,resize,hoverintent,libs |
| 644 | + mvJsLoader.doLoad({ |
| 645 | + 'mvPlayList' : 'libSequencer/mvPlayList.js', |
| 646 | + '$j.ui' : 'jquery/' + jQueryUiVN + '/ui/ui.core.js', |
| 647 | + '$j.ui.droppable' : 'jquery/' + jQueryUiVN + '/ui/ui.droppable.js', |
| 648 | + '$j.ui.draggable' : 'jquery/' + jQueryUiVN + '/ui/ui.draggable.js', |
| 649 | + '$j.ui.sortable' : 'jquery/' + jQueryUiVN + '/ui/ui.sortable.js', |
| 650 | + '$j.ui.resizable' : 'jquery/' + jQueryUiVN + '/ui/ui.resizable.js', |
| 651 | + '$j.ui.slider' : 'jquery/' + jQueryUiVN + '/ui/ui.slider.js', |
| 652 | + '$j.ui.tabs' : 'jquery/' + jQueryUiVN + '/ui/ui.tabs.js', |
| 653 | + '$j.contextMenu' : 'jquery/plugins/jquery.contextMenu.js', |
| 654 | + 'mvSequencer' : 'libSequencer/mvSequencer.js' |
| 655 | + },function(){ |
| 656 | + js_log('calling new mvSequencer'); |
| 657 | + //init the sequence object (it will take over from there) no more than one mvSeq obj for now: |
| 658 | + if(!_global['mvSeq']){ |
| 659 | + _global['mvSeq'] = new mvSequencer(iObj); |
| 660 | + }else{ |
| 661 | + js_log('mvSeq already init'); |
| 662 | + } |
| 663 | + }); |
| 664 | + }); |
| 665 | + } |
636 | 666 | $.fn.firefogg = function( iObj, callback ) { |
637 | 667 | |
638 | 668 | //add base theme css: |
— | — | @@ -723,37 +753,6 @@ |
724 | 754 | |
725 | 755 | })(jQuery); |
726 | 756 | } |
727 | | - |
728 | | -/* init the sequencer */ |
729 | | -function mv_do_sequence(initObj){ |
730 | | - //debugger; |
731 | | - //issue a request to get the css file (if not already included): |
732 | | - loadExternalCss( mv_jquery_skin_path + 'jquery-ui-1.7.1.custom.css'); |
733 | | - loadExternalCss(mv_embed_path+'skins/'+mv_skin_name+'/mv_sequence.css'); |
734 | | - //make sure we have the required mv_embed libs (they are not loaded when no video element is on the page) |
735 | | - mvJsLoader.embedVideoCheck(function(){ |
736 | | - //load playlist object and drag,drop,resize,hoverintent,libs |
737 | | - mvJsLoader.doLoad({ |
738 | | - 'mvPlayList' : 'libSequencer/mvPlayList.js', |
739 | | - '$j.ui' : 'jquery/' + jQueryUiVN + '/ui/ui.core.js', |
740 | | - '$j.ui.droppable' : 'jquery/' + jQueryUiVN + '/ui/ui.droppable.js', |
741 | | - '$j.ui.draggable' : 'jquery/' + jQueryUiVN + '/ui/ui.draggable.js', |
742 | | - '$j.ui.sortable' : 'jquery/' + jQueryUiVN + '/ui/ui.sortable.js', |
743 | | - '$j.ui.resizable' : 'jquery/' + jQueryUiVN + '/ui/ui.resizable.js', |
744 | | - '$j.ui.slider' : 'jquery/' + jQueryUiVN + '/ui/ui.slider.js', |
745 | | - '$j.contextMenu' : 'jquery/plugins/jquery.contextMenu.js', |
746 | | - 'mvSequencer' : 'libSequencer/mvSequencer.js' |
747 | | - },function(){ |
748 | | - js_log('calling new mvSequencer'); |
749 | | - //init the sequence object (it will take over from there) no more than one mvSeq obj: |
750 | | - if(!_global['mvSeq']){ |
751 | | - _global['mvSeq'] = new mvSequencer(initObj); |
752 | | - }else{ |
753 | | - js_log('mvSeq already init'); |
754 | | - } |
755 | | - }); |
756 | | - }); |
757 | | -} |
758 | 757 | /* |
759 | 758 | * utility functions: |
760 | 759 | */ |
Index: branches/new-upload/phase3/js2/uploadPage.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | //an api url (we won't submit directly to action of the form) |
17 | 17 | 'api_url' : wgServer + wgScriptPath + '/api.php', |
18 | 18 | 'form_rewrite': true, |
19 | | - 'new_source_cb' : function( orgFilename, oggName ){ |
| 19 | + 'new_source_cb' : function( orgFilename, oggName ){ |
20 | 20 | $j('#wpDestFile').val( oggName ); |
21 | 21 | mwUploadHelper.doDestCheck(); |
22 | 22 | } |