This is used for the "Advanced" column in the Views UI. But it has all this extra code to remember whether or not you'd left it collapsed last time you went to that page.

I think a regular collapse, with maybe a call-out for the settings page to make it always show.

Comments

aspilicious’s picture

Sounds good.

tim.plunkett’s picture

Priority: Normal » Major

This is the last active CTools dependency.

damiankloip’s picture

Assigned: Unassigned » damiankloip

Just working on this now.

damiankloip’s picture

Status: Active » Needs review

This converts the CTools collapsible-div stuff to views, and removes anything to do with the states/cookies. Is this what we're after? or do we want an new 'simple' solution? To me, this is the simplest solution, as we have the code already.

The patch doesn't include the collapsible-collapsed.png and collapsible-expanded.png files, which we would need to move over too.

damiankloip’s picture

StatusFileSize
new15.64 KB

Oh, and how about the patch!

damiankloip’s picture

I have also moved over the theme function (views_collapsible) too. In the hope we can refactor some of the code in views_ui to just use this instead of how it does it currently - good followup issue.

damiankloip’s picture

StatusFileSize
new14.99 KB

How about this instead?

damiankloip’s picture

StatusFileSize
new14.14 KB

And removed more stuff...

damiankloip’s picture

StatusFileSize
new13.97 KB

Remove some more un needed css stuff

damiankloip’s picture

StatusFileSize
new14.57 KB

With the images in the diff.

dawehner’s picture

+++ b/css/collapsible-div.cssundefined
@@ -0,0 +1,26 @@
+.views-collapsible-container .views-toggle {

Just wondering what happened with the RTL css code, can we simply get rid of them, important i have no glue of css.

Nice cleanup of all this code!

damiankloip’s picture

StatusFileSize
new15.14 KB

I added the rtl code back in, as well as the other css. As we need this to make it look as it does currently in views. Here is (what I think) is a better version!

damiankloip’s picture

StatusFileSize
new15.14 KB

One more...

dead_arm’s picture

Assigned: damiankloip » dead_arm

Assigning to myself for CSS polish.

dead_arm’s picture

Assigned: dead_arm » Unassigned
StatusFileSize
new6.75 KB
new14.58 KB

Work summary:

  • Removed the parent collapsible div
  • Used CSS borders instead of images for the arrow (like the dropbutton)
  • Changed the markup for the toggle arrow so that it is a link and picks up the link color
  • Added back the export filter styling that was removed by accident because it was in the collapsible div comment block
  • Added in RTL support
  • Removed 'Advanced' text when there is no js because the default position is open

Status: Needs review » Needs work

The last submitted patch, views-1779720-15.patch, failed testing.

dead_arm’s picture

Status: Needs work » Needs review
StatusFileSize
new14.55 KB

Rerolled.

tim.plunkett’s picture

Assigned: Unassigned » tim.plunkett

The CSS looks great, but we're not actually using the theme function. I'm working on that now.

tim.plunkett’s picture

StatusFileSize
new5.86 KB
new14.49 KB

So, the more I work with this code, the more I realize it's the same code as fieldset.

But here's what I have for now.

damiankloip’s picture

I did talk about using a fieldset right from the start, but we had some other stuff in the collapsible-div then (like states). So now, I guess there is not really much reason for us not to use a fieldset? Would need to be re themed though :)

On the plus, we would save much more code again. I like what we have now, it seems a bit overkill though. The only main difference in the old collapsible-div is the states....

damiankloip’s picture

StatusFileSize
new7.22 KB

ok, here is a quick patch to ditch everything so far.... :(

Much less code, fieldsets, some other logic around the collapsible can be removed too. I think this makes a much simpler read already.

@dead_arm: So... how do you feel about some more theming work using this instead?

dead_arm’s picture

Assigned: tim.plunkett » dead_arm

Yay! Assigning to myself for CSS stuff.

dead_arm’s picture

Assigned: dead_arm » Unassigned
StatusFileSize
new7.28 KB
new13.07 KB

Removed the parent fieldset, cleaned up the CSS for all three themes, checked and updated the RTL sheets.

tim.plunkett’s picture

Status: Needs review » Fixed

7 files changed, 129 insertions, 93 deletions

which doesn't count the 266 lines of CTools CSS/JS code that isn't loaded anymore :)

http://drupalcode.org/project/views.git/commit/8ed841b
http://drupalcode.org/project/views.git/commit/78acdec

Automatically closed -- issue fixed for 2 weeks with no activity.