split up input-replacement into checkbox-replacement and radio-replacement
for easier understanding
This commit is contained in:
parent
0794cef040
commit
724cf36007
2 changed files with 14 additions and 10 deletions
|
@ -3,8 +3,8 @@
|
||||||
<tr>
|
<tr>
|
||||||
<% if @checkbox: %>
|
<% if @checkbox: %>
|
||||||
<th style="width: 40px" class="no-padding">
|
<th style="width: 40px" class="no-padding">
|
||||||
<label class="input-replacement">
|
<label class="checkbox-replacement">
|
||||||
<input type="checkbox" value="" name="bulk_all"/>
|
<input type="checkbox" value="" name="bulk_all">
|
||||||
<%- @Icon('checkbox', 'icon-unchecked') %>
|
<%- @Icon('checkbox', 'icon-unchecked') %>
|
||||||
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
||||||
</label>
|
</label>
|
||||||
|
@ -40,8 +40,8 @@
|
||||||
<tr class="item<% if object.active is false: %> is-inactive<% end %>" data-id="<%= object.id %>" data-position="<%= position %>" >
|
<tr class="item<% if object.active is false: %> is-inactive<% end %>" data-id="<%= object.id %>" data-position="<%= position %>" >
|
||||||
<% if @checkbox: %>
|
<% if @checkbox: %>
|
||||||
<td class="no-padding">
|
<td class="no-padding">
|
||||||
<label class="input-replacement">
|
<label class="checkbox-replacement">
|
||||||
<input type="checkbox" value="<%= object.id %>" name="bulk"/>
|
<input type="checkbox" value="<%= object.id %>" name="bulk">
|
||||||
<%- @Icon('checkbox', 'icon-unchecked') %>
|
<%- @Icon('checkbox', 'icon-unchecked') %>
|
||||||
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
||||||
</label>
|
</label>
|
||||||
|
@ -49,8 +49,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @radio: %>
|
<% if @radio: %>
|
||||||
<td class="no-padding">
|
<td class="no-padding">
|
||||||
<label class="input-replacement">
|
<label class="radio-replacement">
|
||||||
<input type="radio" value="<%= object.id %>" name="radio"/>
|
<input type="radio" value="<%= object.id %>" name="radio">
|
||||||
<%- @Icon('radio', 'icon-unchecked') %>
|
<%- @Icon('radio', 'icon-unchecked') %>
|
||||||
<%- @Icon('radio-checked', 'icon-checked') %>
|
<%- @Icon('radio-checked', 'icon-checked') %>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -615,7 +615,8 @@ table {
|
||||||
margin-top: -3px;
|
margin-top: -3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-replacement {
|
.checkbox-replacement,
|
||||||
|
.radio-replacement {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
|
@ -625,9 +626,12 @@ table {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-replacement input,
|
.checkbox-replacement input,
|
||||||
.input-replacement input:not(:checked) ~ .icon-checked,
|
.checkbox-replacement input:not(:checked) ~ .icon-checked,
|
||||||
.input-replacement input:checked ~ .icon-unchecked {
|
.checkbox-replacement input:checked ~ .icon-unchecked,
|
||||||
|
.radio-replacement input,
|
||||||
|
.radio-replacement input:not(:checked) ~ .icon-checked,
|
||||||
|
.radio-replacement input:checked ~ .icon-unchecked {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue