r66273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66272‎ | r66273 | r66274 >
Date:14:20, 12 May 2010
Author:papyromancer
Status:deferred
Tags:
Comment:
full css refactor of mwEmbed Modules
Modified paths:
  • /branches/MwEmbedStandAlone/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/AddMedia/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/ClipEdit/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/UploadWizard/css/uploadWizard.css (modified) (history)
  • /branches/MwEmbedStandAlone/modules/UploadWizard/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/UploadWizard/mw.UploadWizard.js (modified) (history)
  • /branches/MwEmbedStandAlone/skins/common/common.css (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/loader.js
@@ -153,6 +153,8 @@
154154 "$j.fn.textSelection" : "jquery/plugins/jquery.textSelection.js",
155155 "$j.browserTest" : "jquery/plugins/jquery.browserTest.js",
156156 "$j.fn.jWizard" : "jquery/plugins/jquery.jWizard.js",
 157+ "$j.fn.tipsy" : "jquery/plugins/jquery.tipsy.js",
 158+ "mw.style.tipsy" : "jquery/plugins/jquery.tipsy.css",
157159
158160 "$j.effects.blind" : "jquery/jquery.ui/ui/effects.blind.js",
159161 "$j.effects.drop" : "jquery/jquery.ui/ui/effects.drop.js",
Index: branches/MwEmbedStandAlone/skins/common/common.css
@@ -177,4 +177,4 @@
178178 .ui-dialog-buttonpane a{
179179 float: right;
180180 margin-right: 10px;
181 -}
\ No newline at end of file
 181+}
Index: branches/MwEmbedStandAlone/modules/UploadWizard/loader.js
@@ -53,8 +53,10 @@
5454 '$j.ui.datepicker',
5555 '$j.effects.core',
5656 '$j.effects.slide',
57 - '$j.effects.pulsate',
 57+ //'$j.effects.pulsate',
5858 '$j.fn.autocomplete',
 59+ '$j.fn.tipsy',
 60+ 'mw.style.tipsy',
5961 'mw.style.autocomplete'
6062 ],
6163 [
Index: branches/MwEmbedStandAlone/modules/UploadWizard/mw.UploadWizard.js
@@ -87,7 +87,15 @@
8888 "mwe-prevent-close": "Your files are still uploading. Are you sure you want to navigate away from this page?",
8989
9090 "mwe-upwiz-files-complete": "Your files finished uploading!",
91 - "mwe-upwiz-deeds-later": "Set deeds and licenses for each file individually on the next page"
 91+ "mwe-upwiz-deeds-later": "Set deeds and licenses for each file individually on the next page",
 92+
 93+ "mwe-upwiz-tooltip-author": "The name of the person who took the photo, or painted the picture, drew the drawing, etc.",
 94+ "mwe-upwiz-tooltip-source": "Where this digital file came from -- could be a URL, or a book or publication",
 95+ "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",
 96+ "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.",
 97+ "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.",
 98+ "mwe-upwiz-tooltip-other": "Any other information you want to include about this work. You may use wikitext code."
 99+
92100 } );
93101
94102
@@ -969,7 +977,9 @@
970978 _this.languageMenu = mw.LanguageUpWiz.getMenu("lang", languageCode);
971979 $j(_this.languageMenu).addClass('mwe-upwiz-desc-lang-select');
972980 _this.description = $j('<textarea name="desc" rows="2" cols="36" class="mwe-upwiz-desc-lang-text"></textarea>')
973 - .growTextArea().get(0);
 981+ .attr( 'title', gM( 'mwe-upwiz-tooltip-description' ) )
 982+ .tipsy( { gravity: 'w', trigger: 'focus' } )
 983+ .growTextArea();
974984 _this.div = $j('<div class="mwe-upwiz-desc-lang-container"></div>')
975985 .append( _this.languageMenu )
976986 .append( _this.description );
@@ -1026,7 +1036,7 @@
10271037 _this.descriptionsDiv = $j( '<div class="mwe-upwiz-details-descriptions mwe-upwiz-details-input"></div>' );
10281038
10291039
1030 - _this.descriptionAdder = $j( '<a id="mwe-upwiz-desc-add"/>' )
 1040+ _this.descriptionAdder = $j( '<a class="mwe-upwiz-desc-add"/>' )
