r75123 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75122‎ | r75123 | r75124 >
Date:22:47, 20 October 2010
Author:reedy
Status:deferred
Tags:
Comment:
MFT 74986-74998

Delete MwEmbed for rebranch, svn is sucking at it
Modified paths:
  • /branches/querypage-work2/extensions (modified) (history)
  • /branches/querypage-work2/extensions/AddMediaWizard/AddMedia/AddMedia.i18n.php (modified) (history)
  • /branches/querypage-work2/extensions/AddMediaWizard/AddMedia/mw.UploadHandler.js (modified) (history)
  • /branches/querypage-work2/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)
  • /branches/querypage-work2/extensions/ConditionalShowSection (modified) (history)
  • /branches/querypage-work2/extensions/ContactPageFundraiser (modified) (history)
  • /branches/querypage-work2/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php (modified) (history)
  • /branches/querypage-work2/extensions/FundraiserPortal (modified) (history)
  • /branches/querypage-work2/extensions/HoneypotIntegration/HoneypotIntegration.class.php (modified) (history)
  • /branches/querypage-work2/extensions/LiquidThreads (modified) (history)
  • /branches/querypage-work2/extensions/LocalisationUpdate (modified) (history)
  • /branches/querypage-work2/extensions/Maps/includes/Maps_Layer.php (modified) (history)
  • /branches/querypage-work2/extensions/Maps/includes/services/OpenLayers/Maps_OpenLayers.php (modified) (history)
  • /branches/querypage-work2/extensions/Maps/includes/services/OpenLayers/OpenLayerFunctions.js (modified) (history)
  • /branches/querypage-work2/extensions/MwEmbed (deleted) (history)
  • /branches/querypage-work2/extensions/SVGZoom (modified) (history)
  • /branches/querypage-work2/extensions/SemanticMaps/RELEASE-NOTES (modified) (history)
  • /branches/querypage-work2/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php (modified) (history)
  • /branches/querypage-work2/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php (modified) (history)
  • /branches/querypage-work2/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayersFormInput.php (modified) (history)
  • /branches/querypage-work2/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayersQP.php (modified) (history)
  • /branches/querypage-work2/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Ask.php (modified) (history)
  • /branches/querypage-work2/extensions/StrategyWiki (modified) (history)
  • /branches/querypage-work2/extensions/StrategyWiki/ActiveStrategy (modified) (history)
  • /branches/querypage-work2/extensions/StringFunctionsEscaped (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/EmbedPlayer.loader.js (added) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/EmbedPlayer.resourceList.php (added) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/loader.js (deleted) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/kskin/mw.style.PlayerSkinKskin.css (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/mw.PlayerControlBuilder.js (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandler.hooks.php (added) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandler.php (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandlerHooks.php (deleted) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/TimedText/TimedText.i18n.php (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/TimedText/TimedText.resourceList.php (added) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/TimedText/loader.js (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/TimedText/mw.TimedText.js (modified) (history)
  • /branches/querypage-work2/extensions/TimedMediaHandler/TimedText/mw.TimedTextEdit.js (modified) (history)
  • /branches/querypage-work2/extensions/TrustedXFF (modified) (history)
  • /branches/querypage-work2/extensions/TrustedXFF/trusted-hosts.txt (modified) (history)
  • /branches/querypage-work2/extensions/UploadWizard/resources/mw.LanguageUpWiz.js (modified) (history)

Diff [purge]

Property changes on: branches/querypage-work2/extensions/CategoryTree/CategoryTreeFunctions.php
___________________________________________________________________
Modified: svn:mergeinfo
11 Merged /trunk/extensions/CategoryTree/CategoryTreeFunctions.php:r74986,74989,74991-74994,74998
Index: branches/querypage-work2/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Ask.php
@@ -23,7 +23,7 @@
2424 * @param Parser $parser
2525 */
2626 public static function render( Parser &$parser ) {
27 - global $smwgQEnabled, $smwgIQRunningNumber;
 27+ global $smwgQEnabled, $smwgIQRunningNumber, $wgTitle;
2828
2929 if ( $smwgQEnabled ) {
3030 $smwgIQRunningNumber++;
@@ -37,7 +37,13 @@
3838 $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) );
3939 }
4040
41 - SMWOutputs::commitToParser( $parser );
 41+ if ( $wgTitle->isSpecialPage() ) {
 42+ global $wgOut;
 43+ SMWOutputs::commitToOutputPage( $wgOut );
 44+ }
 45+ else {
 46+ SMWOutputs::commitToParser( $parser );
 47+ }
4248
4349 return $result;
4450 }
Property changes on: branches/querypage-work2/extensions/StringFunctionsEscaped
___________________________________________________________________
Modified: svn:mergeinfo
4551 Merged /trunk/extensions/StringFunctionsEscaped:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/StrategyWiki/ActiveStrategy
___________________________________________________________________
Modified: svn:mergeinfo
4652 Merged /trunk/extensions/StrategyWiki/ActiveStrategy:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/StrategyWiki
___________________________________________________________________
Modified: svn:mergeinfo
4753 Merged /trunk/extensions/StrategyWiki:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/TrustedXFF/trusted-hosts.txt
___________________________________________________________________
Modified: svn:mergeinfo
4854 Merged /trunk/extensions/TrustedXFF/trusted-hosts.txt:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/TrustedXFF
___________________________________________________________________
Modified: svn:mergeinfo
4955 Merged /trunk/extensions/TrustedXFF:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/SVGZoom
___________________________________________________________________
Modified: svn:mergeinfo
5056 Merged /trunk/extensions/SVGZoom:r74986,74989,74991-74994,74998
Index: branches/querypage-work2/extensions/SemanticMaps/RELEASE-NOTES
@@ -18,6 +18,10 @@
1919
2020 * Support for images without namespace prefix in the statispoints parameter in map ask queries.
2121
 22+* Fixed several issue with the OpenLayers form input.
 23+
 24+* Fixed fatal error for Google Maps v2 options on Special:Ask.
 25+
2226 === Semantic Maps 0.7 ===
2327 (2010-10-15)
2428
Index: branches/querypage-work2/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php
@@ -221,8 +221,8 @@
222222 // var_dump($args);exit;
223223 }
224224 else {
225 - $this->coordinateSet['lat'] = $args[0];
226 - $this->coordinateSet['lon'] = $args[1];
 225+ $this->coordinateSet['lat'] = (float)$args[0];
 226+ $this->coordinateSet['lon'] = (float)$args[1];
227227 }
228228
229229 $this->m_caption = MapsCoordinateParser::formatCoordinates(
Index: branches/querypage-work2/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php
@@ -255,6 +255,11 @@
256256 }
257257 }
258258
 259+ /**
 260+ * Adds the static locations (specified via the staticlocations parameter) to the map.
 261+ *
 262+ * @since 0.7
 263+ */
259264 protected function addStaticLocations() {
260265 global $wgTitle;
261266
Index: branches/querypage-work2/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayersQP.php
@@ -33,7 +33,7 @@
3434 ),
3535 wfMsg( 'maps-loading-map' )
3636 );
37 -
 37+
3838 $this->service->addLayerDependencies( $this->layers[1] );
3939
4040 $langCode = $wgLang->getCode();
Index: branches/querypage-work2/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayersFormInput.php
@@ -1,21 +1,9 @@
22 <?php
33
44 /**
5 - * File holding the SMOpenLayersFormInput class.
6 - *
7 - * @file SM_OpenLayersFormInput.php
8 - * @ingroup SMOpenLayers
9 - *
10 - * @author Jeroen De Dauw
11 - */
12 -
13 -if ( !defined( 'MEDIAWIKI' ) ) {
14 - die( 'Not an entry point.' );
15 -}
16 -
17 -/**
185 * Class for OpenLayers form inputs.
196 *
 7+ * @file SM_OpenLayersFormInput.php
208 * @ingroup SMOpenLayers
219 *
2210 * @author Jeroen De Dauw
Property changes on: branches/querypage-work2/extensions/ConditionalShowSection
___________________________________________________________________
Modified: svn:mergeinfo
2311 Merged /trunk/extensions/ConditionalShowSection:r74986,74989,74991-74994,74998
Index: branches/querypage-work2/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
@@ -113,7 +113,8 @@
114114 if ( $wgRequest->getText( '_cache_', false ) ) {
115115 $cache = true;
116116 $token = '';
117 - $token_match = false;
 117+ $token_match = false;
 118+ $wgOut->mSquidMaxage = 6000;
118119 } else {
119120 $cache = false;
120121
@@ -1187,4 +1188,4 @@
11881189 // Automatically post the form if the user has Javascript support
11891190 $wgOut->addHTML( '<script type="text/javascript">document.paypalredirect.submit();</script>' );
11901191 }
1191 -} // end class
\ No newline at end of file
 1192+} // end class
Property changes on: branches/querypage-work2/extensions/LocalisationUpdate
___________________________________________________________________
Modified: svn:mergeinfo
11921193 Merged /trunk/extensions/LocalisationUpdate:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/HoneypotIntegration/HoneypotIntegration.class.php
___________________________________________________________________
Modified: svn:mergeinfo
11931194 Merged /trunk/extensions/HoneypotIntegration/HoneypotIntegration.class.php:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/AddMediaWizard/AddMedia/AddMedia.i18n.php
___________________________________________________________________
Modified: svn:mergeinfo
11941195 Merged /trunk/extensions/AddMediaWizard/AddMedia/AddMedia.i18n.php:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/AddMediaWizard/AddMedia/mw.UploadHandler.js
___________________________________________________________________
Modified: svn:mergeinfo
11951196 Merged /trunk/extensions/AddMediaWizard/AddMedia/mw.UploadHandler.js:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/FundraiserPortal
___________________________________________________________________
Modified: svn:mergeinfo
11961197 Merged /trunk/extensions/FundraiserPortal:r74986,74989,74991-74994,74998
Index: branches/querypage-work2/extensions/Maps/includes/Maps_Layer.php
@@ -184,6 +184,8 @@
185185 * Returns a string containing the JavaScript definition of this layer.
186186 * Only call this function when you are sure the layer is valid!
187187 *
 188+ * TODO: move this to the OpenLayers class
 189+ *
188190 * @since 0.7.1
189191 *
190192 * @return string
@@ -195,7 +197,7 @@
196198
197199 $class = self::$types[$this->getType()]['class'];
198200
199 - $options = array();
 201+ $options = array( 'isImage' => true );
200202
201203 if ( $this->properties !== false ) {
202204 $options['numZoomLevels'] = $zoomlevels;
Index: branches/querypage-work2/extensions/Maps/includes/services/OpenLayers/OpenLayerFunctions.js
@@ -6,7 +6,7 @@
77 *
88 * @author Jeroen De Dauw
99 */
10 -
 10+
1111 /**
1212 * Creates and initializes an OpenLayers map.
1313 * The resulting map is returned by the function but no further handling is required in most cases.
@@ -15,16 +15,28 @@
1616
1717 OpenLayers.Lang.setCode( langCode );
1818
 19+ var hasImageLayer = false;
 20+ for ( i = 0, n = mapTypes.length; i < n; i++ ) {
 21+ // Idieally this would check if the objecct is of type OpenLayers.layer.image
 22+ if ( mapTypes[i].options && mapTypes[i].options.isImage === true ) {
 23+ hasImageLayer = true;
 24+ break;
 25+ }
 26+ }
 27+
1928 // Create a new OpenLayers map with without any controls on it.
20 - var mapOptions = {
21 - projection: new OpenLayers.Projection("EPSG:900913"),
22 - displayProjection: new OpenLayers.Projection("EPSG:4326"),
23 - units: "m",
24 - numZoomLevels: 18,
25 - maxResolution: 156543.0339,
26 - maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34),
 29+ var mapOptions = {
2730 controls: []
2831 };
 32+
 33+ if ( !hasImageLayer ) {
 34+ mapOptions.projection = new OpenLayers.Projection("EPSG:900913");
 35+ mapOptions.displayProjection = new OpenLayers.Projection("EPSG:4326");
 36+ mapOptions.units = "m";
 37+ mapOptions.numZoomLevels = 18;
 38+ mapOptions.maxResolution = 156543.0339;
 39+ mapOptions.maxExtent = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34);
 40+ }
2941
3042 var mapElement = document.getElementById( mapName );
3143
@@ -73,7 +85,11 @@
7486
7587 for ( i = marker_data.length - 1; i >= 0; i-- ) {
7688 marker_data[i].lonlat = new OpenLayers.LonLat( marker_data[i].lon, marker_data[i].lat );
77 - marker_data[i].lonlat.transform( new OpenLayers.Projection( "EPSG:4326" ), new OpenLayers.Projection( "EPSG:900913" ) );
 89+
 90+ if ( !hasImageLayer ) {
 91+ marker_data[i].lonlat.transform( new OpenLayers.Projection( "EPSG:4326" ), new OpenLayers.Projection( "EPSG:900913" ) );
 92+ }
 93+
7894 if ( bounds != null ) bounds.extend( marker_data[i].lonlat ); // Extend the bounds when no center is set.
7995 markerLayer.addMarker( getOLMarker( markerLayer, marker_data[i], map.getProjectionObject() ) ); // Create and add the marker.
8096 }
@@ -82,7 +98,11 @@
8399
84100 if (centerIsSet) { // When the center is provided, set it.
85101 var centre = new OpenLayers.LonLat(lon, lat);
86 - centre.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
 102+
 103+ if ( !hasImageLayer ) {
 104+ centre.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
 105+ }
 106+
87107 map.setCenter(centre);
88108 }
89109
Index: branches/querypage-work2/extensions/Maps/includes/services/OpenLayers/Maps_OpenLayers.php
@@ -87,7 +87,7 @@
8888 $defaultGroup = wfMsg( 'maps-markers' );
8989 //.// TODO
9090 foreach ( $markers as $marker ) {
91 - $markerItems[false ? $marker[5] : $defaultGroup] = MapsMapper::encodeJsVar( (object)array(
 91+ $markerItems[] = MapsMapper::encodeJsVar( (object)array(
9292 'lat' => $marker[0],
9393 'lon' => $marker[1],
9494 'title' => $marker[2],
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandlerHooks.php
@@ -1,13 +0,0 @@
2 -<?php
3 -
4 -/**
5 - * Hooks for TimedMediaHandler extension
6 - *
7 - * @file
8 - * @ingroup Extensions
9 - */
10 -
11 -class TimedMediaHandlerHooks {
12 -
13 -
14 -}
\ No newline at end of file
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandler.php
@@ -28,12 +28,18 @@
2929 $wgExtensionMessagesFiles['TimedMediaHandlerMagic'] = "$timedMediaDir/TimedMediaHandler.i18n.magic.php";
3030 $wgParserOutputHooks['TimedMediaHandler'] = array( 'TimedMediaHandler', 'outputHook' );
3131
 32+// Load all the mwEmbed modules:
 33+MwEmbedResourceManager::registerModulePath( 'extensions/TimedMediaHandler/EmbedPlayer' );
 34+MwEmbedResourceManager::registerModulePath( 'extensions/TimedMediaHandler/TimedText' );
3235
 36+
3337 // Setup a hook for iframe=true (will strip the interface and only output the player)
3438 $wgHooks['ArticleFromTitle'][] = 'TimedMediaHandler::iframeOutputHook';
3539
36 -// OggTranscode setup
 40+// AutoLoad Classes:
3741 $wgAutoloadClasses['WebVideoTranscode'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscode.php";
 42+$wgAutoloadClasses['TimedMediaHandlerHooks'] = "$timedMediaDir/TimedMediaHandler.hooks.php";
 43+
3844 $wgHooks['LoadExtensionSchemaUpdates'][] = 'WebVideoTranscode::schema';
3945
4046 $wgExtensionCredits['media'][] = array(
@@ -44,9 +50,8 @@
4551 'descriptionmsg' => 'timedmedia-desc',
4652 );
4753
48 -// Include javascript resource registration:
49 -include( "$timedMediaDir/TimedMediaHandler.modules.hooks.php" );
5054
 55+
5156 /******************* CONFIGURATION STARTS HERE **********************/
5257
5358 // Set the supported ogg codecs:
@@ -73,7 +78,7 @@
7479 // The location of ffmpeg2theora ( for metadata and transcoding )
7580 $wgffmpeg2theoraPath = '/usr/bin/ffmpeg2theora';
7681
77 -// Location of the FFmpeg binary
 82+// Location of the FFmpeg binary ( used to encode WebM and for thumbnails )
7883 $wgFFmpegLocation = '/usr/bin/ffmpeg';
7984
8085
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/TimedText.resourceList.php
@@ -0,0 +1,16 @@
 2+<?php
 3+
 4+/**
 5+ * EmbedPlayer module resource list array
 6+ */
 7+
 8+return array(
 9+ // Top level TimedText name:
 10+ "mw.TimedText" => array( "scripts" => "mw.TimedText.js" ),
 11+ "mw.style.TimedText" => array( "scripts" => "css/mw.style.TimedText.css"),
 12+
 13+ "mw.TimedTextEdit" => array( "scripts" => "mw.TimedTextEdit.js"),
 14+ "mw.style.TimedTextEdit" => array( "scripts" => "css/mw.style.TimedTextEdit.css"),
 15+
 16+ "RemoteMwTimedText" => array( "scripts" => "remotes/RemoteMwTimedText.js")
 17+);
\ No newline at end of file
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/loader.js
@@ -2,18 +2,8 @@
33 * TimedText loader.
44 */
55 // Scope everything in "mw" ( keeps the global namespace clean )
6 -( function( mw ) {
 6+( function( mw ) {
77
8 - mw.addResourcePaths( {
9 - "mw.TimedText" : "mw.TimedText.js",
10 - "mw.style.TimedText" : "css/mw.style.TimedText.css",
11 -
12 - "mw.TimedTextEdit" : "mw.TimedTextEdit.js",
13 - "mw.style.TimedTextEdit" : "css/mw.style.TimedTextEdit.css",
14 -
15 - "RemoteMwTimedText" : "remotes/RemoteMwTimedText.js"
16 - } );
17 -
188 mw.setDefaultConfig( {
199 // If the Timed Text interface should be displayed:
2010 // 'always' Displays link and call to contribute always
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/mw.TimedText.js
@@ -202,7 +202,7 @@
203203 'targetMenuContainer' : _this.menuTarget,
204204 'positionOpts' : positionOpts,
205205 'backLinkText' : gM( 'mwe-timedtext-back-btn' )
206 - } )
 206+ } );
207207 });
208208 },
209209
@@ -429,10 +429,7 @@
430430 // Layout Menu option
431431 $j.getLineItem( gM( 'mwe-timedtext-layout' ), 'image' ).append(
432432 _this.getLayoutMenu()
433 - )
434 -
435 - // Search Menu option
436 - //$j.getLineItem( gM('mwe-timedtext-search'), 'search')
 433+ )
