diff --git a/ecrire/inc/chercher_rubrique.php b/ecrire/inc/chercher_rubrique.php index e5cb9ceaad3ae97e3bceb2573bfcddc99c749db7..2f67edc67146598f85bad56414d389e7ea568dcc 100644 --- a/ecrire/inc/chercher_rubrique.php +++ b/ecrire/inc/chercher_rubrique.php @@ -331,20 +331,23 @@ function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do **/ function construire_selecteur($url, $js, $idom, $name, $init = '', $id = 0) { $icone = (strpos($idom, 'auteur') !== false) ? 'auteur-24.png' : 'rechercher-20.png'; + // si icone de recherche on embed le svg + $balise = ($icone === 'rechercher-20.png' ? chercher_filtre('balise_svg') : chercher_filtre('balise_img')); + $img_icone = $balise(chemin_image($icone, _T('titre_image_selecteur'))); return - "<div class='rubrique_actuelle'><a href='#' onclick=\"" + "<div class='rubrique_actuelle'><a href='#' class='rubrique-search' style='display:inline-flex;vertical-align:middle;' onclick=\"" . $js . "return charger_node_url_si_vide('" . $url - . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'><img src='" - . chemin_image($icone) - . "'\nstyle='vertical-align: middle;' alt='" . attribut_html(_T('titre_image_selecteur')) . "' /></a><img src='" + . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>" + . $img_icone + . "</a><img src='" . chemin_image('loader.svg') . "' class='loader' id='img_" . $idom . "'\nstyle='visibility: hidden;' alt='*' />" - . "<input id='titreparent' name='titreparent'" + . "<input id='titreparent' name='titreparent' class='text'" . $init . " />" . "<input type='hidden' id='$name' name='$name' value='" diff --git a/ecrire/inc/filtres_ecrire.php b/ecrire/inc/filtres_ecrire.php index b7a3f3248fa33bfbc87701e18dad9faa604fd135..02bcbb8808be09ae7b37046765cdb8e3e958dcec 100644 --- a/ecrire/inc/filtres_ecrire.php +++ b/ecrire/inc/filtres_ecrire.php @@ -136,7 +136,7 @@ function chercher_rubrique( if ($actionable) { if (strpos($form, '<select') !== false) { $form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" - . '<input class="fondo" type="submit" value="' . _T('bouton_choisir') . '"/>' + . '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>' . "</div>"; } $form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form; diff --git a/ecrire/inc/informer.php b/ecrire/inc/informer.php index 1dbf99f988c1233697f164ea1a4b3ebf8b4892eb..a4d901141e3d989244257ac26fb3b3e7df650345 100644 --- a/ecrire/inc/informer.php +++ b/ecrire/inc/informer.php @@ -39,7 +39,7 @@ function inc_informer_dist($id, $col, $exclus, $rac, $type, $do = 'aff') { include_spip('inc/filtres_images_mini'); $res = image_reduire("<img src='$fid' alt='' />", 100, 48); if ($res) { - $res = "<div style='float: " . $GLOBALS['spip_lang_right'] . "; margin-" . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>$res</div>"; + $res = "<div class='informer__media' style='float: " . $GLOBALS['spip_lang_right'] . "; margin-" . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>$res</div>"; } } } @@ -64,11 +64,13 @@ function inc_informer_dist($id, $col, $exclus, $rac, $type, $do = 'aff') { . "\" />" . "</div>" . "<div class='informer' style='padding: 5px; border-top: 0px;'>" + . '<div class="informer__item">' . (!$res ? '' : $res) - . "<p><b>" . safehtml($titre) . "</b></p>" - . (!$descriptif ? '' : "<div>" . safehtml($descriptif) . "</div>") - . "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" - . "<input type='submit' class='fondo' value='" + . "<p class='informer__titre'><b>" . safehtml($titre) . "</b></p>" + . (!$descriptif ? '' : "<div class='informer__descriptif'>" . safehtml($descriptif) . "</div>") + . '</div>' + . "<div class='informer__action' style='clear:both; text-align: " . $GLOBALS['spip_lang_right'] . ";'>" + . "<input type='submit' class='fondo btn submit' value='" . _T('bouton_choisir') . "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />" . "</div>" diff --git a/ecrire/inc/plonger.php b/ecrire/inc/plonger.php index e627fc4128f33bb0a35e8846ee6c264a26c758f9..b2542357c8e425a2a7aa7ccab942f1e8aa280b59 100644 --- a/ecrire/inc/plonger.php +++ b/ecrire/inc/plonger.php @@ -61,7 +61,7 @@ function inc_plonger_dist($id_rubrique, $idom = "", $list = array(), $col = 1, $ foreach ($ordre as $id => $titrebrut) { $titre = supprimer_numero($titrebrut); - $classe1 = $id_rubrique ? 'petite-rubrique' : "petit-secteur"; + $classe1 = 'petit-item ' . ($id_rubrique ? 'petite-rubrique' : "petit-secteur"); if (isset($rub[$id]["enfants"])) { $classe2 = " class='rub-ouverte'"; $url = "\nhref='$rec&id=$id'"; diff --git a/ecrire/inc/selectionner.php b/ecrire/inc/selectionner.php index 506bc53b99c3cad614b24fc11ba288330b115714..ec0a8404499420dc5bc368d74b2fb064c11d7aff 100644 --- a/ecrire/inc/selectionner.php +++ b/ecrire/inc/selectionner.php @@ -66,7 +66,7 @@ function inc_selectionner_dist($sel, $idom = "", $exclus = 0, $aff_racine = fals $js_func = $do . '_selection_titre'; $ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');"; - $aff_racine = "<div class='petite-racine item'>" + $aff_racine = "<div class='petit-item petite-racine item'>" . "<a href='#'" . "onclick=\"" . $onClick @@ -119,7 +119,7 @@ function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, . http_img_pack("loader.svg", "", "class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'") . "" - . "<input style='width: 100px;float:" . $GLOBALS['spip_lang_right'] . ";' type='search' id='$idom1'" + . "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='search' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'" // eliminer Return car il provoque la soumission (balise unique) // et eliminer Tab pour la navigation au clavier // ce serait encore mieux de ne le faire que s'il y a encore plusieurs diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index db890abf211c734a027b9a8c093d2b935d48e389..1ad6cda00c225fae60378fc763de54bd3dcb7271 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -2233,7 +2233,7 @@ function generer_form_ecrire($script, $corps, $atts = '', $submit = '') { . "<input type='hidden' name='exec' value='$script1' />" . $corps . (!$submit ? '' : - ("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo' type='submit' value=\"" . entites_html($submit) . "\" /></div>")) + ("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . "\" /></div>")) . "</div></form>\n"; } diff --git a/prive/themes/spip/forms.css.html b/prive/themes/spip/forms.css.html index 191b0bfb17793efd79694665ddbcfcc3692a9dc5..ad89e863dc35b08d289de3eef3c3e10df1333223 100644 --- a/prive/themes/spip/forms.css.html +++ b/prive/themes/spip/forms.css.html @@ -50,6 +50,7 @@ --spip-form-color-text-lightest: var(--spip-color-gray); /* placeholder */ /* divers */ --spip-form-border-radius: var(--spip-css-border-radius); /* bordure inputs et cie */ + --spip-form-input-height: calc((var(--spip-form-gutter-input-y) * 2) + var(--spip-css-line-height)); } @@ -283,14 +284,16 @@ .formulaire_editer_auteur .editer_statut:not(.erreur) { background-color: var(--spip-color-theme-lightest); } -.formulaire_spip .editer_parent .rubrique_actuelle { - clear: #LEFT; -} .formulaire_spip .editer.editer_parent label, .formulaire_spip .editer.editer_groupe_mot label { color: black; font-weight: bold; } +.formulaire_spip .editer_parent .rubrique_actuelle { + clear: both; + display: flex; + align-items: center; +} /** @@ -325,7 +328,7 @@ .formulaire_spip textarea:focus, .formulaire_spip select:focus { border-color: var(--spip-color-theme); - box-shadow: 0 0 0 0.3em var(--spip-form-color-focus); + box-shadow: 0 0 0 0.2em var(--spip-form-color-focus); outline: 0; } .formulaire_spip input.text, diff --git a/prive/themes/spip/picker.css.html b/prive/themes/spip/picker.css.html index 445c7790d5c0e832e439ab947eef24122fefb93b..6324e418d06309050a1e620d5bf8ad49664b1958 100644 --- a/prive/themes/spip/picker.css.html +++ b/prive/themes/spip/picker.css.html @@ -27,27 +27,161 @@ option.niveau_4 { background:#eee; color: #606060; } option.niveau_5 { background:#eee; color: #808080; } option.niveau_6 { background:#eee; color: #a0a0a0; } +/* Plongeur + * Voir aussi à la fin des règles du selecteur ajax */ +div.petite-racine, +a.petite-racine { + background: [(#ENV{ltr}|choixsiegal{left,1,99})%] no-repeat; + background-image: url(#CHEMIN_IMAGE{racine-xx.svg}); + background-size: 12px; + padding-#LEFT: 15px; + padding-top: 0.2em; + padding-bottom: 0.2em; + background-color: #fff; + border: 1px solid var(--spip-form-border-color); + border-bottom: 0; + width: 10em; + border-top-left-radius: var(--spip-form-border-radius); + border-top-right-radius: var(--spip-form-border-radius); +} +div.petite-rubrique, +a.petite-rubrique { + background: [(#ENV{ltr}|choixsiegal{left,1,99})%] no-repeat; + background-image: url(#CHEMIN_IMAGE{rubrique-xx.svg}); + background-size:12px; + padding-#LEFT: 15px; + cursor: pointer; +} +div.petit-secteur, +a.petit-secteur { + background: [(#ENV{ltr}|choixsiegal{left,1,99})%] no-repeat; + background-image: url(#CHEMIN_IMAGE{secteur-xx.svg}); + background-size: 12px; + padding-#GET{left}: 15px; +} +div.rub-ouverte, +a.rub-ouverte { + padding-#RIGHT: 10px; + background: url([(#CHEMIN_IMAGE{triangle-droite[(#GET{rtl})].gif})]) var(spip-css-right) center no-repeat; +} + +/* Selecteur ajax */ +.rubrique_actuelle {} +#titreparent[disabled=disabled] { + border: none; + background: none; + color: inherit; + font-weight: 500; + padding: 0; + mask-image: linear-gradient(90deg, hsla(0, 0%, 0%, 100) 90%, hsla(0, 0%, 0%, 0) 100%); +} +.rubrique-search { + color: var(--spip-color-theme); + border: 1px solid var(--spip-color-theme); + border-radius: 99em; + padding: 0.33em; +} +.rubrique-search:hover, +.rubrique-search:focus { + color: var(--spip-color-theme-darker); + border: 1px solid var(--spip-color-theme-darker); +} +.rubrique-search svg { + width: 0.85em; + height: auto; +} +.recherche_rapide_parent { + margin-top: -2.2em; + float: var(--spip-css-right); + display: flex; + align-items: center; +} +.recherche_rapide_parent input.search { + border-radius: 99em; + padding: 0.33em 1em; +} +.recherche_rapide_parent .loader { + order: 2; +} +/**/ +#choix_parent{ + margin-top: 0.5em; +} +#choix_parent_principal { + position: relative; + height: 10em; + overflow: auto; + background: var(--spip-color-theme-white); + border: 1px solid var(--spip-form-border-color); + border-top-left-radius: var(--spip-form-border-radius); + border-top-right-radius: var(--spip-form-border-radius); +} +#choix_parent_selection { + margin-top: -1px; +} +.informer { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.5em !important; + border-bottom-left-radius: var(--spip-form-border-radius); + border-bottom-right-radius: var(--spip-form-border-radius); + background-color: var(--spip-color-theme-light); +} +.informer__titre, +.informer__descriptif, +.informer__media { + margin-bottom: 0.5em; +} +.informer__media { + margin-#RIGHT: 0 !important; + margin-top: 0 !important; + margin-#LEFT: 1em; +} +.informer__action { + margin-#LEFT: 1em; +} +.informer .btn { + margin: 0; +} +.informer-auteur { + /* background: #fff; */ + /* padding: 5px; */ + /* border-top: 0; */ +} +/**/ +#choix_parent .item { + color: var(--spip-color-gray-dark); + background-color: var(--spip-color-white); + display: block; +} +#choix_parent .item.on { + color: var(--spip-color-black); + background-color: var(--spip-color-theme-lighter); +} +#choix_parent .item.on { + color: var(--spip-color-black); +} +#choix_parent .item:hover { + color: var(--spip-color-black); + cursor: pointer; +} +/* voir aussi règles du plongeur */ +#choix_parent .petit-item > div { + display: flex; /* rendre tout le bloc cliquable */ +} +#choix_parent .petit-item a { + padding-top: 0.2em; + padding-bottom: 0.2em; + padding-#RIGHT: 0.2em; + flex: 1 1 auto; + color: inherit; +} +#choix_parent .petit-item:hover, +#choix_parent .petit-item:focus { + background-color: var(--spip-color-theme-lightest); +} -/* plongeur */ -div.petite-racine { margin-bottom: -5px; } -div.petite-racine, a.petite-racine { background: [(#ENV{ltr}|choixsiegal{left,1,99})%] no-repeat; background-image: url(#CHEMIN_IMAGE{racine-xx.svg}); background-size:12px; padding-#GET{left}: 15px; background-color: #fff; border: 1px solid #GET{foncee}; border-bottom: 0; width: 134px; } -div.petite-rubrique, a.petite-rubrique { background: [(#ENV{ltr}|choixsiegal{left,1,99})%] no-repeat; background-image: url(#CHEMIN_IMAGE{rubrique-xx.svg}); background-size:12px; padding-#GET{left}: 15px; } -div.petit-secteur, a.petit-secteur { background: [(#ENV{ltr}|choixsiegal{left,1,99})%] no-repeat; background-image: url(#CHEMIN_IMAGE{secteur-xx.svg}); background-size: 12px; padding-#GET{left}: 15px; } -div.rub-ouverte, a.rub-ouverte { padding-#GET{right}: 10px; background: url([(#CHEMIN_IMAGE{triangle-droite[(#GET{rtl})].gif})]) [(#GET{right})] center no-repeat; } -/* selecteur ajax */ -#choix_parent_principal { background: #fff; border: 1px solid #GET{foncee}; position: relative; height: 170px; overflow: auto; margin-top:5px;} -.recherche_rapide_parent {margin-top: -25px;float:right; } -.rubrique_actuelle { - /* height: 25px; */ -} -#selection_rubrique .informer { background: #fff; } -.informer-auteur { background: #fff; padding: 5px; border-top: 0; } - -#choix_parent .item { color: #666; background-color: #fff; } -#choix_parent_principal .item { padding: 2px; display: block; } -#choix_parent .item.on { color: #000; background-color: #ccc; } -#choix_parent .item.on a {color:#000;} -#choix_parent .item:hover a { color: #000; cursor: pointer; } /* ----- */