Currently all tabs are loaded when the page is loaded. Is there a way to make the tabs load on click? Otherwise the performance gain from hiding blocks are lost...

Comments

katbailey’s picture

Hi there,
this module was originally conceived with sidebar content in mind, and more as a space-saving idea than a performance-enhancing one. The idea was that where previously you would have your blocks positioned underneath each other, taking up a lot of vertical space, they can now take up the same space - just using tabs to view them. However, I will look into the possibility of adding the option to have the content loaded via ajax calls, so that it could be used for larger views.
Thanks for the feature request ;-)

Katherine

Flying Drupalist’s picture

Thanks, would be great if this was implemented. Drupal's biggest load is the block database access, shaving a bit off would do wonders for load time.

yngens’s picture

subscribe

nbchip’s picture

subscribe

liliplanet’s picture

subscribe

liliplanet’s picture

Hi,

Been doing some research and found http://drupal.org/project/jquery_ui which is now installed.

In the quicktabs.module I've added:

jquery_ui_add('ui.tabs');

That's taken away that the content from the tabs load below each other before settling, but was that the correct ui to add?

I think everything still loads fully, and would prefer if content loaded on selecting a specific tab.

Any suggestions would be greatly appreciated.
Lilian

katbailey’s picture

Hi Lilian,
I had just been thinking that the way to go about this would be to use jQuery UI tabs ;-) So you say it works well? I will play around with it and then I can modify the code so that it behaves differently if you have this jquery plugin installed and have chosen "ajax loading" for a particular qt block. I just need to figure out how to tell the tabs where to get the content if it's not going to be loaded straight away. But hopefully that won't prove too difficult

Katherine

liliplanet’s picture

Oops, in regards to jQuery, when installed, it does not work with Hierarchical Select .. totally incompatible .. what a pity.

Perhaps have another solution to load the tabs via ajax?

Thank you so much for your help.
Lilian

iron2’s picture

I am wondering this too. Help please.

najibx’s picture

cool feature for usability (with performance in mind !)

katbailey’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

OK, so I'm taking a different approach on this and it's only going to be available in D6. It will not use jQuery UI Tabs. I have an extremely rough version of it working: it provides a separate interface for creating ajax-based QT blocks, allowing you to select only from views that have displays with paths associated with them (for the purposes of degrading without js so that the tabs otherwise when clicked will go straight to the path of the view). When the Ajaxified QT block is diisplayed, it pulls only the view for the first tab. An ajax callback allows the content for the subsequent tabs to be loaded on click. I might also add the ability to add nodes to tabs on these ajax-based QT blocks.
When I have made more progress on this I will create a new 6.x-2.x branch and put up a dev snapshot. In the meantime feel free to leave feedback about this approach.

liliplanet’s picture

Version: 6.x-1.x-dev » 5.x-1.4

Hi Katherine,

Hope this message finds you very well. Have been checking your project almost daily .. what a pity, there will be no 5.x version? Your beautiful module would be so amazing on my site.

All the best,
Lilian

katbailey’s picture

Hi Lilian,
well it's not that it won't be possible in 5.x, it's just that I have to be realistic about what I'll find the time to do. Once I get it working in 6.x I'd be happy for someone to backport it - the only big difference will be the functions for retrieving the views to choose from - because of the huge differences between Views 1 and Views 2.

Katherine

Flying Drupalist’s picture

Hi, I'm so happy to hear there's progress on it. katbailey, your approach sounds exactly like what I wanted. Thanks for your hard work.

Flying Drupalist’s picture

Hi, I'm not sure what I'm saying, but would this module allow blocks to be loaded via ajax?

http://drupal.org/project/blocktools

katbailey’s picture

FYI there's a dev snapshot up of the D6 version with this functionality - see http://drupal.org/node/327414#comment-1089667. There's nothing about it that's not backportable to D5; I guess I'll try to gauge the level of interest in this for D5 and see if I can put in the time, unless somebody else out there would like to have a go ;-)
@Miraploy - that blocktools module looks interesting. I don't think it is of use for this particular issue but it might be of help with http://drupal.org/node/279773

Flying Drupalist’s picture

Thank you, this is terrific. I'm testing it right now. Will blocks come later?

Flying Drupalist’s picture

Version: 5.x-1.4 » 6.x-2.x-dev

Hi, what is the status of Ajax loading for blocks? Is there some technical difficulty in getting that implemented?

Thanks.

katbailey’s picture

Hi,
no there's no technical difficulty - it's just time-consuming ;-) I'd need to re-jig the form to have 3 options. I guess I felt that ajax loaded blocks wouldn't be as useful as ajax-loaded nodes but maybe I'm wrong. My next priority on this is doing the code cleanup that I did on the 1.x branch. After that it's investigating the ajax paging problem. Then maybe I'll get around to adding in blocks...

Katherine

Flying Drupalist’s picture

Hmm, of course you know best, but for me blocks are soooo crucial :).

I'm not using nodes at all.

Thanks again for this great module.

pasqualle’s picture

Title: Load on click » Ajax loading for blocks
pasqualle’s picture

Status: Active » Fixed

this is fixed in 6.x-2.x

Flying Drupalist’s picture

AWESOME! Thank you!

Status: Fixed » Closed (fixed)

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