Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | loadFromString: function( smilXmlString ) { |
112 | 112 | // Load the parsed string into the local "dom" |
113 | 113 | this.$dom = $j( this.getXMLDomObject( smilXmlString ) ); |
114 | | - mw.log("Smil::loadFromString: loaded smil dom: " + this.$dom.length + "\n" + smilXmlString ); |
| 114 | + mw.log("Smil::loadFromString: loaded smil dom: " + this.$dom.children().length + "\n" + smilXmlString ); |
115 | 115 | }, |
116 | 116 | /** |
117 | 117 | * Update the smil dom via an xmlString |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | return 0; |
300 | 300 | } |
301 | 301 | if ( this.duration == null || forceRefresh === true ) { |
302 | | - var orgDuration = this.duration |
| 302 | + var orgDuration = this.duration; |
303 | 303 | this.duration = this.getBody().getDuration( forceRefresh ); |
304 | 304 | // Trigger the duration change event: |
305 | 305 | if( orgDuration != this.duration ){ |
— | — | @@ -404,7 +404,7 @@ |
405 | 405 | // Escape link output as to not include scirpt execution |
406 | 406 | $j(link).attr('href', |
407 | 407 | mw.escapeQuotesHTML( $j(link).attr('href') ) |
408 | | - ) |
| 408 | + ); |
409 | 409 | }); |
410 | 410 | |
411 | 411 | // Make every asset url absolute and restrict domain of assets |
— | — | @@ -413,17 +413,17 @@ |
414 | 414 | if( $j(node).attr('src') ){ |
415 | 415 | $j(node).attr('src', |
416 | 416 | _this.getAssetUrl( $j(node).attr('src') ) |
417 | | - ) |
| 417 | + ); |
418 | 418 | } |
419 | 419 | if( $j(node).attr('data') ){ |
420 | 420 | $j(node).attr('data', |
421 | 421 | _this.getAssetUrl( $j(node).attr('src') ) |
422 | | - ) |
| 422 | + ); |
423 | 423 | } |
424 | | - // xxx don't know if we really need a form inside of smil. |
| 424 | + // remove form action |
425 | 425 | if( $j(node).attr('action') ){ |
426 | 426 | if( $j(node).attr('action').toLowerCase().indexOf('javascript') != -1 ){ |
427 | | - $j(node).attr('action')= null; |
| 427 | + $j(node).attr('action', ''); |
428 | 428 | } else { |
429 | 429 | $j(node).attr('action', |
430 | 430 | _this.getAssetUrl( $j(node).attr('src') ) |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js |
— | — | @@ -301,16 +301,17 @@ |
302 | 302 | * @param callback |
303 | 303 | */ |
304 | 304 | getSmil: function( callback ){ |
| 305 | + var _this = this; |
305 | 306 | if( !this.smil ) { |
306 | 307 | // Create the Smil engine object |
307 | 308 | this.smil = new mw.Smil( this ); |
308 | 309 | |
309 | 310 | // Load the smil |
310 | 311 | this.smil.loadFromUrl( this.getSrc(), function(){ |
311 | | - callback( this.smil ); |
| 312 | + callback( _this.smil ); |
312 | 313 | }); |
313 | 314 | } else { |
314 | | - callback( this.smil ); |
| 315 | + callback( _this.smil ); |
315 | 316 | } |
316 | 317 | }, |
317 | 318 | |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | if( smilXml == '' ){ |
189 | 189 | smilXml = _this.getNewSmilXML(); |
190 | 190 | } |
191 | | - _this.smilSource = _this.getDataUrl( smilXml ); |
| 191 | + _this.smilSource = _this.getDataUrl( smilXml ); |
192 | 192 | callback( _this.smilSource ) |
193 | 193 | }) |
194 | 194 | // Wait for server to return smil source |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerServer.js |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | mw.getTitleText( this.getApiUrl(), this.getTitleKey(), function( smilPage ){ |
110 | 110 | // Check for remote payload wrapper |
111 | 111 | // XXX need to support multiple pages in single context |
112 | | - _this.currentSequencePage = _this.parseSequencerPage( smilPage ); |
| 112 | + _this.currentSequencePage = _this.parseSequencerPage( smilPage ); |
113 | 113 | // Cache the latest serverSmil ( for local change checks ) |
114 | 114 | // ( save requests automatically respond with warnings on other user updates ) |
115 | 115 | if( _this.currentSequencePage.sequenceXML ){ |
— | — | @@ -118,8 +118,7 @@ |
119 | 119 | _this.serverSmilXml = ''; |
120 | 120 | } |
121 | 121 | |
122 | | - // Cache the pre / post bits |
123 | | - |
| 122 | + // Cache the pre / post bits |
124 | 123 | callback( _this.serverSmilXml ); |
125 | 124 | }) |
126 | 125 | }, |