From commits-return-37253-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Tue Jan 16 22:10:23 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 7863E18065B for ; Tue, 16 Jan 2018 22:10:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6851B160C34; Tue, 16 Jan 2018 21:10:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 70553160C1D for ; Tue, 16 Jan 2018 22:10:22 +0100 (CET) Received: (qmail 82625 invoked by uid 500); 16 Jan 2018 21:10:21 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 82616 invoked by uid 99); 16 Jan 2018 21:10:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jan 2018 21:10:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 835A1E0341; Tue, 16 Jan 2018 21:10:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kdoran@apache.org To: commits@nifi.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: nifi-registry git commit: [NIFIREG-116] update New Policy dialog checkbox UI/UX Date: Tue, 16 Jan 2018 21:10:21 +0000 (UTC) Repository: nifi-registry Updated Branches: refs/heads/master 800365dc9 -> 7720a7cc3 [NIFIREG-116] update New Policy dialog checkbox UI/UX This closes #84. Signed-off-by: Kevin Doran Project: http://git-wip-us.apache.org/repos/asf/nifi-registry/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi-registry/commit/7720a7cc Tree: http://git-wip-us.apache.org/repos/asf/nifi-registry/tree/7720a7cc Diff: http://git-wip-us.apache.org/repos/asf/nifi-registry/diff/7720a7cc Branch: refs/heads/master Commit: 7720a7cc3351b96d44624d9c121345b9a4d61b74 Parents: 800365d Author: Scott Aslan Authored: Thu Jan 11 21:27:46 2018 -0500 Committer: Kevin Doran Committed: Tue Jan 16 16:09:40 2018 -0500 ---------------------------------------------------------------------- .../core/common/styles/_checkboxes.scss | 4 -- .../platform/core/common/styles/_tables.scss | 2 + .../nf-registry-add-policy-to-bucket.html | 50 +++++++++----------- .../nf-registry-add-policy-to-bucket.js | 31 ++++++++++++ 4 files changed, 56 insertions(+), 31 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7720a7cc/nifi-registry-web-ui/src/main/platform/core/common/styles/_checkboxes.scss ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/platform/core/common/styles/_checkboxes.scss b/nifi-registry-web-ui/src/main/platform/core/common/styles/_checkboxes.scss index 4e5aeb2..353ec0a 100644 --- a/nifi-registry-web-ui/src/main/platform/core/common/styles/_checkboxes.scss +++ b/nifi-registry-web-ui/src/main/platform/core/common/styles/_checkboxes.scss @@ -17,10 +17,6 @@ /* Checkboxes */ -body[fds] mat-checkbox { - margin-bottom: 3px; -} - body[fds] .mat-checkbox-inner-container { height: 10px !important; width: 10px !important; http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7720a7cc/nifi-registry-web-ui/src/main/platform/core/common/styles/_tables.scss ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/platform/core/common/styles/_tables.scss b/nifi-registry-web-ui/src/main/platform/core/common/styles/_tables.scss index 02ab2bc..9bfec90 100644 --- a/nifi-registry-web-ui/src/main/platform/core/common/styles/_tables.scss +++ b/nifi-registry-web-ui/src/main/platform/core/common/styles/_tables.scss @@ -24,6 +24,8 @@ body[fds] .td-data-table-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + height: 100%; + line-height: 30px; } body[fds] .td-data-table-column { http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7720a7cc/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.html ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.html b/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.html index 8c89010..8a2c7c5 100644 --- a/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.html +++ b/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.html @@ -36,38 +36,34 @@ limitations under the License.
-
-
-
-
- {{column.format ? - column.format(row[column.name]) : row[column.name]}} -
-
-
- - +
+
+
+ {{column.format ? + column.format(group[column.name]) : group[column.name]}}
+
+ + +
-
-
-
-
- {{column.format ? column.format(row[column.name]) : row[column.name]}} -
-
-
- - +
+
+
+ {{column.format ? column.format(user[column.name]) : user[column.name]}}
+
+ + +
http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7720a7cc/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.js ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.js b/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.js index e2a0a98..b20bff2 100644 --- a/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.js +++ b/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/dialogs/add-policy-to-bucket/nf-registry-add-policy-to-bucket.js @@ -73,10 +73,12 @@ NfRegistryAddPolicyToBucket.prototype = { .subscribe(function (response) { self.users = response[0]; self.users = self.users.filter(function (user) { + user.checked = false; return (self.data.users.indexOf(user.identity) < 0) ? true : false; }); self.groups = response[1]; self.groups = self.groups.filter(function (group) { + group.checked = false; return (self.data.groups.indexOf(group.identity) < 0) ? true : false; }); @@ -355,6 +357,35 @@ NfRegistryAddPolicyToBucket.prototype = { */ cancel: function () { this.dialogRef.close(); + }, + + /** + * Select a user or group. + * + * @param userOrGroup The selected user or group. + * @param type + */ + select: function(userOrGroup, type) { + //deselect all + this.filteredUsers = this.filteredUsers.filter(function (user) { + user.checked = false; + return true; + }); + this.filteredUserGroups = this.filteredUserGroups.filter(function (group) { + group.checked = false; + return true; + }); + userOrGroup.checked = true; + this.userOrGroup = userOrGroup; + this.userOrGroup.type = type; + }, + + /** + * Change event handler for user or group checkboxes + * @param $event + */ + change: function($event){ + $event.source.checked = true; } };