10311041 .attr( 'href', '#' )
10321042 .html( gM( 'mwe-upwiz-desc-add-0' ) )
10331043 .click( function( ) { _this.addDescription(); } );
@@ -1040,7 +1050,10 @@
10411051 // Commons specific help for titles
10421052 // http://commons.wikimedia.org/wiki/Commons:File_naming
10431053 // http://commons.wikimedia.org/wiki/MediaWiki:Filename-prefix-blacklist
 1054+ // XXX make sure they can't use ctrl characters or returns or any other bad stuff.
10441055 _this.titleInput = $j( '<textarea type="text" rows="1" class="mwe-title mwe-long-textarea"></textarea>' )
 1056+ .attr( 'title', gM( 'mwe-upwiz-tooltip-title' ) )
 1057+ .tipsy( { gravity: 'w', trigger: 'focus' } )
10451058 .keyup( function() {
10461059 _this.setFilenameFromTitle();
10471060 } )
@@ -1049,7 +1062,8 @@
10501063 spinner: function(bool) { _this.toggleDestinationBusy(bool); },
10511064 preprocess: function( name ) { return _this.getFilenameFromTitle(); }, // XXX this is no longer a pre-process
10521065 processResult: function( result ) { _this.processDestinationCheck( result ); }
1053 - } );
 1066+ } )
 1067+ ;
10541068
10551069 _this.titleErrorDiv = $j('<div></div>');
10561070
@@ -1106,7 +1120,11 @@
11071121 .append( $j( '<div class="mwe-upwiz-details-more-label"></div>' ).append( gM( 'mwe-upwiz-filename-tag' ) ) )
11081122 .append( $j( '<div class="mwe-upwiz-details-filename mwe-upwiz-details-more-input"></div>' ) ) ) );
11091123
1110 - _this.otherInformationInput = $j( '<textarea class="mwe-upwiz-other-textarea"></textarea>' );
 1124+ _this.otherInformationInput = $j( '<textarea class="mwe-upwiz-other-textarea"></textarea>' )
 1125+ .growTextArea()
 1126+ .attr( 'title', gM( 'mwe-upwiz-tooltip-other' ) )
 1127+ .tipsy( { gravity: 'w', trigger: 'focus' } );
 1128+
11111129 var otherInformationDiv = $j('<div></div>')
11121130 .append( $j( '<div class="mwe-upwiz-details-more-label">' ).append( gM( 'mwe-upwiz-other' ) ) )
11131131 .append( _this.otherInformationInput );
@@ -1997,6 +2015,7 @@
19982016 } );
19992017 */
20002018
 2019+
