r51516 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51515‎ | r51516 | r51517 >
Date:19:45, 5 June 2009
Author:dale
Status:deferred
Tags:
Comment:
* fixes to remote usage of script loader
* sequencer updates
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/mv_baseEmbed.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/mv_embed.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js
@@ -170,8 +170,8 @@
171171 'type' : 'select',
172172 'selectVal' : [{'22050':'22 kHz'}, {'44100':'44 khz'}, {'48000':'48 khz'}],
173173 'formatSelect' : function(val){
174 - return (Math.round(val/100)*10) + ' Hz';
175 - },
 174+ return (Math.round(val/100)*10) + ' Hz';
 175+ },
176176 'help' : "set output samplerate (in Hz)."
177177 },
178178 'noaudio':{
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js
@@ -456,6 +456,7 @@
457457 this.doSmilActions( single_line = true );
458458 },
459459 updateBaseStatus:function(){
 460+ var _this = this;
460461 js_log('f:updateBaseStatus');
461462 $j('#ptitle_'+this.id).html(''+
462463 '<b>' + this.title + '</b> '+
@@ -465,11 +466,13 @@
466467 //only show the inline edit button if mediaWiki write API is enabled:
467468
468469 //should probably be based on if we have a provider api url
469 - if( typeof wgEnableWriteAPI != 'undefined'){
470 - $j('#ptitle_'+this.id).append(
471 - $j.btnHtml('edit', 'edit_'+this.id, 'pencil', {'style':'float:right;font-size:x-small;height:15px;'} )
472 - );
473 - //do binding:
 470+ if( typeof wgEnableWriteAPI != 'undefined'){
 471+ $j( $j.btnHtml('edit', 'editBtn_'+this.id, 'pencil',
 472+ {'style':'float:right;font-size:x-small;height:10px;margin-bottom:0;padding-bottom:7px;padding-top:0;'} )
 473+ ).click(function(){
 474+ _this.doEditor();
 475+ }).appendTo('#ptitle_'+this.id);
 476+ $j('.editBtn_'+this.id).btnBind();
474477 }
475478 //render out the dividers on the timeline:
476479 this.colorPlayHead();
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js
@@ -85,45 +85,8 @@
8686 //all default msg in [English] should be overwritten by the CMS language msg system.
8787 loadGM({
8888 "loading_txt":"loading <blink>...</blink>",
89 - "loading_title" : "Loading...",
90 -
91 - "loading_plugin" : "loading plugin<blink>...</blink>",
92 -
93 - "select_playback" : "Set Playback Preference",
94 - "link_back" : "Link Back",
95 - "error_load_lib" : "mv_embed: Unable to load required javascript libraries\n insert script via DOM has failed, try reloading? ",
96 -
97 - "error_swap_vid" : "Error:mv_embed was unable to swap the video tag for the mv_embed interface",
 89+ "loading_title" : "Loading...",
9890
99 - "download_segment" : "Download Selection:",
100 - "download_full" : "Download Full Video File:",
101 - "download_right_click": "To download right click and select <i>save target as</i>",
102 - "download_clip" : "Download the Clip",
103 - "download_text" : "Download Text (<a style=\"color:white\" title=\"cmml\" href=\"http://wiki.xiph.org/index.php/CMML\">cmml</a> xml):",
104 -
105 - "clip_linkback" : "Clip Source Page",
106 -
107 - "mv_ogg-player-vlc-mozilla" : "VLC Plugin",
108 - "mv_ogg-player-videoElement" : "Native Ogg Video Support",
109 - "mv_ogg-player-vlc-activex" : "VLC ActiveX",
110 - "mv_ogg-player-oggPlugin" : "Generic Ogg Plugin",
111 - "mv_ogg-player-quicktime-mozilla" : "Quicktime Plugin",
112 - "mv_ogg-player-quicktime-activex" : "Quicktime ActiveX",
113 - "mv_ogg-player-cortado" : "Java Cortado",
114 - "mv_ogg-player-flowplayer" : "Flowplayer",
115 - "mv_ogg-player-selected" : " (selected)",
116 - "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis",
117 - "mv_generic_missing_plugin" : "You browser does not appear to support playback type: <b>$1</b><br> visit the <a href=\"http://commons.wikimedia.org/wiki/Commons:Media_help\">Playback Methods</a> page to download a player<br>",
118 -
119 - "add_to_end_of_sequence" : "Add to End of Sequence",
120 -
121 - "missing_video_stream" : "The video file for this stream is missing",
122 -
123 - "next_clip_msg" : "Play Next Clip",
124 - "prev_clip_msg" : "Play Previous Clip",
125 - "current_clip_msg" : "Continue Playing this Clip",
126 - "seek_to" : "Seek to",
127 -
12891 "size-gigabytes" : "$1 GB",
12992 "size-megabytes" : "$1 MB",
13093 "size-kilobytes" : "$1 K",
@@ -142,8 +105,8 @@
143106 ms = gMsg[ key ];
144107 if(typeof args == 'object' || typeof args == 'array'){
145108 for(var v in args){
146 - var rep = '\$'+ ( parseInt(v) + 1 );
147 - //msg test replace arguments start at 1 insted of zero:
 109+ //msg test replace arguments start at 1 insted of zero:
 110+ var rep = '\$'+ ( parseInt(v) + 1 );
148111 ms = ms.replace( rep, args[v]);
149112 }
150113 }else if(typeof args =='string' || typeof args =='number'){
@@ -268,7 +231,7 @@
269232 }
270233 }
271234 if( all_libs_loaded ){
272 - js_log('all libs already loaded skipping...' + libs);
 235+ js_log('all libs already loaded skipping...' + libs);
273236 callback();
274237 return ;
275238 }
@@ -285,7 +248,13 @@
286249 coma=',';
287250 }
288251 }
289 - var dbug_attr = (parseUri( getMvEmbedURL() ).queryKey['debug'])?'&debug=true':'';
 252+ var puri = parseUri( getMvEmbedURL() );
 253+
 254+ if(puri.host != parseUri( document.URL).host){
 255+ mwSlScript = puri.protocol + '://' + puri.authority + mwSlScript;
 256+ }
 257+
 258+ var dbug_attr = (puri.queryKey['debug'])?'&debug=true':'';
290259 this.libs[ last_class ] = mwSlScript + '?class=' + class_set +
291260 '&urid=' + getMvUniqueReqId() + dbug_attr;
292261
@@ -987,7 +956,7 @@
988957 }
989958 //load external js via dom injection
990959 function loadExternalJs( url ){
991 - js_log('load js: '+ url);
 960+ js_log('load js: '+ url);
992961 //if(window['$j']) //use jquery call:
993962 /*$j.ajax({
994963 type: "GET",
@@ -1088,7 +1057,7 @@
10891058 mv_embed_path = mv_embed_url.substr(0, mv_embed_url.indexOf('mwScriptLoader.php')) + mediaWiki_mvEmbed_path ;
10901059 }else{
10911060 mv_embed_path = mv_embed_url.substr(0, mv_embed_url.indexOf('jsScriptLoader.php'));
1092 - }
 1061+ }
10931062 //absolute the url (if relative) (if we don't have mv_embed path)
10941063 if( mv_embed_path.indexOf('://') == -1){
10951064 var pURL = parseUri( document.URL );
@@ -1100,7 +1069,7 @@
11011070 mv_embed_path = pURL.protocol + '://' + pURL.authority + pURL.directory + mv_embed_path;
11021071 }
11031072 }
1104 - }
 1073+ }
11051074 return mv_embed_path;
11061075 }
11071076
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/mv_baseEmbed.js
@@ -1,6 +1,46 @@
22 /* the base video control JSON object with default attributes
33 * for supported attribute details see README
44 */
 5+
 6+loadGM({
 7+ "loading_plugin" : "loading plugin<blink>...</blink>",
 8+
 9+ "select_playback" : "Set Playback Preference",
 10+ "link_back" : "Link Back",
 11+ "error_load_lib" : "mv_embed: Unable to load required javascript libraries\n insert script via DOM has failed, try reloading? ",
 12+
 13+ "error_swap_vid" : "Error:mv_embed was unable to swap the video tag for the mv_embed interface",
 14+
 15+ "add_to_end_of_sequence" : "Add to End of Sequence",
 16+
 17+ "missing_video_stream" : "The video file for this stream is missing",
 18+
 19+ "next_clip_msg" : "Play Next Clip",
 20+ "prev_clip_msg" : "Play Previous Clip",
 21+ "current_clip_msg" : "Continue Playing this Clip",
 22+ "seek_to" : "Seek to",
 23+
 24+ "download_segment" : "Download Selection:",
 25+ "download_full" : "Download Full Video File:",
 26+ "download_right_click": "To download right click and select <i>save target as</i>",
 27+ "download_clip" : "Download the Clip",
 28+ "download_text" : "Download Text (<a style=\"color:white\" title=\"cmml\" href=\"http://wiki.xiph.org/index.php/CMML\">cmml</a> xml):",
 29+
 30+ "clip_linkback" : "Clip Source Page",
 31+
 32+ "mv_ogg-player-vlc-mozilla" : "VLC Plugin",
 33+ "mv_ogg-player-videoElement" : "Native Ogg Video Support",
 34+ "mv_ogg-player-vlc-activex" : "VLC ActiveX",
 35+ "mv_ogg-player-oggPlugin" : "Generic Ogg Plugin",
 36+ "mv_ogg-player-quicktime-mozilla" : "Quicktime Plugin",
 37+ "mv_ogg-player-quicktime-activex" : "Quicktime ActiveX",
 38+ "mv_ogg-player-cortado" : "Java Cortado",
 39+ "mv_ogg-player-flowplayer" : "Flowplayer",
 40+ "mv_ogg-player-selected" : " (selected)",
 41+ "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis",
 42+ "mv_generic_missing_plugin" : "You browser does not appear to support playback type: <b>$1</b><br> visit the <a href=\"http://commons.wikimedia.org/wiki/Commons:Media_help\">Playback Methods</a> page to download a player<br>"
 43+});
 44+
545 var default_video_attributes = {
646 "id":null,
747 "class":null,

Status & tagging log