Commit 510eb730 authored by ginkgofjg's avatar ginkgofjg

#12: Added auto-scroll-up functionality between steps to crmUiWizard.

parent c08c2bcd
......@@ -875,6 +875,20 @@
},
link: function (scope, element, attrs) {
scope.ts = CRM.ts(null);
element.find('.crm-wizard-buttons button').click(function () {
// These values are captured inside the click handler to ensure the
// positions/sizes of the elements are captured at the time of the
// click vs. at the time this directive is initialized.
var topOfWizard = element.offset().top;
var heightOfMenu = $('#civicrm-menu').height() || 0;
$('html')
// stop any other animations that might be happening...
.stop()
// gracefully slide the user to the top of the wizard
.animate({scrollTop: topOfWizard - heightOfMenu}, 1000);
});
}
};
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment