summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-10-29 23:08:27 +0100
committerMaxime Quandalle <maxime@quandalle.com>2015-10-29 23:17:21 +0100
commitdd3cdf3945b26c70b00b5c9c1dd13c74eaed2f8b (patch)
tree3ba21510a19a09a5b50c0522caf74e0cd21c0e93 /client
parente92f67f1910a0a3bc40b85436a89e7d55a04a615 (diff)
downloadwekan-dd3cdf3945b26c70b00b5c9c1dd13c74eaed2f8b.tar.gz
wekan-dd3cdf3945b26c70b00b5c9c1dd13c74eaed2f8b.tar.bz2
wekan-dd3cdf3945b26c70b00b5c9c1dd13c74eaed2f8b.zip
Fix some bugs introduced in aa974aa
Yes Wekan need some tests. Yes I need to stop refactoring my code when I’m halp-sleeping in my bed at 4am.
Diffstat (limited to 'client')
-rw-r--r--client/components/boards/boardBody.js6
-rw-r--r--client/components/lists/listHeader.js4
-rw-r--r--client/components/users/userHeader.js2
-rw-r--r--client/lib/modal.js2
4 files changed, 8 insertions, 6 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index 28257d00..5c1c974f 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -186,7 +186,8 @@ BlazeComponent.extendComponent({
return [{
submit(evt) {
evt.preventDefault();
- const title = this.find('.list-name-input').value.trim();
+ const titleInput = this.find('.list-name-input');
+ const title = titleInput.value.trim();
if (title) {
Lists.insert({
title,
@@ -194,7 +195,8 @@ BlazeComponent.extendComponent({
sort: $('.list').length,
});
- title.value = '';
+ titleInput.value = '';
+ titleInput.focus();
}
},
}];
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js
index ab547f02..dbf9fced 100644
--- a/client/components/lists/listHeader.js
+++ b/client/components/lists/listHeader.js
@@ -5,8 +5,8 @@ BlazeComponent.extendComponent({
editTitle(evt) {
evt.preventDefault();
- const newTitle = this.childrenComponents('inlinedForm')[0].getValue();
- const list = this.currentData().trim();
+ const newTitle = this.childrenComponents('inlinedForm')[0].getValue().trim();
+ const list = this.currentData();
if (newTitle) {
list.rename(newTitle.trim());
}
diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js
index 7d35c1b9..a478da0c 100644
--- a/client/components/users/userHeader.js
+++ b/client/components/users/userHeader.js
@@ -41,7 +41,7 @@ Template.changePasswordPopup.onRendered(function() {
Template.changeLanguagePopup.helpers({
languages() {
- return TAPi18n.getLanguages().map((lang, tag) => {
+ return _.map(TAPi18n.getLanguages(), (lang, tag) => {
const name = lang.name;
return { tag, name };
});
diff --git a/client/lib/modal.js b/client/lib/modal.js
index 7b7516e0..e6301cb5 100644
--- a/client/lib/modal.js
+++ b/client/lib/modal.js
@@ -21,7 +21,7 @@ window.Modal = new class {
}
}
- open(modalName, { onCloseGoTo = ''}) {
+ open(modalName, { onCloseGoTo = ''} = {}) {
this._currentModal.set(modalName);
this._onCloseGoTo = onCloseGoTo;
}