mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
add bootstrap-switch for is_highlight
This commit is contained in:
parent
2dd326c8b9
commit
a845dd5d7d
9 changed files with 45 additions and 12 deletions
|
|
@ -15,6 +15,23 @@
|
|||
detectlang: true,
|
||||
autocollect: true
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$("[class='switch-checkbox']").bootstrapSwitch();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('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"
|
||||
});
|
||||
});
|
||||
});
|
||||
= content_for(:script_head)
|
||||
=# javascript_include_tag "//cdn.transifex.com/live.js"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue