r109779 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109778‎ | r109779 | r109780 >
Date:23:19, 22 January 2012
Author:krinkle
Status:ok
Tags:
Comment:
[ApiSandbox] fix regression from r109726 in some browsers
* select and input elements have different box models in different browsers, decreasing width by 1em so that it won't cause overflow
* use '' instead of '-' consistently
* give selects the same width as well
* buttons were not aligned to the right in IE7. Fixed by using float instead of text-align and relying on inline-block from jQuery UI.
Modified paths:
  • /trunk/extensions/ApiSandbox/ext.apiSandbox.css (modified) (history)
  • /trunk/extensions/ApiSandbox/ext.apiSandbox.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js
@@ -219,7 +219,7 @@
220220 var data,
221221 isQuery = action === 'query';
222222
223 - if ( action === '-' || ( isQuery && query === '-' ) ) {
 223+ if ( action === '' || ( isQuery && query === '' ) ) {
224224 $submit.button( 'option', 'disabled', true );
225225 return;
226226 }
@@ -289,7 +289,7 @@
290290 isQuery = a === 'query';
291291 if ( isQuery ) {
292292 $queryRow.show();
293 - if ( q !== '-' ) {
 293+ if ( q !== '' ) {
294294 $queryContainer.show();
295295 } else {
296296 $queryContainer.hide();
Index: trunk/extensions/ApiSandbox/ext.apiSandbox.css
@@ -1,8 +1,13 @@
22 /* Buttons */
 3+
34 #api-sandbox-buttons {
4 - text-align: right;
 5+ float: right;
56 }
67
 8+#api-sandbox-buttons button {
 9+ float: left;
 10+}
 11+
712 /* Options */
813
914 .api-sandbox-options {
@@ -29,6 +34,7 @@
3035 }
3136
3237 /* Params */
 38+
3339 .api-sandbox-params {
3440 width: 100%;
3541 table-layout: fixed;
@@ -51,9 +57,10 @@
5258 overflow: auto;
5359 }
5460
55 -.api-sandbox-params input[type="text"] {
 61+.api-sandbox-params input[type="text"],
 62+.api-sandbox-params select {
5663 padding: 2px 3px;
57 - width: 19em;
 64+ width: 18em;
5865 }
5966
6067 th.api-sandbox-params-label,

Sign-offs

UserFlagDate
Reedytested23:56, 2 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109726[ApiSandbox] front-end makeover...krinkle07:10, 22 January 2012

Status & tagging log