437434 );
438435 }
439436 // Put in the "Make Transcript" link if config enabled and we have an api key
@@ -442,7 +439,8 @@
443440 );
444441 }
445442
446 -
 443+ $j( _this.embedPlayer ).trigger( 'TimedText.BuildCCMenu', $menu ) ;
 444+
447445 return $menu;
448446 },
449447
@@ -466,6 +464,10 @@
467465 });
468466 },
469467
 468+ showMiroSubs: function(){
 469+
 470+ },
 471+
470472 /**
471473 * Utility function to assist in menu build out:
472474 * Get menu line item (li) html: <li><a> msgKey </a></li>
@@ -478,9 +480,9 @@
479481 */
480482 getLiAddText: function() {
481483 var _this = this;
482 - return $j.getLineItem( gM( 'mwe-timedtext-add-timed-text'), 'script', function() {
483 - _this.showTimedTextEditUI( 'add' );
484 - } );
 484+ return $j.getLineItem( gM( 'mwe-timedtext-upload-timed-text'), 'script', function() {
 485+ _this.showTimedTextEditUI( 'add' );
 486+ } );
485487 },
486488
487489 /**
@@ -651,12 +653,12 @@
652654 // Init Category menu item if it does not already exist:
653655 if( !catSourceList[ catKey ] ) {
654656 // Set up catList pointer:
655 - catSourceList[ catKey ] = [ ]
 657+ catSourceList[ catKey ] = [ ];
656658 }
657659 // Append to the source category key menu item:
658660 catSourceList[ catKey ].push(
659661 _this.getLiSource( source )
660 - )
 662+ );
661663 }else{
662664 sourcesWithoutCategory.push( _this.getLiSource( source ) );
663665 }
@@ -669,7 +671,7 @@
670672 for(var i in catSourceList[ catKey ]) {
671673 $catChildren.append(
672674 catSourceList[ catKey ][i]
673 - )
 675+ );
674676 }
675677 // Append a cat menu item for each category list
676678 $langMenu.append(
@@ -683,7 +685,7 @@
684686 for(var i in catSourceList[ catKey ]) {
685687 $langMenu.append(
686688 catSourceList[ catKey ][i]
687 - )
 689+ );
688690 }
689691 }
690692 }
@@ -696,7 +698,7 @@
697699 $langMenu.append(
698700 _this.getLiAddText()
699701 );
700 -
 702+
701703 return $langMenu;
702704 },
703705
@@ -745,7 +747,7 @@
746748 * Add an track div to the embedPlayer
747749 */
748750 addItextDiv: function( category ) {
749 - mw.log(" addItextDiv: " + category )
 751+ mw.log(" addItextDiv: " + category );
750752 // Get the relative positioned player class from the controlBuilder:
751753 var $playerTarget = this.embedPlayer.$interface;
752754
@@ -767,7 +769,7 @@
768770 })
769771 .append(
770772 $j('<span \>')
771 - )
 773+ );
