r79813 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79812‎ | r79813 | r79814 >
Date:13:20, 7 January 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17: MFT r78093, r79245, r79570, r79571, r79573, r79574, r79581, r79582, r79766, r79770. r78200 had been accidentally merged previously while merging one of the revs after it
Modified paths:
  • /branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.js (modified) (history)
  • /branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.html (modified) (history)
  • /branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.templateEditor.js (modified) (history)
  • /branches/REL1_17/phase3/includes/resourceloader/ResourceLoaderUserModule.php (modified) (history)
  • /branches/REL1_17/phase3/resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css (modified) (history)
  • /branches/REL1_17/phase3/resources/jquery.ui/themes/vector/jquery.ui.button.css (modified) (history)
  • /branches/REL1_17/phase3/resources/jquery.ui/themes/vector/jquery.ui.dialog.css (modified) (history)
  • /branches/REL1_17/phase3/resources/jquery.ui/themes/vector/jquery.ui.theme.css (modified) (history)
  • /branches/REL1_17/phase3/skins/common/prefs.js (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.templateEditor.js
@@ -319,6 +319,7 @@
320320 $(this).text( mediaWiki.msg( $(this).attr( 'rel' ) ) );
321321 } );
322322 },
 323+ immediateCreate: true,
323324 dialog: {
324325 width: 600,
325326 height: 400,
Index: branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.js
@@ -42,7 +42,7 @@
4343 var mod = $.wikiEditor.modules.dialogs.modules[module];
4444 var $dialog = $( '#' + mod.id );
4545 if ( $dialog.length == 0 ) {
46 - $.wikiEditor.modules.dialogs.fn.reallyCreate( context, mod );
 46+ $.wikiEditor.modules.dialogs.fn.reallyCreate( context, mod, module );
4747 $dialog = $( '#' + mod.id );
4848 }
4949
@@ -72,7 +72,7 @@
7373 */
7474 create: function( context, config ) {
7575 // Defer building of modules, but do check whether they need the iframe rightaway
76 - for ( mod in config ) {
 76+ for ( var mod in config ) {
7777 var module = config[mod];
7878 // Only create the dialog if it's supported, isn't filtered and doesn't exist yet
7979 var filtered = false;
@@ -91,6 +91,10 @@
9292 context.fn.setupIframe();
9393 }
9494 context.$textarea.trigger( 'wikiEditor-dialogs-setup-' + mod );
 95+ // If this dialog requires immediate creation, create it now
 96+ if ( typeof module.immediateCreate !== 'undefined' && module.immediateCreate ) {
 97+ $.wikiEditor.modules.dialogs.fn.reallyCreate( context, module, mod );
 98+ }
9599 }
96100 }
97101 },
@@ -98,8 +102,9 @@
99103 * Build the actual dialog. This done on-demand rather than in create()
100104 * @param {Object} context Context object of editor dialog belongs to
101105 * @param {Object} module Dialog module object
 106+ * @param {String} name Dialog name (key in $.wikiEditor.modules.dialogs.modules)
102107 */
103 - reallyCreate: function( context, module ) {
 108+ reallyCreate: function( context, module, name ) {
104109 var configuration = module.dialog;
105110 // Add some stuff to configuration
106111 configuration.bgiframe = true;
@@ -110,7 +115,7 @@
111116 // Stupid JS won't let us do stuff like
112117 // foo = { mediaWiki.msg( 'bar' ): baz }
113118 configuration.newButtons = {};
114 - for ( msg in configuration.buttons )
 119+ for ( var msg in configuration.buttons )
115120 configuration.newButtons[mediaWiki.msg( msg )] = configuration.buttons[msg];
116121 configuration.buttons = configuration.newButtons;
117122 // Create the dialog <div>
@@ -137,7 +142,7 @@
138143 } );
139144
140145 // Let the outside world know we set up this dialog
141 - context.$textarea.trigger( 'wikiEditor-dialogs-loaded-' + mod );
 146+ context.$textarea.trigger( 'wikiEditor-dialogs-loaded-' + name );
