mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #2410 from snpd25/master
Added select-all checkbox in splashpages form
This commit is contained in:
commit
924affb3a5
1 changed files with 19 additions and 0 deletions
|
|
@ -8,6 +8,13 @@
|
|||
.col-md-12
|
||||
= f.inputs name: 'Components' do
|
||||
%ul.fa-ul
|
||||
%li
|
||||
%th
|
||||
%button.btn.btn-default#select-all{ type: "button" }
|
||||
Select All
|
||||
%th
|
||||
%button.btn.btn-default#unselect-all{ type: "button" }
|
||||
Unselect All
|
||||
%li
|
||||
= f.input :include_cfp, label: 'Display call for papers and call for tracks, while open', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_cfp) }
|
||||
%li
|
||||
|
|
@ -45,3 +52,15 @@
|
|||
.col-md-12
|
||||
%p.text-right
|
||||
= f.submit 'Save Changes', class: 'btn btn-primary'
|
||||
|
||||
:javascript
|
||||
$(document).ready(function(){
|
||||
$('#select-all').click(function(event) {
|
||||
var parent = $(this).parents('.inputs:last');
|
||||
parent.find('.input.checkbox input[type=checkbox]').prop('checked',true);
|
||||
});
|
||||
$('#unselect-all').click(function(event) {
|
||||
var parent = $(this).parents('.inputs:last');
|
||||
parent.find('.input.checkbox input[type=checkbox]').prop('checked',false);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue