The show/hide of pager and other settings doesn't account for if advanced settings is checked/unchecked

Ie checked advanced settings
Change theme
= > Pager, other settings changed
Uncheck
=> Pager options remain the same.

Leading to different pager options even when not using advanced settings. Cannot reload page to fix due to it running on page load as far as I can tell.

Brief looking at cvs looks like the issue is still there, search of issues didn't turn up anything but I may have missed one.

CommentFileSizeAuthor
#9 Before9.83 KBhefox
#9 After11.3 KBhefox
#9 The ddblock-cycle-block-content.tpl.php27.61 KBhefox

Comments

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)

When not checking advanced there are no themes used at all.
I don't know what you want to accomplish, what you expect and what is different.
Can you give more information?

hefox’s picture

Steps to reproduce

Check Advanced

Change theme to one with limited pager options (like upright20).

Pager options changed to 'prev-next' only.

Uncheck advanced options.

Pager still only 'prev-next'.

Save, and pager still prev-next since the hiding is done onload also.

There's no action on advanced options so hiding done via theme change remains after unchecking advanced options, from what I can tell

hefox’s picture

Actually, this is is much worse than I though.

Since the default template is upright10 for those not using advanced settings, every time it's hiding the prev-next option so re configurig and saving a block the settings are always lost unless manually going up and doing the whole check, select, uncheck and then change pager. It's quite annoying.

ppblaauw’s picture

When not checking advanced there are no themes used at all.
I don't know what you want to accomplish, what you expect and what is different.
Can you give more information?

hefox’s picture

I'm trying to use the previous-next pager. In order for the javascript to realize that it needs to be set in the ddblock settings. So I go to the block configuration and the previous-next pager option is not there. In order to get the previous--next pager option to show up, I need:

to check Advanced Settings

Change to a theme that I know has a previous-next pager

  $('#ddblock-instance-settings #edit-template:not(.ddblock-show-hide-custom-template-options-processed)', context)
  .addClass('ddblock-show-hide-custom-template-options-processed')
  .bind("change", function() {
    val = $('#ddblock-instance-settings #edit-template').val();
    //alert(val);
    switch (val) {
    case "custom" :
      $("#ddblock-custom-template-settings-wrapper").show();
    case "upright10" :
      $('#edit-pager-wrapper #edit-pager').val('number-pager');
      $('#edit-pager-wrapper option[value="number-pager"]').show();
      $('#edit-pager-wrapper option[value="prev-next-pager"]').hide();
      $('#edit-pager-wrapper option[value="custom-pager"]').hide();

That is run, so I check upright20 to get the prev-next pager to show.

Then I uncheck advanced options, and previous-next is now able to be selected via the select box.

Ie.

Drupal.behaviors.ddblockShowHideAdvancedOptions = function(context) {
  // Show/hide slide advanced options depending on the checkbox.
  $('#ddblock-instance-settings #edit-advanced:not(.ddblock-show-hide-advanced-options-processed)', context)
  .addClass('ddblock-show-hide-advanced-options-processed')
  .bind("click change", function() {
    if (this.checked) {

does not .show or .hide the the Number or previous-next pager making it's visibility depend on the the (invisible) theme settings.

ppblaauw’s picture

Why don't you want to use advanced options? What do you want to accomplish?

hefox’s picture

I'm trying to set the pager to previous-next, that is all. I do not want to use advanced options because I don't have any need for that functionality.

I have no need to make a custom ddblock theme when everything I want to do can be accomplished in an overridden ddblock-content.tpl.php in my theme folder. However, previous and next needs to be selected via that multistep hide/unhide ever time I configure that block due to the hide() onchange of theme.

ppblaauw’s picture

Still don't know what you want to accomplish. You tell what you don't want to use but don't say anything about what you want to accomplish. I can not help you further with this.

I can just say:

When you don't use the advanced options, just the views rows should show in the content and pagers and themes should not be supported in that way. That you found a way that you can use a particular pager by first selecting advanced, then selecting a pager and then unselecting advanced does not mean that this is supported by the module.

Can you tell more what you want to accomplish?
Do you have a link to the functionality in question?

hefox’s picture

StatusFileSize
new27.61 KB
new11.3 KB
new9.83 KB

I don't think this is a feature request, but a bug report which may be leading to the confusion.

The first image is the pager field before doing that check advanced, change themes, then uncheck adanced.

The second image is right after; the number pager is no longer available (though the select list still sees it as selected so shows in the select title, however it's not an option in the dropdown) but the previous-next pager.

The third image is the dbblock-cycle-block-content.tpl.php where it checks if the pager is previous-next and use the markup for that instead. The template file supports it; I don't see why the module wouldn't when it's purely a show/hide causing the issue.

As far as I can tell, there is nothing in the onchange advanced settings that is limiting the pager's previous-next option. That is one part of the bug. Also, there's nothing in the onchange function of theme function that checks if advanced settings is checked. That is other part of the bug, since as far as I can tell it's being invoked on page load and limiting the options even if advanced settings is unchecked.

After I get it to say previous-next my showcase block works perfectly fine; this is purely about the block configuration page I believe.