20012020 // DETAILS div
20022021 $j( '#mwe-upwiz-stepdiv-details .mwe-upwiz-button-next' ).click( function() {
20032022 _this.detailsSubmit( function() {
@@ -2688,6 +2707,8 @@
26892708 } );
26902709
26912710 _this.setQuantity( 1 );
 2711+
 2712+
26922713 },
26932714
26942715
@@ -2711,9 +2732,15 @@
27122733
27132734 // synchronize both username signatures
27142735 // set initial value to configured username
2715 - // if one changes all the others change
 2736+ // if one changes all the others change (keyup event)
 2737+ //
 2738+ // also set tooltips ( the title, tipsy() )
27162739 $j( _this.deedChooser.selector ).find( '.mwe-upwiz-sign' )
2717 - .attr( { value: mw.getConfig( 'userName' ) } )
 2740+ .attr( {
 2741+ title: gM( 'mwe-upwiz-tooltip-sign' ),
 2742+ value: mw.getConfig( 'userName' )
 2743+ } )
 2744+ .tipsy( { trigger: 'focus', gravity: 'w' } )
27182745 .keyup( function() {
27192746 var thisInput = this;
27202747 var thisVal = $j( thisInput ).val();
@@ -2744,8 +2771,12 @@
27452772 var _this = this;
27462773 var sourceInput = $j('<textarea class="mwe-source mwe-long-textarea" name="source" rows="1" cols="40"></textarea>' )
27472774 .growTextArea()
 2775+ .attr( 'title', gM( 'mwe-upwiz-tooltip-source' ) )
 2776+ .tipsy( { trigger: 'focus', gravity: 'w' } );
27482777 var authorInput = $j('<textarea class="mwe-author mwe-long-textarea" name="author" rows="1" cols="40"></textarea>' )
27492778 .growTextArea()
 2779+ .attr( 'title', gM( 'mwe-upwiz-tooltip-author' ) )
 2780+ .tipsy( { trigger: 'focus', gravity: 'w' } );
27502781 licenseInputDiv = $j( '<div class="mwe-upwiz-deed-license"></div>' );
27512782 licenseInput = new mw.UploadWizardLicenseInput( licenseInputDiv );
27522783 licenseInput.setDefaultValues();
@@ -2994,9 +3025,12 @@
29953026 return this;
29963027 };
29973028
 3029+ this.addClass( 'mwe-grow-textarea' );
 3030+
29983031 this.change(this.resizeIfNeeded);
29993032 this.keyup(this.resizeIfNeeded);
30003033
 3034+
30013035 return this;
30023036 };
30033037
Index: branches/MwEmbedStandAlone/modules/UploadWizard/css/uploadWizard.css
@@ -398,10 +398,13 @@
399399 margin-left: 100px;
400400 }
401401
402 -.mwe-long-textarea {
 402+.mwe-grow-textarea, .mwe-long-textarea {
403403 overflow: hidden;
404404 font-family: sans-serif; /* XXX is this right? */
405405 font-size: x-small;
 406+}
 407+
 408+.mwe-long-textarea {
406409 width: 370px;
407410 }
408411
Index: branches/MwEmbedStandAlone/modules/AddMedia/loader.js
@@ -21,7 +21,7 @@
2222 "mw.FirefoggRender" : "modules/libSequencer/mw.FirefoggRender.js",
2323 "mw.RemoteSearchDriver" : "mw.RemoteSearchDriver.js",
2424
25 - "mw.style.AddMedia" : "css/mw.style.AddMedia.css",
 25+ "mw.style.AddMedia" : "css/mw.style.AddMedia.css",
2626
2727 "baseRemoteSearch" : "searchLibs/baseRemoteSearch.js",
2828 "mediaWikiSearch" : "searchLibs/mediaWikiSearch.js",
@@ -65,7 +65,9 @@
6666 '$j.ui.draggable',
6767 '$j.ui.dialog',
6868 '$j.ui.tabs',
69 - '$j.ui.sortable'
 69+ '$j.ui.sortable',
 70+
 71+ 'mw.style.AddMedia'
7072 ]
7173 ];
7274 mw.load( request , function() {
@@ -144,4 +146,4 @@
145147 });
146148 });
147149
148 -} )( window.mw );
\ No newline at end of file
 150+} )( window.mw );
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js
@@ -79,9 +79,10 @@
8080 "vlcEmbed" : "vlcEmbed.js",
8181
8282 "ctrlBuilder" : "skins/ctrlBuilder.js",
 83+ "mw.style.EmbedPlayer" : "mw.style.EmbedPlayer.css",
8384
 85+ "mw.style.kskin" : "skins/kskin/EmbedPlayer.css",
8486 "kskinConfig" : "skins/kskin/kskinConfig.js",
85 - "mw.style.kskin" : "skins/kskin/EmbedPlayer.css",
8687
8788 "mvpcfConfig" : "skins/mvpcf/mvpcfConfig.js",
8889 "mw.style.mvpcf" : "skins/mvpcf/EmbedPlayer.css"
@@ -173,7 +174,8 @@
174175 'ctrlBuilder',
175176 '$j.cookie',
176177 // Add JSON lib if browsers does not define "JSON" natively
177 - 'JSON'
 178+ 'JSON',
 179+ 'mw.style.EmbedPlayer'
178180 ],
179181 [
180182 '$j.fn.menu',
Index: branches/MwEmbedStandAlone/modules/ClipEdit/loader.js
@@ -8,5 +8,6 @@
99 "mw.style.colorpicker" : "colorpicker/css/colorpicker.css",
1010
1111 "$j.Jcrop" : "Jcrop/js/jquery.Jcrop.js",
12 - "mw.style.Jcrop" : "Jcrop/css/jquery.Jcrop.css"
13 -} );
\ No newline at end of file
 12+ "mw.style.Jcrop" : "Jcrop/css/jquery.Jcrop.css",
 13+ "mw.style.ClipEdit" : "mw.style.ClipEdit.css"
 14+} );

Status & tagging log