From 07cc454b410a2b027960971662757810bd301f5d Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Mon, 24 Aug 2015 23:30:56 +0200 Subject: Upgrade meteor to 1.2-rc.4 and package versions The new version of meteor speeds up the reload cycle, which is super valuable during the development. I also removed the "imply-everything" "meteor-platform" package in favor of a more fined-grained package selection. This version also introduces ES6 support with transparent babeljs transpilation. Most features are enable (with the notable exception of ES6 modules) and this commit started to use them in places where a XXX comment suggested it. --- client/lib/escapeActions.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'client/lib/escapeActions.js') diff --git a/client/lib/escapeActions.js b/client/lib/escapeActions.js index 3d08e2e3..1173dc46 100644 --- a/client/lib/escapeActions.js +++ b/client/lib/escapeActions.js @@ -17,25 +17,20 @@ EscapeActions = { 'sidebarView' ], - register: function(label, action, condition, options) { - condition = condition || function() { return true; }; - options = options || {}; - - // XXX Rewrite this with ES6: .push({ priority, condition, action }) + register: function(label, action, condition = () => true, options = {}) { var priority = this.hierarchy.indexOf(label); if (priority === -1) { throw Error('You must define the label in the EscapeActions hierarchy'); } this._actions.push({ - priority: priority, - condition: condition, - action: action, + priority, + condition, + action, noClickEscapeOn: options.noClickEscapeOn, enabledOnClick: !! options.enabledOnClick }); - // XXX Rewrite this with ES6: => function - this._actions = _.sortBy(this._actions, function(a) { return a.priority; }); + this._actions = _.sortBy(this._actions, (a) => { return a.priority; }); }, executeLowest: function() { -- cgit v1.2.3-1-g7c22