* winks at Michael Dale and mumbles something about Title Case *
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 7 Nov 2009 13:38:59 +0000 (13:38 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 7 Nov 2009 13:38:59 +0000 (13:38 +0000)
* remove trailing whitespace

js2/mwEmbed/libAddMedia/dragDropFile.js
js2/mwEmbed/libTimedText/mvTextInterface.js
js2/mwEmbed/php/languages/mwEmbed.i18n.php

index f425087..a19ea3e 100644 (file)
@@ -1,8 +1,8 @@
-/* firefox 3.6 drag-drop uploading 
+/* firefox 3.6 drag-drop uploading
 */
 loadGM({
        "mwe-upload-multi" : "Upload {{PLURAL:$1|file|files}}",
-       "mwe-review-upload": "Review File {{PLURAL:$1|Upload|Uploads}}"
+       "mwe-review-upload": "Review file {{PLURAL:$1|upload|uploads}}"
 });
 
 (function($){
@@ -10,53 +10,53 @@ loadGM({
                js_log("drag drop: " + this.selector);
                //setup drag binding and highlight
                var dC = $j( this.selector ).get(0);
-               dC.addEventListener("dragenter", 
+               dC.addEventListener("dragenter",
                        function(event){
                                $j(dC).css('border', 'solid red');
                                event.stopPropagation();
                                event.preventDefault();
                        }, false);
-               dC.addEventListener("dragleave", 
+               dC.addEventListener("dragleave",
                        function(event){
                                //default textbox css (should be an easy way to do this)
                                $j(dC).css('border', '');
-                               event.stopPropagation(); 
+                               event.stopPropagation();
                                event.preventDefault();
                        }, false);
-               dC.addEventListener("dragover", 
-                       function(event){                                                
-                               event.stopPropagation(); 
+               dC.addEventListener("dragover",
+                       function(event){
+                               event.stopPropagation();
                                event.preventDefault();
                        }, false);
-               dC.addEventListener("drop", 
-                       function( event ){                                                                                                                      
+               dC.addEventListener("drop",
+                       function( event ){
                                doDrop( event );
-                               //handle the drop loader and call event                                 
+                               //handle the drop loader and call event
                        }, false);
                function doDrop(event){
                        var dt = event.dataTransfer,
-                               files = dt.files,                               
+                               files = dt.files,
                                fileCount = files.length;
-                               
+
                        event.stopPropagation();
                        event.preventDefault();
-                                               
+
                        $j('#multiple_file_input').remove();
-                       
+
                        $j('body').append('<div title="' + gM('mwe-upload-multi', fileCount) + '" '+
                        'style="position:absolute;bottom:5em;top:3em;right:0px;left:0px" '+
-                       'id="multiple_file_input">'+                                    
+                       'id="multiple_file_input">'+
                        '</div>');
-               
-                       
-                       var cBtn = {};                  
+
+
+                       var cBtn = {};
                        cBtn[ gM('mwe-cancel') ] = function(){
                                $j(this).dialog('close');
                        }
                        cBtn[ gM('mwe-upload-multi', fileCount) ] = function(){
                                alert('do multiple file upload');
                        }
-                       //open up the dialog 
+                       //open up the dialog
                        $j('#multiple_file_input').dialog({
                                bgiframe: true,
                                autoOpen: true,
@@ -69,32 +69,30 @@ loadGM({
                        $j(window).resize(function(){
                                $j('#multiple_file_input').dialogFitWindow();
                        });
-                       //add the inital table / title: 
+                       //add the inital table / title:
                        $j('#multiple_file_input').html('<h3>' + gM('mwe-review-upload') + '</h3>'+
                                '<table width="100%" border="1" class="table_list" style="border:none;"></table>');
-                       $j.each(files, function(i, file){               
-                               if(file.fileSize < 64048576) {  
+                       $j.each(files, function(i, file){
+                               if(file.fileSize < 64048576) {
                                        $j('#multiple_file_input .table_list').append(
                                                '<tr>' +
                                                        '<td width="300" style="padding:5px"><img width="250" src="'+ file.getAsDataURL() +'">' +'</td>'+
-                                                       '<td valign="top">' + 
+                                                       '<td valign="top">' +
                                                                'File Name: <input name="file['+i+'][title]" value="' + file.name + '"><br>'+
-                                                               'File Desc: <textarea style="width:300px;" name="file['+i+'][desc]"></textarea><br>'+ 
+                                                               'File Desc: <textarea style="width:300px;" name="file['+i+'][desc]"></textarea><br>'+
                                                        '</td>'+
                                                '</tr>'
-                                       );                                                                                      
+                                       );
                                        /*$j.addDialog( "upload this image", '<img width="300" src="' + files[i].getAsDataURL() + '">' +
                                                '<br>name: ' + files[i].name + '</br>' +
                                                '<br>size: ' + files[i].fileSize + '</br>' +
                                                '<br>mime: ' + files[i].mediaType + '</br>');
                                        */
-                                       //do the add-media-wizard with the upload tab                                   
+                                       //do the add-media-wizard with the upload tab
                                } else {
                                        alert("file is too big, needs to be below 64mb");
-                               }       
-                       }); 
+                               }
+                       });
                }
        }
 })(jQuery);
-
-
index 9843e66..e566f25 100644 (file)
@@ -5,7 +5,7 @@ loadGM({
        "mwe-close" : "close",
        "mwe-improve_transcript" : "Improve",
        "mwe-no_text_tracks_found" : "No text tracks were found",
-       "mwe-subtitles" : "$1 Subtitles"
+       "mwe-subtitles" : "$1 subtitles"
 })
 // text interface object (for inline display captions)
 var mvTextInterface = function( parentEmbed ){
@@ -36,7 +36,7 @@ mvTextInterface.prototype = {
                if(this.pe.roe || _this.pe.wikiTitleKey ){
                        if(!this.pe.media_element.addedROEData){
                                js_log("load roe data!");
-                               $j('#mv_txt_load_'+_this.pe.id).show(); //show the loading icon         
+                               $j('#mv_txt_load_'+_this.pe.id).show(); //show the loading icon
                                if(_this.pe.roe){
                                        do_request( _this.pe.roe, function(data)
                                        {
@@ -44,16 +44,16 @@ mvTextInterface.prototype = {
                                                _this.pe.media_element.addROE(data);
                                                _this.getParseTimedText_rowReady();
                                        });
-                               }else if( _this.pe.wikiTitleKey ){                                      
-                                       do_api_req({    
-                                                       'url':  apiUrl,                                 
+                               }else if( _this.pe.wikiTitleKey ){
+                                       do_api_req({
+                                                       'url':  apiUrl,
                                                        'data': {
                                                                'list' : 'allpages',
                                                                'apprefix' : 'TimedText:' + _this.pe.wikiTitleKey
                                                        }
                                        }, function( subData ) {
                                                do_api_req({
-                                                               'url':  apiUrl, 
+                                                               'url':  apiUrl,
                                                                'data': {
                                                                        'meta' : 'siteinfo',
                                                                        'siprop' : 'languages'
@@ -64,12 +64,12 @@ mvTextInterface.prototype = {
                                                                        for(var j in lagRaw){
                                                                                langData[ lagRaw[j].code ] = lagRaw[j]['*'];
                                                                        }
-                                                                       for(var i in subData.query.allpages){                                                           
+                                                                       for(var i in subData.query.allpages){
                                                                                var subPage = subData.query.allpages[i];
                                                                                langKey = subPage.title.split('.');
                                                                                langKey = langKey[ langKey.length-2 ];
                                                                                if( !langData[ langKey] ){
-                                                                                       js_log('Error: langkey:'+ langKey + ' not found'); 
+                                                                                       js_log('Error: langkey:'+ langKey + ' not found');
                                                                                }else{
                                                                                        var textElm = document.createElement('text');
                                                                                        $j(textElm).attr({
@@ -77,13 +77,13 @@ mvTextInterface.prototype = {
                                                                                                'lang'  : langKey,
                                                                                                'type'  : "text/x-srt",
                                                                                                'title' : gM('mwe-subtitles', langData[ langKey]),
-                                                                                               'src' : wgServer + wgScript + '?title=' + subPage.title + '&action=raw' 
-                                                                                       });                                                                                                                                                             
+                                                                                               'src' : wgServer + wgScript + '?title=' + subPage.title + '&action=raw'
+                                                                                       });
                                                                                        _this.pe.media_element.tryAddSource( textElm );
                                                                                        _this.getParseTimedText_rowReady();
                                                                                }
                                                                        }
-                                                               });             //do_api_req({                  
+                                                               });             //do_api_req({
                                        });     //function( subData ) {
                                }
                        }else{
index b10819b..beaf716 100644 (file)
@@ -48,7 +48,7 @@ $messages['en'] = array(
        'mwe-close' => 'close',
        'mwe-improve_transcript' => 'Improve',
        'mwe-no_text_tracks_found' => 'No text tracks were found',
-       'mwe-subtitles' => '$1 Subtitles',
+       'mwe-subtitles' => '$1 subtitles',
 
        /*
         * js file: /libSequencer/mvTimedEffectsEdit.js
@@ -312,7 +312,7 @@ $messages['en'] = array(
         * js file: /libAddMedia/dragDropFile.js
         */
        'mwe-upload-multi' => 'Upload {{PLURAL:$1|file|files}}',
-       'mwe-review-upload' => 'Review File {{PLURAL:$1|Upload|Uploads}}',
+       'mwe-review-upload' => 'Review file {{PLURAL:$1|upload|uploads}}',
 
        /*
         * js file: /libEmbedVideo/embedVideo.js