발령,몰수,포상 활성화, 사령턴 턴 입력 활성화

This commit is contained in:
2020-03-07 19:52:33 +09:00
parent 28c3ebb5f9
commit 29c7e3696a
10 changed files with 241 additions and 108 deletions
+37 -3
View File
@@ -94,9 +94,43 @@ function reloadTable(){
}, errUnknown);
}
function reserveTurn(turnList, command){
console.log(turnList, command);
$.post({
url:'j_set_chief_command.php',
dataType:'json',
data:{
action:command,
turnList:turnList
}
}).then(function(data){
if(!data.result){
alert(data.reason);
}
reloadTable();
}, errUnknown);
}
jQuery(function($){
chiefTableObj= genChiefTableObj();
$('#reloadTable').click(reloadTable);
reloadTable();
chiefTableObj= genChiefTableObj();
reloadTable();
$('#reloadTable').click(reloadTable);
$('#setCommand').click(function(){
var turnList = $('#chiefTurnSelector').val().map(function(v){return parseInt(v);});
var $command = $('#chiefCommandList option:selected');
if($command.data('reqarg')){
$.redirect(
"b_processing.php", {
command: $command.val(),
turnList: turnList.join('_'),
is_chief: true
}, "GET");
}
else{
reserveTurn(turnList, $command.val());
}
return false;
});
})