Jdlrobson has uploaded a new change for review.

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

Change subject: Upstream checkboxes to core
......................................................................

Upstream checkboxes to core

Change-Id: I256a84f7c94ca04ce01ce62571e33ca2ec35c9f5
See: I6a0db7c8ce33d242120f1cba9222db4e2154696c
---
M includes/NewHTMLCheckField.php
M resources/betafeatures.css
D resources/images/checked.png
D resources/images/checked.svg
4 files changed, 8 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BetaFeatures 
refs/changes/22/149122/1

diff --git a/includes/NewHTMLCheckField.php b/includes/NewHTMLCheckField.php
index 42daa6a..abd2db7 100644
--- a/includes/NewHTMLCheckField.php
+++ b/includes/NewHTMLCheckField.php
@@ -38,7 +38,7 @@
                        $value = !$value;
                }
 
-               $labelClasses = array( 'mw-ui-styled-checkbox-label' );
+               $labelClasses = array( 'mw-ui-styled-checkbox-label 
mw-ui-checkbox' );
                $labelAttrs = array( 'for' => $this->mID );
 
                if ( isset( $this->mParams['disabled'] ) && 
$this->mParams['disabled'] === true ) {
@@ -79,7 +79,9 @@
 
                $attr['class'] = implode( ' ', $classes );
 
-               $this->mParent->getOutput()->addModules( 'ext.betaFeatures' );
+               $out = $this->mParent->getOutput();
+               $out->addModules( 'ext.betaFeatures' );
+               $out->addModuleStyles( 'mediawiki.ui.checkbox' );
                return Html::rawElement( 'label', $labelAttrs, Xml::check( 
$this->mName, $value, $attr ) . ' ' );
        }
 
diff --git a/resources/betafeatures.css b/resources/betafeatures.css
index f15a7ec..ea7e660 100644
--- a/resources/betafeatures.css
+++ b/resources/betafeatures.css
@@ -25,51 +25,6 @@
 
 @charset "UTF-8";
 
-.client-js .mw-ui-styled-checkbox-label {
-       background-color: #fff;
-       cursor: pointer;
-       display: inline-block;
-       float: left;
-       width: 24px;
-       height: 24px;
-       border: 1px solid grey;
-       -webkit-border-radius: 2px;
-       -moz-border-radius: 2px;
-       -ms-border-radius: 2px;
-       -o-border-radius: 2px;
-       border-radius: 2px;
-       margin-right: 18px;
-}
-
-.client-js .mw-ui-styled-checkbox-label input[type=checkbox] {
-       /* Hide visually, keep accessible */
-       position: absolute;
-       clip: rect(1px 1px 1px 1px);
-       clip: rect(1px,1px,1px,1px);
-}
-
-.client-js .mw-ui-styled-checkbox-label.mw-ui-checked {
-       /* SVG support using a transparent gradient to guarantee cross-browser
-        * compatibility (browsers able to understand gradient syntax support 
also SVG).
-        * 
http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique */
-       background-image: url(images/checked.png);
-       /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), 
url(images/checked.svg);
-       /* @embed */
-       background-image: linear-gradient(transparent, transparent), 
url(images/checked.svg);
-       /* Fix for Opera 12 not rendering SVG backgrounds on border-radius 
labels */
-       background-image: -o-linear-gradient(transparent, transparent), 
url(images/checked.png);
-       background-repeat: no-repeat;
-}
-
-.client-js .mw-ui-styled-checkbox-label.mw-ui-disabled {
-       background-color: lightgrey;
-}
-
-.client-js .mw-ui-checkbox-label {
-       padding-top: 5px;
-}
-
 table.mw-htmlform-container {
        border-collapse: separate;
        border-spacing: 0 4px;
@@ -184,6 +139,10 @@
        margin-right: 9px;
 }
 
+.mw-ui-feature-checkbox .mw-ui-checkbox {
+       float: left;
+}
+
 .mw-htmlform-field-HTMLTextBlockField .mw-input {
        padding-bottom: 15px;
 }
diff --git a/resources/images/checked.png b/resources/images/checked.png
deleted file mode 100644
index ce4e6b9..0000000
--- a/resources/images/checked.png
+++ /dev/null
Binary files differ
diff --git a/resources/images/checked.svg b/resources/images/checked.svg
deleted file mode 100644
index aea69db..0000000
--- a/resources/images/checked.svg
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg"; 
width="24" height="24"><path d="M4 12l5 5 11-12" stroke="#00B78C" 
stroke-width="3" fill="none"/></svg>
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I256a84f7c94ca04ce01ce62571e33ca2ec35c9f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to