Apparently in 5.x views pagers would remember the last tab selected - see #270509: Paged views don't have the tab fragment set. This is no longer the case in 7.x, in fact unless #821334: Tabbed panel back button on browser gets in, it seems the url fragment is completely lost. Could we please have this feature back? I'm marking this as a bug report as it is apparently a regression, but I never used 5.x so I can't confirm that.

Comments

mstrelan’s picture

Status: Active » Needs work
StatusFileSize
new2.97 KB

If #821334: Tabbed panel back button on browser gets in then it can be modified further to add the fragment identifier to pager links inside tabs. Specifically if #4 over there gets in it would be as simple as adding this:

      // Add fragments to pager links.
      tabs.find('ul.pager li a').each(function() {
        parent_tab = $(this).parents('.ui-tabs-panel');
        container_id = parent_tab.parent().attr('id');
        siblings = parent_tab.parent().find('.ui-tabs-panel');
        $(this).fragment('href', container_id + '=' + siblings.index(parent_tab), 2);
      });

I've attached a working copy of the panels_tabs.js file that includes this functionality, you also have to apply the patch from the other issue first in order to get jQuery BBQ included.

Setting this to needs work as it relies on the other issue to get in before a patch can be written. It would also only work if the theme doesn't completely override the pager structure. I think someone with better jQuery skills could improve this code as well.

joel_osc’s picture

Tested the two patches and they seem to fix the views pagers nicely - nice work mstrelan! It would be nice if these fixed made it into a build to prevent others from running into this. This is a really great module.

haradhansharma’s picture

would you advise pls, where the patch shuld be included! I m new here. pls help.

mstrelan’s picture

In comment #1 you just download the .txt file and rename it to .js but it depends on a patch from another issue, see #1 for the details. To learn how to apply patches on linux/unix see http://drupal.org/patch/apply or for Windows see http://drupal.org/node/60179 and Mac OS see http://drupal.org/node/60818

haradhansharma’s picture

thnx mstrelan, I am grateful to you! It is working!

drupalok’s picture

+1 to get this into a release. PLEASE!!! :)

neoxavier’s picture

Title: Views pagers in tabs don't remember the last tab selection » Pager should remember the tab
Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes

I edit the title a bit, in order to make the patch naming easier.

I rerolled the patch againts 7.x-2.x-dev's HEAD. This patch will work only if you have from this issue applied beforehand. https://www.drupal.org/node/821334#comment-10280567

The patch will be in the next comment

neoxavier’s picture

here is the patch mentioned in #7

The patch will not work unless to have this patch as well https://www.drupal.org/node/821334#comment-10280567

neoxavier’s picture

I made a new patch that basically combination between patch from https://www.drupal.org/node/821334 and https://www.drupal.org/node/1560234 and I reroll it against the 2.x dev HEAD.

You can find it here https://www.drupal.org/node/2561029