Actualiser js/admin.js
This commit is contained in:
+6
-1
@@ -338,7 +338,7 @@ function toggleFormFields() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function switchAdminTab(tabName) {
|
function switchAdminTab(tabName) {
|
||||||
currentAdminTab = tabName;
|
currentAdminTab = tabName;
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
selectedIds.clear();
|
selectedIds.clear();
|
||||||
const searchInput = document.getElementById('search-input');
|
const searchInput = document.getElementById('search-input');
|
||||||
@@ -387,6 +387,7 @@ function openEditModal(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function closeAdminModal() { document.getElementById('admin-modal').classList.remove('open'); }
|
function closeAdminModal() { document.getElementById('admin-modal').classList.remove('open'); }
|
||||||
|
|
||||||
async function openConfigModal() {
|
async function openConfigModal() {
|
||||||
document.getElementById('config-modal').classList.add('open');
|
document.getElementById('config-modal').classList.add('open');
|
||||||
|
|
||||||
@@ -401,12 +402,16 @@ async function openConfigModal() {
|
|||||||
if (data.tmdb_api_key) document.getElementById('tmdb-key-input').placeholder = '✅ Clé configurée (laisser vide pour ne pas changer)';
|
if (data.tmdb_api_key) document.getElementById('tmdb-key-input').placeholder = '✅ Clé configurée (laisser vide pour ne pas changer)';
|
||||||
} catch(e) { console.error(e); }
|
} catch(e) { console.error(e); }
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeConfigModal() { document.getElementById('config-modal').classList.remove('open'); }
|
function closeConfigModal() { document.getElementById('config-modal').classList.remove('open'); }
|
||||||
|
|
||||||
function openPasswordModal() {
|
function openPasswordModal() {
|
||||||
document.getElementById('pwd-error').style.display = 'none';
|
document.getElementById('pwd-error').style.display = 'none';
|
||||||
document.getElementById('password-modal').classList.add('open');
|
document.getElementById('password-modal').classList.add('open');
|
||||||
}
|
}
|
||||||
|
|
||||||
function closePasswordModal() { document.getElementById('password-modal').classList.remove('open'); }
|
function closePasswordModal() { document.getElementById('password-modal').classList.remove('open'); }
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
localStorage.removeItem('token');
|
localStorage.removeItem('token');
|
||||||
window.location.href = 'login.html';
|
window.location.href = 'login.html';
|
||||||
|
|||||||
Reference in New Issue
Block a user