Skip to content

Commit

Permalink
[#1879] Hide "exceed" input when not in use
Browse files Browse the repository at this point in the history
  • Loading branch information
gabemart committed Nov 3, 2015
1 parent 12ca61d commit 231904a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions akvo/rsr/static/scripts-src/project-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,7 @@ if (firstAccordionChild !== null) {
exceedTargetNewValue.setAttribute('type', 'number');
exceedTargetNewValue.setAttribute('disabled', '');
exceedTargetNewValue.classList.add('exceed-value');
exceedTargetNewValue.classList.add('opacity-transition');

exceedTargetNewValue.addEventListener('input', function () {
if (exceedTargetCheckbox.checked) {
Expand Down
1 change: 1 addition & 0 deletions akvo/rsr/static/scripts-src/project-main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,7 @@ if (firstAccordionChild !== null) {
exceedTargetNewValue.setAttribute('type', 'number');
exceedTargetNewValue.setAttribute('disabled', '');
exceedTargetNewValue.classList.add('exceed-value');
exceedTargetNewValue.classList.add('opacity-transition');

exceedTargetNewValue.addEventListener('input', function () {
if (exceedTargetCheckbox.checked) {
Expand Down
4 changes: 4 additions & 0 deletions akvo/rsr/static/styles-src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2427,11 +2427,15 @@ body.translationBarActive div.skiptranslate ~ article, body.translationBarActive
.results .update-dialog-container td .update-entry-container .update-exceed-target {
margin: 2em 0 0 0;
text-align: right; }
.results .update-dialog-container td .update-entry-container .update-exceed-target input.exceed-value {
opacity: 0; }
.results .update-dialog-container td .update-entry-container .update-exceed-target label {
margin-right: 10px;
color: rgba(32, 32, 36, 0.5); }
.results .update-dialog-container td .update-entry-container .update-exceed-target .update-exceed-target-checkbox {
margin-right: 10px; }
.results .update-dialog-container td .update-entry-container .update-exceed-target .update-exceed-target-checkbox:checked ~ input.exceed-value {
opacity: 1; }
.results .update-dialog-container td .update-entry-container .indicator-bar-display-container {
position: relative;
height: 100%;
Expand Down
10 changes: 8 additions & 2 deletions akvo/rsr/static/styles-src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3110,15 +3110,21 @@ body {
.update-exceed-target {
margin: 2em 0 0 0;
text-align: right;
input {

input.exceed-value {
opacity: 0;
}
label {
margin-right: 10px;
color: rgba($akvoBlack, 0.5);
}
.update-exceed-target-checkbox {
margin-right: 10px;

&:checked {
~ input.exceed-value {
opacity: 1;
}
}
}
}
.indicator-bar-display-container {
Expand Down

0 comments on commit 231904a

Please sign in to comment.