mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
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()`.
This commit is contained in:
parent
b3696e1e3b
commit
31b60d82fc
12 changed files with 50 additions and 48 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue