From 468694a84cc164e4923f2d2e4631c37ceb1c4b55 Mon Sep 17 00:00:00 2001 From: Xavier Priour Date: Thu, 15 Oct 2015 14:01:13 +0200 Subject: Import board: added UI --- client/components/boards/boardHeader.jade | 2 ++ client/components/boards/boardHeader.js | 1 + client/components/boards/boardHeader.styl | 2 ++ 3 files changed, 5 insertions(+) create mode 100644 client/components/boards/boardHeader.styl (limited to 'client/components/boards') diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade index ffc79143..e460170b 100644 --- a/client/components/boards/boardHeader.jade +++ b/client/components/boards/boardHeader.jade @@ -107,6 +107,8 @@ template(name="createBoardPopup") | {{{_ 'board-private-info'}}} a.js-change-visibility {{_ 'change'}}. input.primary.wide(type="submit" value="{{_ 'create'}}") + | {{_ 'or'}} + a.js-import {{_ 'import-board'}} template(name="boardChangeTitlePopup") diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index dbd76895..92d5f6d4 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -145,6 +145,7 @@ BlazeComponent.extendComponent({ this.setVisibility(this.currentData()); }, 'click .js-change-visibility': this.toggleVisibilityMenu, + 'click .js-import': Popup.open('boardImportBoard'), submit: this.onSubmit, }]; }, diff --git a/client/components/boards/boardHeader.styl b/client/components/boards/boardHeader.styl new file mode 100644 index 00000000..adfe4b19 --- /dev/null +++ b/client/components/boards/boardHeader.styl @@ -0,0 +1,2 @@ +a.js-import + text-decoration underline -- cgit v1.2.3-1-g7c22 From 118b434a5aad35df8eefea85624ab9abafab56f0 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Tue, 20 Oct 2015 20:02:12 +0200 Subject: Provide a default date for lists and cards creation date See https://github.com/wekan/wekan/pull/362#issuecomment-149645497 for motivation. This commit also contains cosmetic changes to the import Popup and on the code style to be more consistent with the code base. --- client/components/boards/boardHeader.jade | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/components/boards') diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade index e460170b..cb86e9bb 100644 --- a/client/components/boards/boardHeader.jade +++ b/client/components/boards/boardHeader.jade @@ -107,8 +107,9 @@ template(name="createBoardPopup") | {{{_ 'board-private-info'}}} a.js-change-visibility {{_ 'change'}}. input.primary.wide(type="submit" value="{{_ 'create'}}") - | {{_ 'or'}} - a.js-import {{_ 'import-board'}} + span.quiet + | {{_ 'or'}} + a.js-import {{_ 'import-board'}} template(name="boardChangeTitlePopup") -- cgit v1.2.3-1-g7c22 From c6b12dc5ada1b37d759796fefe0dbc5b327f130c Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Wed, 21 Oct 2015 04:34:44 +0200 Subject: Upgrade peerlibrary:blaze-components to v0.14 This change includes method renames and others UI related packages updates. --- client/components/boards/boardBody.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/components/boards') diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index 95590beb..517e53ba 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -34,7 +34,7 @@ BlazeComponent.extendComponent({ }, openNewListForm() { - this.componentChildren('addListForm')[0].open(); + this.childrenComponents('addListForm')[0].open(); }, // XXX Flow components allow us to avoid creating these two setter methods by @@ -179,7 +179,7 @@ BlazeComponent.extendComponent({ // Proxy open() { - this.componentChildren('inlinedForm')[0].open(); + this.childrenComponents('inlinedForm')[0].open(); }, events() { -- cgit v1.2.3-1-g7c22 From 31b60d82fcae64a844805a2a76a0af25fb9c16c2 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Fri, 23 Oct 2015 16:56:55 +0200 Subject: 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()`. --- client/components/boards/boardBody.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/components/boards') 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, }); -- cgit v1.2.3-1-g7c22 From 68521fc1c3d52b6b7b6d39931618c90338b5b3aa Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Thu, 29 Oct 2015 15:31:33 +0100 Subject: Update packages and update Meteor to 1.2.1 Blaze-components had yet another methods rename. --- client/components/boards/boardBody.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/components/boards') diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index e7cfc791..28257d00 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 @@ -179,7 +179,7 @@ BlazeComponent.extendComponent({ // Proxy open() { - this.childrenComponents('inlinedForm')[0].open(); + this.childComponents('inlinedForm')[0].open(); }, events() { -- cgit v1.2.3-1-g7c22 From dd3cdf3945b26c70b00b5c9c1dd13c74eaed2f8b Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Thu, 29 Oct 2015 23:08:27 +0100 Subject: Fix some bugs introduced in aa974aa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Yes Wekan need some tests. Yes I need to stop refactoring my code when I’m halp-sleeping in my bed at 4am. --- client/components/boards/boardBody.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client/components/boards') 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(); } }, }]; -- cgit v1.2.3-1-g7c22