mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Schedule update moved to program update
Schedule update updated a program attribute
This commit is contained in:
parent
310c521790
commit
81108290e5
4 changed files with 41 additions and 22 deletions
|
|
@ -11,4 +11,27 @@ $(function () {
|
|||
dataType: 'script'
|
||||
});
|
||||
});
|
||||
|
||||
$("[class='switch-checkbox-schedule']").bootstrapSwitch();
|
||||
|
||||
$('input[class="switch-checkbox-schedule"]').on('switchChange.bootstrapSwitch', function(event, state) {
|
||||
var url = $(this).attr('url');
|
||||
var method = $(this).attr('method');
|
||||
|
||||
if(state){
|
||||
url += $(this).attr('value');
|
||||
}
|
||||
|
||||
var callback = function(data) {
|
||||
if(data.status != 'ok'){
|
||||
alert("The schedule couldn't been updated");
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: method,
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue