r72313 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72312‎ | r72313 | r72314 >
Date:21:16, 3 September 2010
Author:dale
Status:deferred
Tags:
Comment:
some fixes for group resource mode
fixed horizontal scroll of clip list
Modified paths:
  • /branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsEdit.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsView.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/css/mw.style.Sequencer.css (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.FirefoggRender.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerConfig.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerKeyBindings.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerRender.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTimeline.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/ui.layout/ui.layout-1.2.0.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js (modified) (history)
  • /branches/MwEmbedStandAlone/remotes/mediaWiki.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js
@@ -4,7 +4,7 @@
55 */
66 var urlparts = getRemoteEmbedPath();
77 var mwEmbedHostPath = urlparts[0];
8 -var mwRemoteVersion = 'r139';
 8+var mwRemoteVersion = 'r142';
99 var mwUseScriptLoader = true;
1010
1111 // Log the mwRemote version makes it easy to debug cache issues
@@ -30,7 +30,6 @@
3131 if( document.URL.indexOf( 'debug=true' ) !== -1 ){
3232 mwReqParam['debug'] = true;
3333 }
34 -
3534 // Check if debug mode and disable script grouping
3635 if( mwReqParam['debug'] ) {
3736 mwUseScriptLoader = false;
@@ -102,7 +101,7 @@
103102 window.ranMwRewrites = 'done';
104103
105104 // Add media wizard
106 - if ( ( wgAction == 'edit' && wgPageName.indexOf( "Sequence:" ) ) || wgAction == 'submit' ) {
 105+ if ( ( wgAction == 'edit' && wgPageName.indexOf( "Sequence:" ) ) || wgAction == 'submit' ) {
107106 loadMwEmbed( [
108107 'mw.RemoteSearchDriver',
109108 'mw.ClipEdit',
@@ -112,7 +111,7 @@
113112 '$j.ui.sortable'
114113 ], function() {
115114 mw.load( mwEmbedHostPath + '/remotes/AddMediaWizardEditPage.js?' + mwGetReqArgs() );
116 - } );
 115+ } );
117116 return ;
118117 }
119118
@@ -138,7 +137,7 @@
139138 return ;
140139 }
141140 }
142 -
 141+
143142 // Remote Sequencer
144143 if( wgPageName.indexOf( "Sequence:" ) === 0 ){
145144 //console.log( 'spl: ' + typeof mwSetPageToLoading );
@@ -155,8 +154,9 @@
156155 if( window.mwSequencerRemote ){
157156 window.mwSequencerRemote.drawUI();
158157 } else {
159 - loadMwEmbed( [ 'mw.MediaWikiRemoteSequencer', 'mw.style.SequencerRemote' ], function(){
160 - $j('#editform,.mw-newarticletext').hide();
 158+ mwLoadPlayer(function(){
 159+ // wait for wikieditor to do its thing
 160+ $j('#editform,.mw-newarticletext,#toolbar').hide();
161161 $j('.sequenceLoader').hide();
162162
163163 window.mwSequencerRemote = new mw.MediaWikiRemoteSequencer({
@@ -164,8 +164,10 @@
165165 'title' : wgTitle,
166166 'target' : '#bodyContent'
167167 });
168 - window.mwSequencerRemote.drawUI();
169 - } );
 168+ window.mwSequencerRemote.drawUI();
 169+
 170+ //setTimeout(function(){
 171+ })
170172 }
171173
172174 }
@@ -268,15 +270,17 @@
269271 function mwLoadPlayer( callback ){
270272
271273 // The jsPlayerRequest includes both javascript and style sheets for the embedPlayer
272 - var jsPlayerRequest = [
273 - 'mw.EmbedPlayer',
274 - 'mw.style.EmbedPlayer',
 274+ var jsPlayerRequest = [
275275 '$j.ui',
276276 '$j.widget',
277277 '$j.ui.mouse',
 278+
 279+ '$j.cookie',
 280+ 'mw.EmbedPlayer',
 281+ 'mw.style.EmbedPlayer',
 282+
278283 'mw.PlayerControlBuilder',
279 - '$j.fn.hoverIntent',
280 - '$j.cookie',
 284+ '$j.fn.hoverIntent',
281285 'JSON',
282286 '$j.ui.slider',
283287
@@ -291,8 +295,11 @@
292296 'mw.style.TimedText',
293297
294298 // mwSwarmTransport module
295 - 'mw.SwarmTransport'
 299+ 'mw.SwarmTransport',
296300
 301+ // Sequencer remote:
 302+ 'mw.MediaWikiRemoteSequencer',
 303+ 'mw.style.SequencerRemote'
297304 ];
298305 // Quick sniff use java if IE and native if firefox
299306 // ( other browsers will run detect and get on-demand )
@@ -579,6 +586,8 @@
580587 rurl += ',' + cName;
581588 }
582589 }
 590+ // force add our updated version of $j.cookie
 591+ rurl +=',$j.cookie';
