http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66273

Revision: 66273
Author:   papyromancer
Date:     2010-05-12 14:20:40 +0000 (Wed, 12 May 2010)

Log Message:
-----------
full css refactor of mwEmbed Modules

Modified Paths:
--------------
    branches/MwEmbedStandAlone/loader.js
    branches/MwEmbedStandAlone/modules/AddMedia/loader.js
    branches/MwEmbedStandAlone/modules/ClipEdit/loader.js
    branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js
    branches/MwEmbedStandAlone/modules/UploadWizard/css/uploadWizard.css
    branches/MwEmbedStandAlone/modules/UploadWizard/loader.js
    branches/MwEmbedStandAlone/modules/UploadWizard/mw.UploadWizard.js
    branches/MwEmbedStandAlone/skins/common/common.css

Modified: branches/MwEmbedStandAlone/loader.js
===================================================================
--- branches/MwEmbedStandAlone/loader.js        2010-05-12 14:15:06 UTC (rev 
66272)
+++ branches/MwEmbedStandAlone/loader.js        2010-05-12 14:20:40 UTC (rev 
66273)
@@ -153,6 +153,8 @@
        "$j.fn.textSelection"   : "jquery/plugins/jquery.textSelection.js",
        "$j.browserTest"                : 
"jquery/plugins/jquery.browserTest.js",
        "$j.fn.jWizard"                 : "jquery/plugins/jquery.jWizard.js",
+       "$j.fn.tipsy"                   : "jquery/plugins/jquery.tipsy.js",
+       "mw.style.tipsy"                : "jquery/plugins/jquery.tipsy.css",
 
        "$j.effects.blind"              : 
"jquery/jquery.ui/ui/effects.blind.js",
        "$j.effects.drop"               : "jquery/jquery.ui/ui/effects.drop.js",

Modified: branches/MwEmbedStandAlone/modules/AddMedia/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/AddMedia/loader.js       2010-05-12 
14:15:06 UTC (rev 66272)
+++ branches/MwEmbedStandAlone/modules/AddMedia/loader.js       2010-05-12 
14:20:40 UTC (rev 66273)
@@ -21,7 +21,7 @@
                "mw.FirefoggRender"             : 
"modules/libSequencer/mw.FirefoggRender.js",
                "mw.RemoteSearchDriver" : "mw.RemoteSearchDriver.js",           
 
-       "mw.style.AddMedia" : "css/mw.style.AddMedia.css",
+    "mw.style.AddMedia" : "css/mw.style.AddMedia.css",
                
                "baseRemoteSearch"              : 
"searchLibs/baseRemoteSearch.js",
                "mediaWikiSearch"               : 
"searchLibs/mediaWikiSearch.js",
@@ -65,7 +65,9 @@
                                '$j.ui.draggable',
                                '$j.ui.dialog',
                                '$j.ui.tabs',
-                               '$j.ui.sortable'                
+                               '$j.ui.sortable',
+
+        'mw.style.AddMedia'
                        ]
                ];
                mw.load( request , function() {
@@ -144,4 +146,4 @@
                });     
        });
 
-} )( window.mw );
\ No newline at end of file
+} )( window.mw );

Modified: branches/MwEmbedStandAlone/modules/ClipEdit/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/ClipEdit/loader.js       2010-05-12 
14:15:06 UTC (rev 66272)
+++ branches/MwEmbedStandAlone/modules/ClipEdit/loader.js       2010-05-12 
14:20:40 UTC (rev 66273)
@@ -8,5 +8,6 @@
        "mw.style.colorpicker"  : "colorpicker/css/colorpicker.css",
        
        "$j.Jcrop"                      : "Jcrop/js/jquery.Jcrop.js",
-       "mw.style.Jcrop"        : "Jcrop/css/jquery.Jcrop.css"
-} );
\ No newline at end of file
+       "mw.style.Jcrop"        : "Jcrop/css/jquery.Jcrop.css",
+  "mw.style.ClipEdit" : "mw.style.ClipEdit.css"
+} );

Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js    2010-05-12 
14:15:06 UTC (rev 66272)
+++ branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js    2010-05-12 
14:20:40 UTC (rev 66273)
@@ -79,9 +79,10 @@
        "vlcEmbed"                      : "vlcEmbed.js",
        
        "ctrlBuilder"           : "skins/ctrlBuilder.js",
+  "mw.style.EmbedPlayer" : "mw.style.EmbedPlayer.css",
        
+       "mw.style.kskin"        : "skins/kskin/EmbedPlayer.css",        
        "kskinConfig"           : "skins/kskin/kskinConfig.js",
-       "mw.style.kskin"        : "skins/kskin/EmbedPlayer.css",        
        
        "mvpcfConfig"           : "skins/mvpcf/mvpcfConfig.js",
        "mw.style.mvpcf"        : "skins/mvpcf/EmbedPlayer.css" 
@@ -173,7 +174,8 @@
                        'ctrlBuilder',
                        '$j.cookie',
                        // Add JSON lib if browsers does not define "JSON" 