772774
773775 // Scale the text Relative to player size:
774776 $track.css(
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/mw.TimedTextEdit.js
@@ -39,7 +39,8 @@
4040 textEditStages:{
4141 'upload':{
4242 'icon' : 'folder-open'
43 - },
 43+ }
 44+ /*
4445 'transcribe':{
4546 'icon' : 'comment'
4647 },
@@ -49,6 +50,7 @@
5051 'translate':{
5152 'icon' : 'flag'
5253 }
 54+ */
5355 },
5456
5557 /**
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/TimedText.i18n.php
@@ -32,7 +32,7 @@
3333 'mwe-timedtext-upload-text-done-uploading' => 'Done uploading',
3434 'mwe-timedtext-back-btn' => 'Back',
3535 'mwe-timedtext-choose-text' => 'Choose text',
36 - 'mwe-timedtext-add-timed-text' => 'Add timed text',
 36+ 'mwe-timedtext-upload-timed-text' => 'Upload subtitles',
3737 'mwe-timedtext-loading-text-edit' => 'Loading timed text editor',
3838 'mwe-timedtext-search' => 'Search clip',
3939 'mwe-timedtext-layout' => 'Layout',
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandler.hooks.php
@@ -0,0 +1,12 @@
 2+<?php
 3+
 4+/**
 5+ * Hooks for TimedMediaHandler extension
 6+ *
 7+ * @file
 8+ * @ingroup Extensions
 9+ */
 10+
 11+class TimedMediaHandlerHooks {
 12+
 13+}
