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

This commit is contained in:
2020-03-07 19:52:33 +09:00
parent 65cd8af9e1
commit e6a39f246d
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;
});
})
+9 -3
View File
@@ -1,6 +1,13 @@
function reserveTurn(turnList, command, arg){
var target;
if(isChiefTurn){
target = 'j_set_chief_command.php';
}
else{
target = 'j_set_general_command.php';
}
$.post({
url:'j_set_general_command.php',
url:target,
dataType:'json',
data:{
action:command,
@@ -35,8 +42,7 @@ window.submitAction = function(){
'int':[
'crewType', 'destGeneralID', 'destCityID', 'destNationID',
'amount', 'colorType',
'month',
'year', 'destGeneralID', 'destCityID', 'destNationID', 'amount', 'crewType',
'year', 'month',
],
'boolean':[
'isGold', 'buyRice',