natively                     
-                       'JSON'
+                       'JSON',
+      'mw.style.EmbedPlayer'
                ],
                [
                        '$j.fn.menu',                   

Modified: branches/MwEmbedStandAlone/modules/UploadWizard/css/uploadWizard.css
===================================================================
--- branches/MwEmbedStandAlone/modules/UploadWizard/css/uploadWizard.css        
2010-05-12 14:15:06 UTC (rev 66272)
+++ branches/MwEmbedStandAlone/modules/UploadWizard/css/uploadWizard.css        
2010-05-12 14:20:40 UTC (rev 66273)
@@ -398,10 +398,13 @@
        margin-left: 100px;
 }
 
-.mwe-long-textarea {
+.mwe-grow-textarea, .mwe-long-textarea {
        overflow: hidden;
        font-family: sans-serif; /* XXX is this right? */
        font-size: x-small;
+}
+
+.mwe-long-textarea {
        width: 370px;
 }
 

Modified: branches/MwEmbedStandAlone/modules/UploadWizard/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/UploadWizard/loader.js   2010-05-12 
14:15:06 UTC (rev 66272)
+++ branches/MwEmbedStandAlone/modules/UploadWizard/loader.js   2010-05-12 
14:20:40 UTC (rev 66273)
@@ -53,8 +53,10 @@
                        '$j.ui.datepicker',
                        '$j.effects.core',
                        '$j.effects.slide',
-                       '$j.effects.pulsate',
+                       //'$j.effects.pulsate',
                        '$j.fn.autocomplete',
+                       '$j.fn.tipsy',
+                       'mw.style.tipsy',
                        'mw.style.autocomplete'
                ],
                [

Modified: branches/MwEmbedStandAlone/modules/UploadWizard/mw.UploadWizard.js
===================================================================
--- branches/MwEmbedStandAlone/modules/UploadWizard/mw.UploadWizard.js  
2010-05-12 14:15:06 UTC (rev 66272)
+++ branches/MwEmbedStandAlone/modules/UploadWizard/mw.UploadWizard.js  
2010-05-12 14:20:40 UTC (rev 66273)
@@ -87,7 +87,15 @@
        "mwe-prevent-close": "Your files are still uploading. Are you sure you 
want to navigate away from this page?",
 
        "mwe-upwiz-files-complete": "Your files finished uploading!",
-       "mwe-upwiz-deeds-later": "Set deeds and licenses for each file 
individually on the next page"
+       "mwe-upwiz-deeds-later": "Set deeds and licenses for each file 
individually on the next page",
+
+       "mwe-upwiz-tooltip-author": "The name of the person who took the photo, 
or painted the picture, drew the drawing, etc.",
+       "mwe-upwiz-tooltip-source": "Where this digital file came from -- could 
be a URL, or a book or publication",
+       "mwe-upwiz-tooltip-sign": "You can use your wiki User name or your real 
name. In both cases, this will be linked to your wiki User page",
+       "mwe-upwiz-tooltip-title": "A short title for the image. You may use 
plain language with spaces, but no line breaks. This title must be unlike all 
other titles in this wiki.",
+       "mwe-upwiz-tooltip-description": "Briefly describe everything notable 
about the work. For a photo, mention the main things that are depicted, the 
occasion or the place.",
+       "mwe-upwiz-tooltip-other": "Any other information you want to include 
about this work. You may use wikitext code."
+       
 } );
 
 
@@ -969,7 +977,9 @@
        _this.languageMenu = mw.LanguageUpWiz.getMenu("lang", languageCode);
        $j(_this.languageMenu).addClass('mwe-upwiz-desc-lang-select');
        _this.description = $j('<textarea name="desc" rows="2" cols="36" 
class="mwe-upwiz-desc-lang-text"></textarea>')
-                               .growTextArea().get(0);
+                               .attr( 'title', gM( 
'mwe-upwiz-tooltip-description' ) )
+                               .tipsy( { gravity: 'w', trigger: 'focus' } )
+                               .growTextArea();
        _this.div = $j('<div class="mwe-upwiz-desc-lang-container"></div>')
                       .append( _this.languageMenu )
                       .append( _this.description );
@@ -1026,7 +1036,7 @@
        _this.descriptionsDiv = $j( '<div class="mwe-upwiz-details-descriptions 
mwe-upwiz-details-input"></div>' );
        
 
-       _this.descriptionAdder = $j( '<a id="mwe-upwiz-desc-add"/>' )
+       _this.descriptionAdder = $j( '<a class="mwe-upwiz-desc-add"/>' )
                                        .attr( 'href', '#' )
                                        .html( gM( 'mwe-upwiz-desc-add-0' ) )
                                        .click( function( ) { 
_this.addDescription(); } );
@@ -1040,7 +1050,10 @@
        // Commons specific help for titles 
        //    http://commons.wikimedia.org/wiki/Commons:File_naming
        //    
http://commons.wikimedia.org/wiki/MediaWiki:Filename-prefix-blacklist
+       //    XXX make sure they can't use ctrl characters or returns or any 
other bad stuff.
        _this.titleInput = $j( '<textarea type="text" rows="1" class="mwe-title 
mwe-long-textarea"></textarea>' )
+               .attr( 'title', gM( 'mwe-upwiz-tooltip-title' ) )
+               .tipsy( { gravity: 'w', trigger: 'focus' } )
                .keyup( function() { 
                        _this.setFilenameFromTitle();
                } )
@@ -1049,7 +1062,8 @@
                        spinner: function(bool) { 
_this.toggleDestinationBusy(bool); },
                        preprocess: function( name ) { return 
_this.getFilenameFromTitle(); }, // XXX this is no longer a pre-process
                        processResult: function( result ) { 
_this.processDestinationCheck( result ); } 
-               } );
+               } )
+               ;
 
        _this.titleErrorDiv = $j('<div></div>');
 
