mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
fix sorting in events#index with button functionality and add color/text to switch buttons
This commit is contained in:
parent
b8b3703175
commit
fbdec2a58e
5 changed files with 26 additions and 19 deletions
16
app/assets/javascripts/osem-switch.js
Normal file
16
app/assets/javascripts/osem-switch.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
$(function () {
|
||||
$(document).ready(function() {
|
||||
$("[class='switch-checkbox']").bootstrapSwitch();
|
||||
|
||||
$('input[class="switch-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) {
|
||||
url = "/admin/conference/" + this.name + "/events/" + this.value
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'PATCH',
|
||||
data: { event: { is_highlight: state } },
|
||||
dataType: 'script'
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue