fix: Utilisation du picker sur l’ajout de rubrique à un auteur

pull/3/head
Matthieu Marcillaud 1 month ago
parent 949b564bef
commit 813b31b2dd

@ -26,17 +26,22 @@ style='display:none;'>#GET{bouton_modif}</a>&#93;</div>
type="text" value=""
id="[(#GET{picker_id})]"
size="10"
data-selecteur="generique" data-select-php="oui" data-select-params="#GET{params}"
data-selecteur="generique"
data-select-php="oui"
data-select-params="#GET{params}"
/>
<a href="#"
onclick="jQuery.ajax({'url':'[(#URL_PAGE{ajax_item_pick,rubriques=[(#ENV{rubriques})]&articles=[(#ENV{articles})]&ref=})]'+jQuery('[#(#GET{picker_id})]').val(),
'dataType':'text',
'success':function(r){
eval('r = '+r); // JSON envoye par ajax_item_pick.html
const id = '[#(#GET{picker_id})]';
const id_select2 = id + jQuery.escapeSelector(':select2');
if (r){
jQuery('[#(#GET{picker_id})]').item_pick(r.id,'#ENV{name,id_item}',r.titre,r.type);
jQuery(id).item_pick(r.id,'#ENV{name,id_item}', r.titre, r.type);
}
jQuery('[#(#GET{picker_id})]').val('');
jQuery(id).val('');
jQuery(id_select2).val('').trigger('change');
}
});return false;">#GET{bouton_modif}</a>
</div>

@ -50,6 +50,13 @@
}
.choix_rapide .select2-container {
width: auto !important;
}
.choix_rapide .select2-container input[type=search] {
width: auto !important;
}
/* OLD: ------- */
/**

Loading…
Cancel
Save