diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-10-23 16:56:55 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-10-23 16:56:55 +0200 |
commit | 31b60d82fcae64a844805a2a76a0af25fb9c16c2 (patch) | |
tree | a82d7d6e6097f67215406ea47a11671292a4dc7b | |
parent | b3696e1e3b366770af8c41861b5cf996cdd2378a (diff) | |
download | wekan-31b60d82fcae64a844805a2a76a0af25fb9c16c2.tar.gz wekan-31b60d82fcae64a844805a2a76a0af25fb9c16c2.tar.bz2 wekan-31b60d82fcae64a844805a2a76a0af25fb9c16c2.zip |
Upgrade Meteor to 1.2.1-rc4
This version includes a more complete selection of ES2015 polyfills
that I started used across the code base, for instance by replacing
`$.trim(str)` by `str.trim()`.
-rw-r--r-- | .meteor/release | 2 | ||||
-rw-r--r-- | .meteor/versions | 36 | ||||
-rw-r--r-- | client/components/activities/activities.js | 4 | ||||
-rw-r--r-- | client/components/activities/comments.js | 12 | ||||
-rw-r--r-- | client/components/boards/boardBody.js | 6 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 6 | ||||
-rw-r--r-- | client/components/lists/listBody.js | 6 | ||||
-rw-r--r-- | client/components/lists/listHeader.js | 6 | ||||
-rw-r--r-- | client/components/main/editor.js | 8 | ||||
-rw-r--r-- | client/components/users/userHeader.js | 6 | ||||
-rw-r--r-- | models/boards.js | 4 | ||||
-rw-r--r-- | sandstorm.js | 2 |
12 files changed, 50 insertions, 48 deletions
diff --git a/.meteor/release b/.meteor/release index 5684262a..71252f55 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@1.2.0.2 +METEOR@1.2.1-rc.4 diff --git a/.meteor/versions b/.meteor/versions index 840f09f9..b661658f 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,12 +1,12 @@ 3stack:presence@1.0.3 -accounts-base@1.2.1 -accounts-password@1.1.3 +accounts-base@1.2.2-rc.0 +accounts-password@1.1.4-rc.0 aldeed:collection2@2.5.0 aldeed:simple-schema@1.3.3 alethes:pages@1.8.4 arillo:flow-router-helpers@0.4.5 audit-argument-checks@1.0.4 -autoupdate@1.2.3 +autoupdate@1.2.4-rc.0 babel-compiler@5.8.24_1 babel-runtime@0.1.4 base64@1.0.4 @@ -34,22 +34,22 @@ cfs:storage-adapter@0.2.3 cfs:tempstore@0.1.5 cfs:upload-http@0.0.20 cfs:worker@0.1.4 -check@1.0.6 -coffeescript@1.0.10 +check@1.1.0-rc.0 +coffeescript@1.0.11-rc.0 cosmos:browserify@0.5.1 dburles:collection-helpers@1.0.3 ddp@1.2.2 ddp-client@1.2.1 -ddp-common@1.2.1 +ddp-common@1.2.2-rc.0 ddp-rate-limiter@1.0.0 -ddp-server@1.2.1 +ddp-server@1.2.2-rc.0 deps@1.0.9 diff-sequence@1.0.1 -ecmascript@0.1.5 -ecmascript-collections@0.1.6 +ecmascript@0.1.6-rc.0 +ecmascript-runtime@0.2.6-rc.0 ejson@1.0.7 -email@1.0.7 -es5-shim@4.1.13 +email@1.0.8-rc.0 +es5-shim@4.1.14-rc.0 fastclick@1.0.7 fortawesome:fontawesome@4.4.0 geojson-utils@1.0.4 @@ -71,7 +71,7 @@ localstorage@1.0.5 logging@1.0.8 matb33:collection-hooks@0.8.1 matteodem:easy-search@1.6.4 -meteor@1.1.9 +meteor@1.1.10-rc.0 meteor-base@1.0.1 meteor-platform@1.2.3 meteorhacks:aggregate@1.3.0 @@ -82,7 +82,7 @@ meteorspark:util@0.2.0 minifiers@1.1.7 minimongo@1.0.10 mobile-status-bar@1.0.6 -mongo@1.1.2 +mongo@1.1.3-rc.0 mongo-id@1.0.1 mongo-livedata@1.0.9 mousetrap:mousetrap@1.4.6_1 @@ -107,10 +107,10 @@ peerlibrary:blaze-components@0.14.0 peerlibrary:computed-field@0.3.0 peerlibrary:reactive-field@0.1.0 perak:markdown@1.0.5 -promise@0.5.0 +promise@0.5.1-rc.0 raix:eventemitter@0.1.3 raix:handlebar-helpers@0.2.5 -random@1.0.4 +random@1.0.5-rc.0 rate-limit@1.0.0 reactive-dict@1.1.2 reactive-var@1.0.6 @@ -126,10 +126,10 @@ softwarerero:accounts-t9n@1.1.4 spacebars@1.0.7 spacebars-compiler@1.0.7 srp@1.0.4 -standard-minifiers@1.0.1 +standard-minifiers@1.0.2-rc.0 tap:i18n@1.7.0 templates:tabs@2.2.0 -templating@1.1.4 +templating@1.1.5-rc.0 templating-tools@1.0.0 tracker@1.0.9 ui@1.0.8 @@ -139,6 +139,6 @@ useraccounts:core@1.12.4 useraccounts:flow-routing@1.12.4 useraccounts:unstyled@1.12.4 verron:autosize@3.0.8 -webapp@1.2.2 +webapp@1.2.3-rc.0 webapp-hashing@1.0.5 zimme:active-route@2.3.2 diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index a491c2e8..64e9865d 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -101,9 +101,9 @@ BlazeComponent.extendComponent({ }, 'submit .js-edit-comment'(evt) { evt.preventDefault(); - const commentText = this.currentComponent().getValue(); + const commentText = this.currentComponent().getValue().trim(); const commentId = Template.parentData().commentId; - if ($.trim(commentText)) { + if (commentText) { CardComments.update(commentId, { $set: { text: commentText, diff --git a/client/components/activities/comments.js b/client/components/activities/comments.js index 08401caa..f9bbcff8 100644 --- a/client/components/activities/comments.js +++ b/client/components/activities/comments.js @@ -23,12 +23,13 @@ BlazeComponent.extendComponent({ commentFormIsOpen.set(true); }, 'submit .js-new-comment-form'(evt) { - const input = this.getInput(); - if ($.trim(input.val())) { + const input = this.getInput() + const text = input.val().trim(); + if (text) { CardComments.insert({ + text, boardId: this.currentData().boardId, cardId: this.currentData()._id, - text: input.val(), }); resetCommentInput(input); Tracker.flush(); @@ -72,8 +73,9 @@ EscapeActions.register('inlinedForm', docId: Session.get('currentCard'), }; const commentInput = $('.js-new-comment-input'); - if ($.trim(commentInput.val())) { - UnsavedEdits.set(draftKey, commentInput.val()); + const draft = commentInput.val().trim(); + if (draft) { + UnsavedEdits.set(draftKey, draft); } else { UnsavedEdits.reset(draftKey); } diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index 517e53ba..e7cfc791 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -186,10 +186,10 @@ BlazeComponent.extendComponent({ return [{ submit(evt) { evt.preventDefault(); - const title = this.find('.list-name-input'); - if ($.trim(title.value)) { + const title = this.find('.list-name-input').value.trim(); + if (title) { Lists.insert({ - title: title.value, + title, boardId: Session.get('currentBoard'), sort: $('.list').length, }); diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 2d2679ec..fa818c5a 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -75,8 +75,8 @@ BlazeComponent.extendComponent({ }, 'submit .js-card-details-title'(evt) { evt.preventDefault(); - const title = this.currentComponent().getValue(); - if ($.trim(title)) { + const title = this.currentComponent().getValue().trim(); + if (title) { this.data().setTitle(title); } }, @@ -106,7 +106,7 @@ BlazeComponent.extendComponent({ close(isReset = false) { if (this.isOpen.get() && !isReset) { - const draft = $.trim(this.getValue()); + const draft = this.getValue().trim(); if (draft !== Cards.findOne(Session.get('currentCard')).description) { UnsavedEdits.set(this._getUnsavedEditKey(), this.getValue()); } diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 88b31788..25aeffcc 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -12,7 +12,7 @@ BlazeComponent.extendComponent({ options.position = options.position || 'top'; const forms = this.childrenComponents('inlinedForm'); - let form = _.find(forms, (component) => { + let form = forms.find((component) => { return component.data().position === options.position; }); if (!form && forms.length > 0) { @@ -26,7 +26,7 @@ BlazeComponent.extendComponent({ const firstCardDom = this.find('.js-minicard:first'); const lastCardDom = this.find('.js-minicard:last'); const textarea = $(evt.currentTarget).find('textarea'); - const title = textarea.val(); + const title = textarea.val().trim(); const position = this.currentData().position; let sortIndex; if (position === 'top') { @@ -35,7 +35,7 @@ BlazeComponent.extendComponent({ sortIndex = Utils.calculateIndex(lastCardDom, null).base; } - if ($.trim(title)) { + if (title) { const _id = Cards.insert({ title, listId: this.data()._id, diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index b5df2c81..ab547f02 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -6,9 +6,9 @@ BlazeComponent.extendComponent({ editTitle(evt) { evt.preventDefault(); const newTitle = this.childrenComponents('inlinedForm')[0].getValue(); - const list = this.currentData(); - if ($.trim(newTitle)) { - list.rename(newTitle); + const list = this.currentData().trim(); + if (newTitle) { + list.rename(newTitle.trim()); } }, diff --git a/client/components/main/editor.js b/client/components/main/editor.js index 168c85d0..82fce641 100644 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -8,8 +8,8 @@ Template.editor.onRendered(() => { { match: /\B:([\-+\w]*)$/, search(term, callback) { - callback($.map(Emoji.values, (emoji) => { - return emoji.indexOf(term) === 0 ? emoji : null; + callback(Emoji.values.map((emoji) => { + return emoji.includes(term) ? emoji : null; })); }, template(value) { @@ -28,9 +28,9 @@ Template.editor.onRendered(() => { match: /\B@(\w*)$/, search(term, callback) { const currentBoard = Boards.findOne(Session.get('currentBoard')); - callback($.map(currentBoard.members, (member) => { + callback(currentBoard.members.map((member) => { const username = Users.findOne(member.userId).username; - return username.indexOf(term) === 0 ? username : null; + return username.includes(term) ? username : null; })); }, template(value) { diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index a7382769..7d35c1b9 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -18,9 +18,9 @@ Template.memberMenuPopup.events({ Template.editProfilePopup.events({ submit(evt, tpl) { evt.preventDefault(); - const fullname = $.trim(tpl.find('.js-profile-fullname').value); - const username = $.trim(tpl.find('.js-profile-username').value); - const initials = $.trim(tpl.find('.js-profile-initials').value); + const fullname = tpl.find('.js-profile-fullname').value.trim(); + const username = tpl.find('.js-profile-username').value.trim(); + const initials = tpl.find('.js-profile-initials').value.trim(); Users.update(Meteor.userId(), {$set: { 'profile.fullname': fullname, 'profile.initials': initials, diff --git a/models/boards.js b/models/boards.js index 1d365a95..98d6ec77 100644 --- a/models/boards.js +++ b/models/boards.js @@ -97,11 +97,11 @@ Boards.helpers({ }, labelIndex(labelId) { - return _.indexOf(_.pluck(this.labels, '_id'), labelId); + return _.pluck(this.labels, '_id').indexOf(labelId); }, memberIndex(memberId) { - return _.indexOf(_.pluck(this.members, 'userId'), memberId); + return _.pluck(this.members, 'userId').indexOf(memberId); }, absoluteUrl() { diff --git a/sandstorm.js b/sandstorm.js index b3006454..51f8ba34 100644 --- a/sandstorm.js +++ b/sandstorm.js @@ -27,7 +27,7 @@ if (isSandstorm && Meteor.isServer) { const permissionDoc = { userId, isActive, isAdmin }; const boardMembers = Boards.findOne(sandstormBoard._id).members; - const memberIndex = _.indexOf(_.pluck(boardMembers, 'userId'), userId); + const memberIndex = _.pluck(boardMembers, 'userId').indexOf(userId); let modifier; if (memberIndex > -1) |