Skip to content
Extraits de code Groupes Projets
Valider 7edec6c2 rédigé par cerdic's avatar cerdic
Parcourir les fichiers

Fix divers petits glitchs sur le picker de rubrique

parent 1b6c3282
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -156,6 +156,11 @@ function picker_identifie_id_rapide($ref, $rubriques_ou_objets = false, $article ...@@ -156,6 +156,11 @@ function picker_identifie_id_rapide($ref, $rubriques_ou_objets = false, $article
} }
} }
// si id numerique et un seul objet possible, pas d'ambiguite
if (is_numeric($ref) and count($objets) === 1) {
$ref = reset($objets) . $ref;
}
// Si la référence ne correspond à rien, c'est fini // Si la référence ne correspond à rien, c'est fini
if (!($match = typer_raccourci($ref))) { if (!($match = typer_raccourci($ref))) {
return json_export(false); return json_export(false);
......
...@@ -4,4 +4,4 @@ if (!defined('_ECRIRE_INC_VERSION')) { ...@@ -4,4 +4,4 @@ if (!defined('_ECRIRE_INC_VERSION')) {
return; return;
} }
include_spip('formulaires/selecteur/selecteur_fonctions'); include_spip('inc/filtres_selecteur_generique');
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
[(#ENV{limite_branche}|non) [(#ENV{limite_branche}|non)
[(#GRAND_TOTAL|<{#TOTAL_BOUCLE}|oui) [(#GRAND_TOTAL|<{#TOTAL_BOUCLE}|oui)
<div class='frame[ total_(#GRAND_TOTAL|max{#TOTAL_BOUCLE|moins{1}})] frame_0'><h2>[<a(#ENV{rubriques,0}|oui) href='#' onclick="jQuery(this).item_pick('rubrique|0','#ENV{name,id_item}','<:info_racine_site|texte_script|attribut_html:>','rubrique');return false;" <div class='frame[ total_(#GRAND_TOTAL|max{#TOTAL_BOUCLE|moins{1}})] frame_0'><h2>[<a(#ENV{rubriques,0}|oui) href='#' onclick="jQuery(this).item_pick('rubrique|0','#ENV{name,id_item}','<:info_racine_site|texte_script|attribut_html:>','rubrique');return false;"
><img class='add' src='#CHEMIN_IMAGE{ajouter-16.png}' alt='' /></a>]<:info_racine_site:></h2> >[(#CHEMIN_IMAGE{ajouter-16.png}|balise_img{'',add})]</a>]<:info_racine_site:></h2>
[(#INCLURE{fond=formulaires/selecteur/inc-nav-rubriques}{id_rubrique=0}{env})]</div>]] [(#INCLURE{fond=formulaires/selecteur/inc-nav-rubriques}{id_rubrique=0}{env})]</div>]]
<BOUCLE_contenu(HIERARCHIE){id_rubrique}{tout}{n-4,4}>#SET{n,0} <BOUCLE_contenu(HIERARCHIE){id_rubrique}{tout}{n-4,4}>#SET{n,0}
<div class='frame[ total_(#GRAND_TOTAL|min{#TOTAL_BOUCLE|moins{1}})][ frame_(#COMPTEUR_BOUCLE|moins{#GRAND_TOTAL|plus{1}|max{#TOTAL_BOUCLE}}|plus{#TOTAL_BOUCLE})]'>[(#ID_RUBRIQUE|=={#ENV{limite_branche}}|non)<a <div class='frame[ total_(#GRAND_TOTAL|min{#TOTAL_BOUCLE|moins{1}})][ frame_(#COMPTEUR_BOUCLE|moins{#GRAND_TOTAL|plus{1}|max{#TOTAL_BOUCLE}}|plus{#TOTAL_BOUCLE})]'>[(#ID_RUBRIQUE|=={#ENV{limite_branche}}|non)<a
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter