]> source.dussan.org Git - sonarqube.git/commitdiff
SQBILLING-88 Add coupon input in billing upgrade page
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Thu, 15 Mar 2018 16:02:01 +0000 (17:02 +0100)
committerSonarTech <sonartech@sonarsource.com>
Thu, 5 Apr 2018 18:20:48 +0000 (20:20 +0200)
* Update plugin dependencies
* Update license headers
* Better support to disable inputs and react-select

server/sonar-web/src/main/js/app/styles/components/menu.css
server/sonar-web/src/main/js/app/styles/init/forms.css
server/sonar-web/src/main/js/app/theme.js
server/sonar-web/src/main/js/components/common/MultiSelectOption.tsx
server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/MultiSelectOption-test.tsx.snap
server/sonar-web/src/main/js/components/controls/react-select.css

index 11e247b18a0d4de7cf84a6324b80b119b3620b82..0ae00301aa39d2c82f2937e874338b18768ffd38 100644 (file)
@@ -58,6 +58,8 @@
 
 .menu > li > a.disabled {
   color: #bbb !important;
+  cursor: not-allowed !important;
+  pointer-events: none !important;
 }
 
 .menu > li > a:hover,
index 60d8fb53f3e63297fbd94c8a77ccfbb98a4616ec..98a484ef21e0222c58a023c3dfa5c7462b8a000e 100644 (file)
@@ -80,6 +80,20 @@ select.invalid {
   border-color: var(--red);
 }
 
+input.disabled,
+input:disabled,
+textarea.disabled,
+textarea:disabled,
+select.disabled,
+select:disabled {
+  color: var(--disableGrayText) !important;
+  border-color: var(--disableGrayBorder) !important;
+  background: var(--disableGrayBg) !important;
+  cursor: not-allowed !important;
+  pointer-events: none !important;
+  box-shadow: none !important;
+}
+
 input[type='text'],
 input[type='password'],
 input[type='email'],
@@ -177,9 +191,9 @@ button:disabled:focus,
 .button:disabled:focus,
 input[type='submit']:disabled:focus,
 input[type='button']:disabled:focus {
-  color: #bbb !important;
-  border-color: #ddd !important;
-  background: #ebebeb !important;
+  color: var(--disableGrayText) !important;
+  border-color: var(--disableGrayBorder) !important;
+  background: var(--disableGrayBg) !important;
   cursor: not-allowed !important;
   box-shadow: none !important;
 }
index dd39fe0a445ea29a864a54d0d53ef8a8a6ed376b..434a6bc2ecc55bca6bc6cc2e0a69ef84629ad68d 100644 (file)
@@ -40,6 +40,10 @@ module.exports = {
   gray60: '#999',
   gray40: '#404040',
 
+  disableGrayText: '#bbb',
+  disableGrayBorder: '#ddd',
+  disableGrayBg: '#ebebeb',
+
   barBackgroundColor: '#f3f3f3',
   barBorderColor: '#e6e6e6',
 
index 879bdada43f1781a251c084332c9836072b61f01..ffdea8dd9e4dc8b76cf2636da07ebc852ab266e7 100644 (file)
@@ -50,11 +50,7 @@ export default class MultiSelectOption extends React.PureComponent<Props> {
       'icon-checkbox-checked': selected,
       'icon-checkbox-invisible': disabled
     });
-    const activeClass = classNames({
-      active: this.props.active,
-      disabled,
-      'cursor-not-allowed': disabled
-    });
+    const activeClass = classNames({ active: this.props.active, disabled });
 
     return (
       <li>
index 3f9a5cc7ef5709325448714b1b5e5c35c726795a..ff5048c163cb43bad071e891db2a2f8307e6bbf2 100644 (file)
@@ -40,7 +40,7 @@ exports[`should render custom element 1`] = `
 exports[`should render disabled element 1`] = `
 <li>
   <a
-    className="disabled cursor-not-allowed"
+    className="disabled"
     href="#"
     onClick={[Function]}
     onFocus={[Function]}
index a8bc7eac879783010ab5fafbc7ff6591f24fb3d7..bac1d66a0b8f15af1680032ede6c1fcf08ae1235 100644 (file)
 }
 
 .Select.is-disabled > .Select-control {
-  background-color: #f9f9f9;
+  background-color: var(--disableGrayBg) !important;
+  border-color: var(--disableGrayBorder) !important;
 }
 
 .Select.is-disabled > .Select-control:hover {
-  box-shadow: none;
+  box-shadow: none !important;
 }
 
 .Select.is-disabled .Select-arrow-zone {
-  cursor: default;
-  pointer-events: none;
+  cursor: not-allowed !important;
+  pointer-events: none !important;
+}
+
+.Select.is-disabled .Select-placeholder,
+.Select.is-disabled .Select-value {
+  color: var(--disableGrayText) !important;
 }
 
 .Select-control {