583592
584593 // Add the remaining arguments
585594 rurl += '&' + mwGetReqArgs();
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
@@ -705,7 +705,7 @@
706706 */
707707 panZoomLayout: function( smilElement, $target, img ){
708708 var _this = this;
709 - mw.log( 'panZoomLayout:' + $j( smilElement).attr('id') );
 709+ //mw.log( 'panZoomLayout:' + $j( smilElement).attr('id') );
710710 var panZoom = $j( smilElement).attr('panZoom').split(',');
711711 if( !img ){
712712 var img = $j( '#' + this.smil.getSmilElementPlayerID( smilElement ) ).find('img').get(0);
@@ -731,7 +731,7 @@
732732 }
733733 // Get percent values
734734 var percentValues = _this.smil.getAnimate().getPercentFromPanZoomValues( panZoom, natrualSize );
735 - mw.log('panZoomLayout::' + 'l:' + percentValues.left + ' t:' + percentValues.top + ' w:' + percentValues.width + ' h:' + percentValues.height );
 735+ //mw.log('panZoomLayout::' + 'l:' + percentValues.left + ' t:' + percentValues.top + ' w:' + percentValues.width + ' h:' + percentValues.height );
736736 // Update the layout via the animation engine updateElementLayout method
737737 _this.smil.getAnimate().updateElementLayout( smilElement, percentValues, $target, img );
738738 });
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
@@ -435,7 +435,7 @@
436436 // xxx need to refactor move to "smilLayout"
437437 updateElementLayout: function( smilElement, percentValues, $target, htmlElement ){
438438 var _this = this;
439 - mw.log("updateElementLayout::" + ' ' + percentValues.left + ' ' + percentValues.top + ' ' + percentValues.width + ' ' + percentValues.height );
 439+ //mw.log("updateElementLayout::" + ' ' + percentValues.left + ' ' + percentValues.top + ' ' + percentValues.width + ' ' + percentValues.height );
440440
441441 // get a pointer to the html target:
442442 if( !$target ) {
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerConfig.js
@@ -6,38 +6,40 @@
77 * the mw.setConfig() method
88 *
99 */
 10+// Wrap in mw closure
 11+( function( mw ) {
 12+ // Define the class name
 13+ mw.SequencerConfig = true;
 14+
 15+ mw.setDefaultConfig({
 16+ // If the sequencer should attribute kaltura
 17+ "Sequencer.KalturaAttribution" : true,
 18+
 19+ // If a the sequencer should open new windows
 20+ "Sequencer.SpawnNewWindows" : true,
 21+
 22+ // If a the sequencer should include withJS=MediaWiki:mwEmbed in created urls
 23+ "Sequencer.WithJsMwEmbedUrlHelper" : true,
 24+
 25+ // The size of the undo stack
 26+ "Sequencer.NumberOfUndos" : 100,
 27+
 28+ // Default image duration
 29+ "Sequencer.AddMediaImageDuration" : 2,
 30+
 31+ // Default image source width
 32+ "Sequencer.AddMediaImageWidth" : 640,
 33+
 34+ // If a asset can be directly added to the sequence by url
 35+ // ( if disabled only urls that are part addMedia can be added )
 36+ "Sequencer.AddAssetByUrl" : true,
 37+
 38+ // Default timeline clip timeline track height
 39+ "Sequencer.TimelineTrackHeight" : 100,
 40+
 41+ // Default timeline audio or collapsed timeline height
 42+ "Sequencer.TimelineColapsedTrackSize" : 35
 43+ });
1044
11 -// Define the class name
12 -mw.SequencerConfig = true;
13 -
14 -mw.setDefaultConfig({
15 - // If the sequencer should attribute kaltura
16 - "Sequencer.KalturaAttribution" : true,
17 -
18 - // If a the sequencer should open new windows
19 - "Sequencer.SpawnNewWindows" : true,
20 -
21 - // If a the sequencer should include withJS=MediaWiki:mwEmbed in created urls
22 - // ( save gards ) against users that are 'trying' the
23 - "Sequencer.WithJsMwEmbedUrlHelper" : true,
24 -
25 - // The size of the undo stack
26 - "Sequencer.NumberOfUndos" : 100,
27 -
28 - // Default image duration
29 - "Sequencer.AddMediaImageDuration" : 2,
30 -
31 - // Default image source width
32 - "Sequencer.AddMediaImageWidth" : 640,
33 -
34 - // If a asset can be directly added to the sequence by url
35 - // ( if disabled only urls that are part addMedia can be added )
36 - "Sequencer.AddAssetByUrl" : true,
37 -
38 - // Default timeline clip timeline track height
39 - "Sequencer.TimelineTrackHeight" : 100,
40 -
41 - // Default timeline audio or collapsed timeline height
42 - "Sequencer.TimelineColapsedTrackSize" : 35
43 -})
 45+} )( window.mw );
4446
\ No newline at end of file
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerKeyBindings.js
@@ -78,5 +78,4 @@
7979 $j( _this ).trigger( 'delete' );
8080 } );
8181 }
82 -
83 -}
\ No newline at end of file
 82+};
