Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cimo75’s picture

+1

cimo75’s picture

A bit hackish but it gets the work done, get into the accordion function call and ad a subclass as follow

          /* jQuery UI accordion call */
          $(displaySelector +':not(.ui-accordion)').accordion({
              header: headerSelector,
              animated: "slowslide",
              active: this.rowstartopen,
              collapsible: this.collapsible,
              autoHeight: this.autoheight,
              event: this.event,
              fillSpace: this.fillspace,
              navigation: this.navigation,
              clearstyle: this.clearstyle,
              animate: 8000
          });
          $.extend($.ui.accordion.animations, {
            slowslide: function(options) {
            $.ui.accordion.animations.slide(options, { duration: 1000 }); }
          });
markdc’s picture

Issue summary: View changes

I tried this and couldn't get it to work in 7.x-1.1. Is there another solution, or should this still work? I want no animation and 0ms transition. Thanks in advance.

ishani.addweb’s picture

Status: Active » Needs review

@fatmarker, Tried with the given solution & got the solution. Please review it & let me know if you have any query.

->To speed and change the speed of the slide of view accordion following change have to perform.
->First, go to view accordion modules views-accordion.js file and put the following function:

 /* jQuery UI accordion call */
$(displaySelector + ':not(.ui-accordion)').accordion({
  header: headerSelector,
  animated: ""fast"",
  active: this.rowstartopen,
  collapsible: this.collapsible,
  autoHeight: this.autoheight,
  event: this.event,
  fillSpace: this.fillspace,
  navigation: this.navigation,
  clearstyle: this.clearstyle,
  animate: 80
});

Thanks

Manuel Garcia’s picture

Title: How to change the toggle speed » Add support for animation duration
Category: Support request » Feature request
FileSize
2.01 KB

Thanks for the report, lets turn this around, and try to add support to configure this in the module.

Please help by testing the attached patch and report back your findings :)

Manuel Garcia’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
kostyashupenko’s picture

Assigned: Unassigned » kostyashupenko
kostyashupenko’s picture

Assigned: kostyashupenko » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
1.94 KB
Manuel Garcia’s picture

Thanks @kostyashupenko - the reroll looks good.

It should work fine, but I'd like someone to test this on a local site before committing to be on the safe side.

Manuel Garcia’s picture

Title: Add support for animation duration » Add support for animation duration on jQuery >= 1.9
FileSize
4.42 KB
3.9 KB

OK, finally got around to spend some time on this.

Some important findings:

  1. For jQuery >= 1.9, Animation effect was not actually working, so this means this option was not working for pretty much for any site using jquery_update...
  2. The animation duration is only available for jQuery 1.9 and upwards (ie. you need jquery_update module if you want to make use of this)

So, in this patch:

  • Fixes the bug described in point 1 above.
  • Adds the new duration option only if the site is configured to use jQuery 1.9 or later.
  • Adds a validator for the new option using views_element_validate_integer
Manuel Garcia’s picture

Fixing a bug in the previous patch where if you select animation style none, jquery ui still used the duration time to animate it. Now if you select none you wont see any animation which is the expected behaviour.

Manuel Garcia’s picture

The slide easing effect was removed from jQuery UI on newer versions, accounting for that here.

  • Manuel Garcia committed 32c7753 on 7.x-1.x
    Issue #1675010 by Manuel Garcia, kostyashupenko: Add support for...
Manuel Garcia’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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