\ No newline at end of file
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/loader.js
@@ -1,251 +0,0 @@
2 -/**
3 -* EmbedPlayer loader
4 -*/
5 -
6 -/**
7 -* Default player module configuration
8 -*/
9 -( function( mw ) {
10 -
11 - mw.setDefaultConfig( {
12 - // If the player controls should be overlaid on top of the video ( if supported by playback method)
13 - // can be set to false per embed player via overlayControls attribute
14 - 'EmbedPlayer.OverlayControls' : true,
15 -
16 - 'EmbedPlayer.LibraryPage': 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library',
17 -
18 - // A default apiProvider ( ie where to lookup subtitles, video properties etc )
19 - // NOTE: Each player instance can also specify a specific provider
20 - "EmbedPlayer.ApiProvider" : "local",
21 -
22 - // What tags will be re-written to video player by default
23 - // Set to empty string or null to avoid automatic video tag rewrites to embedPlayer
24 - "EmbedPlayer.RewriteTags" : "video,audio,playlist",
25 -
26 - // Default video size ( if no size provided )
27 - "EmbedPlayer.DefaultSize" : "400x300",
28 -
29 - // If the video player should attribute kaltura
30 - "EmbedPlayer.KalturaAttribution" : true,
31 -
32 - // The attribution button
33 - 'EmbedPlayer.AttributionButton' :{
34 - 'title' : 'Kaltura html5 video library',
35 - 'href' : 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library',
36 - // Style icon to be applied
37 - 'class' : 'kaltura-icon',
38 - // An icon image url ( should be a 12x12 image or data url )
39 - 'iconurl' : false
40 - },
41 -
42 -
43 - // Set the browser player warning flag displays warning for non optimal playback
44 - "EmbedPlayer.ShowNativeWarning" : true,
45 -
46 - // If fullscreen is global enabled.
47 - "EmbedPlayer.EnableFullscreen" : true,
48 -
49 - // If mwEmbed should use the Native player controls
50 - // this will prevent video tag rewriting and skinning
51 - // useful for devices such as iPad / iPod that
52 - // don't fully support DOM overlays or don't expose full-screen
53 - // functionality to javascript
54 - "EmbedPlayer.NativeControls" : false,
55 -
56 - // If mwEmbed should use native controls on mobile safari
57 - "EmbedPlayer.NativeControlsMobileSafari" : true,
58 -
59 -
60 - // The z-index given to the player interface during full screen ( high z-index )
61 - "EmbedPlayer.fullScreenZIndex" : 999998,
62 -
63 - // The default share embed mode ( can be "object" or "videojs" )
64 - //
65 - // "object" will provide a <object tag pointing to mwEmbedFrame.php
66 - // Object embedding should be much more compatible with sites that
67 - // let users embed flash applets
68 - // "videojs" will include the source javascript and video tag to
69 - // rewrite the player on the remote page DOM
70 - // Video tag embedding is much more mash-up friendly but exposes
71 - // the remote site to the mwEmbed javascript and can be a xss issue.
72 - "EmbedPlayer.ShareEmbedMode" : 'object',
73 -
74 - // Default player skin name
75 - "EmbedPlayer.SkinName" : "mvpcf",
76 -
77 - // Number of milliseconds between interface updates
78 - 'EmbedPlayer.MonitorRate' : 250
79 - } );
80 -
81 - // Add class file paths
82 - mw.addResourcePaths( {
83 - "mw.EmbedPlayer" : "mw.EmbedPlayer.js",
84 -
85 - "mw.EmbedPlayerKplayer" : "mw.EmbedPlayerKplayer.js",
86 - "mw.EmbedPlayerGeneric" : "mw.EmbedPlayerGeneric.js",
87 - "mw.EmbedPlayerHtml" : "mw.EmbedPlayerHtml.js",
88 - "mw.EmbedPlayerJava": "mw.EmbedPlayerJava.js",
89 - "mw.EmbedPlayerNative" : "mw.EmbedPlayerNative.js",
90 -
91 - "mw.EmbedPlayerVlc" : "mw.EmbedPlayerVlc.js",
92 -
93 - "mw.PlayerControlBuilder" : "skins/mw.PlayerControlBuilder.js",
94 -
95 - "mw.style.EmbedPlayer" : "skins/mw.style.EmbedPlayer.css",
96 -
97 - "mw.style.PlayerSkinKskin" : "skins/kskin/mw.style.PlayerSkinKskin.css",
98 -
99 - "mw.PlayerSkinKskin" : "skins/kskin/mw.PlayerSkinKskin.js",
100 -
101 - "mw.PlayerSkinMvpcf" : "skins/mvpcf/mw.PlayerSkinMvpcf.js",
102 - "mw.style.PlayerSkinMvpcf" : "skins/mvpcf/mw.style.PlayerSkinMvpcf.css"
103 - } );
104 -
105 - /**
106 - * Check the current DOM for any tags in "EmbedPlayer.RewriteTags"
107 - */
108 - mw.documentHasPlayerTags = function() {
109 - var rewriteTags = mw.getConfig( 'EmbedPlayer.RewriteTags' );
110 - if( $j( rewriteTags ).length != 0 ) {
111 - return true;
112 - }
113 -
114 - var tagCheckObject = { 'hasTags' : false };
115 - $j( mw ).trigger( 'LoaderEmbedPlayerDocumentHasPlayerTags',
116 - [ tagCheckObject ]);
117 -
118 - return tagCheckObject.hasTags;
119 - };
120 -
121 - /**
122 - * Add a DOM ready check for player tags
123 - *
124 - * We use mw.addSetupHook instead of mw.ready so that
125 - * mwEmbed player is setup before any other mw.ready calls
126 - */
127 - mw.addSetupHook( function( callback ) {
128 - mw.rewritePagePlayerTags();
129 - // Run the setupFlag to continue setup
130 - callback();
131 - });
132 -
133 - mw.rewritePagePlayerTags = function() {
134 - mw.log( 'EmbedPlayer:: Document::' + mw.documentHasPlayerTags() );
135 - if( mw.documentHasPlayerTags() ) {
136 - var rewriteElementCount = 0;
137 -
138 - // Set each player to loading ( as early on as possible )
139 - $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).each( function( index, element ){
140 -
141 - // Assign an the element an ID ( if its missing one )
142 - if ( $j( element ).attr( "id" ) == '' ) {
143 - $j( element ).attr( "id", 'v' + ( rewriteElementCount++ ) );
144 - }
145 - // Add an absolute positioned loader
146 - $j( element )
147 - .getAbsoluteOverlaySpinner()
148 - .attr('id', 'loadingSpinner_' + $j( element ).attr('id') )
149 - .addClass( 'playerLoadingSpinner' );
150 -
151 - });
152 - // Load the embedPlayer module ( then run queued hooks )
153 - mw.load( 'EmbedPlayer', function ( ) {
154 - mw.log("EmbedPlayer:: do rewrite players:" + $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).length );
155 - // Rewrite the EmbedPlayer.RewriteTags with the
156 - $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).embedPlayer();
157 - })
158 - }
159 - }
160 -
161 - /**
162 - * Add the module loader function:
163 - */
164 - mw.addModuleLoader( 'EmbedPlayer', function() {
165 - var _this = this;
166 - // Hide videonojs class
167 - $j( '.videonojs' ).hide();
168 -
169 - // Set up the embed video player class request: (include the skin js as well)
170 - var dependencyRequest = [
171 - [
172 - 'mw.EmbedPlayer'
173 - ],
174 - [
175 - 'mw.PlayerControlBuilder',
176 - '$j.fn.hoverIntent',
177 - 'mw.style.EmbedPlayer',
178 - '$j.cookie',
179 - // Add JSON lib if browsers does not define "JSON" natively
180 - 'JSON',
181 - '$j.ui',
182 - '$j.widget'
183 - ],
184 - [
185 - '$j.ui.mouse',
186 - '$j.fn.menu',
187 - 'mw.style.jquerymenu',
188 - '$j.ui.slider'
189 - ]
190 -
191 - ];
192 -
193 - // Pass every tag being rewritten through the update request function
194 - $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).each( function() {
195 - var playerElement = this;
196 - mw.embedPlayerUpdateLibraryRequest( playerElement, dependencyRequest[ 1 ] )
197 - } );
198 -
199 - // Add PNG fix code needed:
200 - if ( $j.browser.msie && $j.browser.version < 7 ) {
201 - dependencyRequest[0].push( '$j.fn.pngFix' );
202 - }
203 -
204 - // Do short detection, to avoid extra player library request in ~most~ cases.
205 - //( If browser is firefox include native, if browser is IE include java )
206 - if( $j.browser.msie ) {
207 - dependencyRequest[0].push( 'mw.EmbedPlayerJava' )
208 - }
209 -
210 - // Safari gets slower load since we have to detect ogg support
211 - if( !!document.createElement('video').canPlayType && !$j.browser.safari ) {
212 - dependencyRequest[0].push( 'mw.EmbedPlayerNative' )
213 - }
214 -
215 - // Return the set of libs to be loaded
216 - return dependencyRequest;
217 - } );
218 -
219 - /**
220 - * Takes a embed player element and updates a request object with any
221 - * dependent libraries per that tags attributes.
222 - *
223 - * For example a player skin class name could result in adding some
224 - * css and javascirpt to the player library request.
225 - *
226 - * @param {Object} playerElement The tag to check for library dependent request classes.
227 - * @param {Array} dependencyRequest The library request array
228 - */
229 - mw.embedPlayerUpdateLibraryRequest = function(playerElement, dependencyRequest ){
230 - var skinName = $j( playerElement ).attr( 'class' );
231 - // Set playerClassName to default if unset or not a valid skin
232 - if( ! skinName || $j.inArray( skinName.toLowerCase(), mw.validSkins ) == -1 ){
233 - skinName = mw.getConfig( 'EmbedPlayer.SkinName' );
234 - }
235 - skinName = skinName.toLowerCase();
236 - // Add the skin to the request
237 - var skinCaseName = skinName.charAt(0).toUpperCase() + skinName.substr(1);
238 - // The skin js:
239 - if( $j.inArray( 'mw.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){
240 - dependencyRequest.push( 'mw.PlayerSkin' + skinCaseName );
241 - }
242 - // The skin css
243 - if( $j.inArray( 'mw.style.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){
244 - dependencyRequest.push( 'mw.style.PlayerSkin' + skinCaseName );
245 - }
246 -
247 - // Allow extension to extend the request.
248 - $j( mw ).trigger( 'LoaderEmbedPlayerUpdateRequest',
249 - [ playerElement, dependencyRequest ] );
250 - }
251 -
252 -} )( window.mw );
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/EmbedPlayer.resourceList.php
@@ -0,0 +1,28 @@
 2+<?php
 3+
 4+/**
 5+ * EmbedPlayer module resource list array
 6+ */
 7+
 8+return array(
 9+ "mw.EmbedPlayer" => array( 'scripts'=> "mw.EmbedPlayer.js" ),
 10+
 11+ "mw.EmbedPlayerKplayer" => array( 'scripts'=> "mw.EmbedPlayerKplayer.js" ),
 12+ "mw.EmbedPlayerGeneric" => array( 'scripts'=> "mw.EmbedPlayerGeneric.js" ),
 13+ "mw.EmbedPlayerHtml" => array( 'scripts'=> "mw.EmbedPlayerHtml.js" ),
 14+ "mw.EmbedPlayerJava" => array( 'scripts'=> "mw.EmbedPlayerJava.js"),
 15+ "mw.EmbedPlayerNative" => array( 'scripts'=> "mw.EmbedPlayerNative.js" ),
 16+
 17+ "mw.EmbedPlayerVlc" => array( 'scripts'=> "mw.EmbedPlayerVlc.js" ),
 18+
 19+ "mw.PlayerControlBuilder" => array( 'scripts' => "skins/mw.PlayerControlBuilder.js" ),
 20+
 21+ "mw.style.EmbedPlayer" => array( 'scripts'=> "skins/mw.style.EmbedPlayer.css" ),
 22+
 23+ "mw.style.PlayerSkinKskin" => array( 'scripts' => "skins/kskin/mw.style.PlayerSkinKskin.css" ),
 24+
 25+ "mw.PlayerSkinKskin" => array( 'scripts' => "skins/kskin/mw.PlayerSkinKskin.js"),
 26+
 27+ "mw.PlayerSkinMvpcf" => array( 'scripts'=> "skins/mvpcf/mw.PlayerSkinMvpcf.js"),
 28+ "mw.style.PlayerSkinMvpcf" => array( 'scripts'=> "skins/mvpcf/mw.style.PlayerSkinMvpcf.css"),
 29+);
