r87170 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87169‎ | r87170 | r87171 >
Date:16:57, 30 April 2011
Author:catrope
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_17/extensions/ParserFunctions/ParserFunctions_body.php (modified) (history)
  • /branches/REL1_17/extensions/Vector/modules/ext.vector.collapsibleTabs.js (modified) (history)
  • /branches/REL1_17/phase3/includes/Linker.php (modified) (history)
  • /branches/REL1_17/phase3/includes/api/ApiParamInfo.php (modified) (history)
  • /branches/REL1_17/phase3/resources/jquery/jquery.collapsibleTabs.js (modified) (history)
  • /branches/REL1_17/phase3/resources/mediawiki/mediawiki.js (modified) (history)
  • /branches/REL1_17/phase3/skins/common/commonPrint.css (modified) (history)
  • /branches/REL1_17/phase3/skins/common/diff.css (modified) (history)
  • /branches/REL1_17/phase3/skins/common/shared.css (modified) (history)
  • /branches/REL1_17/phase3/skins/monobook/main.css (modified) (history)
  • /branches/REL1_17/phase3/skins/vector/screen.css (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/Vector/modules/ext.vector.collapsibleTabs.js
@@ -28,7 +28,7 @@
2929 $( this ).hide();
3030 // add the placeholder
3131 $( '<span class="placeholder" style="display:none;"></span>' ).insertAfter( this );
32 - $( this ).remove().prependTo( target ).data( 'collapsibleTabsSettings', data );
 32+ $( this ).detach().prependTo( target ).data( 'collapsibleTabsSettings', data );
3333 $( this ).attr( 'style', 'display:list-item;' );
3434 //$.collapsibleTabs.getSettings( $( $.collapsibleTabs.getSettings( $( ele ) ).expandedContainer ) )
3535 // .shifting = false;
@@ -65,13 +65,13 @@
6666 var $target = $( data.expandedContainer ).find( 'span.placeholder:first' );
6767 var expandedWidth = data.expandedWidth;
6868 $moving.css( "position", "relative" ).css( ( rtl ? 'right' : 'left' ), 0 ).css( 'width', '1px' );
69 - $target.replaceWith( $moving.remove().css( 'width', '1px' ).data( 'collapsibleTabsSettings', data )
70 - .animate( { width: expandedWidth+"px" }, "normal", function() {
 69+ $target.replaceWith( $moving.detach().css( 'width', '1px' ).data( 'collapsibleTabsSettings', data )
 70+ .animate( { width: expandedWidth+"px" }, "normal", function( ) {
7171 $( this ).attr( 'style', 'display:block;' );
7272 //$.collapsibleTabs.getSettings( $( $.collapsibleTabs.getSettings( $( ele ) ).expandedContainer ) )
7373 // .shifting = false;
7474 // Do the above, except with guards for JS errors
75 - var data = $.collapsibleTabs.getSettings( $( ele ) );
 75+ var data = $.collapsibleTabs.getSettings( $( this ) );
7676 if ( !data ) {
7777 return;
7878 }
Property changes on: branches/REL1_17/extensions/Vector/modules/ext.vector.collapsibleTabs.js
___________________________________________________________________
Modified: svn:mergeinfo
7979 Merged /trunk/extensions/Vector/modules/ext.vector.collapsibleTabs.js:r86625
Index: branches/REL1_17/extensions/ParserFunctions/ParserFunctions_body.php
@@ -415,6 +415,11 @@
416416 # if local time was not requested, convert to UTC
417417 $tz = new DateTimeZone( 'UTC' );
418418 }
 419+
 420+ # Correct for DateTime interpreting 'XXXX' as XX:XX o'clock
 421+ if ( preg_match( '/^[0-9]{4}$/', $date ) ) {
 422+ $date = '00:00 '.$date;
 423+ }
419424
420425 # Parse date
421426 if ( $date !== '' ) {
Index: branches/REL1_17/phase3/skins/monobook/main.css
@@ -59,7 +59,6 @@
6060
6161 table {
6262 font-size: 100%;
63 - color: black;
6463 }
6564 a {
6665 text-decoration: none;
Index: branches/REL1_17/phase3/skins/common/commonPrint.css
@@ -44,6 +44,9 @@
4545 div.floatleft p {
4646 font-style: italic;
4747 }
 48+div.center {
 49+ text-align: center;
 50+}
4851
4952 /* thumbnails */
5053 div.thumb {
Index: branches/REL1_17/phase3/skins/common/shared.css
@@ -556,6 +556,7 @@
557557 background: #f9f9f9;
558558 border: 1px #aaa solid;
559559 border-collapse: collapse;
 560+ color: black;
560561 }
561562 .wikitable th, .wikitable td {
562563 border: 1px #aaa solid;
Property changes on: branches/REL1_17/phase3/skins/common/shared.css
___________________________________________________________________
Modified: svn:mergeinfo
563564 Merged /trunk/phase3/skins/common/shared.css:r85546,86450,86625,86841,86904,86973,87030
Index: branches/REL1_17/phase3/skins/common/diff.css
@@ -54,8 +54,10 @@
5555 }
5656 table.diff td div {
5757 /* Force-wrap very long lines such as URLs or page-widening char strings.
58 - CSS 3 draft..., but Gecko doesn't support it yet:
59 - https://bugzilla.mozilla.org/show_bug.cgi?id=99457 */
 58+ CSS 3 only (In Gecko 1.9.1 / Firefox 3.5):
 59+ https://bugzilla.mozilla.org/show_bug.cgi?id=99457
 60+ https://developer.mozilla.org/web-tech/2008/08/20/word-wrap-break-word/
 61+ https://developer.mozilla.org/En/CSS/Word-wrap */
6062 word-wrap: break-word;
6163
6264 /* As fallback, scrollbars will be added for very wide cells
Index: branches/REL1_17/phase3/skins/vector/screen.css
@@ -73,7 +73,6 @@
7474 #p-personal {
7575 position: absolute;
7676 top: 0;
77 - padding-left: 10em;
7877 right: 0.75em;
7978 }
8079 #p-personal h5 {
@@ -82,7 +81,7 @@
8382 #p-personal ul {
8483 list-style: none;
8584 margin: 0;
86 - padding: 0;
 85+ padding-left: 10em; /* Keep from overlapping logo */
8786 }
8887 /* @noflip */
8988 #p-personal li {
@@ -825,7 +824,6 @@
826825 /* Tables */
827826 table {
828827 font-size: 100%;
829 - color: black;
830828 }
831829 /* Forms */
832830 fieldset {
Property changes on: branches/REL1_17/phase3/skins/vector/screen.css
___________________________________________________________________
Modified: svn:mergeinfo
833831 Merged /trunk/phase3/skins/vector/screen.css:r85546,86450,86625,86841,86904,86973,87030
Index: branches/REL1_17/phase3/includes/Linker.php
@@ -199,7 +199,7 @@
200200
201201 $attribs = array_merge(
202202 $attribs,
203 - $this->linkAttribs( $target, $customAttribs, $options, $text )
 203+ $this->linkAttribs( $target, $customAttribs, $options )
204204 );
205205 if ( is_null( $text ) ) {
206206 $text = $this->linkText( $target );
@@ -249,7 +249,7 @@
250250 /**
251251 * Returns the array of attributes used when linking to the Title $target
252252 */
253 - private function linkAttribs( $target, $attribs, $options, $linkText ) {
 253+ private function linkAttribs( $target, $attribs, $options ) {
254254 wfProfileIn( __METHOD__ );
255255 global $wgUser;
256256 $defaults = array();
@@ -280,13 +280,12 @@
281281 }
282282
283283 # Get a default title attribute.
284 - $known = in_array( 'known', $options );
285284 if ( $target->getPrefixedText() == '' ) {
286285 # A link like [[#Foo]]. This used to mean an empty title
287286 # attribute, but that's silly. Just don't output a title.
288 - } elseif ( $known && strtolower($linkText) !== strtolower($target->getPrefixedText() ) ) {
 287+ } elseif ( in_array( 'known', $options ) ) {
289288 $defaults['title'] = $target->getPrefixedText();
290 - } elseif ( !$known ) {
 289+ } else {
291290 $defaults['title'] = wfMsg( 'red-link-title', $target->getPrefixedText() );
292291 }
293292
Index: branches/REL1_17/phase3/includes/api/ApiParamInfo.php
@@ -156,6 +156,7 @@
157157 if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {
158158 $a['type'] = $p[ApiBase::PARAM_TYPE];
159159 if ( is_array( $a['type'] ) ) {
 160+ $a['type'] = array_values( $a['type'] ); // to prevent sparse arrays from being serialized to JSON as objects
160161 $result->setIndexedTagName( $a['type'], 't' );
161162 }
162163 }
Index: branches/REL1_17/phase3/resources/jquery/jquery.collapsibleTabs.js
@@ -49,12 +49,14 @@
5050 },
5151 addData: function( $collapsible ) {
5252 var $settings = $collapsible.parent().data( 'collapsibleTabsSettings' );
53 - $collapsible.data( 'collapsibleTabsSettings', {
54 - 'expandedContainer': $settings.expandedContainer,
55 - 'collapsedContainer': $settings.collapsedContainer,
56 - 'expandedWidth': $collapsible.width(),
57 - 'prevElement': $collapsible.prev()
58 - } );
 53+ if ( $settings != null ) {
 54+ $collapsible.data( 'collapsibleTabsSettings', {
 55+ 'expandedContainer': $settings.expandedContainer,
 56+ 'collapsedContainer': $settings.collapsedContainer,
 57+ 'expandedWidth': $collapsible.width(),
 58+ 'prevElement': $collapsible.prev()
 59+ } );
 60+ }
5961 },
6062 getSettings: function( $collapsible ) {
6163 var $settings = $collapsible.data( 'collapsibleTabsSettings' );
@@ -95,7 +97,7 @@
9698 var dataExp = $.collapsibleTabs.getSettings( data.expandedContainer );
9799 dataExp.shifting = true;
98100 $moving
99 - .remove()
 101+ .detach()
100102 .prependTo( data.collapsedContainer )
101103 .data( 'collapsibleTabsSettings', data );
102104 dataExp.shifting = false;
@@ -107,9 +109,9 @@
108110 var dataExp = $.collapsibleTabs.getSettings( data.expandedContainer );
109111 dataExp.shifting = true;
110112 // remove this element from where it's at and put it in the dropdown menu
111 - $moving.remove().insertAfter( data.prevElement ).data( 'collapsibleTabsSettings', data );
 113+ $moving.detach().insertAfter( data.prevElement ).data( 'collapsibleTabsSettings', data );
112114 dataExp.shifting = false;
113115 $.collapsibleTabs.handleResize();
114116 }
115117 };
116 -} )( jQuery );
\ No newline at end of file
 118+} )( jQuery );
Index: branches/REL1_17/phase3/resources/mediawiki/mediawiki.js
@@ -910,9 +910,7 @@
911911 // Allow calling with an external script or single dependency as a string
912912 if ( typeof modules === 'string' ) {
913913 // Support adding arbitrary external scripts
914 - if ( modules.substr( 0, 7 ) == 'http://'
915 - || modules.substr( 0, 8 ) == 'https://' )
916 - {
 914+ if ( modules.substr( 0, 7 ) == 'http://' || modules.substr( 0, 8 ) == 'https://' ) {
917915 if ( type === 'text/css' ) {
918916 $( 'head' )
919917 .append( $( '<link rel="stylesheet" type="text/css" />' )
Property changes on: branches/REL1_17/phase3/resources/mediawiki/mediawiki.js
___________________________________________________________________
Modified: svn:mergeinfo
920918 Merged /trunk/phase3/resources/mediawiki/mediawiki.js:r85546,86450,86625,86841,86904,86973,87030

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85546Remove color:black from table {} in skins (bug 28422) + small fixes...krinkle16:31, 6 April 2011
r86450fixing bug 28438 - header links displaying incorrectly in rlt IE9. Also remov...kaldari01:42, 20 April 2011
r86625(bug 27833) CollapsibleTabs doesn't collapse tabs due to JS errors...catrope14:39, 21 April 2011
r86805fix for bug 28655 - #time interpreting years incorrectlykaldari01:10, 24 April 2011
r86841Followup r86625: per CR, use loose comparison against null instead of typeof ...catrope10:17, 25 April 2011
r86904fix for bug 28573 - in printable version centered images are not centeredkaldari21:37, 25 April 2011
r86973Follow-up r86954: make one centralised call to array_values(), there are more...maxsem19:20, 26 April 2011
r87030revert r76127, r76129, and r83535 b/c I'm backing out the fix for bug #542. ...mah19:13, 27 April 2011

Status & tagging log