Closed (fixed)
Project:
Collapsing Panels Style
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
28 Jan 2009 at 14:17 UTC
Updated:
21 Oct 2014 at 18:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joachim commentedI'm very busy on a D5-based project at the moment -- for which I coded this -- so I don't have time to work on a D6 version right now.
If someone makes a patch and it's tested I'll gladly do a D6 release!
Comment #2
ckidowMaybe here is a starting point for a port... don't know... I've got no coding expertises but need a D6 verion at all. :)
http://drupal.org/node/363067
Comment #3
joachim commentedI'm not going to use that monster chunk of JS...
A module port to D6 involves:
- updating the .info file
- checking the API functions. There are only panel hooks here, so that's just checking the panels API docs.
- checking the JS works with the most recent Jquery -- it's very basic so that should be ok.
Comment #4
tsi commentedsubscribing
Comment #5
joachim commentedThis comment from from one of the panels maintainers: http://drupal.org/node/317523#comment-1229357 has details about the current status of panels...
Based on that, I'd say:
- Panels2 for D6 -- shouldn't be too complex like said above. But as Panels2 will be dead-ended I don't know how much point there is.
- Panels3 for D6 -- don't know how stable the API is for this right now.
I'll consider patches for both and I'm happy to branch twice. Sorry I don't have any time to work on this myself.
Comment #6
witzel commentedJust want to thank you for the work you did on the D5 module and encourage you to work on a module for Panels 3 D6. Unfortunately im not a coder and can't offer my help.
Comment #7
tim.plunkett+1
Comment #8
joachim commentedPanels 3 is out now, so there's a stable base to build on.
However, I have no time to devote to this module at the moment. Patches will be accepted! :)
Comment #9
pimousse98 commentedsubscribing
Comment #10
robbertnl commentedSubscribing, I am using http://drupal.org/project/collapsiblock (Drupal 6.14 & Panels 3) in panels right now but I prefer using collapsing panels
Comment #11
srsbl commentedSubscribing.
In the case of the use of panels to display views, what I am doing is using a Viewfield placed within a group with fieldset-collapsible. When adding content to a panel select Node and then Field group. In "Field group label" choose Above and in "Field group format" then set to Fieldset-collapsible.
Comment #12
Daniel A. Beilinson commentedOkay, I made a 6.x version. It's working, but very badly. There is some problems with this jQ code:
It's showing collapsible block when the page loading and then hide it.
Comment #13
Daniel A. Beilinson commentedAnd, of course, there is no problems if you want to make it non-collapsed by default, you need to change jq:
I can make it optional if you want.
Comment #14
joachim commentedThanks for working on this!
It works nicely, but I'm trying to figure out if we can have the initial state as a setting.
Interestingly, the hook_panels_style_info isn't being used by Panels' own style plugins, but it's getting called nonetheless via cTools.
Looking at includes/list.inc I can see how to define settings. I may try and figure those out, but anyone feel free to beat me to it :)
Comment #15
josepvalls commented#13 worked fine for me too using Firebug, can't wait to see the proper module implementation.
I was just trying to figure out the layout plugins and I'll give it a try myself.
Comment #16
ManyNancy commentedThank you all so much for working on this.
Comment #17
fuerst commentedYou may see http://manueg.okkernoot.net/blog/200910/how-create-panels-style-plugin for a Drupal 6.x module.
Comment #18
G Gavitt commentedThank you fuerst. I am using your example module with panels 3. I am using it for a collapsible embedded view with out any problems. Great tutorial as well.. powerful stuff.
Comment #19
joachim commentedThat tutorial looks great.
If someone could take the time to integrate it with the work already here, I'll commit it.
Comment #20
chien_fu commented...is excited. subscribing.
Comment #21
joachim commentedWell, I said if 'someone' does it. Until someone actually steps up and does it, it's not going to happen. I haven't time to work on this myself. If anyone wants to co-maintain this module that would be great too.
Comment #22
nigelcunningham commentedI've just been working on this, and have a version that needs review, please.
I'd really rather implement this as an extra attribute in the Panels Stylizer module, but haven't done that yet (I'm not sure if it's possible yet).
Comment #23
nigelcunningham commentedOh, I should have mentioned: this version uses cookies to record what is expanded/collapsed.
Comment #24
bryancasler commentedNigelCunningham, gave your module a shot but it had malformed output.
The fieldset titles were all printed together, even the ones that didn't have content.
Then below that the fieldsets with their titles *again* and their content were printed.
Attached is a screen shot.
Comment #25
bryancasler commentedNigel I found the following ctools plugin that works out of the box.
http://manueg.okkernoot.net/blog/200910/how-create-panels-style-plugin
File: http://manueg.okkernoot.net/sites/default/files/ctoolsplugins.tar.gz
It works perfect except that it displays fieldset headers even when the fieldset content is empty. I don't know if you would be able to do anything about that, but that addition would make this work perfectly.
Comment #26
bryancasler commentedSorry for so many post, this will be the last one.
I think around line 57 in collapsible.inc would be the place to make it not print anything if the content is empty
Comment #27
nigelcunningham commentedThat plugin didn't work for me, and my one works perfectly :) Perhaps we're running different versions of Panels and Ctools? I have Ctools 6.x-1.x-dev (2010-Nov-02) and Panels 6.x-3.8.
Comment #28
bryancasler commentedThanks for your response NigelCunningham
I upgraded ctools to (6.x-1.x-dev Nov-02) and panels to (6.x-3.8) tonight.
The solution I was using in #25 no longer works, just like you mentioned in #27.
I went ahead and installed your module (#22) to give it a try, but its not working either. The option for "Collapsing" is showing up under the style menu for me to apply, but when I view the node nothing has changed. Unfortunately I'm not getting any error output, so I can't offer much more feedback than that. Have you had any problems?
Comment #29
bryancasler commentedSo it's late and I was editing the wrong panel :) No wonder there was no effect.
Now I have updated the correct panel, and it's still not working. It is however having an effect on the output.
It's also adding panels_collapse.css, collapse.js and panels_collapse.js
Here is a 18 second screencast showing the output.
http://www.screencast-o-matic.com/watch/c6XTQl68H
Comment #30
nigelcunningham commentedIt looks like you still don't have the style applied. If I do the same thing with a pane on http://crca.org.au, I see that the heading has classes 'collapsible collapsed', whereas yours doesn't.
Comment #31
bryancasler commentedDouble checked everything and I'm still not certain what could be causing the dysfunction.
Are you sure you are using exactly what you uploaded in #22? Didn't happen to make any changes on it?
Also I'm running jQuery Update 1.3.2 and jQuery UI 1.7.3, not sure if that would have an impact.
Comment #32
bryancasler commentedI was able to get everything working by removing cookie support in panels_collapse.js
Comment #33
elektrorl commented#22 + #32 JS code: working. Thanks a lot !
Comment #34
nigelcunningham commentedHmm. Without the cookie support, it won't remember your settings between sessions.
Comment #35
joachim commentedIf someone can roll all this as a patch, I'll start a 6--1 branch, commit it, and roll a dev release, so it's easier for everyone to try the code and continue working on it.
Comment #36
ayalon commentedI made a patch for Drupal 6.
I had to change the css class to something general. I'm using the fusion theme, and the div.panel-display class is not available there. Additionally, I better integrated the javascript in th Drupal way.
I expect now a new re-roll from the maintainer as promised above.
Comment #37
joachim commentedPatch doesn't apply I'm afraid -- I'm getting most of the hunks failing.
Remember to roll patches from the module base folder.
Hmmm... what does Fusion do that removes the class we're expecting? I'm inclined to say it's not our problem.
You don't need to reproduce this part.
Missing 'e'.
Hooks documentation doesn't agree with declaration.
Watch out for whitespace.
Here too.
Not sure what is going on here.
Powered by Dreditor.
Comment #38
bryancasler commentedThis is a working version I cobbled together a while back.
http://min.us/mvoiXGY
Comment #39
bryancasler commentedIf anyone is able to, I'm starting a D7 discussion over here.
#1108620: Drupal 7.x version?
Comment #40
joachim commentedThe code from #38 looks okay, but it needs a few things fixing:
- JS variables should not have an initial $
- I don't understand why you're doing this: $heading.addClass('collapsible')
- some module functions are missing headers
- we're missing a hook_theme -- surely it won't work without that? Or does Panels register it for us? If that's the case, the code needs a comment to prevent a WTF.
- please watch for Windows line endings!
Since I've got the code, I've stuck it on top of the current 6.x and made it into a patch, attached here.
Now if people could move this forward to something I can commit that would be great.
Comment #41
amitaibujust note there's the module -- http://drupal.org/project/panels_dashboard
Comment #42
Tafa commentedokay, i just tried it and it works perfect so far...so thanks for the hint...
t
Comment #43
chriszz commentedVersion #38 works for me. I did not find a way of using the dashboard in mini panels, so I preferred the simple Style Plug. Eventually I am going to test the patch in #40.
Regards
Christian
Comment #44
ann_meredith commentedsub
Comment #45
pbfleetwood commented+1
Comment #46
djg_tram commentedAt the beginning of the JS, there is a line:
$('div.panel-display div.panel-pane-collapsible').each(function() {The
div.panel-displayis wrong, it should be removed:$('div.panel-pane-collapsible').each(function() {It is not necessary, the second
divfinds the tag all right. But the real problem is that it breaks the module on custom flexible panels, it only works on the stock panels. With it removed, it works in both cases all right.Comment #47
djg_tram commentedA simple approach to make the default state selectable. The default is initially expanded. For all panes that need to be collapsed by default, use the CSS settings of the pane (right corner gear icon) and assign the class name pane-collapsible-collapse-default.
Comment #48
wxman commentedJust adding my 2 cents. I've been trying out ways to improve my mobile version of my site, including collapsing DIV's to save space. I first tried one from this article: http://manueg.okkernoot.net/blog/200910/how-create-panels-style-plugin. It works, but it causes warnings about version problems. Next I tried using #38 along with #47 and I'm getting better results and no errors. It works perfectly on my Android phone.
Comment #49
nirvanajyothi commentedsubscribing
Comment #50
WorldFallz commentedI also used http://manueg.okkernoot.net/blog/200910/how-create-panels-style-plugin to get this going. Seems to be working fine without any error or warnings. Attached for anyone who wants to use. If you're willing to consider a patch for it (it's completely different than the way this module works by rolling its own js), let me know and I'll roll one.
Comment #51
kenorb commentedComment #52
WorldFallz commentedimo the maintainer should make that call. And also, I'm willing to take over maintainership of the module if need be.
Comment #53
kenorb commentedThe module is 3 major versions behind (most of the modules are now implementing 8.x core), so I don't know even if it would be possible to have version 6.x (which is already depreciated), or it should be version for 8.x first. If there was no progress for over 3 years, I don't think it will going to happen. So I think people should use some alternative modules.
But you actually attached 6.x version in #50, so I think people should review it then.
Comment #54
WorldFallz commentedD6 is not deprecated yet-- and there is talk about keeping around partially supported even after d8. D8 isn't released yet, but even if it was I don't think it's reasonable to expect contrib maintainers to first create d8 branches before doing anything for previous versions. If there was a d8 branch, then yes, it's usually done at the newest point first and then back ported.
And there is progress-- I just just created and posted a working module. I'm stuck with a d6 site likely unless d8 comes out so I regularly maintain d6 modules I use.
Comment #55
joachim commentedAttached zipfile looks good, apart from just one formatting issue:
@WorldFallz: I've granted you maintainer access. Feel free to start a D6 branch, commit your code, make a D6 release, and update the project page :)
Comment #56
WorldFallz commentedawesome... thanks joachim! That's great. I'm in the process of adding an additional style option use this awesome jquery plugin. Once that's done I make a d6 dev branch.
Comment #57
WorldFallz commentedComment #59
WorldFallz commentedIn the interests of getting something committed asap, I've gone ahead and committed the code from #50. I'll add the jquery plugin version as a different style when it's ready.