\ No newline at end of file
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/mw.EmbedPlayer.js
@@ -7,11 +7,7 @@
88 * mw.PlayerControlBuilder Handles skinning of the player controls
99 */
1010
11 -/**
12 - * Add the messages text:
13 - */
14 -
15 -mw.includeAllModuleMessages();
 11+
1612 /*
1713 * The default video attributes supported by embedPlayer
1814 */
@@ -134,7 +130,71 @@
135131 "type" : null
136132 });
137133
 134+mw.setDefaultConfig( {
 135+ // If the player controls should be overlaid on top of the video ( if supported by playback method)
 136+ // can be set to false per embed player via overlayControls attribute
 137+ 'EmbedPlayer.OverlayControls' : true,
 138+
 139+ 'EmbedPlayer.LibraryPage': 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library',
 140+
 141+ // A default apiProvider ( ie where to lookup subtitles, video properties etc )
 142+ // NOTE: Each player instance can also specify a specific provider
 143+ "EmbedPlayer.ApiProvider" : "local",
 144+
 145+ // Default video size ( if no size provided )
 146+ "EmbedPlayer.DefaultSize" : "400x300",
138147
 148+ // If the video player should attribute kaltura
 149+ "EmbedPlayer.KalturaAttribution" : true,
 150+
 151+ // The attribution button
 152+ 'EmbedPlayer.AttributionButton' :{
 153+ 'title' : 'Kaltura html5 video library',
 154+ 'href' : 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library',
 155+ // Style icon to be applied
 156+ 'class' : 'kaltura-icon',
 157+ // An icon image url ( should be a 12x12 image or data url )
 158+ 'iconurl' : false
 159+ },
 160+
 161+
 162+ // Set the browser player warning flag displays warning for non optimal playback
 163+ "EmbedPlayer.ShowNativeWarning" : true,
 164+
 165+ // If fullscreen is global enabled.
 166+ "EmbedPlayer.EnableFullscreen" : true,
 167+
 168+ // If mwEmbed should use the Native player controls
 169+ // this will prevent video tag rewriting and skinning
 170+ // useful for devices such as iPad / iPod that
 171+ // don't fully support DOM overlays or don't expose full-screen
 172+ // functionality to javascript
 173+ "EmbedPlayer.NativeControls" : false,
 174+
 175+ // If mwEmbed should use native controls on mobile safari
 176+ "EmbedPlayer.NativeControlsMobileSafari" : true,
 177+
 178+
 179+ // The z-index given to the player interface during full screen ( high z-index )
 180+ "EmbedPlayer.fullScreenZIndex" : 999998,
 181+
 182+ // The default share embed mode ( can be "object" or "videojs" )
 183+ //
 184+ // "object" will provide a <object tag pointing to mwEmbedFrame.php
 185+ // Object embedding should be much more compatible with sites that
 186+ // let users embed flash applets
 187+ // "videojs" will include the source javascript and video tag to
 188+ // rewrite the player on the remote page DOM
 189+ // Video tag embedding is much more mash-up friendly but exposes
 190+ // the remote site to the mwEmbed javascript and can be a xss issue.
 191+ "EmbedPlayer.ShareEmbedMode" : 'object',
 192+
 193+ // Default player skin name
 194+ "EmbedPlayer.SkinName" : "mvpcf",
 195+
 196+ // Number of milliseconds between interface updates
 197+ 'EmbedPlayer.MonitorRate' : 250
 198+}
139199 /**
140200 * The base source attribute checks
141201 * also see: http://dev.w3.org/html5/spec/Overview.html#the-source-element
@@ -261,7 +321,7 @@
262322 'width' : width,
263323 'height' : height
264324 })
265 - )
 325+ );
266326 }
267327 });
268328
@@ -302,7 +362,7 @@
303363 callback();
304364 }
305365
306 - })
 366+ });
307367 };
308368
309369 } )( jQuery );
@@ -434,7 +494,7 @@
435495
436496 // Copy over any data attributes from the playerElement
437497 if( mw.getConfig( 'EmbedPlayer.DataAttributes' ) ) {
438 - var dataAttr = mw.getConfig( 'EmbedPlayer.DataAttributes' )
 498+ var dataAttr = mw.getConfig( 'EmbedPlayer.DataAttributes' );
439499 for( var i in dataAttr ){
440500 if( $j( playerElement ).data( i ) ){
441501 $j( '#' + playerInterface.id ).data( i, $j( playerElement ).data( i ) );
@@ -444,7 +504,7 @@
445505
446506 // Pass the id to any hook that needs to interface prior to checkPlayerSources
447507 mw.log("EmbedPlayer::addElement :trigger " + playerInterface.id );
448 - $j( mw ).trigger ( 'newEmbedPlayerEvent', playerInterface.id );
 508+ $j( mw ).trigger ( 'newEmbedPlayerEvent', $j( '#' + playerInterface.id ).get(0) );
449509
450510 // Issue the checkPlayerSources call to the new player interface:
451511 // make sure to use the element that is in the DOM:
@@ -572,7 +632,7 @@
573633 .show()
574634 .after(
575635 $j( swapPlayerElement ).css( 'display', 'none' )
576 - )
 636+ );
577637 } else {
578638 $j( targetElement ).replaceWith( swapPlayerElement );
579639 }
@@ -589,7 +649,7 @@
590650 if( playerInterface.useNativePlayerControls() ) {
591651 $j( targetElement )
592652 .getAbsoluteOverlaySpinner()
593 - .attr('id', 'loadingSpinner_' + playerInterface.id )
 653+ .attr('id', 'loadingSpinner_' + playerInterface.id );
594654 }else{
595655 $j( swapPlayerElement ).append(
596656 $j('<div />')
@@ -642,7 +702,7 @@
643703 }
644704 }
645705 }
646 -}
 706+};
647707
648708 /**
649709 * mediaSource class represents a source for a media element.
@@ -1130,7 +1190,7 @@
11311191 var mimeType = playableSources[source].mimeType;
11321192 var player = mw.EmbedTypes.players.defaultPlayer( mimeType );
11331193 if ( player && player.library == 'Native' ) {
1134 - mw.log('Set native playback');
 1194+ mw.log('EmbedPlayer::Set native playback');
11351195 this.selectedSource = playableSources[ source ];
11361196 return true;
11371197 }
@@ -1193,9 +1253,9 @@
11941254 */
11951255 hasStreamOfMIMEType: function( mimeType )
11961256 {
1197 - for ( source in this.sources )
 1257+ for ( var i = 0; i < this.sources.length; i++ )
11981258 {
1199 - if ( this.sources[source].getMIMEType() == mimeType ){
 1259+ if ( this.sources[i].getMIMEType() == mimeType ){
12001260 return true;
12011261 }
12021262 }
@@ -1472,7 +1532,7 @@
14731533 .attr( 'src', customSource.src );
14741534 // xxx todo pull list of valid source attributes from mediaSource prototype
14751535 if( customSource.type ){
1476 - $source.attr('type', customSource.type )
 1536+ $source.attr('type', customSource.type );
14771537 }
14781538 if( customSource.title ){
14791539 $source.attr('title', customSource.title );
@@ -1618,6 +1678,7 @@
16191679 finishCheckPlayerSources();
16201680 }
16211681 },
 1682+
16221683 /**
16231684 * Insert and play a video source ( useful for ads or bumper videos )
16241685 *
@@ -1722,7 +1783,6 @@
17231784 /**
17241785 * Check for timed Text support
17251786 * and load necessary libraries
1726 - *
17271787 */
17281788 checkForTimedText: function( ) {
17291789 var _this = this;
@@ -1766,8 +1826,6 @@
17671827 }
17681828
17691829 if ( this.selectedPlayer ) {
1770 - mw.log( "Playback system: " + this.selectedPlayer.library );
1771 -
17721830 // Inherit the playback system of the selected player:
17731831 this.inheritEmbedPlayer();
17741832 } else {
@@ -2141,7 +2199,7 @@
21422200 })
21432201 .text( gM( 'mwe-embedplayer-download_clip' ) )
21442202 )
2145 - )
 2203+ );
