Algérie événement

Nouveau lieu

Ajouter un nouveau lieu

Général

Nom du lieu*

Prix

Description

Catégorie*

Type de lieu*

Faits saillants

Location

Informations de contact

E-mail

Numéro de téléphone 1 (facultatif)

Numéro de téléphone 2 (facultatif)

site Internet (optionnel)

Champs supplémentaires

Réseaux sociaux

Facebook

Instagram

Horaires d'ouvertures

Médias

L'image sélectionnée

Images de la galerie (facultatif)

' + ''; console.log($html); $('#golo_place_featured_image_view').html($html); golo_place_gallery_event(uploader_featured_image, 'thumb'); $('#featured_image_url-error').hide(); $( '.moxie-shim:last-child' ).remove(); } }); }; featured_image(); // Place Thumbnails var golo_place_gallery_event = function ($uploader_featured_image, $type) { $('body').on('click', '.icon-delete', function (e) { e.preventDefault(); var $this = $(this), icon_delete = $this, thumbnail = $this.closest('.media-thumb-wrap'), place_id = $this.data('place-id'), attachment_id = $this.data('attachment-id'); icon_delete.html(''); $.ajax({ type: 'post', url: 'https://algerie-evenement.com/wp-admin/admin-ajax.php', dataType: 'json', data: { 'action': 'remove_place_img_ajax', 'place_id': place_id, 'attachment_id': attachment_id, 'type': $type, 'removeNonce': '770c2f5b7a' }, success: function (response) { if (response.success) { thumbnail.remove(); thumbnail.hide(); $this.parents( '.file-upload-block' ).find( '#menu_image_url' ).val( '' ); $this.parents( '.file-upload-block' ).find( '#menu_image_id' ).val( '' ); $.each($uploader_featured_image.files, function (i, file) { $uploader_featured_image.removeFile(file); }); $('#featured_image_url-error').show(); } icon_delete.html(''); }, error: function () { icon_delete.html(''); } }); }); } golo_place_gallery_event('gallery'); // Place Gallery images var golo_place_gallery_images = function () { $("#place_gallery_thumbs_container").sortable(); /* initialize uploader */ var uploader = new plupload.Uploader({ browse_button: 'golo_select_gallery_images', file_data_name: 'place_upload_file', container: 'golo_gallery_plupload_container', drop_element: 'golo_gallery_plupload_container', multi_selection: true, url: "https://algerie-evenement.com/wp-admin/admin-ajax.php?action=golo_place_img_upload_ajax&nonce=770c2f5b7a", filters: { mime_types: [ {title: 'Formats de fichiers valides', extensions: "jpg,jpeg,gif,png"} ], max_file_size: '1 Mo', prevent_duplicates: true } }); uploader.init(); uploader.bind('FilesAdded', function (up, files) { var placeThumb = ""; var maxfiles = '3'; if (up.files.length > maxfiles) { up.splice(maxfiles); alert('no more than ' + maxfiles + ' file(s)'); return; } plupload.each(files, function (file) { placeThumb += '
'; }); document.getElementById('place_gallery_thumbs_container').innerHTML += placeThumb; up.refresh(); uploader.start(); }); uploader.bind('UploadProgress', function (up, file) { document.getElementById("holder-" + file.id).innerHTML = ''; }); uploader.bind('Error', function (up, err) { document.getElementById('golo_gallery_errors_log').innerHTML += "Error: " + err.message + "
"; }); uploader.bind('FileUploaded', function (up, file, ajax_response) { var response = $.parseJSON(ajax_response.response); if (response.success) { var $html = '
' + '' + '
' + '' + '' + '' + '
' + '
'; document.getElementById("holder-" + file.id).innerHTML = $html; golo_place_gallery_event('gallery'); } }); }; golo_place_gallery_images(); }); })(jQuery);
Exit mobile version