Alpha v0.7.1
This commit is contained in:
parent
d2db986282
commit
8e63d8ec36
38
admin.php
38
admin.php
@ -404,6 +404,10 @@ if ($tab === 'users') {
|
||||
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
|
||||
input:checked + .slider { background-color: #a3be8c; }
|
||||
input:checked + .slider:before { transform: translateX(20px); }
|
||||
|
||||
/* Color picker custom style */
|
||||
.color-group { display: flex; gap: 5px; }
|
||||
.color-picker-input { width: 45px !important; height: 34px !important; padding: 2px !important; border: 1px solid #334155 !important; background: #0f172a !important; cursor: pointer; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -626,8 +630,11 @@ if ($tab === 'users') {
|
||||
<input type="text" name="slug" id="st_slug" required>
|
||||
</div>
|
||||
<div class="form-group" style="flex: 1;">
|
||||
<label>Couleur (Hex ou CSS)</label>
|
||||
<input type="text" name="color" id="st_color" required placeholder="Ex: #ef4444">
|
||||
<label>Couleur</label>
|
||||
<div class="color-group">
|
||||
<input type="color" id="st_color_picker" class="color-picker-input" oninput="document.getElementById('st_color').value = this.value">
|
||||
<input type="text" name="color" id="st_color" required placeholder="#ef4444" oninput="document.getElementById('st_color_picker').value = this.value">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -717,7 +724,10 @@ if ($tab === 'users') {
|
||||
</div>
|
||||
<div class="form-group" style="flex: 1;">
|
||||
<label>Couleur</label>
|
||||
<input type="color" name="color" id="fac_color" value="#808080">
|
||||
<div class="color-group">
|
||||
<input type="color" id="fac_color_picker" class="color-picker-input" oninput="document.getElementById('fac_color').value = this.value">
|
||||
<input type="text" name="color" id="fac_color" required placeholder="#808080" oninput="document.getElementById('fac_color_picker').value = this.value">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="flex: 1;">
|
||||
<label>Icône (FontAwesome)</label>
|
||||
@ -984,10 +994,17 @@ if ($tab === 'users') {
|
||||
document.getElementById('st_name').value = data.name;
|
||||
document.getElementById('st_slug').value = data.slug;
|
||||
document.getElementById('st_color').value = data.color;
|
||||
if (document.getElementById('st_color_picker')) {
|
||||
document.getElementById('st_color_picker').value = data.color.startsWith('#') ? data.color : '#000000';
|
||||
}
|
||||
document.getElementById('st_desc').value = data.description;
|
||||
window.scrollTo(0,0);
|
||||
}
|
||||
function resetStatusForm() { document.getElementById('statusForm').reset(); document.getElementById('st_id').value = 0; }
|
||||
function resetStatusForm() {
|
||||
document.getElementById('statusForm').reset();
|
||||
document.getElementById('st_id').value = 0;
|
||||
document.getElementById('st_color_picker').value = '#000000';
|
||||
}
|
||||
|
||||
function editSettlementType(data) {
|
||||
document.getElementById('set_t_id').value = data.id;
|
||||
@ -1012,11 +1029,20 @@ if ($tab === 'users') {
|
||||
document.getElementById('fac_id').value = data.id;
|
||||
document.getElementById('fac_name').value = data.name;
|
||||
document.getElementById('fac_slug').value = data.slug || '';
|
||||
document.getElementById('fac_color').value = data.color || '#808080';
|
||||
const color = data.color || '#808080';
|
||||
document.getElementById('fac_color').value = color;
|
||||
if (document.getElementById('fac_color_picker')) {
|
||||
document.getElementById('fac_color_picker').value = color.startsWith('#') ? color : '#808080';
|
||||
}
|
||||
document.getElementById('fac_fa_icon').value = data.fa_icon || '';
|
||||
window.scrollTo(0,0);
|
||||
}
|
||||
function resetFactionForm() { document.getElementById('factionForm').reset(); document.getElementById('fac_id').value = 0; document.getElementById('fac_color').value = '#808080'; }
|
||||
function resetFactionForm() {
|
||||
document.getElementById('factionForm').reset();
|
||||
document.getElementById('fac_id').value = 0;
|
||||
document.getElementById('fac_color').value = '#808080';
|
||||
document.getElementById('fac_color_picker').value = '#808080';
|
||||
}
|
||||
|
||||
function editResource(data) {
|
||||
document.getElementById('res_id').value = data.id;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user