@@ -1106,7 +1120,11 @@
                                .append( $j( '<div 
class="mwe-upwiz-details-more-label"></div>' ).append( gM( 
'mwe-upwiz-filename-tag' ) ) )
                                .append( $j( '<div 
class="mwe-upwiz-details-filename mwe-upwiz-details-more-input"></div>' ) ) ) );
        
-       _this.otherInformationInput = $j( '<textarea 
class="mwe-upwiz-other-textarea"></textarea>' );
+       _this.otherInformationInput = $j( '<textarea 
class="mwe-upwiz-other-textarea"></textarea>' )
+               .growTextArea()
+               .attr( 'title', gM( 'mwe-upwiz-tooltip-other' ) )
+               .tipsy( { gravity: 'w', trigger: 'focus' } );
+
        var otherInformationDiv = $j('<div></div>')     
                .append( $j( '<div class="mwe-upwiz-details-more-label">' 
).append( gM( 'mwe-upwiz-other' ) ) ) 
                .append( _this.otherInformationInput );
@@ -1997,6 +2015,7 @@
                } );
 */
 
+
                // DETAILS div
                $j( '#mwe-upwiz-stepdiv-details .mwe-upwiz-button-next' 
).click( function() {
                        _this.detailsSubmit( function() { 
@@ -2688,6 +2707,8 @@
                                } );
 
                                _this.setQuantity( 1 );
+
+
                        },
 
 
@@ -2711,9 +2732,15 @@
 
                                // synchronize both username signatures
                                // set initial value to configured username
-                               // if one changes all the others change
+                               // if one changes all the others change (keyup 
event)
+                               //
+                               // also set tooltips ( the title, tipsy() )
                                $j( _this.deedChooser.selector ).find( 
'.mwe-upwiz-sign' )
-                                       .attr( { value: mw.getConfig( 
'userName' ) } )
+                                       .attr( {
+                                               title: gM( 
'mwe-upwiz-tooltip-sign' ), 
+                                               value: mw.getConfig( 'userName' 
) 
+                                       } )
+                                       .tipsy( { trigger: 'focus', gravity: 
'w' } )
                                        .keyup( function() { 
                                                var thisInput = this;
                                                var thisVal = $j( thisInput 
).val();
@@ -2744,8 +2771,12 @@
                var _this = this;
                var sourceInput = $j('<textarea class="mwe-source 
mwe-long-textarea" name="source" rows="1" cols="40"></textarea>' )
                                        .growTextArea()
+                                       .attr( 'title', gM( 
'mwe-upwiz-tooltip-source' ) )
+                                       .tipsy( { trigger: 'focus', gravity: 
'w' } );
                var authorInput = $j('<textarea class="mwe-author 
mwe-long-textarea" name="author" rows="1" cols="40"></textarea>' )
                                        .growTextArea()
+                                       .attr( 'title', gM( 
'mwe-upwiz-tooltip-author' ) )
+                                       .tipsy( { trigger: 'focus', gravity: 
'w' } );
                licenseInputDiv = $j( '<div 
class="mwe-upwiz-deed-license"></div>' );
                licenseInput = new mw.UploadWizardLicenseInput( licenseInputDiv 
);
                licenseInput.setDefaultValues();
@@ -2994,9 +3025,12 @@
                return this;
        };
 
+       this.addClass( 'mwe-grow-textarea' );
+       
        this.change(this.resizeIfNeeded);
        this.keyup(this.resizeIfNeeded);
 
+
        return this;
 };
 

Modified: branches/MwEmbedStandAlone/skins/common/common.css
===================================================================
--- branches/MwEmbedStandAlone/skins/common/common.css  2010-05-12 14:15:06 UTC 
(rev 66272)
+++ branches/MwEmbedStandAlone/skins/common/common.css  2010-05-12 14:20:40 UTC 
(rev 66273)
@@ -177,4 +177,4 @@
 .ui-dialog-buttonpane a{
        float: right;
        margin-right: 10px;
-}
\ No newline at end of file
+}



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to