142147 },
143148 /**
144149 * Resize a dialog so its contents fit
Index: branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.html
@@ -59,7 +59,7 @@
6060 padding: 0.5em 4px;
6161 padding-top: 1.25em;
6262 margin-top: -0.95em;
63 - background: #F3F3F3 url(../../images/wikiEditor/templateEditor/text-base.png) repeat-x scroll center top;
 63+ background: #F3F3F3 url(images/templateEditor/text-base.png) repeat-x scroll center top;
6464 display: block;
6565 width: 100%;
6666 border-bottom: solid 1px #cccccc;
@@ -76,7 +76,7 @@
7777 margin-bottom: -1px;
7878 margin-right: 2px;
7979 overflow: hidden;
80 - background: url( '../../images/wikiEditor/templateEditor/name-base.png' ) 0 0 repeat-x #e8e8e8;
 80+ background: url(images/templateEditor/name-base.png) 0 0 repeat-x #e8e8e8;
8181 color: #000000;
8282 font-family: monospace;
8383 text-decoration: none;
@@ -108,16 +108,16 @@
109109 text-decoration: underline;
110110 }
111111 .wikiEditor-templateEditor .wikiEditor-template-expanded .wikiEditor-template-expand {
112 - background-image: url(../../images/wikiEditor/templateEditor/collapse.png);
 112+ background-image: url(images/templateEditor/collapse.png);
113113 }
114114 .wikiEditor-templateEditor .wikiEditor-template-expanded .wikiEditor-template-dialog {
115 - background-image: url(../../images/wikiEditor/templateEditor/dialog-expanded.png);
 115+ background-image: url(images/templateEditor/dialog-expanded.png);
116116 }
117117 .wikiEditor-templateEditor .wikiEditor-template-collapsed .wikiEditor-template-expand {
118 - background-image: url(../../images/wikiEditor/templateEditor/expand.png);
 118+ background-image: url(images/templateEditor/expand.png);
119119 }
120120 .wikiEditor-templateEditor .wikiEditor-template-collapsed .wikiEditor-template-dialog {
121 - background-image: url(../../images/wikiEditor/templateEditor/dialog-collapsed.png);
 121+ background-image: url(images/templateEditor/dialog-collapsed.png);
122122 }
123123 .wikiEditor-templateEditor .wikiEditor-template-expanded {
124124 display: block;
Index: branches/REL1_17/phase3/skins/common/prefs.js
@@ -14,8 +14,8 @@
1515 };
1616
1717 window.timezoneSetup = function() {
18 - var tzSelect = document.getElementById( 'mw-input-timecorrection' );
19 - var tzTextbox = document.getElementById( 'mw-input-timecorrection-other' );
 18+ var tzSelect = document.getElementById( 'mw-input-wptimecorrection' );
 19+ var tzTextbox = document.getElementById( 'mw-input-wptimecorrection-other' );
2020
2121 if ( tzSelect && tzTextbox ) {
2222 addHandler( tzSelect, 'change', function( e ) { updateTimezoneSelection( false ); } );
@@ -40,8 +40,8 @@
4141 };
4242
4343 window.guessTimezone = function() {
44 - var textbox = document.getElementById( 'mw-input-timecorrection-other' );
45 - var selector = document.getElementById( 'mw-input-timecorrection' );
 44+ var textbox = document.getElementById( 'mw-input-wptimecorrection-other' );
 45+ var selector = document.getElementById( 'mw-input-wptimecorrection' );
4646
4747 selector.value = 'other';
4848 textbox.value = fetchTimezone();
@@ -50,13 +50,13 @@
5151 };
5252
5353 window.updateTimezoneSelection = function( force_offset ) {
54 - var selector = document.getElementById( 'mw-input-timecorrection' );
 54+ var selector = document.getElementById( 'mw-input-wptimecorrection' );
5555
5656 if ( selector.value == 'guess' ) {
5757 return guessTimezone();
5858 }
5959
60 - var textbox = document.getElementById( 'mw-input-timecorrection-other' );
 60+ var textbox = document.getElementById( 'mw-input-wptimecorrection-other' );
6161 var localtimeHolder = document.getElementById( 'wpLocalTime' );
6262 var servertime = document.getElementsByName( 'wpServerTime' )[0].value;
6363 var minDiff = 0;
Property changes on: branches/REL1_17/phase3/skins/common/prefs.js
___________________________________________________________________
Added: svn:mergeinfo
6464 Merged /branches/new-installer/phase3/skins/common/prefs.js:r43664-66004
6565 Merged /branches/REL1_15/phase3/skins/common/prefs.js:r51646
6666 Merged /branches/sqlite/skins/common/prefs.js:r58211-58321
6767 Merged /trunk/phase3/skins/common/prefs.js:r79245,79581
Index: branches/REL1_17/phase3/includes/resourceloader/ResourceLoaderUserModule.php
@@ -28,9 +28,7 @@
2929 /* Protected Methods */
3030
3131 protected function getPages( ResourceLoaderContext $context ) {
32 - global $wgAllowUserCss;
33 -
34 - if ( $context->getUser() && $wgAllowUserCss ) {
 32+ if ( $context->getUser() ) {
3533 $username = $context->getUser();
3634 return array(
3735 "$username/common.js" => array( 'ns' => NS_USER, 'type' => 'script' ),
Index: branches/REL1_17/phase3/resources/jquery.ui/themes/vector/jquery.ui.dialog.css
@@ -23,11 +23,13 @@
2424 padding: 0.9em 1.4em 0.6em !important;
2525 }
2626 body .ui-dialog .ui-widget-header {
 27+ /* @embed */
2728 background: #f0f0f0 url(images/titlebar-fade.png) repeat-x scroll 50% 100% !important;
2829 }
2930 /* FIXME: Should just update the icon sprite if we're keeping this X */
3031 body .ui-dialog .ui-icon-closethick {
31 - background: url(images/close-x.png) no-repeat 50% 50% !important;
 32+ /* @embed */
 33+ background: url(images/close.png) no-repeat 50% 50% !important;
3234 }
3335 body .ui-dialog .ui-dialog-buttonpane {
3436 margin-top: 0 !important;
Index: branches/REL1_17/phase3/resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css
@@ -1,7 +1,7 @@
22 /* Autocomplete
33 ----------------------------------*/
44 .ui-autocomplete { position: absolute; cursor: default; }
5 -.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
 5+.ui-autocomplete-loading { /* @embed */ background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
66
77 /* workarounds */
88 * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
Index: branches/REL1_17/phase3/resources/jquery.ui/themes/vector/jquery.ui.theme.css
@@ -13,26 +13,26 @@
1414 .ui-widget { font-family: sans-serif; font-size: 0.8em; }
1515 .ui-widget .ui-widget { font-size: 1em; }
1616 .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: sans-serif; font-size: 1em; }
17 -.ui-widget-content { border: none; background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; }
 17+.ui-widget-content { border: none; /* @embed */ background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; }
1818 .ui-widget-content a { color: #362b36; }
19 -.ui-widget-header { border: 1px solid #aed0ea; line-height: 1em; background: #ffffff url(images/ui-bg_highlight-soft_100_ffffff_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
 19+.ui-widget-header { border: 1px solid #aed0ea; line-height: 1em; /* @embed */ background: #ffffff url(images/ui-bg_highlight-soft_100_ffffff_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
2020 .ui-widget-header a { color: #222222; }
2121
2222 /* Interaction states
2323 ----------------------------------*/
24 -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_highlight-hard_80_d7ebf9_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #2779aa; }
 24+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; /* @embed */ background: #d7ebf9 url(images/ui-bg_highlight-hard_80_d7ebf9_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #2779aa; }
2525 .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; }
26 -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_highlight-soft_100_e4f1fb_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #0070a3; }
 26+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; /* @embed */ background: #e4f1fb url(images/ui-bg_highlight-soft_100_e4f1fb_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #0070a3; }
2727 .ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; }
28 -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #cccccc; background: #f0f0f0 url(images/ui-bg_inset-hard_100_f0f0f0_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #000000; }
 28+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #cccccc; background: #f0f0f0 /* @embed */ url(images/ui-bg_inset-hard_100_f0f0f0_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #000000; }
2929 .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #000000; text-decoration: none; }
3030 .ui-widget :active { outline: none; }
3131
3232 /* Interaction Cues
3333 ----------------------------------*/
34 -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; }
 34+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f /* @embed */ url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; }
3535 .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
36 -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; }
 36+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a /* @embed */ url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; }
3737 .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
3838 .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
3939 .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
@@ -43,14 +43,13 @@
4444 ----------------------------------*/
4545
4646 /* states and images */
47 -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); }
48 -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
49 -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
50 -.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); }
51 -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); }
52 -.ui-state-active .ui-icon {background-image: url(images/ui-icons_666666_256x240.png); }
53 -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
54 -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
 47+.ui-icon { width: 16px; height: 16px; }
 48+.ui-icon, .ui-widget-content .ui-icon, .ui-widget-header .ui-icon { /* @embed */ background-image: url(images/ui-icons_72a7cf_256x240.png); }
 49+.ui-state-default .ui-icon { /* @embed */ background-image: url(images/ui-icons_3d80b3_256x240.png); }
 50+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon { /* @embed */ background-image: url(images/ui-icons_2694e8_256x240.png); }
 51+.ui-state-active .ui-icon { /* @embed */ background-image: url(images/ui-icons_666666_256x240.png); }
 52+.ui-state-highlight .ui-icon { /* @embed */ background-image: url(images/ui-icons_2e83ff_256x240.png); }
 53+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { /* @embed */ background-image: url(images/ui-icons_ffffff_256x240.png); }
