From: Daniel Ruf Date: Sat, 24 Mar 2018 23:03:16 +0000 (+0100) Subject: fix: use new offCanvas event naming scheme X-Git-Tag: v6.6.0~3^2~73^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fa93a3142c1ebf74e31426efd9a5396f980f9db;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: use new offCanvas event naming scheme --- diff --git a/js/foundation.offcanvas.js b/js/foundation.offcanvas.js index 12ddd120a..62885a617 100644 --- a/js/foundation.offcanvas.js +++ b/js/foundation.offcanvas.js @@ -366,7 +366,7 @@ class OffCanvas extends Plugin { * Fires when the off-canvas menu closes. * @event OffCanvas#close */ - this.$element.trigger('close.zf.offcanvas'); + this.$element.trigger('close.zf.offCanvas'); var _this = this; @@ -406,7 +406,7 @@ class OffCanvas extends Plugin { * Fires when the off-canvas menu is closed. * @event OffCanvas#closed */ - _this.$element.trigger('closed.zf.offcanvas'); + _this.$element.trigger('closed.zf.offCanvas'); }); } diff --git a/test/javascript/components/offcanvas.js b/test/javascript/components/offcanvas.js index dfb7800c6..86cd12d5e 100644 --- a/test/javascript/components/offcanvas.js +++ b/test/javascript/components/offcanvas.js @@ -190,12 +190,11 @@ describe('Off Canvas', function() { plugin.open(); }); - it('fires close.zf.offcanvas event', function(done) { + it('fires close.zf.offCanvas event', function(done) { $html = $(template).appendTo('body'); plugin = new Foundation.OffCanvas($html.find('[data-off-canvas]'), {}); - - $html.one('opened.zf.offcanvas', function() { - $html.one('close.zf.offcanvas', function() { + $html.one('opened.zf.offCanvas', function() { + $html.one('close.zf.offCanvas', function() { done(); }); @@ -206,14 +205,14 @@ describe('Off Canvas', function() { plugin.open(); }); - it('fires closed.zf.offcanvas event', function(done) { + it('fires closed.zf.offCanvas event', function(done) { $html = $(template).appendTo('body'); plugin = new Foundation.OffCanvas($html.find('[data-off-canvas]'), {}); - $html.one('opened.zf.offcanvas', function() { - $html.one('close.zf.offcanvas', function() { + $html.one('opened.zf.offCanvas', function() { + $html.one('close.zf.offCanvas', function() { plugin.$element.one(Foundation.transitionend(plugin.$element), function() { - $html.one('closed.zf.offcanvas', function () { + $html.one('closed.zf.offCanvas', function () { done(); }); });