건국시 국가색

This commit is contained in:
2020-05-04 21:02:46 +09:00
parent 73e5f5d6ad
commit a688b6fdce
2 changed files with 23 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
jQuery(function($){
function changeNationColorPlate(){
var $this = $('#colorType');
var $option = $this.find('option:selected');
$this.css({
'background-color':$option.css('background-color'),
'color':$option.css('color')
});
}
$('#colorType').change(function(){
changeNationColorPlate();
});
changeNationColorPlate();
});
+9 -2
View File
@@ -196,6 +196,13 @@ class che_건국 extends Command\GeneralCommand
return true;
}
public function getJSFiles(): array
{
return [
'js/colorSelect.js'
];
}
public function getForm(): string
{
@@ -248,7 +255,7 @@ class che_건국 extends Command\GeneralCommand
<?php endforeach; ?>
<br>
국명 : <input type='text' class='formInput' name="nationName" id="nationName" size='18' maxlength='18' style='color:white;background-color:black;'>
: <select class='formInput' name='colorType' id='colorType' size='1'>
: <select class='formInput' name='colorType' id='colorType' size='1'>
<?php foreach (GetNationColors() as $idx => $color) :
/*
@@ -257,7 +264,7 @@ class che_건국 extends Command\GeneralCommand
}
*/
?>
<option value="<?= $idx ?>" style='background-color:<?= $color ?>;color:<?= newColor($color) ?>' ;>국가명</option>
<option value="<?= $idx ?>" style='background-color:<?= $color ?>;color:<?= newColor($color) ?>;'>국가명(<?=$color?>)</option>
<?php endforeach; ?>
</select>
성향 : <select class='formInput' name='nationType' id='nationType' size='1'>