r51486 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51485‎ | r51486 | r51487 >
Date:01:43, 5 June 2009
Author:dale
Status:deferred
Tags:
Comment:
sequence style updates and minor fixes
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/example_usage/Sequence_Editor.html (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mediaWikiUploadHelper.OFF.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/archiveOrgSearch.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/baseRemoteSearch.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/flickrSearch.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/metavidSearch.js (modified) (history)
  • /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/libSequencer/mvPlayList.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/mv_embed.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/mv_sequence.css (modified) (history)
  • /branches/new-upload/phase3/js2/uploadPage.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/example_usage/Sequence_Editor.html
@@ -4,31 +4,20 @@
55 <head>
66 <title>Simple SMIL example</title>
77 <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>
815 </head>
916 <body>
1017 <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 - &lt;-- code used: <br />
26 - <pre> &lt;playlist id=&quot;smil_pl&quot; src=&quot;media/sample_smil.xml&quot;&gt;</pre>
27 -
28 - </td>
29 - </tr>
30 -
31 - </table>
32 - <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />&nbsp;
 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+
3322 </body>
3423 </html>
3524
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 );
44 };
55 mediaWikiSearch.prototype = {
6 - init:function( initObj ){
 6+ init:function( iObj ){
77 //init base class and inherit:
8 - var baseSearch = new baseRemoteSearch( initObj );
 8+ var baseSearch = new baseRemoteSearch( iObj );
99 for(var i in baseSearch){
1010 if(typeof this[i] =='undefined'){
1111 this[i] = baseSearch[i];
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/baseRemoteSearch.js
@@ -20,8 +20,8 @@
2121 'category' : '.media:category@label|url'
2222 }
2323
24 -var baseRemoteSearch = function(initObj) {
25 - return this.init(initObj);
 24+var baseRemoteSearch = function(iObj) {
 25+ return this.init(iObj);
2626 };
2727 baseRemoteSearch.prototype = {
2828
@@ -37,10 +37,10 @@
3838 num_results :0,
3939
4040 //init the object:
41 - init: function( initObj ){
 41+ init: function( iObj ){
4242 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];
4545 }
4646 return this;
4747 },
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/archiveOrgSearch.js
@@ -2,16 +2,16 @@
33 //more about solr here:
44 //http://lucene.apache.org/solr/
55
6 -var archiveOrgSearch = function ( initObj){
7 - return this.init( initObj );
 6+var archiveOrgSearch = function ( iObj){
 7+ return this.init( iObj );
88 }
99 archiveOrgSearch.prototype = {
1010 //archive.org constants:
1111 dnUrl:'http://www.archive.org/download/',
1212 dtUrl:'http://www.archive.org/details/',
13 - init:function( initObj ){
 13+ init:function( iObj ){
1414 //init base class and inherit:
15 - var baseSearch = new baseRemoteSearch( initObj );
 15+ var baseSearch = new baseRemoteSearch( iObj );
1616 for(var i in baseSearch){
1717 if(typeof this[i] =='undefined'){
1818 this[i] = baseSearch[i];
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/metavidSearch.js
@@ -4,17 +4,17 @@
55 loadGM( {
66 "mv_stream_title" : "$1 $2 to $3"
77 });
8 -var metavidSearch = function(initObj) {
9 - return this.init(initObj);
 8+var metavidSearch = function(iObj) {
 9+ return this.init(iObj);
1010 };
1111 metavidSearch.prototype = {
1212 reqObj:{ //set up the default request paramaters
1313 'order':'recent',
1414 'feed_format':'rss'
1515 },
16 - init:function( initObj ){
 16+ init:function( iObj ){
1717 //init base class and inherit:
18 - var baseSearch = new baseRemoteSearch( initObj );
 18+ var baseSearch = new baseRemoteSearch( iObj );
1919 for(var i in baseSearch){
2020 if(typeof this[i] =='undefined'){
2121 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 );
44 }
55 flickrOrgSearch.prototype = {
6 - init:function( initObj ){
 6+ init:function( iObj ){
77 //init base class and inherit:
8 - var baseSearch = new baseRemoteSearch( initObj );
 8+ var baseSearch = new baseRemoteSearch( iObj );
99 for(var i in baseSearch){
1010 if(typeof this[i] =='undefined'){
1111 this[i] = baseSearch[i];
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js
@@ -1,5 +1,5 @@
22 /*
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)
44 */
55
66 //@@todo put all msg text into loadGM json
@@ -15,8 +15,8 @@
1616
1717 });
1818
19 -var mvAdvFirefogg = function( initObj ){
20 - return this.init( initObj );
 19+var mvAdvFirefogg = function( iObj ){
 20+ return this.init( iObj );
2121 }
2222 var default_mvAdvFirefogg_config = {
2323 //which config groups to include
@@ -231,15 +231,15 @@
232232 'help' : "Contact link"
233233 }
234234 },
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){
238238 if( typeof default_mvAdvFirefogg_config [i] != 'undefined' ){
239 - this[i] = initObj[i];
 239+ this[i] = iObj[i];
240240 }
241241 }
242242 //inherit the base mvFirefogg class:
243 - var myFogg = new mvFirefogg( initObj );
 243+ var myFogg = new mvFirefogg( iObj );
244244 for(var i in myFogg){
245245 if( typeof this[i] != 'undefined'){
246246 this[ 'basefogg_' + i ] = myFogg[i];
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js
@@ -1,12 +1,13 @@
22 /*the sequence remote search driver
33 extends the base remote search driver with sequence specific stuff. could seperate this out into seperate lib.
44 */
5 -var seqRemoteSearchDriver = function(initObj){
6 - return this.init( initObj )
 5+var seqRemoteSearchDriver = function(iObj){
 6+ return this.init( iObj )
77 }
88 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 );
1112 for(var i in tmpRSD){
1213 if(this[i]){
1314 this['parent_'+i] = tmpRSD[i];
@@ -27,7 +28,7 @@
2829 var clip_key ='';
2930
3031 //@@todo support multiple target tracks
31 - $j('.mv_clip_box_result').draggable({
 32+ $j( '.mv_clip_box_result' ).draggable({
3233 start:function(){
3334 source_pos = $j(this).offset();
3435 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 @@
5555 }
5656
5757
58 -var mvFirefogg = function(initObj){
59 - return this.init( initObj );
 58+var mvFirefogg = function(iObj){
 59+ return this.init( iObj );
6060 }
6161 mvFirefogg.prototype = { //extends mvBaseUploadInterface
6262
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -68,8 +68,8 @@
6969 /*
7070 * base remoteSearch Driver interface
7171 */
72 -var remoteSearchDriver = function(initObj){
73 - return this.init( initObj );
 72+var remoteSearchDriver = function(iObj){
 73+ return this.init( iObj );
7474 }
7575 remoteSearchDriver.prototype = {
7676 results_cleared:false,
@@ -296,12 +296,12 @@
297297 cUpLoader : null,
298298 cEdit : null,
299299
300 - init: function( initObj ){
 300+ init: function( iObj ){
301301 var _this = this;
302302 js_log('remoteSearchDriver:init');
303303 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];
306306 }else{
307307 this[ i ] = default_remote_search_options[i];
308308 }
@@ -1096,7 +1096,7 @@
10971097 //or if import mode if just "linking"
10981098 if( this.checkRepoLocal( cp ) || this.import_url_mode == 'remote_html_embed'){
10991099 //local repo jump directly to check Import Resource callback:
1100 - cir_callback( rObj );
 1100+ cir_callback( rObj );
11011101 }else{
11021102 //not a local domain update target resource name with the prefix:
11031103 rObj.target_resource_title = cp.resource_prefix +rObj.target_resource_title;
@@ -1370,10 +1370,10 @@
13711371 var _this = this;
13721372
13731373 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);
13751375 }else{
1376 - _this.cur_embed_code = rObj.pSobj.getEmbedWikiCode( rObj );
1377 - }
 1376+ _this.cur_embed_code = rObj.pSobj.getEmbedWikiCode( rObj );
 1377+ }
13781378
13791379 //insert at start if textInput cursor has not been set (ie == length)
13801380 if( _this.caret_pos && _this.caret_pos.text){
@@ -1410,12 +1410,12 @@
14111411
14121412 //also update the render area:
14131413 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+ });
14201420 }
14211421 });
14221422 },
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mediaWikiUploadHelper.OFF.js
@@ -38,8 +38,8 @@
3939 'api_url':false
4040 }
4141
42 -var mediaWikiUploadHelper = function(initObj){
43 - return this.init( initObj );
 42+var mediaWikiUploadHelper = function(iObj){
 43+ return this.init( iObj );
4444 }
4545 mediaWikiUploadHelper.prototype = {
4646 init:function( iObj ){
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js
@@ -129,10 +129,9 @@
130130 debugger;
131131 */
132132 //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+ });
137136
138137 },
139138 selectPlaybackMethod:function(){
@@ -387,10 +386,11 @@
388387 '</div>'+
389388 '</div>'
390389 );
 390+
391391 //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+ );
395395 //once the controls are in the DOM add hooks:
396396 ctrlBuilder.addControlHooks(this);
397397
@@ -463,11 +463,13 @@
464464 seconds2npt( this.getDuration() ) + '</i>');
465465
466466 //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
467469 if( typeof wgEnableWriteAPI != 'undefined'){
468470 $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;'} )
471472 );
 473+ //do binding:
472474 }
473475 //render out the dividers on the timeline:
474476 this.colorPlayHead();
@@ -2017,8 +2019,8 @@
20182020 return this.clipList;
20192021 }
20202022 }
2021 - var trackObj = function( initObj ){
2022 - return this.init( initObj );
 2023+ var trackObj = function( iObj ){
 2024+ return this.init( iObj );
20232025 }
20242026 var supported_track_attr =
20252027 trackObj.prototype = {
@@ -2030,16 +2032,16 @@
20312033 'desc:'
20322034 ),
20332035 disp_mode:'timeline_thumb',
2034 - init : function(initObj){
2035 - if(!initObj)
2036 - initObj={};
 2036+ init : function(iObj){
 2037+ if(!iObj)
 2038+ iObj={};
20372039 //make sure clips is new:
20382040 this.clips = new Array();
20392041
20402042 var _this = this;
20412043 $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];
20442046 });
20452047 },
20462048 //returns the values of supported_attributes:
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js
@@ -7,8 +7,10 @@
88 * @author Michael Dale
99 * @email dale@ucsc.edu
1010 * @url http://metavid.org
11 - *
1211 *
 12+ * @further developed in open source collaboration with kaltura.
 13+ * more info at http://kaltura.com
 14+ *
1315 * mv_sequencer.js
1416 * is a basic embeddeble sequencer.
1517 * extends the playlist with drag/drop/sortable/add/remove functionality
@@ -62,7 +64,14 @@
6365 var sequencerDefaultValues = {
6466
6567 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+
6776 video_container_id:'mv_video_container',
6877
6978 video_width : 400,
@@ -91,8 +100,10 @@
92101 //stores the clipboard edit token (if user has rights to edit their User page)
93102 clipboardEditToken:null,
94103 //stores the sequence edit token (if user has rights to edit the current sequence)
95 - sequenceEditToken:null,
 104+ sequenceEditToken:null,
 105+
96106
 107+
97108 //Msg are all the language specific values ...
98109 // (@@todo overwrite by msg values preloaded in the page)
99110 //tack/clips can be pushed via json or inline playlist format
@@ -105,8 +116,8 @@
106117 //trackObj used to payload playlist Track Object (when inline not present)
107118 tracks:{}
108119 }
109 -var mvSequencer = function(initObj) {
110 - return this.init(initObj);
 120+var mvSequencer = function(iObj) {
 121+ return this.init(iObj);
111122 };
112123 //set up the mvSequencer object
113124 mvSequencer.prototype = {
@@ -176,53 +187,53 @@
177188 key_ctrl_down:false,
178189 inputFocus:false,
179190
180 - init:function( initObj ){
 191+ init:function( iObj ){
181192 //set up pointer to this_seq for current scope:
182193 var this_seq = this;
183194 //set the default values:
184195 for(var i in sequencerDefaultValues){
185196 this[ i ] = sequencerDefaultValues[i];
186197 }
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];
191202 }
192203 }
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');
195206 return false;
196207 }
197208
198209 //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");
201212 return false;
202213 }
203214
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();
207218
208219
209220 //add the container divs (with basic layout ~universal~
210 - $j('#'+this.sequence_container_id).html(''+
 221+ $j(this.target_sequence_container).html(''+
211222 '<div id="'+this.video_container_id+'" style="position:absolute;right:0px;top:0px;' +
212223 'width:'+this.video_width+'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+
213224 '<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;"/>'+
215226 '<div id="'+this.timeline_id+'" style="position:absolute;' +
216227 'left:0px;right:0px;top:'+(this.video_height+10)+'px;bottom:25px;overflow:auto;">'+
217228 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;'+
220231 'right:0px;bottom:0px;height:25px;overflow:hidden;">'+
221232 gM('loading_user_rights') +
222233 '</div>'
223234 );
224235
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()
227238 );
228239 //first check if we got a cloned PL object:
229240 //(when the editor is invoked with the plalylist already on the page)
@@ -258,7 +269,7 @@
259270 'solid gray;font-size:1.2em;" ">' +
260271 gM('edit_cancel') + '</a> ';
261272 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 +
263274 '<a style="border:solid gray;font-size:1.2em;" href="#" onClick="'+this.instance_name+'.getSeqOutputJSON()">'+
264275 'Preview Json Output'+
265276 '</a>' +
@@ -266,7 +277,7 @@
267278 'Preview XML Output (will be save shortly) ' +
268279 '</a>');
269280 }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') );
271282 }
272283 //assing bindings
273284 $j('#mv_cancel_seq_button').unbind().click(function(){
@@ -462,7 +473,7 @@
463474 //propagate the edit tokens
464475 //if on an edit page just grab from the form:
465476 this.sequenceEditToken = $j('input[wpEditToken]').val();
466 - if(typeof this.sequenceEditToken == 'undefined'){
 477+ if(typeof this.sequenceEditToken == 'undefined' && this.getLocalApiUrl()!=null){
467478 var reqObj = {
468479 'action':'query',
469480 'prop':'info',
@@ -523,31 +534,46 @@
524535 }
525536
526537
527 - //render the menu:
528 - var menu_html = '<ul id="seq_menu">';
 538+ //render the menu tabs::
529539 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++;
539558 });
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;
543561
544 - $j('#'+this.sequence_tools_id).html( menu_html + item_containers );
 562+ $j('#'+this.sequence_tools_id).html( o );
545563
 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+
546572 //add binding for menu
547 - $j('#seq_menu li').click(function(){
 573+ /*$j('#seq_menu li').click(function(){
548574 $j('#seq_menu li').removeClass('mv_selected_item');
549575 $j(this).addClass('mv_selected_item');
550576 this_seq.disp( $j(this).attr('id').replace('mv_menu_item_','') );
551 - });
 577+ });*/
552578
553579 //load init content into containers
554580 this.setupMenuItems();
@@ -1332,10 +1358,10 @@
13331359 //remove the old one if its still there
13341360 $j('#'+this.timeline_id +'_pl_control').remove();
13351361 //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"'+
13371363 ' style="position:absolute;top:' + (this.plObj.height) +'px;'+
13381364 '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">'+
13401366 this.plObj.getControlsHTML() +
13411367 '</div>'+
13421368 '</div>');
Index: branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js
@@ -47,8 +47,8 @@
4848 'profile': 'inpage' //the given profile either "inpage" or "sequence"
4949 //timeline invokes the timeline editor (letting you set keyframes)
5050 }
51 -var mvClipEdit = function(initObj) {
52 - return this.init(initObj);
 51+var mvClipEdit = function(iObj) {
 52+ return this.init(iObj);
5353 };
5454 mvClipEdit.prototype = {
5555
@@ -56,11 +56,11 @@
5757 crop: null, //the crop values
5858 base_img_src:null,
5959
60 - init:function( initObj){
 60+ init:function( iObj){
6161 //init object:
6262 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];
6565 }
6666 }
6767
Index: branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/mv_sequence.css
@@ -144,7 +144,7 @@
145145 .mv_adjust_click{
146146 cursor:pointer;
147147 }
148 -
 148+/*
149149 #seq_menu{
150150 list-style-type:none;
151151 list-style-position:outside;
@@ -161,6 +161,7 @@
162162 #seq_menu li a{
163163 color:#fff;
164164 }
 165+*/
165166 .seq_control_container{
166167 position:absolute;
167168 top:40px;
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js
@@ -615,14 +615,14 @@
616616 mvJsLoader.jQueryCheck(function(){
617617 //load search specifc extra stuff
618618 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'
627627 }, function(){
628628 iObj['instance_name']= 'rsdMVRS';
629629 _global['rsdMVRS'] = new remoteSearchDriver( iObj );
@@ -631,7 +631,37 @@
632632 });
633633 });
634634 }
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+ }
636666 $.fn.firefogg = function( iObj, callback ) {
637667
638668 //add base theme css:
@@ -723,37 +753,6 @@
724754
725755 })(jQuery);
726756 }
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 -}
758757 /*
759758 * utility functions:
760759 */
Index: branches/new-upload/phase3/js2/uploadPage.js
@@ -15,7 +15,7 @@
1616 //an api url (we won't submit directly to action of the form)
1717 'api_url' : wgServer + wgScriptPath + '/api.php',
1818 'form_rewrite': true,
19 - 'new_source_cb' : function( orgFilename, oggName ){
 19+ 'new_source_cb' : function( orgFilename, oggName ){
2020 $j('#wpDestFile').val( oggName );
2121 mwUploadHelper.doDestCheck();
2222 }

Status & tagging log