5554
5655 /* positioning */
5756 .ui-icon-carat-1-n { background-position: 0 0; }
@@ -246,4 +245,4 @@
247246
248247 /* Overlays */
249248 .ui-widget-overlay { background: #000000; opacity: .75;filter:Alpha(Opacity=75); }
250 -.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_flat_70_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
\ No newline at end of file
 249+.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; /* @embed */ background: #000000 url(images/ui-bg_flat_70_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
\ No newline at end of file
Index: branches/REL1_17/phase3/resources/jquery.ui/themes/vector/jquery.ui.button.css
@@ -35,6 +35,7 @@
3636 padding: 0.2em 0.6em 0.15em !important;
3737 margin: 0.5em 0 0.5em 0.4em !important;
3838 border: 1px solid #a6a6a6 !important;
 39+ /* @embed */
3940 background: #f2f2f2 url(images/button-off.png) repeat-x scroll 50% 100% !important;
4041 cursor: pointer;
4142 font-size: 1em;
@@ -44,16 +45,19 @@
4546 }
4647 body button.ui-button:hover {
4748 border-color: #6e7273;
 49+ /* @embed */
4850 background: #e1e1e1 url(images/button-over.png) repeat-x scroll 50% 100% !important;
4951 }
5052 body button.ui-button:active,
5153 body button.ui-button:focus {
5254 border-color: #707271;
 55+ /* @embed */
5356 background: #bfbfbf url(images/button-down.png) repeat-x scroll 50% 100% !important;
5457 }
5558 body button.ui-button.disabled {
5659 color: #7f7f7f;
5760 border-color: #cccccc;
 61+ /* @embed */
5862 background: #f2f2f2 url(images/button-disabled.png) repeat-x scroll 50% 100% !important;
5963 }
6064 /* Disables the annoying dashed border Firefox puts on active buttons */

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78093Remove unnecessary check against $wgAllowUserCss in ResourceLoaderUserModule ...catrope20:10, 8 December 2010
r78200Make load.php output a comment explaining what's going on when no modules wer...catrope17:21, 10 December 2010
r79245Fix JS errors in prefs.js caused by the (unintentional?) renaming of mw-input...catrope12:16, 30 December 2010
r79570WikiEditor: Fix paths to images in jquery.wikiEditor.html , apparently these ...catrope11:58, 4 January 2011
r79571Followup r79570: fix the image paths up for realcatrope12:03, 4 January 2011
r79573WikiEditor: Fix templateEditor dialogs, which were broken by lazy creation in...catrope12:53, 4 January 2011
r79574Fix jQuery UI dialog CSS for close-x.png -> close.png rename in Vector themecatrope12:58, 4 January 2011
r79581Add /* @embed */ comments for URLs in all RL-ified CSS files, except in jQuer...catrope14:25, 4 January 2011
r79582Remove two useless CSS rules that would cause one image to be embedded thricecatrope14:28, 4 January 2011
r79766Improves on r79582 - no need to delete the rules, just merge them! Do you rea...tparscal22:42, 6 January 2011
r79770Improves on r79766, and thus also r79582 - the original only applied the widt...tparscal22:46, 6 January 2011

Status & tagging log