McIntireEvan has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/192260

Change subject: Update inputs to use mw-ui styles
......................................................................

Update inputs to use mw-ui styles

Update the rest of the input types to use the mw-ui styles

bug: T63526
Change-Id: Ibe77500d0bd79361331d8ded2150523102fe7779
---
M InputBox.classes.php
M resources/ext.inputBox.styles.css
2 files changed, 17 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InputBox 
refs/changes/60/192260/1

diff --git a/InputBox.classes.php b/InputBox.classes.php
index cc030ea..3458e3a 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -45,7 +45,15 @@
                // Split caches by language, to make sure visitors do not see a 
cached
                // version in a random language (since labels are in the user 
language)
                $this->mParser->getOptions()->getUserLangObj();
-               $this->mParser->getOutput()->addModuleStyles( 
'ext.inputBox.styles' );
+        $this->mParser->getOutput()->addModuleStyles(
+            array(
+                'mediawiki.ui',
+                           'mediawiki.ui.button',
+                           'mediawiki.ui.checkbox',
+                'mediawiki.ui.input',
+                'ext.inputBox.styles'
+            )
+        );
        }
 
        public function render() {
@@ -119,7 +127,7 @@
                );
                $htmlOut .= Xml::element( 'input',
                        array(
-                               'class' => 'searchboxInput',
+                               'class' => 'searchboxInput mw-ui-input',
                                'name' => 'search',
                                'type' => $this->mHidden ? 'hidden' : 'text',
                                'value' => $this->mDefaultText,
@@ -194,7 +202,7 @@
                                        );
                                } else {
                                        // Checkbox
-                                       $htmlOut .= ' <div 
class="inputbox-element">';
+                                       $htmlOut .= ' <div 
class="mw-ui-checkbox mw-ui-checkbox-label">';
                                        $htmlOut .= Xml::element( 'input',
                                                array(
                                                        'type' => 'checkbox',
@@ -288,7 +296,8 @@
                $htmlOut .= $htmlLabel;
                $htmlOut .= Xml::element( 'input',
                        array(
-                               'type' => $this->mHidden ? 'hidden' : 'text',
+                'type' => $this->mHidden ? 'hidden' : 'text',
+                'class' => 'mw-ui-input',
                                'name' => 'search',
                                'size' => $this->mWidth,
                                'id' => 'bodySearchInput' . $id,
@@ -425,8 +434,8 @@
                $htmlOut .= Xml::openElement( 'input',
                        array(
                                'type' => $this->mHidden ? 'hidden' : 'text',
-                               'name' => 'title',
-                               'class' => 'createboxInput',
+                'name' => 'title',
+                               'class' => 'createboxInput mw-ui-input',
                                'value' => $this->mDefaultText,
                                'placeholder' => $this->mPlaceholderText,
                                'size' => $this->mWidth,
@@ -500,7 +509,7 @@
                        array(
                                'type' => $this->mHidden ? 'hidden' : 'text',
                                'name' => 'wpNewTitle',
-                               'class' => 'mw-moveboxInput',
+                               'class' => 'mw-moveboxInput mw-ui-input',
                                'value' => $this->mDefaultText,
                                'placeholder' => $this->mPlaceholderText,
                                'size' => $this->mWidth,
@@ -582,7 +591,7 @@
                        array(
                                'type' => $this->mHidden ? 'hidden' : 'text',
                                'name' => 'preloadtitle',
-                               'class' => 'commentboxInput',
+                               'class' => 'commentboxInput mw-ui-input',
                                'value' => $this->mDefaultText,
                                'placeholder' => $this->mPlaceholderText,
                                'size' => $this->mWidth,
diff --git a/resources/ext.inputBox.styles.css 
b/resources/ext.inputBox.styles.css
index 30916f5..de0450b 100644
--- a/resources/ext.inputBox.styles.css
+++ b/resources/ext.inputBox.styles.css
@@ -7,8 +7,3 @@
 .mw-inputbox-inline {
        display: inline;
 }
-
-.inputbox-element {
-       display: inline;
-       white-space: nowrap;
-}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/192260
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe77500d0bd79361331d8ded2150523102fe7779
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: master
Gerrit-Owner: McIntireEvan <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to