Repository: couchdb-fauxton Updated Branches: refs/heads/master aae7b7c72 -> ec16a8076
Fire event when navbar size changes Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/ec16a807 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/ec16a807 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/ec16a807 Branch: refs/heads/master Commit: ec16a80762c4cb2718e543c21ae7f67c82f4560c Parents: aae7b7c Author: Garren Smith <[email protected]> Authored: Thu Jan 22 10:30:24 2015 +0200 Committer: Garren Smith <[email protected]> Committed: Thu Jan 22 10:39:22 2015 +0200 ---------------------------------------------------------------------- app/addons/fauxton/components.js | 2 +- app/addons/fauxton/components.react.jsx | 9 +++++---- app/constants.js | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ec16a807/app/addons/fauxton/components.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js index b017129..fa537c1 100644 --- a/app/addons/fauxton/components.js +++ b/app/addons/fauxton/components.js @@ -820,7 +820,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) { }, 500); $(window).resize(resizeEditor); - this.listenTo(FauxtonAPI.Events, FauxtonAPI.constants.EVENTS.BURGER_CLICKED, resizeEditor); + this.listenTo(FauxtonAPI.Events, FauxtonAPI.constants.EVENTS.NAVBAR_SIZE_CHANGED, resizeEditor); }, cleanup: function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ec16a807/app/addons/fauxton/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/components.react.jsx b/app/addons/fauxton/components.react.jsx index f1c35fd..c420a8a 100644 --- a/app/addons/fauxton/components.react.jsx +++ b/app/addons/fauxton/components.react.jsx @@ -11,10 +11,10 @@ // the License. define([ - "api", - "react", - "addons/fauxton/stores", - "addons/fauxton/actions" + 'api', + 'react', + 'addons/fauxton/stores', + 'addons/fauxton/actions' ], function(FauxtonAPI, React, Stores, Actions) { @@ -92,6 +92,7 @@ function(FauxtonAPI, React, Stores, Actions) { setMenuState: function () { $('body').toggleClass('closeMenu', this.state.isMinimized); + FauxtonAPI.Events.trigger(FauxtonAPI.constants.EVENTS.NAVBAR_SIZE_CHANGED, this.state.isMinimized); }, componentDidMount: function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ec16a807/app/constants.js ---------------------------------------------------------------------- diff --git a/app/constants.js b/app/constants.js index 15fd535..7662b5b 100644 --- a/app/constants.js +++ b/app/constants.js @@ -28,7 +28,7 @@ define([], function () { EVENTS: { TRAY_CLOSED: 'tray:closed', TRAY_OPENED: 'tray:opened', - BURGER_CLICKED: 'burger:clicked' + NAVBAR_SIZE_CHANGED: 'navbar:size_changed' }, // documentation URLs
