LT-379: Study association table row hover is odd

This commit is contained in:
Leonardo Campos 2016-11-22 20:25:14 -02:00
parent da5b7d4fc4
commit dc64210b99
3 changed files with 25 additions and 12 deletions

View File

@ -23,13 +23,13 @@
<tbody>
{{#each relevantStudies}}
<tr>
<tr class="{{#if autoselected}}disabled{{/if}}">
<td class="checkboxWrapper center">
<label>
<input type="checkbox" class="includeStudy" {{valueIf autoselected '' 'checked'}}/> <span></span>
</label>
</td>
<td class="center studyDataCell {{#if autoselected}}disabled{{/if}}">
<td class="center studyDataCell">
{{#if autoselected}}
<p class="studyDate autoselected"
data-toggle="tooltip"
@ -40,13 +40,13 @@
<p class="studyDate">{{formatDA studyDate}}</p>
{{/if}}
</td>
<td class="center studyDataCell {{#if autoselected}}disabled{{/if}}">
<td class="center studyDataCell">
<p>{{formatPN patientName}}</p>
</td>
<td class="studyDataCell {{#if autoselected}}disabled{{/if}}">
<td class="studyDataCell">
<p>{{studyDescription}}</p>
</td>
<td class="timepointOptions center studyDataCell noselect {{#if autoselected}}disabled{{/if}}">
<td class="timepointOptions center studyDataCell noselect">
{{#each timepointOptions}}
<label class="noselect">
<input type="radio"
@ -54,7 +54,7 @@
value="{{value}}"
class="timepointOption"
{{valueIf checked 'checked' ''}}
{{valueIf autoselected 'disabled' ''}}>
{{valueIf ../autoselected 'disabled' ''}}>
<span></span>{{name}}
</label>
{{/each}}

View File

@ -128,12 +128,14 @@ Template.studyAssociationTable.helpers({
Template.studyAssociationTable.events({
'change input.includeStudy'(event, instance) {
const checkbox = event.currentTarget;
const studyDataCells = $(checkbox).parents('tr').find('td.studyDataCell');
const studyRow = $(checkbox).closest('tr');
const studyDataCells = studyRow.find('td.studyDataCell');
if (checkbox.checked === true) {
studyDataCells.removeClass('disabled');
studyRow.removeClass('disabled');
studyDataCells.find('input').attr('disabled', false);
} else {
studyDataCells.addClass('disabled');
studyRow.addClass('disabled');
studyDataCells.find('input').attr('disabled', true);
}
}

View File

@ -108,6 +108,16 @@ $bodyCellHeight = 30px
&:before
theme('background-color', '$activeColor')
&:disabled
& + span
border-color: #535960 !important
&:checked + span
border-color: #0D4256 !important
&:before
background-color: #0D4256 !important
label
padding: 0 5px
padding-left: 20px
@ -115,9 +125,6 @@ $bodyCellHeight = 30px
position: relative
line-height: initial
&.disabled
opacity: 0.2
&.checkboxWrapper
label
display: block
@ -165,6 +172,10 @@ $bodyCellHeight = 30px
&:before
content: '\2713'
&.disabled
td
color: #535960
&:hover, &:active, &.active
background-color: $tableHoverColor
color: white