r73640 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73639‎ | r73640 | r73641 >
Date:20:52, 23 September 2010
Author:dale
Status:deferred
Tags:
Comment:
fixed empty sequence edit display
Modified paths:
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerServer.js (modified) (history)
  • /branches/MwEmbedStandAlone/remotes/mediaWiki.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -1598,11 +1598,12 @@
15991599 // Run embedPlayer sources hook
16001600 mw.runTriggersCallback( _this, 'checkPlayerSourcesEvent', function(){
16011601 _this.checkForTimedText();
1602 - })
1603 - }
 1602+ });
 1603+ };
16041604
1605 - // NOTE: Should could be moved to mediaWiki Api support module
1606 - if ( _this.apiTitleKey ) {
 1605+ // NOTE: Should could be moved to mediaWiki Api support module
 1606+ // only load from api if sources are empty:
 1607+ if ( _this.apiTitleKey && this.mediaElement.sources.length == 0) {
16071608 // Load media from external data
16081609 mw.log( 'EmbedPlayer::checkPlayerSources: loading apiTitleKey data' );
16091610 _this.loadSourceFromApi( function(){
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js
@@ -166,7 +166,7 @@
167167 _this.getMenu().drawMenu();
168168
169169 // initialize the edit stack to support undo / redo actions
170 - _this.getActionsEdit().setupEditStack();
 170+ _this.getActionsEdit().setupEditStack();
171171 });
172172
173173 },
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerServer.js
@@ -110,8 +110,13 @@
111111 // XXX need to support multipe pages in single context
112112 _this.currentSequencePage = _this.parseSequencerPage( smilPage );
113113 // Cache the latest serverSmil ( for local change checks )
114 - // ( save requests automatically respond with warnings on other user updates )
115 - _this.serverSmilXml = _this.currentSequencePage.sequenceXML ;
 114+ // ( save requests automatically respond with warnings on other user updates )
 115+ if( _this.currentSequencePage.sequenceXML ){
 116+ _this.serverSmilXml = _this.currentSequencePage.sequenceXML ;
 117+ } else {
 118+ // empty result
 119+ _this.serverSmilXml = '';
 120+ }
116121
117122 // Cache the pre / post bits
118123
@@ -143,8 +148,8 @@
144149 var endKey = SEQUENCER_PAYLOADKEY + ' -->';
145150 // If the key is not found fail
146151 if( !pageText || pageText.indexOf( startKey ) == -1 || pageText.indexOf(endKey) == -1 ){
147 - mw.log("Error could not find sequence payload");
148 - return '';
 152+ mw.log( "Error could not find sequence payload" );
 153+ return {};
149154 }
150155 // trim the output:
151156 return {
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js
@@ -363,7 +363,7 @@
364364 poster_attr = '';
365365 pheight = 0;
366366 }else{
367 - var poster_attr = 'poster = "' + $pimg.attr( 'src' ) + '" ';
 367+ var poster_attr = ' poster = "' + $pimg.attr( 'src' ) + '" ';
368368 var pheight = $pimg.attr( 'height' );
369369 }
370370

Status & tagging log