From d8554ec67e26b4e86c86ee83bb5332b1d5d70215 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 8 Apr 2019 10:58:49 +0300 Subject: Combine to same line. --- client/components/main/layouts.jade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'client/components') diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade index ac2e4bf3..7fd0492e 100644 --- a/client/components/main/layouts.jade +++ b/client/components/main/layouts.jade @@ -1,7 +1,6 @@ head title - meta(name="viewport" - content="maximum-scale=1.0,width=device-width,initial-scale=1.0,user-scalable=0") + meta(name="viewport" content="maximum-scale=1.0,width=device-width,initial-scale=1.0,user-scalable=0") meta(http-equiv="X-UA-Compatible" content="IE=edge") //- XXX We should use pathFor in the following `href` to support the case where the application is deployed with a path prefix, but it seems to be -- cgit v1.2.3-1-g7c22 From dc11e0c79cf7dad5f9988cf77cabf08b8878c9b6 Mon Sep 17 00:00:00 2001 From: hupp-mac-4 Date: Thu, 18 Apr 2019 15:41:23 +0530 Subject: Issue: Full width of lists and space before first list #2336 Resolved #2336 --- client/components/boards/boardBody.styl | 2 +- client/components/lists/list.styl | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'client/components') diff --git a/client/components/boards/boardBody.styl b/client/components/boards/boardBody.styl index 148c6ce1..dfaaa050 100644 --- a/client/components/boards/boardBody.styl +++ b/client/components/boards/boardBody.styl @@ -50,6 +50,6 @@ position() display: flex flex-direction: column margin: 0 - padding: 0 40px 0px 0 + padding: 0 0px 0px 0 overflow-x: hidden overflow-y: auto diff --git a/client/components/lists/list.styl b/client/components/lists/list.styl index 7e4550a4..3b82f07f 100644 --- a/client/components/lists/list.styl +++ b/client/components/lists/list.styl @@ -161,7 +161,7 @@ .mini-list flex: 0 0 60px - height: 60px + height: auto width: 100% border-left: 0px border-bottom: 1px solid darken(white, 20%) @@ -189,7 +189,12 @@ border-bottom: 1px solid darken(white, 20%) .list-header - + padding: 0 12px 0px + border-bottom: 0px solid #e4e4e4 + height: 60px + margin-top: 10px + display: flex + align-items: center .list-header-left-icon display: inline padding: 7px @@ -201,8 +206,10 @@ .list-header-menu-icon position: absolute padding: 7px - top: -@padding + top: 50% + transform: translateY(-50%) right: 17px + font-size: 20px .link-board-wrapper display: flex -- cgit v1.2.3-1-g7c22 From 308417852c218501af60aeae3f947707cc7c64cc Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 19 Apr 2019 14:57:52 +0200 Subject: Search user in admin panel --- client/components/settings/peopleBody.jade | 6 ++++-- client/components/settings/peopleBody.js | 23 ++++++++++++++++++++++- client/components/settings/peopleBody.styl | 17 +++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) (limited to 'client/components') diff --git a/client/components/settings/peopleBody.jade b/client/components/settings/peopleBody.jade index 4d06637e..e459da6e 100644 --- a/client/components/settings/peopleBody.jade +++ b/client/components/settings/peopleBody.jade @@ -3,8 +3,10 @@ template(name="people") unless currentUser.isAdmin | {{_ 'error-notAuthorized'}} else - .content-title + .content-title.ext-box span {{_ 'people'}} + input#searchInput(placeholder="{{_ 'search'}}") + button#searchButton {{_ 'enter'}} .content-body .side-menu ul @@ -103,4 +105,4 @@ template(name="editUserPopup") | {{_ 'password'}} input.js-profile-password(type="password") - input.primary.wide(type="submit" value="{{_ 'save'}}") \ No newline at end of file + input.primary.wide(type="submit" value="{{_ 'save'}}") diff --git a/client/components/settings/peopleBody.js b/client/components/settings/peopleBody.js index a4d70974..245c8884 100644 --- a/client/components/settings/peopleBody.js +++ b/client/components/settings/peopleBody.js @@ -8,6 +8,7 @@ BlazeComponent.extendComponent({ this.error = new ReactiveVar(''); this.loading = new ReactiveVar(false); this.people = new ReactiveVar(true); + this.findUsersOptions = new ReactiveVar({}); this.page = new ReactiveVar(1); this.loadNextPageLocked = false; @@ -26,6 +27,25 @@ BlazeComponent.extendComponent({ }); }); }, + events() { + return [{ + 'click #searchButton'(event) { + const value = $('#searchInput').first().val(); + if (value === '') { + this.findUsersOptions.set({}); + } else { + const regex = new RegExp(value, 'i'); + this.findUsersOptions.set({ + $or: [ + { username: regex }, + { 'profile.fullname': regex }, + { 'emails.address': regex }, + ] + }); + } + } + }]; + }, loadNextPage() { if (this.loadNextPageLocked === false) { this.page.set(this.page.get() + 1); @@ -49,7 +69,8 @@ BlazeComponent.extendComponent({ this.loading.set(w); }, peopleList() { - return Users.find({}, { + // get users in front to cache them + return Users.find(this.findUsersOptions.get(), { fields: {_id: true}, }); }, diff --git a/client/components/settings/peopleBody.styl b/client/components/settings/peopleBody.styl index 84db44a7..fb9d5c6b 100644 --- a/client/components/settings/peopleBody.styl +++ b/client/components/settings/peopleBody.styl @@ -13,3 +13,20 @@ table tr:nth-child(even) background-color: #dddddd; + +.ext-box + display: flex; + flex-direction: row; + height: 34px; + + span + vertical-align: center; + line-height: 34px; + margin-right: 10px; + + input, button + margin: 0 10px 0 0; + padding: 0; + + button + min-width: 60px; -- cgit v1.2.3-1-g7c22 From 070feb4b664cf84613fed378d568a9449c3780e6 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 19 Apr 2019 16:17:17 +0200 Subject: Number of users --- client/components/settings/peopleBody.jade | 9 ++++--- client/components/settings/peopleBody.js | 42 ++++++++++++++++++++---------- client/components/settings/peopleBody.styl | 4 +++ 3 files changed, 38 insertions(+), 17 deletions(-) (limited to 'client/components') diff --git a/client/components/settings/peopleBody.jade b/client/components/settings/peopleBody.jade index e459da6e..30b7a807 100644 --- a/client/components/settings/peopleBody.jade +++ b/client/components/settings/peopleBody.jade @@ -4,9 +4,12 @@ template(name="people") | {{_ 'error-notAuthorized'}} else .content-title.ext-box - span {{_ 'people'}} - input#searchInput(placeholder="{{_ 'search'}}") - button#searchButton {{_ 'enter'}} + .ext-box-left + span {{_ 'people'}} + input#searchInput(placeholder="{{_ 'search'}}") + button#searchButton {{_ 'enter'}} + .ext-box-right + span {{_ 'people-number'}} #{peopleNumber} .content-body .side-menu ul diff --git a/client/components/settings/peopleBody.js b/client/components/settings/peopleBody.js index 245c8884..db7be138 100644 --- a/client/components/settings/peopleBody.js +++ b/client/components/settings/peopleBody.js @@ -9,6 +9,7 @@ BlazeComponent.extendComponent({ this.loading = new ReactiveVar(false); this.people = new ReactiveVar(true); this.findUsersOptions = new ReactiveVar({}); + this.number = new ReactiveVar(0); this.page = new ReactiveVar(1); this.loadNextPageLocked = false; @@ -30,22 +31,30 @@ BlazeComponent.extendComponent({ events() { return [{ 'click #searchButton'(event) { - const value = $('#searchInput').first().val(); - if (value === '') { - this.findUsersOptions.set({}); - } else { - const regex = new RegExp(value, 'i'); - this.findUsersOptions.set({ - $or: [ - { username: regex }, - { 'profile.fullname': regex }, - { 'emails.address': regex }, - ] - }); + this.filterPeople(event); + }, + 'keydown #searchInput'(event) { + if (event.keyCode === 13 && !event.shiftKey) { + this.filterPeople(event); } } }]; }, + filterPeople(event) { + const value = $('#searchInput').first().val(); + if (value === '') { + this.findUsersOptions.set({}); + } else { + const regex = new RegExp(value, 'i'); + this.findUsersOptions.set({ + $or: [ + { username: regex }, + { 'profile.fullname': regex }, + { 'emails.address': regex }, + ] + }); + } + }, loadNextPage() { if (this.loadNextPageLocked === false) { this.page.set(this.page.get() + 1); @@ -69,11 +78,16 @@ BlazeComponent.extendComponent({ this.loading.set(w); }, peopleList() { - // get users in front to cache them - return Users.find(this.findUsersOptions.get(), { + const users = Users.find(this.findUsersOptions.get(), { fields: {_id: true}, }); + this.number.set(users.count()); + return users; }, + peopleNumber() { + return this.number.get(); + } + }).register('people'); Template.peopleRow.helpers({ diff --git a/client/components/settings/peopleBody.styl b/client/components/settings/peopleBody.styl index fb9d5c6b..b98c5340 100644 --- a/client/components/settings/peopleBody.styl +++ b/client/components/settings/peopleBody.styl @@ -19,6 +19,10 @@ table flex-direction: row; height: 34px; + .ext-box-left + display: flex; + width: 40% + span vertical-align: center; line-height: 34px; -- cgit v1.2.3-1-g7c22 From e63eee0c68d35a155da79f31ab18ddc5a76bde13 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 19 Apr 2019 16:39:14 +0200 Subject: fix lints --- client/components/settings/peopleBody.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'client/components') diff --git a/client/components/settings/peopleBody.js b/client/components/settings/peopleBody.js index db7be138..3ec96bb0 100644 --- a/client/components/settings/peopleBody.js +++ b/client/components/settings/peopleBody.js @@ -30,17 +30,17 @@ BlazeComponent.extendComponent({ }, events() { return [{ - 'click #searchButton'(event) { - this.filterPeople(event); + 'click #searchButton'() { + this.filterPeople(); }, 'keydown #searchInput'(event) { if (event.keyCode === 13 && !event.shiftKey) { - this.filterPeople(event); + this.filterPeople(); } - } + }, }]; }, - filterPeople(event) { + filterPeople() { const value = $('#searchInput').first().val(); if (value === '') { this.findUsersOptions.set({}); @@ -51,7 +51,7 @@ BlazeComponent.extendComponent({ { username: regex }, { 'profile.fullname': regex }, { 'emails.address': regex }, - ] + ], }); } }, @@ -86,8 +86,7 @@ BlazeComponent.extendComponent({ }, peopleNumber() { return this.number.get(); - } - + }, }).register('people'); Template.peopleRow.helpers({ -- cgit v1.2.3-1-g7c22 From 5993d6862bb5f25070fe5158a5f88cb04c178b67 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 20 Apr 2019 16:46:26 +0300 Subject: Change enter => search --- client/components/settings/peopleBody.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components') diff --git a/client/components/settings/peopleBody.jade b/client/components/settings/peopleBody.jade index 30b7a807..4dca5cb1 100644 --- a/client/components/settings/peopleBody.jade +++ b/client/components/settings/peopleBody.jade @@ -7,7 +7,7 @@ template(name="people") .ext-box-left span {{_ 'people'}} input#searchInput(placeholder="{{_ 'search'}}") - button#searchButton {{_ 'enter'}} + button#searchButton {{_ 'search'}} .ext-box-right span {{_ 'people-number'}} #{peopleNumber} .content-body -- cgit v1.2.3-1-g7c22