diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-08-24 23:30:56 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-08-25 18:08:04 +0200 |
commit | 07cc454b410a2b027960971662757810bd301f5d (patch) | |
tree | 2f3c29e06eb1e35fe88925c0cbc1140a9895d066 /client | |
parent | 9bea6a52d32c843d277640e42785a8faac583a63 (diff) | |
download | wekan-07cc454b410a2b027960971662757810bd301f5d.tar.gz wekan-07cc454b410a2b027960971662757810bd301f5d.tar.bz2 wekan-07cc454b410a2b027960971662757810bd301f5d.zip |
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.
Diffstat (limited to 'client')
-rw-r--r-- | client/components/cards/details.js | 9 | ||||
-rw-r--r-- | client/components/forms/inlinedform.js | 8 | ||||
-rw-r--r-- | client/lib/escapeActions.js | 15 |
3 files changed, 12 insertions, 20 deletions
diff --git a/client/components/cards/details.js b/client/components/cards/details.js index 05da2053..7c09ba81 100644 --- a/client/components/cards/details.js +++ b/client/components/cards/details.js @@ -40,11 +40,10 @@ BlazeComponent.extendComponent({ }, events: function() { - // XXX We can't define this event directly in the event map below because we - // miss ES6 object keys interpolation. - var events = {}; - events[CSSEvents.animationend + ' .js-card-details'] = function() { - this.isLoaded.set(true); + var events = { + [CSSEvents.animationend + ' .js-card-details']: function() { + this.isLoaded.set(true); + } }; return [_.extend(events, { diff --git a/client/components/forms/inlinedform.js b/client/components/forms/inlinedform.js index 2988738c..09c75ce1 100644 --- a/client/components/forms/inlinedform.js +++ b/client/components/forms/inlinedform.js @@ -70,12 +70,10 @@ BlazeComponent.extendComponent({ // Close the inlined form when after its submission submit: function() { - var self = this; - // XXX Swith to an arrow function here when we'll have ES6 if (this.currentData().autoclose !== false) { - Tracker.afterFlush(function() { - self.close(); - self.callFirstWith(self, 'resetCache'); + Tracker.afterFlush(() => { + this.close(); + this.callFirstWith(this, 'resetCache'); }); } } 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() { |