Index: branches/js2-work/phase3/js/mwEmbed/tests/media/sample_smil.xml |
— | — | @@ -1,47 +0,0 @@ |
2 | | -<smil xmlns="http://www.w3.org/2001/SMIL20/Language"> |
3 | | - <head> |
4 | | - <meta name="title" content="Simple Crossfading Example"/> |
5 | | - |
6 | | - <transition id="fromGreen" |
7 | | - type="fade" |
8 | | - subtype="fadeFromColor" |
9 | | - fadeColor="#87CF87" |
10 | | - dur="4s"/> |
11 | | - |
12 | | - <transition id="toGreen" |
13 | | - type="fade" |
14 | | - subtype="fadeToColor" |
15 | | - fadeColor="#87CF87" |
16 | | - dur="4s"/> |
17 | | - |
18 | | - <transition id="xFade" |
19 | | - type="fade" |
20 | | - subtype="crossfade" |
21 | | - dur="4s"/> |
22 | | - |
23 | | - </head> |
24 | | - <body> |
25 | | - <seq> |
26 | | - |
27 | | - <video src="http://upload.wikimedia.org/wikipedia/commons/d/d3/Okapia_johnstoni5.ogg" |
28 | | - region="video_region" |
29 | | - transIn="fromGreen" |
30 | | - transOut="xFade" |
31 | | - type="video/ogg" |
32 | | - fill="transition" |
33 | | - durationHint="15" |
34 | | - dur="7s" |
35 | | - poster="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Okapia_johnstoni5.ogg/mid-Okapia_johnstoni5.ogg.jpg"/> |
36 | | - |
37 | | - <video src="http://upload.wikimedia.org/wikipedia/commons/0/0d/B-36_bomber.ogg" |
38 | | - region="video_region" |
39 | | - fill="transition" |
40 | | - dur="10s" |
41 | | - durationHint="70" |
42 | | - type="video/ogg" |
43 | | - poster="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/B-36_bomber.ogg/mid-B-36_bomber.ogg.jpg"/> |
44 | | - </seq> |
45 | | - </body> |
46 | | -</smil> |
47 | | - |
48 | | - |
Index: branches/js2-work/phase3/js/mwEmbed/tests/media/sequence_transition_smil.xml |
— | — | @@ -0,0 +1,51 @@ |
| 2 | +<?xml version="1.0" encoding="UTF-8"?> |
| 3 | +<smil baseProfile="Language" version="3.0" xmlns="http://www.w3.org/ns/SMIL"> |
| 4 | + <head> |
| 5 | + <meta name="title" content="Simple Crossfading Example"/> |
| 6 | + |
| 7 | + <transition id="fromGreen" |
| 8 | + type="fade" |
| 9 | + subtype="fadeFromColor" |
| 10 | + fadeColor="#87CF87" |
| 11 | + dur="4s"/> |
| 12 | + |
| 13 | + <transition id="toGreen" |
| 14 | + type="fade" |
| 15 | + subtype="fadeToColor" |
| 16 | + fadeColor="#87CF87" |
| 17 | + dur="4s"/> |
| 18 | + |
| 19 | + <transition id="xFade" |
| 20 | + type="fade" |
| 21 | + subtype="crossfade" |
| 22 | + dur="4s"/> |
| 23 | + |
| 24 | + </head> |
| 25 | + <body> |
| 26 | + <seq> |
| 27 | + |
| 28 | + <video src="http://upload.wikimedia.org/wikipedia/commons/d/d3/Okapia_johnstoni5.ogg" |
| 29 | + region="video_region" |
| 30 | + transIn="fromGreen" |
| 31 | + transOut="xFade" |
| 32 | + type="video/ogg" |
| 33 | + fill="transition" |
| 34 | + durationHint="15" |
| 35 | + dur="9s" |
| 36 | + poster="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Okapia_johnstoni5.ogg/mid-Okapia_johnstoni5.ogg.jpg" |
| 37 | + /> |
| 38 | + |
| 39 | + <video src="http://upload.wikimedia.org/wikipedia/commons/0/0d/B-36_bomber.ogg" |
| 40 | + region="video_region" |
| 41 | + fill="transition" |
| 42 | + dur="10s" |
| 43 | + durationHint="70" |
| 44 | + type="video/ogg" |
| 45 | + poster="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/B-36_bomber.ogg/mid-B-36_bomber.ogg.jpg" |
| 46 | + /> |
| 47 | + </seq> |
| 48 | + |
| 49 | + </body> |
| 50 | +</smil> |
| 51 | + |
| 52 | + |
Property changes on: branches/js2-work/phase3/js/mwEmbed/tests/media/sequence_transition_smil.xml |
___________________________________________________________________ |
Name: svn:mergeinfo |
1 | 53 | + /branches/REL1_15/phase3/js2/mwEmbed/example_usage/media/sample_smil.xml:51646 |
/branches/sqlite/js2/mwEmbed/example_usage/media/sample_smil.xml:58211-58321 |
Name: svn:eol-style |
2 | 54 | + native |
Index: branches/js2-work/phase3/js/mwEmbed/tests/media/kenburns_smil.xml |
— | — | @@ -0,0 +1,51 @@ |
| 2 | +<?xml version="1.0" encoding="UTF-8"?> |
| 3 | +<smil baseProfile="Language" version="3.0" xmlns="http://www.w3.org/ns/SMIL"> |
| 4 | + <head> |
| 5 | + <meta name="title" content="Simple "Ken Burns" Example"/> |
| 6 | + |
| 7 | + <transition id="xFade" |
| 8 | + type="fade" |
| 9 | + subtype="crossfade" |
| 10 | + dur="4s"/> |
| 11 | + |
| 12 | + <layout> |
| 13 | + <root-layout height="320" width="240" backgroundColor="red" /> |
| 14 | + <region xml:id="B" top="0" left="0" height="320" width="240" backgroundColor="blue" /> |
| 15 | + </layout> |
| 16 | + |
| 17 | + </head> |
| 18 | + <body> |
| 19 | + <seq> |
| 20 | + <!-- source img is 437x599 !--> |
| 21 | + <img |
| 22 | + src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/79/JackDelanolocomotiveshop.jpg/437px-JackDelanolocomotiveshop.jpg" |
| 23 | + panZoom="0,0,90%,50%" |
| 24 | + dur="10s" |
| 25 | + region="B" |
| 26 | + fit="meet" |
| 27 | + fill="transition" |
| 28 | + > |
| 29 | + <--! scroll down and zoom in on the image !--> |
| 30 | + <animate attributeName="panZoom" |
| 31 | + values="5%,0,90%,50%; 0,50%,100%,50%" |
| 32 | + dur="10s" /> |
| 33 | + </img> |
| 34 | + <img |
| 35 | + src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/T%C3%BCrkenbund_Lilie%2C_Lilium_martagon.JPG/415px-T%C3%BCrkenbund_Lilie%2C_Lilium_martagon.JPG" |
| 36 | + panZoom="0,0,100,75" |
| 37 | + transIn="xFade" |
| 38 | + dur="10s" |
| 39 | + region="B" |
| 40 | + fit="meet" |
| 41 | + > |
| 42 | + <animate attributeName="panZoom" |
| 43 | + values="25,20,50,75; 45,55,50,75; 140,40,50,75; 35,0,100,150; 0,0,100,150" |
| 44 | + dur="20s" /> |
| 45 | + </img> |
| 46 | + |
| 47 | + </seq> |
| 48 | + |
| 49 | + </body> |
| 50 | +</smil> |
| 51 | + |
| 52 | + |
Index: branches/js2-work/phase3/js/mwEmbed/tests/Sequence_Editor.html |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | mw.ready(function(){ |
10 | 10 | mw.load( 'Sequencer', function(){ |
11 | 11 | $j('#seqcontainer').sequencer({ |
12 | | - 'mv_pl_src':'media/sample_smil.xml', |
| 12 | + 'mv_pl_src':'media/sequence_transition_smil.xml', |
13 | 13 | //set the add media wizard to only include commons: |
14 | 14 | 'amw_conf':{ |
15 | 15 | 'enabled_providers':['wiki_commons'] |
Index: branches/js2-work/phase3/js/mwEmbed/tests/Playlist_Render.html |
— | — | @@ -41,9 +41,13 @@ |
42 | 42 | </script> |
43 | 43 | </head> |
44 | 44 | <body> |
45 | | - <playlist id="render_player" src="media/sample_smil.xml" controls="false" width="320" height="240"></playlist> |
| 45 | + <playlist id="render_player" |
| 46 | + src="media/sequence_transition_smil.xml" |
| 47 | + controls="false" |
| 48 | + width="320" |
| 49 | + height="240"> |
| 50 | + </playlist> |
46 | 51 | |
47 | | - |
48 | 52 | <!--<video id="render_player" |
49 | 53 | durationHint="5" |
50 | 54 | src="http://upload.wikimedia.org/wikipedia/commons/4/41/Panthera_tigris8.ogg" |
— | — | @@ -62,6 +66,7 @@ |
63 | 67 | <button id="buttonStop">Stop</button> |
64 | 68 | Current Time: <input type="text" id="time_status" value="0.0" /> |
65 | 69 | <span id="status"></span><br> |
| 70 | + <button id="buttonSeek3">Seek to 3 seconds</button> |
66 | 71 | </div> |
67 | 72 | |
68 | 73 | </body> |
Index: branches/js2-work/phase3/js/mwEmbed/skins/mvpcf/styles.css |
— | — | @@ -494,7 +494,6 @@ |
495 | 495 | } |
496 | 496 | |
497 | 497 | .ui-widget-content input { |
498 | | - width: 450px; |
499 | 498 | padding: 5px; |
500 | 499 | } |
501 | 500 | |
— | — | @@ -513,6 +512,8 @@ |
514 | 513 | margin: 0 0.5em 0 -0.5em; |
515 | 514 | padding: 0 0.5em; |
516 | 515 | color: blue; |
| 516 | + list-style-image:none; |
| 517 | + cursor:pointer; |
517 | 518 | } |
518 | 519 | |
519 | 520 | ul.ui-provider-selection li .ui-selected { |
— | — | @@ -527,7 +528,7 @@ |
528 | 529 | |
529 | 530 | ul.ui-provider-selection li a { |
530 | 531 | color: blue; |
531 | | - text-decoration: none; |
| 532 | + text-decoration: none; |
532 | 533 | } |
533 | 534 | |
534 | 535 | /* Vertical Tabs |
— | — | @@ -591,8 +592,7 @@ |
592 | 593 | |
593 | 594 | .related_vids ul { |
594 | 595 | margin:0; |
595 | | - padding:0; |
596 | | - |
| 596 | + padding:0; |
597 | 597 | list-style-image:none; |
598 | 598 | list-style-position:inside; |
599 | 599 | list-style-type:none; |
— | — | @@ -600,7 +600,6 @@ |
601 | 601 | padding:0; |
602 | 602 | } |
603 | 603 | |
604 | | - |
605 | 604 | .related_vids li{ |
606 | 605 | -x-system-font:none; |
607 | 606 | color:#FAFAFA; |
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js |
— | — | @@ -1,4 +1,4 @@ |
2 | | -/* |
| 2 | +/** |
3 | 3 | * The Core timed Text interface object |
4 | 4 | * |
5 | 5 | * handles class mappings for: |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | "mwe-ftype-oga" : "Ogg audio file", |
55 | 55 | "mwe-ftype-ogg" : "Ogg video file", |
56 | 56 | "mwe-ftype-unk" : "Unknown file format", |
57 | | - |
| 57 | + |
58 | 58 | "rsd-wiki_commons-title": "Wikimedia Commons", |
59 | 59 | "rsd-wiki_commons": "Wikimedia Commons, an archive of freely-licensed educational media content (images, sound and video clips)", |
60 | 60 | |
— | — | @@ -202,9 +202,7 @@ |
203 | 203 | /** |
204 | 204 | * Content_providers documentation |
205 | 205 | * |
206 | | - * @enabled: whether the search provider can be selected |
207 | | - * |
208 | | - * @checked: whether the search provider will show up as selectable tab |
| 206 | + * @enabled: whether the search provider can be selected |
209 | 207 | * |
210 | 208 | * @default: default: if the current cp should be displayed (only one should be the default) |
211 | 209 | * |
— | — | @@ -240,8 +238,7 @@ |
241 | 239 | * Local wiki search |
242 | 240 | */ |
243 | 241 | 'this_wiki': { |
244 | | - 'enabled': 1, |
245 | | - 'checked': 1, |
| 242 | + 'enabled': 1, |
246 | 243 | 'api_url': ( wgServer && wgScriptPath ) ? |
247 | 244 | wgServer + wgScriptPath + '/api.php' : null, |
248 | 245 | 'lib': 'mediaWiki', |
— | — | @@ -254,7 +251,6 @@ |
255 | 252 | */ |
256 | 253 | 'kaltura': { |
257 | 254 | 'enabled': 1, |
258 | | - 'checked': 1, |
259 | 255 | 'homepage': 'http://kaltura.com', |
260 | 256 | 'api_url': 'http://kaldev.kaltura.com/michael/aggregator.php', |
261 | 257 | 'lib': 'kaltura', |
— | — | @@ -267,7 +263,6 @@ |
268 | 264 | */ |
269 | 265 | 'wiki_commons': { |
270 | 266 | 'enabled': 1, |
271 | | - 'checked': 1, |
272 | 267 | 'homepage': 'http://commons.wikimedia.org/wiki/Main_Page', |
273 | 268 | 'api_url': 'http://commons.wikimedia.org/w/api.php', |
274 | 269 | 'lib': 'mediaWiki', |
— | — | @@ -277,7 +272,7 @@ |
278 | 273 | // Commons can be enabled as a remote repo do check shared |
279 | 274 | 'check_shared': true, |
280 | 275 | |
281 | | - // List all the domains where commons is local: |
| 276 | + // List all the domains where commons is local ( lets you avoid an api check for "shared" repo ) |
282 | 277 | 'local_domains': [ 'wikimedia', 'wikipedia', 'wikibooks' ], |
283 | 278 | |
284 | 279 | // Specific to wiki commons config: |
— | — | @@ -290,7 +285,6 @@ |
291 | 286 | */ |
292 | 287 | 'archive_org': { |
293 | 288 | 'enabled': 1, |
294 | | - 'checked': 1, |
295 | 289 | 'homepage': 'http://www.archive.org/about/about.php', |
296 | 290 | |
297 | 291 | 'api_url': 'http://www.archive.org/advancedsearch.php', |
— | — | @@ -305,7 +299,6 @@ |
306 | 300 | */ |
307 | 301 | 'flickr': { |
308 | 302 | 'enabled': 1, |
309 | | - 'checked': 1, |
310 | 303 | 'homepage': 'http://www.flickr.com/about/', |
311 | 304 | |
312 | 305 | 'api_url': 'http://www.flickr.com/services/rest/', |
— | — | @@ -321,7 +314,6 @@ |
322 | 315 | */ |
323 | 316 | 'metavid': { |
324 | 317 | 'enabled': 1, |
325 | | - 'checked': 1, |
326 | 318 | 'homepage': 'http://metavid.org/wiki/Metavid_Overview', |
327 | 319 | 'api_url': 'http://metavid.org/w/index.php?title=Special:MvExportSearch', |
328 | 320 | 'lib': 'metavid', |
— | — | @@ -349,8 +341,7 @@ |
350 | 342 | * Special Upload tab provider |
351 | 343 | */ |
352 | 344 | 'upload': { |
353 | | - 'enabled': 1, |
354 | | - 'checked': 1, |
| 345 | + 'enabled': 1, |
355 | 346 | 'title': 'Upload' |
356 | 347 | } |
357 | 348 | }, |
— | — | @@ -485,7 +476,7 @@ |
486 | 477 | // Set up the local API upload URL |
487 | 478 | if ( _this.upload_api_target == 'local' ) { |
488 | 479 | if ( ! _this.local_wiki_api_url ) { |
489 | | - $j( '#tab-upload' ).html( gM( 'rsd_config_error', 'missing_local_api_url' ) ); |
| 480 | + $j( '#rsd_results_container' ).html( gM( 'rsd_config_error', 'missing_local_api_url' ) ); |
490 | 481 | return false; |
491 | 482 | } else { |
492 | 483 | _this.upload_api_target = _this.local_wiki_api_url; |
— | — | @@ -862,7 +853,7 @@ |
863 | 854 | for ( var providerName in this.content_providers ) { |
864 | 855 | var content_providers = this.content_providers; |
865 | 856 | var provider = content_providers[ providerName ]; |
866 | | - if ( provider.enabled && provider.checked && provider.api_url ) { |
| 857 | + if ( provider.enabled && provider.api_url ) { |
867 | 858 | var $anchor = $j( '<div />' ) |
868 | 859 | .text( gM( 'rsd-' + providerName + '-title' ) ) |
869 | 860 | .attr({ |
— | — | @@ -877,6 +868,8 @@ |
878 | 869 | .removeClass( 'ui-selected' ); |
879 | 870 | $j( this ).addClass( 'ui-selected' ); |
880 | 871 | _this.current_provider = $j( this ).attr( "name" ); |
| 872 | + // Update the search results on provider selection |
| 873 | + _this.showSearchTab( _this.current_provider, true ); |
881 | 874 | }); |
882 | 875 | |
883 | 876 | var $listItem = $j( '<li />' ); |
— | — | @@ -907,17 +900,24 @@ |
908 | 901 | |
909 | 902 | $searchForm.append( $providerSelection ); |
910 | 903 | $searchForm.append( $searchBox ); |
911 | | - $searchForm.append( $searchButton ); |
912 | | - /* |
| 904 | + $searchForm.append( $searchButton ); |
913 | 905 | // Add optional upload buttons. |
914 | 906 | if ( this.content_providers['upload'].enabled) { |
915 | | - $uploadButton = $j.button({icon_id: 'upload', text: 'upload'}) |
916 | | - .addClass("rsd_upload_button"); |
| 907 | + $uploadButton = $j.button( { icon_id: 'disk', text: gM( 'mwe-upload_tab' ) }) |
| 908 | + .addClass("rsd_upload_button") |
| 909 | + .click(function(){ |
| 910 | + _this.current_provider = 'upload'; |
| 911 | + _this.showUploadTab( ); |
| 912 | + }); |
| 913 | + $searchForm.append( $uploadButton ); |
| 914 | + /* |
| 915 | + // Import functionality not yet supported |
917 | 916 | $importButton = $j.button({icon_id: 'import', text: 'import'}) |
918 | 917 | .addClass("rsd_import_button"); |
919 | | - $searchForm.append( $uploadButton ).append( $importButton ); |
| 918 | + .append( $importButton ); |
| 919 | + */ |
920 | 920 | } |
921 | | - */ |
| 921 | + |
922 | 922 | $controlContainer.append( $searchForm ); |
923 | 923 | |
924 | 924 | return $controlContainer; |
— | — | @@ -930,42 +930,17 @@ |
931 | 931 | mw.log( "showUploadTab::" ); |
932 | 932 | var _this = this; |
933 | 933 | // set it to loading: |
934 | | - $j( '#tab-upload' ).loadingSpinner(); |
935 | | - // Do things async to keep interface snappy |
936 | | - setTimeout( |
937 | | - function() { |
938 | | - // check if we need to setup the proxy:: |
939 | | - if ( _this.upload_api_target == 'proxy' ) { |
940 | | - _this.setupProxy( function() { |
941 | | - _this.showUploadForm(); |
942 | | - } ); |
943 | | - } else { |
944 | | - _this.showUploadForm(); |
945 | | - } |
946 | | - }, |
947 | | - 1 ); |
948 | | - }, |
949 | | - |
950 | | - /** |
951 | | - * Shows the upload from |
952 | | - */ |
953 | | - showUploadForm: function() { |
954 | | - var _this = this; |
| 934 | + $j( '#rsd_results_container' ).loadingSpinner(); |
| 935 | + //Show the upload form |
955 | 936 | mw.load( ['$j.fn.simpleUploadForm'], function() { |
956 | 937 | var provider = _this.content_providers['this_wiki']; |
957 | 938 | |
958 | | - // check for "this_wiki" enabled |
959 | | - /*if(!provider.enabled){ |
960 | | - $j('#tab-upload') |
961 | | - .html('error this_wiki not enabled (can\'t get uploaded file info)'); |
962 | | - return false; |
963 | | - }*/ |
964 | | - |
965 | 939 | // Load this_wiki search system to grab the resource |
966 | 940 | _this.loadSearchLib( provider, function() { |
967 | | - _this.showUploadForm_internal( provider ); |
| 941 | + _this.showUploadForm( provider ); |
968 | 942 | } ); |
969 | 943 | } ); |
| 944 | + |
970 | 945 | }, |
971 | 946 | |
972 | 947 | /** |
— | — | @@ -973,39 +948,49 @@ |
974 | 949 | * |
975 | 950 | * @param {Object} provider Provider object for Upload From |
976 | 951 | */ |
977 | | - showUploadForm_internal: function( provider ) { |
| 952 | + showUploadForm: function( provider ) { |
978 | 953 | var _this = this; |
979 | 954 | var uploadMsg = gM( 'mwe-upload_a_file', _this.upload_api_name ); |
980 | 955 | var recentUploadsMsg = gM( 'mwe-your_recent_uploads', _this.upload_api_name ); |
981 | 956 | |
982 | 957 | // Do basic layout form on left upload "bin" on right |
983 | | - $j( '#tab-upload' ).html( |
984 | | - '<table>' + |
985 | | - '<tr>' + |
986 | | - '<td valign="top" style="width:350px; padding-right: 12px;">' + |
987 | | - '<h4>' + uploadMsg + '</h4>' + |
988 | | - '<div id="upload_form">' + |
989 | | - mw.loading_spinner() + |
990 | | - '</div>' + |
991 | | - '</td>' + |
992 | | - '<td valign="top" id="upload_bin_cnt">' + |
993 | | - '<h4>' + recentUploadsMsg + '</h4>' + |
994 | | - '<div id="upload_bin">' + |
995 | | - mw.loading_spinner() + |
996 | | - '</div>' + |
997 | | - '</td>' + |
998 | | - '</tr>' + |
999 | | - '</table>' |
| 958 | + $uploadTableRow = $j('<tr />').append( |
| 959 | + $j('<td />').attr( { |
| 960 | + 'valign':'top' |
| 961 | + } ) |
| 962 | + .css({ |
| 963 | + 'width' : '350px', |
| 964 | + 'padding-right' : '12px' |
| 965 | + }) |
| 966 | + .append( |
| 967 | + $j('<h4 />').text( uploadMsg ), |
| 968 | + $j('<div />').attr({ |
| 969 | + 'id': 'upload_form' |
| 970 | + }) |
| 971 | + .loadingSpinner() |
| 972 | + ), |
| 973 | + |
| 974 | + $j('<td />').attr( { |
| 975 | + 'valign' : 'top', |
| 976 | + 'id':'upload_bin' |
| 977 | + } ) |
| 978 | + .loadingSpinner() |
| 979 | + ) |
| 980 | + $j( '#rsd_results_container' ).html( |
| 981 | + $j('<table />').append( |
| 982 | + $uploadTableRow |
| 983 | + ) |
1000 | 984 | ); |
1001 | 985 | |
1002 | 986 | // Fill in the user uploads: |
1003 | 987 | if ( typeof wgUserName != 'undefined' && wgUserName ) { |
1004 | 988 | // Load the upload bin with anything the current user has uploaded |
1005 | | - provider.sObj.getUserRecentUploads( wgUserName, function( ) { |
| 989 | + provider.sObj.getUserRecentUploads( wgUserName, function( ) { |
| 990 | + $j('#upload_bin').empty().append( |
| 991 | + $j('<h4 />').text( recentUploadsMsg ) |
| 992 | + ); |
1006 | 993 | _this.showResults(); |
1007 | 994 | } ); |
1008 | | - } else { |
1009 | | - $j( '#upload_bin_cnt' ).empty(); |
1010 | 995 | } |
1011 | 996 | |
1012 | 997 | // Deal with the api form upload form directly: |
— | — | @@ -1334,24 +1319,27 @@ |
1335 | 1320 | var o = ''; |
1336 | 1321 | var tabSelector = '#rsd_results_container'; |
1337 | 1322 | var provider = this.content_providers[ this.current_provider ]; |
| 1323 | + |
1338 | 1324 | |
1339 | | - // TODO: clean this up |
1340 | | - /* |
| 1325 | + // The "upload" tab has special results output target rather than top level |
| 1326 | + // resutls container. |
| 1327 | + // @@todo Clean up by moving the rsd_results_container down in the DOM for selected tab display. |
| 1328 | + // ( will be need once we add left side filter controls |
| 1329 | + // that are exclusive to some providers ) |
1341 | 1330 | if ( this.current_provider == 'upload' ) { |
1342 | | - tabSelector = '#upload_bin'; |
| 1331 | + $resultsContainer = $j('#upload_bin'); |
1343 | 1332 | var provider = _this.content_providers['this_wiki']; |
1344 | 1333 | } else { |
1345 | 1334 | var provider = this.content_providers[ this.current_provider ]; |
1346 | | - tabSelector = '#tab-' + this.current_provider; |
1347 | | - // Output the results bar / controls |
| 1335 | + $resultsContainer = $j('#rsd_results_container'); |
| 1336 | + |
| 1337 | + // Add the results header: |
| 1338 | + $resultsContainer.empty().append( this.createResultsHeader() ) |
1348 | 1339 | } |
1349 | | - */ |
1350 | 1340 | |
1351 | 1341 | // Empty the existing results: |
1352 | 1342 | // $j( tabSelector ).empty(); |
1353 | | - this.$resultsContainer.empty(); |
1354 | | - |
1355 | | - this.$resultsContainer.append( _this.createResultsHeader() ); |
| 1343 | + |
1356 | 1344 | var numResults = 0; |
1357 | 1345 | |
1358 | 1346 | // Output all the results for the current current_provider |
— | — | @@ -1361,20 +1349,22 @@ |
1362 | 1350 | numResults++; |
1363 | 1351 | } ); |
1364 | 1352 | // Put in the tab output (plus clear the output) |
1365 | | - this.$resultsContainer.append( o + '<div style="clear:both"/>' ); |
| 1353 | + $resultsContainer.append( o + '<div style="clear:both"/>' ); |
1366 | 1354 | } |
1367 | | - |
1368 | | - this.$resultsContainer.append( _this.createResultsFooter() ); |
| 1355 | + // @@TODO should abstract footer and header ~outside~ of search results |
| 1356 | + // to have less leakgege with upload tab |
| 1357 | + if ( this.current_provider != 'upload' ) { |
| 1358 | + $resultsContainer.append( _this.createResultsFooter() ); |
| 1359 | + } |
1369 | 1360 | |
1370 | | - mw.log( 'did numResults :: ' + numResults + |
1371 | | - ' append: ' + $j( '#rsd_q' ).val() ); |
1372 | | - // Remove any old search res |
| 1361 | + mw.log( 'did numResults :: ' + numResults + ' append: ' + $j( '#rsd_q' ).val() ); |
| 1362 | + |
| 1363 | + // Add "no search results" text |
1373 | 1364 | $j( '#rsd_no_search_res' ).remove(); |
1374 | 1365 | if ( numResults == 0 ) { |
1375 | | - $j( '#tab-' + provider.id ).append( |
1376 | | - '<span style="padding:10px">' + |
1377 | | - gM( 'rsd_no_results', $j( '#rsd_q' ).val() ) + |
1378 | | - '</span>' ); |
| 1366 | + $resultsContainer.append( |
| 1367 | + gM( 'rsd_no_results', $j( '#rsd_q' ).val() ) |
| 1368 | + ) |
1379 | 1369 | } |
1380 | 1370 | this.addResultBindings(); |
1381 | 1371 | }, |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -316,7 +316,7 @@ |
317 | 317 | callbackFunctions : null, |
318 | 318 | |
319 | 319 | /** |
320 | | - * Constructor initialises callbackFunctions and playerList |
| 320 | + * Constructor initializes callbackFunctions and playerList |
321 | 321 | */ |
322 | 322 | init: function( ) { |
323 | 323 | this.callbackFunctions = new Array(); |
— | — | @@ -1612,7 +1612,7 @@ |
1613 | 1613 | |
1614 | 1614 | // Make sure the player is |
1615 | 1615 | mw.log( 'performing embed for ' + _this.id ); |
1616 | | - // mw.log('shopuld embed:' + embed_code); |
| 1616 | + // mw.log('should embed:' + embed_code); |
1617 | 1617 | $j( '#' + _this.id ).html( _this.getEmbedHTML() ); |
1618 | 1618 | }, |
1619 | 1619 | /** |
— | — | @@ -1641,7 +1641,7 @@ |
1642 | 1642 | |
1643 | 1643 | /** |
1644 | 1644 | * Get Related Clips from a category list |
1645 | | - * Configuration specific ( should be factored into a seperate module ) |
| 1645 | + * Configuration specific ( should be factored into a separate module ) |
1646 | 1646 | * @parma {Object} catlist List of categories |
1647 | 1647 | */ |
1648 | 1648 | getRelatedFromCat:function( catlist ) { |
— | — | @@ -1962,19 +1962,17 @@ |
1963 | 1963 | * Usefull for updating for when new playback system is selected |
1964 | 1964 | */ |
1965 | 1965 | refreshControls:function() { |
1966 | | - if ( $j( '#' + this.id + ' .control-bar' ).length == 0 ) { |
1967 | | - mw.log( 'refreshControls::control-bar not present, no refresh' ); |
| 1966 | + if ( this.$interface.find( '.control-bar' ).length == 0 ) { |
| 1967 | + mw.log( 'Error: refreshControls::control-bar not present, no refresh' ); |
1968 | 1968 | return ; |
1969 | 1969 | } |
1970 | 1970 | // Do update controls: |
1971 | | - $j( '#' + this.id + ' .control-bar' ).html( this.getControls() ); |
1972 | | - this.ctrlBuilder.addControlHooks(); |
1973 | | - |
| 1971 | + this.$interface.find( '.control-bar' ).html( this.getControls() ); |
| 1972 | + this.ctrlBuilder.addControlHooks(); |
1974 | 1973 | }, |
1975 | 1974 | |
1976 | 1975 | /** |
1977 | 1976 | * Show the player |
1978 | | - * |
1979 | 1977 | */ |
1980 | 1978 | showPlayer : function () { |
1981 | 1979 | // set-up the local ctrlBuilder instance: |
— | — | @@ -3031,6 +3029,9 @@ |
3032 | 3030 | * players and supported mime types |
3033 | 3031 | * In an ideal world we would query the plugin to get what mime |
3034 | 3032 | * types it supports in practice not always reliable/avaliable |
| 3033 | +* |
| 3034 | +* We can't cleanly store these values per library since player library is loaded post player detection |
| 3035 | +* |
3035 | 3036 | */ |
3036 | 3037 | |
3037 | 3038 | //Flash based players: |
— | — | @@ -3038,23 +3039,29 @@ |
3039 | 3040 | var kplayer = new mediaPlayer('kplayer', ['video/x-flv', 'video/h264'], 'kplayer'); |
3040 | 3041 | var omtkPlayer = new mediaPlayer( 'omtkplayer', ['audio/ogg'], 'omtk' ); |
3041 | 3042 | |
3042 | | -//Java based player |
3043 | | -var cortadoPlayer = new mediaPlayer( 'cortado', ['video/ogg', 'audio/ogg'], 'java' ); |
| 3043 | +// Java based player |
| 3044 | +var cortadoPlayer = new mediaPlayer( 'cortado', ['video/ogg', 'audio/ogg', 'application/ogg'], 'java' ); |
3044 | 3045 | |
3045 | | -//Native html5 player |
3046 | | -var videoElementPlayer = new mediaPlayer( 'videoElement', ['video/ogg', 'audio/ogg'], 'native' ); |
| 3046 | +// Native html5 player |
| 3047 | +var videoElementPlayer = new mediaPlayer( 'videoElement', ['video/ogg', 'audio/ogg', 'application/ogg'], 'native' ); |
3047 | 3048 | |
3048 | | -//VLC player |
3049 | | -var vlcMineList = ['video/ogg', 'audio/ogg', 'video/x-flv', 'video/mp4', 'video/h264']; |
| 3049 | +// VLC player |
| 3050 | +var vlcMineList = ['video/ogg', 'audio/ogg', 'application/ogg', 'video/x-flv', 'video/mp4', 'video/h264']; |
3050 | 3051 | var vlcPlayer = new mediaPlayer( 'vlc-player', vlcMineList, 'vlc' ); |
3051 | 3052 | |
3052 | | -//Generic plugin |
3053 | | -var oggPluginPlayer = new mediaPlayer( 'oggPlugin', ['video/ogg'], 'generic' ); |
| 3053 | +// Generic plugin |
| 3054 | +var oggPluginPlayer = new mediaPlayer( 'oggPlugin', ['video/ogg', 'application/ogg'], 'generic' ); |
3054 | 3055 | |
3055 | | -//HTML player for timed display of html contnet ( used in sequencer ) |
| 3056 | +// HTML player for timed display of html content |
3056 | 3057 | var htmlPlayer = new mediaPlayer( 'html', ['text/html', 'image/jpeg', 'image/png', 'image/svg'], 'html' ); |
3057 | 3058 | |
| 3059 | +// SMIL player for ( mime types from: http://gonze.com/playlists/playlist-format-survey.html ) |
| 3060 | +// Only add if playlist module exists |
| 3061 | +if( mw.getClassPath( 'playlistEmbed' ) ) { |
| 3062 | + var playlistPlayer = new mediaPlayer( 'playlist', ['application/smil', 'application/xspf+xml', 'audio/mpegurl'], 'playlist' ); |
| 3063 | +} |
3058 | 3064 | |
| 3065 | + |
3059 | 3066 | /** |
3060 | 3067 | * mediaPlayers is a collection of mediaPlayer objects supported by the client. |
3061 | 3068 | * @constructor |
— | — | @@ -3127,14 +3134,12 @@ |
3128 | 3135 | getMIMETypePlayers: function( mime_type ) { |
3129 | 3136 | var mime_players = new Array(); |
3130 | 3137 | var _this = this; |
3131 | | - var inx = 0; |
3132 | 3138 | if ( this.default_players[mime_type] ) { |
3133 | | - $j.each( this.default_players[mime_type], function( d, lib ) { |
3134 | | - var library = _this.default_players[mime_type][d]; |
| 3139 | + $j.each( this.default_players[ mime_type ], function( d, lib ) { |
| 3140 | + var library = _this.default_players[ mime_type ][ d ]; |
3135 | 3141 | for ( var i = 0; i < _this.players.length; i++ ) { |
3136 | 3142 | if ( _this.players[i].library == library && _this.players[i].supportsMIMEType( mime_type ) ) { |
3137 | | - mime_players[ inx ] = _this.players[i]; |
3138 | | - inx++; |
| 3143 | + mime_players.push( _this.players[i] ); |
3139 | 3144 | } |
3140 | 3145 | } |
3141 | 3146 | } ); |
— | — | @@ -3150,7 +3155,7 @@ |
3151 | 3156 | * Player for mime type |
3152 | 3157 | * null if no player found |
3153 | 3158 | */ |
3154 | | - defaultPlayer : function( mime_type ) { |
| 3159 | + defaultPlayer : function( mime_type ) { |
3155 | 3160 | //mw.log( "get defaultPlayer for " + mime_type ); |
3156 | 3161 | var mime_players = this.getMIMETypePlayers( mime_type ); |
3157 | 3162 | if ( mime_players.length > 0 ) |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/nativeEmbed.js |
— | — | @@ -266,7 +266,7 @@ |
267 | 267 | play: function() { |
268 | 268 | this.getPlayerElement(); |
269 | 269 | this.parent_play(); // update interface |
270 | | - if ( this.playerElement ) { |
| 270 | + if ( this.playerElement && this.playerElement.play ) { |
271 | 271 | this.playerElement.play(); |
272 | 272 | // re-start the monitor: |
273 | 273 | this.monitor(); |
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/playListEmbed.js |
— | — | @@ -1,60 +0,0 @@ |
2 | | -/** |
3 | | - * The playlistEmbed object code |
4 | | - * Acts as a playback system for embedPlayer where the src |
5 | | - * is xml with multiple files |
6 | | - * |
7 | | - * Only works with "video" tag browsers |
8 | | - * |
9 | | - * @author: Michael Dale mdale@wikimedia.org |
10 | | - * @license GPL2 |
11 | | - * |
12 | | - * supports frame by frame rendering of "smil" and other playlist formats |
13 | | - * supports basic drop frame live playback of "smil" and other playlist formats |
14 | | - * |
15 | | - * Extends the "embedPlayer" and represents the playlist as a single video stream |
16 | | - * |
17 | | - */ |
18 | | -var playListEmbed = { |
19 | | - |
20 | | - // Instance Name |
21 | | - instanceOf: 'playListEmbed', |
22 | | - |
23 | | - // Native player supported feature set |
24 | | - supports: { |
25 | | - 'play_head': true, |
26 | | - 'pause': true, |
27 | | - 'fullscreen': false, |
28 | | - 'time_display': true, |
29 | | - 'volume_control': true, |
30 | | - 'overlays': true, |
31 | | - }, |
32 | | - |
33 | | - /** |
34 | | - * Return the embed code for the first clip in the playlist |
35 | | - * ( monitor and seek handle clip switching ) |
36 | | - */ |
37 | | - getEmbedHTML : function () { |
38 | | - var _this = this; |
39 | | - var embed_code = this.getEmbedObj(); |
40 | | - mw.log( "embed code: " + embed_code ) |
41 | | - setTimeout( function(){ |
42 | | - _this.postEmbedJS(); |
43 | | - }, 150 ); |
44 | | - return embed_code; |
45 | | - }, |
46 | | - |
47 | | - /** |
48 | | - * Get the native embed code for clipset at given time and seek |
49 | | - */ |
50 | | - getEmbedObj:function() { |
51 | | - // Output Video tag for every clip in next 20s |
52 | | - var eb = '<video ' + |
53 | | - 'id="' + this.pid + '" ' + |
54 | | - 'style="width:' + this.width + 'px;height:' + this.height + 'px;" ' + |
55 | | - 'width="' + this.width + '" height="' + this.height + '" ' + |
56 | | - 'src="' + this.getSrc() + '" ' + |
57 | | - '</video>'; |
58 | | - return eb; |
59 | | - }, |
60 | | - |
61 | | -} |
\ No newline at end of file |
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/loader.js |
— | — | @@ -8,7 +8,9 @@ |
9 | 9 | "mw.TimedEffectsEdit" : "modules/Sequencer/mvTimedEffectsEdit.js", |
10 | 10 | "mw.FirefoggRender" : "modules/Sequencer/mw.FirefoggRender.js", |
11 | 11 | |
12 | | - "RemoteMwSequencer" : "modules/Sequencer/remotes/RemoteMwSequencer.js" |
| 12 | + "RemoteMwSequencer" : "modules/Sequencer/remotes/RemoteMwSequencer.js", |
| 13 | + |
| 14 | + "playlistEmbed" : "modules/Sequencer/playlistEmbed.js" |
13 | 15 | } ); |
14 | 16 | |
15 | 17 | mw.addModuleLoader( 'FirefoggRender', function( callback) { |
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/playlistEmbed.js |
— | — | @@ -0,0 +1,66 @@ |
| 2 | +/** |
| 3 | + * The playlistEmbed object code |
| 4 | + * Acts as a playback system for embedPlayer where the src |
| 5 | + * is smil xml or other playlist xml |
| 6 | + * |
| 7 | + * Only works with "video" tag browsers |
| 8 | + * |
| 9 | + * @author: Michael Dale mdale@wikimedia.org |
| 10 | + * @license GPL2 |
| 11 | + * |
| 12 | + * supports frame by frame rendering of "smil" and other playlist formats |
| 13 | + * supports basic drop frame live playback of "smil" and other playlist formats |
| 14 | + * |
| 15 | + * Extends the "embedPlayer" and represents the playlist as a single video stream |
| 16 | + * |
| 17 | + */ |
| 18 | +var playlistEmbed = { |
| 19 | + |
| 20 | + // Instance Name |
| 21 | + instanceOf: 'playListEmbed', |
| 22 | + |
| 23 | + // Native player supported feature set |
| 24 | + supports: { |
| 25 | + 'play_head': true, |
| 26 | + 'pause': true, |
| 27 | + 'fullscreen': false, |
| 28 | + 'time_display': true, |
| 29 | + 'volume_control': true, |
| 30 | + 'overlays': true, |
| 31 | + }, |
| 32 | + |
| 33 | + /** |
| 34 | + * put the embed player into the container |
| 35 | + */ |
| 36 | + doEmbedPlayer: function(){ |
| 37 | + var _this = this; |
| 38 | + // Set "loading" here: |
| 39 | + $j(this).text( gM( 'mwe-loading_plugin' ) ); |
| 40 | + |
| 41 | + // Get the clips in range |
| 42 | + |
| 43 | + // Start loading all the assets |
| 44 | + |
| 45 | + }, |
| 46 | + |
| 47 | + /** |
| 48 | + * Get the thumbnail html |
| 49 | + */ |
| 50 | + getThumbnailHTML: function(){ |
| 51 | + return 'thumb html'; |
| 52 | + } |
| 53 | + /** |
| 54 | + * Seeks to the requested time and issues a callback when ready / displayed |
| 55 | + * (should be overwritten by client that supports frame serving) |
| 56 | + */ |
| 57 | + setCurrentTime: function( time, callback ) { |
| 58 | + |
| 59 | + }, |
| 60 | + |
| 61 | + /** |
| 62 | + * Get all the "clips" in a given range from currentTime |
| 63 | + */ |
| 64 | + getClipsInRange: function( range ){ |
| 65 | + |
| 66 | + } |
| 67 | +} |
\ No newline at end of file |
Property changes on: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/playlistEmbed.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
1 | 68 | + /branches/REL1_15/phase3/js2/mwEmbed/libSequencer/mvPlayList.js:51646 |
/branches/sqlite/js2/mwEmbed/libSequencer/mvPlayList.js:58211-58321 |
Name: svn:eol-style |
2 | 69 | + native |
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.PlayList.js |
— | — | @@ -678,7 +678,7 @@ |
679 | 679 | this.cur_clip.embed.stop(); |
680 | 680 | }, |
681 | 681 | updateCurrentClip : function( new_clip , into_perc) { |
682 | | - mw.log( 'f:updateCurrentClip:' + new_clip.id ); |
| 682 | + //mw.log( 'f:updateCurrentClip:' + new_clip.id ); |
683 | 683 | |
684 | 684 | // keep the active play clip in sync (stop the other clip) |
685 | 685 | if ( this.cur_clip ) { |
— | — | @@ -862,7 +862,8 @@ |
863 | 863 | // playlist stops playback for the current clip (and resets state for start clips) |
864 | 864 | stop:function() { |
865 | 865 | var _this = this; |
866 | | - mw.log("mw.PlayList stop:"+ this.start_clip.id + ' c:'+this.cur_clip.id); |
| 866 | + //mw.log("mw.PlayList stop:"+ this.start_clip.id + ' c:'+this.cur_clip.id); |
| 867 | + this.updatePlayHead(0); |
867 | 868 | this.setupClipDisplay(); |
868 | 869 | }, |
869 | 870 | doSeek:function( v ) { |
— | — | @@ -880,7 +881,7 @@ |
881 | 882 | return ''; |
882 | 883 | }, |
883 | 884 | setCurrentTime: function( time, callback ) { |
884 | | - mw.log( 'pl:setCurrentTime:' + time ); |
| 885 | + //mw.log( 'pl:setCurrentTime:' + time ); |
885 | 886 | var _this = this; |
886 | 887 | _this.currentTime = time; |
887 | 888 | |
— | — | @@ -1599,7 +1600,7 @@ |
1600 | 1601 | * @param offSetTime default value 0 if we need to start rendering from a given time |
1601 | 1602 | */ |
1602 | 1603 | doInitTransition:function( tObj ) { |
1603 | | - mw.log( 'mvTransLib:f:doInitTransition' ); |
| 1604 | + //mw.log( 'mvTransLib:f:doInitTransition' ); |
1604 | 1605 | if ( !tObj.type ) { |
1605 | 1606 | mw.log( 'transition is missing type attribute' ); |
1606 | 1607 | return false; |
— | — | @@ -1705,7 +1706,7 @@ |
1706 | 1707 | fadeFromColor: { |
1707 | 1708 | 'attr' : ['fadeColor'], |
1708 | 1709 | 'init' : function( tObj ) { |
1709 | | - mw.log('f:fadeFromColor: '+tObj.overlay_selector_id +' to color: '+ tObj.fadeColor); |
| 1710 | + //mw.log('f:fadeFromColor: '+tObj.overlay_selector_id +' to color: '+ tObj.fadeColor); |
1710 | 1711 | if ( !tObj.fadeColor ) |
1711 | 1712 | mw.log( 'missing fadeColor' ); |
1712 | 1713 | if ( $j( '#' + tObj.overlay_selector_id ).length == 0 ) { |
— | — | @@ -1730,7 +1731,7 @@ |
1731 | 1732 | crossfade: { |
1732 | 1733 | "attr" : [], |
1733 | 1734 | "init" : function( tObj ) { |
1734 | | - mw.log( 'f:crossfade: ' + tObj.overlay_selector_id ); |
| 1735 | + //mw.log( 'f:crossfade: ' + tObj.overlay_selector_id ); |
1735 | 1736 | if ( $j( '#' + tObj.overlay_selector_id ).length == 0 ) |
1736 | 1737 | mw.log( "ERROR overlay selector not found: " + tObj.overlay_selector_id ); |
1737 | 1738 | |
Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js |
— | — | @@ -956,7 +956,7 @@ |
957 | 957 | } |
958 | 958 | |
959 | 959 | // Check for javascript class |
960 | | - if( this.classPaths[ loadRequest ] ){ |
| 960 | + if( this.getClassPath( loadRequest ) ){ |
961 | 961 | mw.log('mw.load: loadClass: ' + loadRequest ); |
962 | 962 | this.loadClass( loadRequest, callback ); |
963 | 963 | return ; |
— | — | @@ -1067,7 +1067,7 @@ |
1068 | 1068 | var coma = ''; |
1069 | 1069 | for( var i=0; i < groupedLoadSet.length; i++ ) { |
1070 | 1070 | var loadName = groupedLoadSet[ i ]; |
1071 | | - if( this.classPaths[ loadName ] ) { |
| 1071 | + if( this.getClassPath( loadName ) ) { |
1072 | 1072 | // Only add to group request if not already set: |
1073 | 1073 | if ( !mw.isset( loadName ) ){ |
1074 | 1074 | groupClassKey += coma + loadName |
— | — | @@ -1152,7 +1152,7 @@ |
1153 | 1153 | scriptRequest = className; |
1154 | 1154 | }else{ |
1155 | 1155 | // Get the class url: |
1156 | | - var baseClassPath = this.classPaths[ className ]; |
| 1156 | + var baseClassPath = this.getClassPath( className ); |
1157 | 1157 | // Add the mwEmbed path if not a root path or a full url |
1158 | 1158 | if( baseClassPath.indexOf( '/' ) !== 0 && |
1159 | 1159 | baseClassPath.indexOf('://') === -1 ){ |
— | — | @@ -1177,7 +1177,7 @@ |
1178 | 1178 | // Issue the request to load the class (include class name in result callback: |
1179 | 1179 | mw.getScript( scriptRequest, function( scriptRequest ) { |
1180 | 1180 | if(! mw.isset( className ) && callback){ |
1181 | | - mw.log( 'Possible Error: ' + className +' not set in time, or not defined in:' + "\n" + _this.classPaths[ className ] ); |
| 1181 | + mw.log( 'Possible Error: ' + className +' not set in time, or not defined in:' + "\n" + _this.getClassPath( className ) ); |
1182 | 1182 | } |
1183 | 1183 | // make sure callback is set and mwLoadDoneCB has not been called |
1184 | 1184 | if( callback ){ |
— | — | @@ -1235,6 +1235,16 @@ |
1236 | 1236 | } |
1237 | 1237 | }, |
1238 | 1238 | |
| 1239 | + /** |
| 1240 | + * get a class path forom a className |
| 1241 | + * if no class found return false |
| 1242 | + */ |
| 1243 | + getClassPath: function( className ){ |
| 1244 | + if( this.classPaths[ className ] ) |
| 1245 | + return this.classPaths[ className ] |
| 1246 | + return false; |
| 1247 | + }, |
| 1248 | + |
1239 | 1249 | /** |
1240 | 1250 | * Add a style sheet to be loaded the same time as the requested class |
1241 | 1251 | * |
— | — | @@ -1288,8 +1298,13 @@ |
1289 | 1299 | mw.addClassFilePaths = function ( classSet ) { |
1290 | 1300 | return mw.loader.addClassFilePaths( classSet ); |
1291 | 1301 | } |
1292 | | - |
1293 | 1302 | /** |
| 1303 | + * Get Class File Path entry point: |
| 1304 | + */ |
| 1305 | + mw.getClassPath = function( className ) { |
| 1306 | + return mw.loader.getClassPath( className ); |
| 1307 | + } |
| 1308 | + /** |
1294 | 1309 | * Add Class Style Sheet entry point: |
1295 | 1310 | */ |
1296 | 1311 | mw.addClassStyleSheets = function( sheetSet ){ |
— | — | @@ -1767,7 +1782,7 @@ |
1768 | 1783 | } |
1769 | 1784 | } |
1770 | 1785 | }; |
1771 | | - mw.log(" append script: " + script.src ); |
| 1786 | + //mw.log(" append script: " + script.src ); |
1772 | 1787 | // Append the script to the DOM: |
1773 | 1788 | head.appendChild( script ); |
1774 | 1789 | } |