\ No newline at end of file
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTimeline.js
@@ -64,9 +64,9 @@
6565 this.trackLayout.resizeAll();
6666 },
6767 getTimelineContainerHeight: function(){
68 - var _this = this;
 68+ var _this = this;
6969 // Start with vertical space for one more track
70 - var timelineHeight = mw.getConfig( 'Sequencer.TimelineTrackHeight' );
 70+ var timelineHeight = 60;
7171 var smilSequenceTracks = this.sequencer.getSmil().getBody().getSeqElements();
7272 $j.each(smilSequenceTracks, function( trackIndex, smilSequenceTrack ){
7373 timelineHeight+= _this.getSequenceTrackHeight( smilSequenceTrack )
Index: branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js
@@ -311,7 +311,7 @@
312312 .append(
313313 gM("mwe-sequencer-restore-text-edit", $j('<a />').click(function(){
314314 $j('#sequencerContainer').hide();
315 - $j('#editform').show();
 315+ $j('#editform,#toolbar').show();
316316 }) )
317317 )
318318 .css( {'cursor': 'pointer', 'font-size':'x-small' })
@@ -486,7 +486,7 @@
487487 'top' : '5px',
488488 'bottom' : '5px',
489489 'left' : '5px',
490 - 'right' : '5px',
 490+ 'right' : '6px',
491491 'background': '#FFF'
492492 })
493493 .append(
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.FirefoggRender.js
@@ -222,4 +222,4 @@
223223 this.doneRenderCallback( this.fogg )
224224 }
225225 }
226 -}
\ No newline at end of file
 226+};
\ No newline at end of file
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerRender.js
@@ -62,4 +62,4 @@
6363 }
6464 })
6565 }
66 -}
\ No newline at end of file
 66+};
\ No newline at end of file
Index: branches/MwEmbedStandAlone/modules/Sequencer/css/mw.style.Sequencer.css
@@ -5,7 +5,6 @@
66 top: 4px;
77 left:4px;
88 right: 4px;
9 -
109 }
1110
1211 .mwe-sequencer .trackNameContainer{
@@ -13,6 +12,7 @@
1413 }
1514 .mwe-sequencer .clipTrackSetContainer{
1615 overflow-x: scroll;
 16+ overflow-y: hidden !important;
1717 }
1818
1919 .mwe-sequencer .clipTrackSet{
Index: branches/MwEmbedStandAlone/modules/Sequencer/ui.layout/ui.layout-1.2.0.js
@@ -2503,5 +2503,5 @@
25042504 , cssHeight: cssH
25052505 };
25062506
2507 -}
 2507+};
25082508 })( jQuery );
\ No newline at end of file
Index: branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsEdit.js
@@ -123,4 +123,4 @@
124124 this.sequencer.getMenu().disableMenuItem( 'edit', 'redo' );
125125 }
126126 }
127 -}
\ No newline at end of file
 127+};
\ No newline at end of file
Index: branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js
@@ -512,4 +512,4 @@
513513 }
514514 );
515515 }
516 -}
\ No newline at end of file
 516+};
\ No newline at end of file
Index: branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsView.js
@@ -101,4 +101,4 @@
102102
103103 return formatted;
104104 }
105 -}
 105+};
\ No newline at end of file

Status & tagging log