stevent Posted March 14, 2019 Posted March 14, 2019 Bonjour à tous, Sur ce site : http://www.st-event.be/demo/mdc/3-coccinelle Prestashop 1.6 J'aimerais qu'une seule catégorie à la fois soit ouverte dans le bloc catégorie sur la gauche. Je m'explique : Lorsque une catégorie est ouverte et que l'on décide par exemple de cliquer sur le "+" de KARMANN GHIA, cette dernière s'ouvre en effet mais COCCINELLE reste ouverte.Ce qui fait que le page devient très longue. J'aimerais donc que la catégorie précèdente se ferme automatiquement lorsqu'une autre est déroulée. Je suppose qu'il faut modifier le treeManagement.js mais je n'ai aucune idée de ce que je peux y faire. Merci d'avance pour votre retour et à bientôt ! Share this post Link to post Share on other sites More sharing options...
Eolia Posted March 14, 2019 Posted March 14, 2019 ligne 49 modifiez comme suit $('ul.tree.dhtml span.grower').click(function(){ $('span .OPEN').removeClass('OPEN').addClass('CLOSE'); toggleBranch($(this)); }); Share this post Link to post Share on other sites More sharing options...
stevent Posted March 14, 2019 Posted March 14, 2019 Merci Eolia, J'ai testé mais il semble qu'il reste une erreur dans ma démarche. En effet cela n'à pas résolu la question J'ai joint à screenshot de ma modif au cas ou. Merci encore, Share this post Link to post Share on other sites More sharing options...
Eolia Posted March 14, 2019 Posted March 14, 2019 Difficile de dire, votre site ne s'affiche plus chez moi... Share this post Link to post Share on other sites More sharing options...
stevent Posted March 15, 2019 Posted March 15, 2019 Quelqu'un d'autre aurait une idée tout en exploitant l'apport de Eolia ? Share this post Link to post Share on other sites More sharing options...
stevent Posted April 9, 2019 Posted April 9, 2019 up? Share this post Link to post Share on other sites More sharing options...
Performance Agency Posted April 10, 2019 Posted April 10, 2019 Et en mettant cela en plus ? $('ul.tree.dhtml span.grower').click(function(){ $('span .OPEN').parent().find('ul').toggle(); $('span .OPEN').removeClass('OPEN').addClass('CLOSE'); toggleBranch($(this)); }); Share this post Link to post Share on other sites More sharing options...
stevent Posted April 10, 2019 Posted April 10, 2019 Merci pour le retour Malheureusement pas de réaction non plus Je m'étonne que Presta n'aie pas été prévu à la base pour n'ouvrir qu'une seule catégorie à la fois, ce qui me semble plus logique Share this post Link to post Share on other sites More sharing options...
Performance Agency Posted April 10, 2019 Posted April 10, 2019 Ah il y avait peut être une erreur, et avec ca? $('ul.tree.dhtml span.grower').click(function(){ $('ul.tree ul span.OPEN').parent().find('ul').toggle(); $('ul.tree ul span.OPEN').removeClass('OPEN').addClass('CLOSE'); toggleBranch($(this)); }); Share this post Link to post Share on other sites More sharing options...
stevent Posted April 10, 2019 Posted April 10, 2019 Non plus 😕 Share this post Link to post Share on other sites More sharing options...
stevent Posted April 16, 2019 Posted April 16, 2019 Personne n'à une idée qui s'y rapproche ? Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now