diff options
author | Xavier Priour <xavier.priour@bubblyware.com> | 2015-11-13 12:43:34 +0100 |
---|---|---|
committer | Xavier Priour <xavier.priour@bubblyware.com> | 2015-11-13 12:43:34 +0100 |
commit | a7427b9ae4e790989c49408ffe14aea4976db305 (patch) | |
tree | 3b56c753ce05ba9a5253078e2792b2c485d2912e /client/components/boards/boardBody.js | |
parent | 3dc70b3ea4d49bccb10d4f2b3e317c794da91e37 (diff) | |
parent | cb3bd86396e4d19e1f05fcb94e3527f81e70412e (diff) | |
download | wekan-a7427b9ae4e790989c49408ffe14aea4976db305.tar.gz wekan-a7427b9ae4e790989c49408ffe14aea4976db305.tar.bz2 wekan-a7427b9ae4e790989c49408ffe14aea4976db305.zip |
merge with /devel
Diffstat (limited to 'client/components/boards/boardBody.js')
-rw-r--r-- | client/components/boards/boardBody.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index 517e53ba..5a74e61b 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -34,7 +34,7 @@ BlazeComponent.extendComponent({ }, openNewListForm() { - this.childrenComponents('addListForm')[0].open(); + this.childComponents('addListForm')[0].open(); }, // XXX Flow components allow us to avoid creating these two setter methods by @@ -45,7 +45,8 @@ BlazeComponent.extendComponent({ }, scrollLeft(position = 0) { - this.$('.js-lists').animate({ + const lists = this.$('.js-lists'); + lists && lists.animate({ scrollLeft: position, }); }, @@ -179,22 +180,24 @@ BlazeComponent.extendComponent({ // Proxy open() { - this.childrenComponents('inlinedForm')[0].open(); + this.childComponents('inlinedForm')[0].open(); }, events() { return [{ submit(evt) { evt.preventDefault(); - const title = this.find('.list-name-input'); - if ($.trim(title.value)) { + const titleInput = this.find('.list-name-input'); + const title = titleInput.value.trim(); + if (title) { Lists.insert({ - title: title.value, + title, boardId: Session.get('currentBoard'), sort: $('.list').length, }); - title.value = ''; + titleInput.value = ''; + titleInput.focus(); } }, }]; |