Implementing the HTML5 History API would be a great leap forward for this module. The case was recently put for it to be supported by Views here:

http://drupal.org/node/1084336

Would it be possible to implement this into Quick Tabs?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acouch’s picture

I would really like this feature and would work on a patch if the maintainer would like to see one.

katbailey’s picture

I would LOVE to see a patch for this :-)

sammyd56’s picture

Glad to see this getting some eyes! Gogo Drupal developers, you rock :)

acouch’s picture

@katbailey, I did a little more looking into this.

Just to be clear the desired behavior is to have a hash in the url appear when you click on a tab and for that to be an entry in the window.history object, correct? So when someone clicks on a tabs and clicks the back button they cycle back through the tabs they have clicked.

If so, the JQuery BBQ plugin in D7 core might be the best route since it does graceful degradation better and already has documentation for use with UI tabs: http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui...

Does that make sense? If so I'll get cracking.

katbailey’s picture

Uh oh, just realized I never responded here, sorry about that. Yes, that makes perfect sense - I'd really like to see the solution use the bbq plugin.

acouch’s picture

FileSize
6.01 KB

I was able to get around to this. I was only able to get to the UI tabs plugin. I would be able to do the accordion version as well, maybe next weekend.

I tested this with multiple tabs on the same page and it works for me. It also still respects the default active tab selected in the quicktab settings. This will be overridden once someone clicks a tab with history enabled and returns to that page with the hash still in the URL.

tim.plunkett’s picture

Status: Active » Needs review

subscribe

acouch’s picture

Attached is a patch for the accordion. I'll wait for some feedback before delving into the quicktabs renderer.

iamEAP’s picture

Any chance anyone would take on a 6 version of this as well?

acouch’s picture

I will work on a 6.x version if the 7.x version is approved.

katbailey’s picture

Status: Needs review » Needs work

Sorry for taking so long with this and thanks @acouch for the awesome work! Both patches have been committed :-)

Leaving as "needs work" in case you do find time to implement this for the classic Quicktabs renderer, though I imagine that will be a bit trickier :-/

katbailey’s picture

Assigned: Unassigned » katbailey
Status: Needs work » Fixed

FYI I am working on implementing this for the classic Quicktabs renderer.

katbailey’s picture

Status: Fixed » Needs work

Oops, didn't mean to change the status.

joelpittet’s picture

Assigned: katbailey » Unassigned
Issue summary: View changes