jQuery(document).ready(function($) { let userVotes = {}; function updateView() { if (djVotingSystem.isAdmin) { $('#pending-artists-heading').show(); $('#pending-artist-table').show(); $('.actions-column').show(); $('.edit-button, .delete-button').show(); } else { $('#pending-artists-heading').hide(); $('#pending-artist-table').hide(); $('.actions-column').hide(); $('.edit-button, .delete-button').hide(); } } function loadArtists() { $.ajax({ url: djVotingSystem.ajax_url, method: 'POST', data: { action: 'get_artists' }, success: function(response) { if (response.success) { const artists = response.data; $('#dj-vote-table-body').empty(); $('#pending-artist-table-body').empty(); artists.forEach(artist => { if (artist.status === 'pending' && djVotingSystem.isAdmin) { $('#pending-artist-table-body').append(createPendingArtistRow(artist)); } else if (artist.status === 'published') { $('#dj-vote-table-body').append(createArtistRow(artist)); } }); loadUserVotes(); } } }); } function loadUserVotes() { // Charger les votes de l'utilisateur depuis le stockage local userVotes = JSON.parse(localStorage.getItem('userVotes')) || {}; // Appliquer l'indicateur visuel pour les votes existants Object.keys(userVotes).forEach(artistId => { const voteType = userVotes[artistId]; $(`.vote-button[data-artist-id="${artistId}"][data-vote-type="${voteType}"]`).addClass('selected-vote'); }); } function createArtistRow(artist) { return ` ${artist.name} ${artist.name} ${artist.music_style} ${artist.artist_type} ${artist.votes} ${djVotingSystem.isAdmin ? ` ` : ''} `; } function createPendingArtistRow(artist) { return ` ${artist.name} ${artist.name} ${artist.music_style} ${artist.artist_type} ${artist.url} `; } $('#new-artist-form').on('submit', function(e) { e.preventDefault(); const artistName = $('#artist-name').val().trim(); const musicStyle = $('#music-style').val().trim(); const artistType = $('#artist-type').val().trim(); const artistUrl = $('#artist-url').val().trim(); const artistPhoto = $('#artist-photo')[0].files[0]; const reader = new FileReader(); reader.onload = function(e) { const photoUrl = e.target.result; $.ajax({ url: djVotingSystem.ajax_url, method: 'POST', data: { action: 'register_artist', name: artistName, music_style: musicStyle, artist_type: artistType, url: artistUrl, photo: photoUrl }, success: function(response) { if (response.success) { $('#newArtistModal').modal('hide'); $('#new-artist-form')[0].reset(); alert('L\'artiste a été ajouté et est en attente de validation par un administrateur.'); loadArtists(); } else { alert(response.data || 'Erreur lors de l\'ajout de l\'artiste.'); } } }); }; reader.readAsDataURL(artistPhoto); }); $(document).on('click', '.approve-button', function() { const artistId = $(this).data('artist-id'); $.ajax({ url: djVotingSystem.ajax_url, method: 'POST', data: { action: 'approve_artist', id: artistId }, success: function(response) { if (response.success) { loadArtists(); } else { alert('Erreur lors de l\'approbation de l\'artiste.'); } } }); }); $(document).on('click', '.reject-button', function() { const artistId = $(this).data('artist-id'); $.ajax({ url: djVotingSystem.ajax_url, method: 'POST', data: { action: 'reject_artist', id: artistId }, success: function(response) { if (response.success) { loadArtists(); } else { alert('Erreur lors du rejet de l\'artiste.'); } } }); }); $(document).on('click', '.edit-button', function() { const artistId = $(this).data('artist-id'); const artistRow = $(this).closest('tr'); const artistName = artistRow.find('td:nth-child(2) a').text(); const musicStyle = artistRow.find('td:nth-child(3)').text(); const artistType = artistRow.find('td:nth-child(4)').text(); const artistUrl = artistRow.find('td:nth-child(2) a').attr('href'); const artistPhoto = artistRow.find('td:nth-child(1) img').attr('src'); $('#edit-artist-id').val(artistId); $('#edit-artist-name').val(artistName); $('#edit-music-style').val(musicStyle); $('#edit-artist-type').val(artistType); $('#edit-artist-url').val(artistUrl); $('#edit-artist-photo').val(''); $('#editArtistModal').modal('show'); }); $('#edit-artist-form').on('submit', function(e) { e.preventDefault(); const artistId = $('#edit-artist-id').val().trim(); const artistName = $('#edit-artist-name').val().trim(); const musicStyle = $('#edit-music-style').val().trim(); const artistType = $('#edit-artist-type').val().trim(); const artistUrl = $('#edit-artist-url').val().trim(); const artistPhoto = $('#edit-artist-photo')[0].files[0]; const formData = new FormData(); formData.append('action', 'update_artist'); formData.append('id', artistId); formData.append('name', artistName); formData.append('music_style', musicStyle); formData.append('artist_type', artistType); formData.append('url', artistUrl); if (artistPhoto) { const reader = new FileReader(); reader.onload = function(e) { formData.append('photo', e.target.result); submitUpdateForm(formData); }; reader.readAsDataURL(artistPhoto); } else { submitUpdateForm(formData); } }); function submitUpdateForm(formData) { $.ajax({ url: djVotingSystem.ajax_url, method: 'POST', data: formData, contentType: false, processData: false, success: function(response) { if (response.success) { $('#editArtistModal').modal('hide'); loadArtists(); } else { alert('Erreur lors de la modification de l\'artiste.'); } } }); } $(document).on('click', '.delete-button', function() { const artistId = $(this).data('artist-id'); const artistName = $(this).closest('tr').find('td:nth-child(2) a').text(); $('#delete-artist-id').val(artistId); $('#delete-artist-name').text(artistName); $('#confirmDeleteModal').modal('show'); }); $('#confirm-delete-button').on('click', function() { const artistId = $('#delete-artist-id').val(); $.ajax({ url: djVotingSystem.ajax_url, method: 'POST', data: { action: 'delete_artist', id: artistId }, success: function(response) { if (response.success) { $('#confirmDeleteModal').modal('hide'); loadArtists(); } else { alert('Erreur lors de la suppression de l\'artiste.'); } } }); }); $(document).on('click', '.vote-button', function() { const artistId = $(this).data('artist-id'); const voteType = $(this).data('vote-type'); $.ajax({ url: djVotingSystem.ajax_url, method: 'POST', data: { action: 'add_vote', artist_id: artistId, vote_type: voteType }, success: function(response) { if (response.success) { $('#votes-' + artistId).text(response.data.new_votes); $('.vote-button[data-artist-id="' + artistId + '"]').removeClass('selected-vote'); $(`.vote-button[data-artist-id="${artistId}"][data-vote-type="${voteType}"]`).addClass('selected-vote'); // Mettre à jour le vote de l'utilisateur dans le stockage local userVotes[artistId] = voteType; localStorage.setItem('userVotes', JSON.stringify(userVotes)); } else { alert(response.data || 'Erreur lors du vote.'); } } }); }); loadArtists(); updateView(); }); THUNDER X Glazart: Dissolver, LULU, D44 & More | Agenda Techno
Accueil Evénements Techno - Techno Mag Soirée THUNDER X Glazart: Dissolver, LULU, D44 & More

THUNDER X Glazart: Dissolver, LULU, D44 & More

̸
PROGRAMMATION
Dissolver, LULU (1), D44 & More..
Partager

Genre
Techno
LINE UP
DISSOLVER
LULU
D44
Helen Frey
Blasty
OUR CLUB :
Soundsystem full d&b audiotechnik
LGBTQIA+ Friendly
3 outdoors spaces (two terraces and one chill out)
______________________
Adress : 7-15 Avenue de la Porte de la Villette 75019 PARIS
M(7) : Porte de la Villette
______________________
Opening hours
Club: Friday and Saturday from 12am to 6am.
After: Every Saturday and Sunday from 6:30 a.m. to 4 p.m.
_____________________
+ 18 only. ID required. The management reserves the right of admission.
All discriminatory behaviors, such as racism, homophobia, transphobia, sexism, and hate, are strictly prohibited inside Glazart.
Licence 2 : D-2-1118556
Licence 3 : R-20-0010015

Noter cet article

L'événement est terminé.

Date

13 - 14 Jan 2024
Expiré!

Heure

12:55 pm - 6:00 am

Tarif

17.35 €

Plus d'Infos

Billetterie

Labels

Techno,
Tekno

Lieu

7-15 Av. de la Porte-de-la-Villette, 75019, Paris, France
7-15 Av. de la Porte-de-la-Villette, 75019, Paris, France
Catégorie
QR Code
Powered by Modern Events Calendar