summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-12-17 23:42:30 +0200
committerLauri Ojansivu <x@xet7.org>2019-12-17 23:42:30 +0200
commit3b3950369ce07aa9e6fc4ab1bef9fb8a4993e398 (patch)
treec38869d02bd5f31f55b4dd4d15df7982b837c40c /client/components
parenta4dbe982991acc50a3c200f65af1377ce9499fa1 (diff)
downloadwekan-3b3950369ce07aa9e6fc4ab1bef9fb8a4993e398.tar.gz
wekan-3b3950369ce07aa9e6fc4ab1bef9fb8a4993e398.tar.bz2
wekan-3b3950369ce07aa9e6fc4ab1bef9fb8a4993e398.zip
Fix comment text disappearing when clicking outside of comment text area.
Fix lint error. Thanks to xet7 !
Diffstat (limited to 'client/components')
-rw-r--r--client/components/activities/comments.js3
-rw-r--r--client/components/users/userHeader.js34
2 files changed, 12 insertions, 25 deletions
diff --git a/client/components/activities/comments.js b/client/components/activities/comments.js
index 95084646..50ca019b 100644
--- a/client/components/activities/comments.js
+++ b/client/components/activities/comments.js
@@ -16,9 +16,6 @@ BlazeComponent.extendComponent({
events() {
return [
{
- 'click .js-new-comment:not(.focus)'() {
- commentFormIsOpen.set(true);
- },
'submit .js-new-comment-form'(evt) {
const input = this.getInput();
const text = input.val().trim();
diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js
index e0c6218e..5f36ef54 100644
--- a/client/components/users/userHeader.js
+++ b/client/components/users/userHeader.js
@@ -180,24 +180,20 @@ Template.changeSettingsPopup.helpers({
currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).showDesktopDragHandles;
+ } else if (cookies.has('showDesktopDragHandles')) {
+ return true;
} else {
- if (cookies.has('showDesktopDragHandles')) {
- return true;
- } else {
- return false;
- }
+ return false;
}
},
hiddenSystemMessages() {
currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).hasHiddenSystemMessages;
+ } else if (cookies.has('hasHiddenSystemMessages')) {
+ return true;
} else {
- if (cookies.has('hasHiddenSystemMessages')) {
- return true;
- } else {
- return false;
- }
+ return false;
}
},
showCardsCountAt() {
@@ -205,8 +201,6 @@ Template.changeSettingsPopup.helpers({
if (currentUser) {
return Meteor.user().getLimitToShowCardsCount();
} else {
- import { Cookies } from 'meteor/ostrio:cookies';
- const cookies = new Cookies();
return cookies.get('limitToShowCardsCount');
}
},
@@ -217,24 +211,20 @@ Template.changeSettingsPopup.events({
currentUser = Meteor.user();
if (currentUser) {
Meteor.call('toggleDesktopDragHandles');
+ } else if (cookies.has('showDesktopDragHandles')) {
+ cookies.remove('showDesktopDragHandles');
} else {
- if (cookies.has('showDesktopDragHandles')) {
- cookies.remove('showDesktopDragHandles');
- } else {
- cookies.set('showDesktopDragHandles', 'true');
- }
+ cookies.set('showDesktopDragHandles', 'true');
}
},
'click .js-toggle-system-messages'() {
currentUser = Meteor.user();
if (currentUser) {
Meteor.call('toggleSystemMessages');
+ } else if (cookies.has('hasHiddenSystemMessages')) {
+ cookies.remove('hasHiddenSystemMessages');
} else {
- if (cookies.has('hasHiddenSystemMessages')) {
- cookies.remove('hasHiddenSystemMessages');
- } else {
- cookies.set('hasHiddenSystemMessages', 'true');
- }
+ cookies.set('hasHiddenSystemMessages', 'true');
}
},
'click .js-apply-show-cards-at'(event, templateInstance) {