"Feuille de staff mise à jour via Ajax"
This commit is contained in:
@@ -60,14 +60,18 @@ function save_turn() {
|
||||
}
|
||||
}
|
||||
|
||||
function update_sheet(turn, slot) {
|
||||
document.location = '/staffsheet/update/'+turn+'/'+slot;
|
||||
function update_sheet(obj, turn, slot) {
|
||||
var url = '/staffsheet/update/'+turn+'/'+slot;
|
||||
get_html_from_ajax(obj, url);
|
||||
obj.onclick=function (){ return clear_sheet(obj, turn, slot);}
|
||||
return true;
|
||||
}
|
||||
|
||||
function clear_sheet(turn, slot) {
|
||||
function clear_sheet(obj, turn, slot) {
|
||||
if (confirm("Voulez-vous vraiment libérer ce créneau ? \n\n Confirmer ?")) {
|
||||
document.location = '/staffsheet/clear/'+turn+'/'+slot;
|
||||
var url = '/staffsheet/clear/'+turn+'/'+slot;
|
||||
get_html_from_ajax(obj, url);
|
||||
obj.onclick=function (){ return update_sheet(obj, turn, slot);}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user