Closed (fixed)
Project:
Views Bootstrap
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2013 at 14:31 UTC
Updated:
5 Feb 2020 at 20:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
waverate commentedAny update with a solution for this?
Comment #2
Chitmin commentedI add this
<div id="collapse<?php print $key ?>" class="panel-collapse collapse <?php if ($key == '0'): ?>in<?php endif; ?>>So, its only on first one but its also not open by default.
Update,
Sorry, my mistake.
This one works.
<div id="collapse<?php print $key ?>" class="panel-collapse collapse <?php if($key == '0'): ?>in<?php endif; ?>">Comment #3
waverate commented#2 is a good workaround until this is available through the Views UI.
I copied views_bootstrap/templates/accordian/views-bootstrap-accordion-plugin-style.tpl.php to my theme templates override folder and renamed it to the correct Views override. From the View theme information, I re-scanned the template files.
The line to change is line 15.
Comment #4
chris mcgrath commentedthis is great Chitmin thanks!
I was wondering if you might have a solution to closing the open accordion that your code enables on page load when then next item in the group is clicked
Comment #5
kyletaylored commentedAttached a patch. Adds a checkbox to the accordion option in the Views UI.
Comment #6
kyletaylored commentedHeh, fixed the patch against dev.
Comment #7
waverate commented#6 Works
Comment #8
kingfisher64 commentedTried patch #6 against latest dev, get offset hunk failed notice. Could somebody else test this again?
Noticed that patch #5 has the filepaths prefixed with "/profiles/openenterprise/modules/contrib/" before the bootstrap module is reached. So didn't attempt a patch with this.
Would it be possible to re-roll these for the latest stable version 7.x-3.1? - then try get them committed?
Many thanks for any help
Comment #9
kyletaylored commentedI re-rolled the patch against 7.x-3.x-dev
Comment #10
kingfisher64 commentedThank you kyletaylored applied the patch successfully against latest 7.x-3.x-dev. Option appears correctly in views backend as well.
However the accordions now are both closed and when clicked just go to the node page and won't open at all. So tried the dev without the patch reveals it still doesn't open - so nothing to do with your patch.
For me only the 3.1 version works, the latest dev breaks the accordion use. I'm using 1.9 jQuery.
Comment #11
kingfisher64 commentedTried on new install - switching jquery versions and it works fine - so my issue was only a jquery version issue and the patch on #9 works.
Thanks kyletaylored for the re-roll :)
Can this be committed please?
Comment #12
pgraell commentedI make another implementation (patch base 7.x-3.1+24-dev) that can select collapse/uncollapse and first/middle/last elements in Views UI accordion option.
It works for me, but can somebody else review this patch?
Comment #13
iamfredrik commentedRe-rolled #12 against 7.x-3.1+30-dev
Comment #14
LCM commentedI also added:
<a class="accordion-toggle <?php if($key != '0'): ?>collapsed<?php endif; ?>"To set correct state for headings (which is useful if you have icons placed within headings to indicate state, e.g. plus/minus or up/down)
Maybe you can integrate this for the sake of completeness.
Comment #15
Déjà vu commented#2 worked for me drupal is making me lazy to think ;p
Comment #16
ikeigenwijs commentedA bit late but could # 14 be incorporated?
And because this is a UI change a screenshot of UI before and after the patch
What happens for existing installs?
still applies cleanly to dev, i m ready to go if i have the extra confirmation.
Comment #17
bluehead commented14 works
Comment #18
peetrovich commented#9 worked for me.
Thanks to kyletaylored.
Comment #19
maxmendez commentedThanks for the patch, in my case i'm working on Drupal 8 so i rewrited for 8.x-4.1 and include a fix to make it compatible with bootstrap barrio.
Comment #21
aburrows commented