21462204 }
21472205 // hide
21482206 },
@@ -2415,8 +2473,10 @@
24162474 // so we have to do a full replace ( if controls are not included initially )
24172475 if( mw.isMobileHTML5() && mobileSafariNeedsRefresh ) {
24182476 var source = this.mediaElement.getSources( 'video/h264' )[0];
2419 - if( source && ! source.src ){
2420 - mw.log( 'Error: should have caught no playable sources for mobile safari earlier' );
 2477+ // XXX note this should be updated once mobile supports h.264
 2478+ if( !source || !source.src ){
 2479+ mw.log( 'Warning: Your probably fakeing the iPhone userAgent ( no h.264 source )' );
 2480+ source = this.mediaElement.getSources( 'video/ogg' )[0];
24212481 }
24222482
24232483 var videoAttribues = {
@@ -2637,7 +2697,7 @@
26382698 doLinkBack: function() {
26392699 if ( ! this.linkback && this.roe && this.mediaElement.addedROEData == false ) {
26402700 var _this = this;
2641 - this.displayMenuOverlay( gM( 'mwe-embedplayer-loading_txt' ) );
 2701+ this.displayMenuOverlay( gM( 'mwe-loading_txt' ) );
26422702 this.getMvJsonUrl( this.roe, function( data ) {
26432703 _this.mediaElement.addROE( data );
26442704 _this.doLinkBack();
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/mw.PlayerControlBuilder.js
@@ -145,7 +145,7 @@
146146 */
147147 addControlComponents: function( ) {
148148 var _this = this;
149 - mw.log( 'f:controlsBuilder:: opt:' + this.options );
 149+ mw.log( 'PlayerControlsBuilder:: addControlComponents' );
150150
151151 // Set up local pointer to the embedPlayer
152152 var embedPlayer = this.embedPlayer;
@@ -618,7 +618,7 @@
619619 if( this.embedPlayer.getPlayerElement ){
620620 $j( this.embedPlayer.getPlayerElement() ).css( 'z-index', '1' );
621621 }
622 - mw.log( 'showControlBar' );
 622+ mw.log( 'PlayerControlBuilder:: ShowControlBar' );
623623 // Move up text track if present
624624 this.embedPlayer.$interface.find( '.track' )
625625 .animate(
@@ -929,7 +929,7 @@
930930 gM( 'mwe-embedplayer-download' ),
931931 'disk',
932932 function( ) {
933 - ctrlObj.displayMenuOverlay( gM('mwe-embedplayer-loading_txt' ) );
 933+ ctrlObj.displayMenuOverlay( gM('mwe-loading_txt' ) );
934934 // Call show download with the target to be populated
935935 ctrlObj.showDownload(
936936 ctrlObj.embedPlayer.$interface.find( '.overlay-content' )
@@ -1340,14 +1340,25 @@
13411341 showDownload: function( $target ) {
13421342 var _this = this;
13431343 var embedPlayer = this.embedPlayer;
 1344+
13441345 // Load the roe if available (to populate out download options:
13451346 // mw.log('f:showDownload '+ this.roe + ' ' + this.mediaElement.addedROEData);
13461347 if ( embedPlayer.roe && embedPlayer.mediaElement.addedROEData == false ) {
1347 - $target.html( gM( 'mwe-embedplayer-loading_txt' ) );
 1348+ $target.html( gM( 'mwe-loading_txt' ) );
13481349 embedPlayer.getMvJsonUrl( this.roe, function( data ) {
13491350 embedPlayer.mediaElement.addROE( data );
13501351 _this.showDownloadWithSources( $target );
13511352 } );
 1353+
 1354+ // Load additional text sources via apiTitleKey:
 1355+ // @@ todo we should move this to timedText bindings
 1356+ } else if( embedPlayer.apiTitleKey ) {
 1357+ // Load text interface ( if not already loaded )
 1358+ mw.load( 'TimedText', function() {
 1359+ embedPlayer.timedText.setupTextSources(function(){
 1360+ _this.showDownloadWithSources( $target );
 1361+ });
 1362+ });
13521363 } else {
13531364 _this.showDownloadWithSources( $target );
13541365 }
@@ -1365,7 +1376,7 @@
13661377 $target.empty();
13671378
13681379 var $mediaList = $j( '<ul />' );
1369 - var $textList = $j( '<ul />' );
 1380+ var $textList = $j( '<ul />' );
13701381 $j.each( embedPlayer.mediaElement.getSources(), function( index, source ) {
13711382 if( source.getSrc() ) {
13721383 mw.log("showDownloadWithSources:: Add src: " + source.getTitle() );
@@ -1379,7 +1390,7 @@
13801391 //Add link to time segment:
13811392 if ( source.getSrc().indexOf( '?t=' ) !== -1 ) {
13821393 $target.append( $dl_line );
1383 - } else if ( this.getMIMEType() == "text/cmml" || this.getMIMEType() == "text/x-srt" ) {
 1394+ } else if ( this.getMIMEType().indexOf('text') === 0 ) {
13841395 // Add link to text list
13851396 $textList.append( $dl_line );
13861397 } else {
@@ -1632,7 +1643,7 @@
16331644 'volumeControl': {
16341645 'w' : 28,
16351646 'o' : function( ctrlObj ) {
1636 - mw.log( ' set up volume control for: ' + ctrlObj.embedPlayer.id );
 1647+ mw.log( 'PlayerControlBuilder::Set up volume control for: ' + ctrlObj.embedPlayer.id );
16371648 $volumeOut = $j( '<span />' );
16381649 if ( ctrlObj.volume_layout == 'horizontal' ) {
16391650 $volumeOut.append(
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/kskin/mw.style.PlayerSkinKskin.css
@@ -166,6 +166,7 @@
167167 .k-player .k-menu-screens {
168168 float: left;
169169 font-size: 11px;
 170+ text-align: left;
170171 padding: 13px 10px 15px 15px;
171172 }
172173
@@ -412,4 +413,4 @@
413414 width : 51px;
414415 height : 12px;
415416 cursor: pointer;
416 -}
\ No newline at end of file
 417+}
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js
@@ -312,7 +312,7 @@
313313 break;
314314 case 'download' :
315315 embedPlayer.$interface.find( '.menu-download').text(
316 - gM('mwe-embedplayer-loading_txt' )
 316+ gM('mwe-loading_txt' )
317317 );
318318 // Call show download with the target to be populated
319319 this.showDownload(
@@ -390,7 +390,7 @@
391391 if ( data.query.pages ) {
392392 for ( var i in data.query.pages ) {
393393 var imageProps = data.query.pages[i];
394 - // Check properites for "missing"
 394+ // Check properties for "missing"
395395 if( imageProps.imageinfo && imageProps.imageinfo[0] && imageProps.imageinfo[0].descriptionurl ){
396396 // Found page
397397 $target.find( '.credits_box' ).html(
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/EmbedPlayer.loader.js
@@ -0,0 +1,163 @@
 2+/**
 3+* EmbedPlayer loader
 4+*/
 5+
 6+/**
 7+* Default player module configuration
 8+*/
 9+( function( mw ) {
 10+
 11+ mw.setDefaultConfig( {
 12+ // What tags will be re-written to video player by default
 13+ // Set to empty string or null to avoid automatic video tag rewrites to embedPlayer
 14+ "EmbedPlayer.RewriteTags" : "video,audio,playlist"
 15+ } );
 16+
 17+ /**
 18+ * Check the current DOM for any tags in "EmbedPlayer.RewriteTags"
 19+ */
 20+ mw.documentHasPlayerTags = function() {
 21+ var rewriteTags = mw.getConfig( 'EmbedPlayer.RewriteTags' );
 22+ if( $j( rewriteTags ).length != 0 ) {
 23+ return true;
 24+ }
 25+
 26+ var tagCheckObject = { 'hasTags' : false };
 27+ $j( mw ).trigger( 'LoaderEmbedPlayerDocumentHasPlayerTags',
 28+ [ tagCheckObject ]);
 29+
 30+ return tagCheckObject.hasTags;
 31+ };
 32+
 33+ /**
 34+ * Add a DOM ready check for player tags
 35+ *
 36+ * We use mw.addSetupHook instead of mw.ready so that
 37+ * mwEmbed player is setup before any other mw.ready calls
 38+ */
 39+ mw.addSetupHook( function( callback ) {
 40+ mw.rewritePagePlayerTags();
 41+ // Run the setupFlag to continue setup
 42+ callback();
 43+ });
 44+
 45+ mw.rewritePagePlayerTags = function() {
 46+ mw.log( 'EmbedPlayer:: Document::' + mw.documentHasPlayerTags() );
 47+ if( mw.documentHasPlayerTags() ) {
 48+ var rewriteElementCount = 0;
 49+
 50+ // Set each player to loading ( as early on as possible )
 51+ $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).each( function( index, element ){
 52+
 53+ // Assign an the element an ID ( if its missing one )
 54+ if ( $j( element ).attr( "id" ) == '' ) {
 55+ $j( element ).attr( "id", 'v' + ( rewriteElementCount++ ) );
 56+ }
 57+ // Add an absolute positioned loader
 58+ $j( element )
 59+ .getAbsoluteOverlaySpinner()
 60+ .attr('id', 'loadingSpinner_' + $j( element ).attr('id') )
 61+ .addClass( 'playerLoadingSpinner' );
 62+
 63+ });
 64+ // Load the embedPlayer module ( then run queued hooks )
 65+ mw.load( 'EmbedPlayer', function ( ) {
 66+ mw.log("EmbedPlayer:: do rewrite players:" + $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).length );
 67+ // Rewrite the EmbedPlayer.RewriteTags with the
 68+ $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).embedPlayer();
 69+ })
 70+ }
 71+ }
 72+
 73+ /**
 74+ * Add the module loader function:
 75+ */
 76+ mediaWiki.loader.register( 'EmbedPlayer', function(){
 77+ // Hide videonojs class
 78+ $j( '.videonojs' ).hide();
 79+
 80+ // Set up the embed video player class request: (include the skin js as well)
 81+ var baseRequest = [
 82+ 'mw.EmbedPlayer'
 83+
 84+ 'mw.PlayerControlBuilder',
 85+ '$j.fn.hoverIntent',
 86+ 'mw.style.EmbedPlayer',
 87+ '$j.cookie',
 88+
 89+ // Add JSON lib if browsers does not define "JSON" natively
 90+ 'JSON',
 91+ '$j.ui',
 92+ '$j.widget'
 93+
 94+ '$j.ui.mouse',
 95+ '$j.fn.menu',
 96+ 'mw.style.jquerymenu',
 97+ '$j.ui.slider'
 98+ ];
 99+
 100+ // Pass every tag being rewritten through the update request function
 101+ $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).each( function() {
 102+ var playerElement = this;
 103+ mw.embedPlayerUpdateLibraryRequest( playerElement, dependencyRequest[ 1 ] )
 104+ } );
 105+
 106+ // Add PNG fix code needed:
 107+ if ( $j.browser.msie && $j.browser.version < 7 ) {
 108+ dependencyRequest[0].push( '$j.fn.pngFix' );
 109+ }
 110+
 111+ // Do short detection, to avoid extra player library request in ~most~ cases.
 112+ //( If browser is firefox include native, if browser is IE include java )
 113+ if( $j.browser.msie ) {
 114+ dependencyRequest[0].push( 'mw.EmbedPlayerJava' )
 115+ }
 116+
 117+ // Safari gets slower load since we have to detect ogg support
 118+ if( !!document.createElement('video').canPlayType && !$j.browser.safari ) {
 119+ dependencyRequest[0].push( 'mw.EmbedPlayerNative' )
 120+ }
 121+
 122+ // Return the set of libs to be loaded
 123+ return dependencyRequest;
 124+ });
 125+ mw.addModuleLoader( 'EmbedPlayer', function() {
 126+ var _this = this;
 127+ } );
 128+
 129+ /**
 130+ * Takes a embed player element and updates a request object with any
 131+ * dependent libraries per that tags attributes.
 132+ *
 133+ * For example a player skin class name could result in adding some
 134+ * css and javascirpt to the player library request.
 135+ *
 136+ * @param {Object} playerElement The tag to check for library dependent request classes.
 137+ * @param {Array} dependencyRequest The library request array
 138+ */
 139+ mw.embedPlayerUpdateLibraryRequest = function(playerElement, dependencyRequest ){
 140+ var skinName = $j( playerElement ).attr( 'class' );
 141+ // Set playerClassName to default if unset or not a valid skin
 142+ if( ! skinName || $j.inArray( skinName.toLowerCase(), mw.validSkins ) == -1 ){
 143+ skinName = mw.getConfig( 'EmbedPlayer.SkinName' );
 144+ }
 145+ skinName = skinName.toLowerCase();
 146+ // Add the skin to the request
 147+ var skinCaseName = skinName.charAt(0).toUpperCase() + skinName.substr(1);
 148+
 149+ // The skin js:
 150+ if( $j.inArray( 'mw.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){
 151+ dependencyRequest.push( 'mw.PlayerSkin' + skinCaseName );
 152+ }
 153+
 154+ // The skin css
 155+ if( $j.inArray( 'mw.style.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){
 156+ dependencyRequest.push( 'mw.style.PlayerSkin' + skinCaseName );
 157+ }
 158+
 159+ // Allow extension to extend the request.
 160+ $j( mw ).trigger( 'LoaderEmbedPlayerUpdateRequest',
 161+ [ playerElement, dependencyRequest ] );
 162+ }
 163+
 164+} )( window.mw );
Property changes on: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/EmbedPlayer.loader.js
___________________________________________________________________
Added: svn:eol-style
1165 + native
Property changes on: branches/querypage-work2/extensions/LiquidThreads
___________________________________________________________________
Modified: svn:mergeinfo
2166 Merged /trunk/extensions/LiquidThreads:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/UploadWizard/resources/mw.LanguageUpWiz.js
___________________________________________________________________
Modified: svn:mergeinfo
3167 Merged /trunk/extensions/UploadWizard/resources/mw.LanguageUpWiz.js:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions/ContactPageFundraiser
___________________________________________________________________
Modified: svn:mergeinfo
4168 Merged /trunk/extensions/ContactPageFundraiser:r74986,74989,74991-74994,74998
Property changes on: branches/querypage-work2/extensions
___________________________________________________________________
Modified: svn:mergeinfo
5169 Merged /trunk/extensions:r74986,74989,74991-74994,74998

Status & tagging log