From c80acaa3f025f54f9a910e640db765bb8164a399 Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Tue, 10 Jun 2014 17:08:19 -0400 Subject: [PATCH] added copyable clientid display to client table --- .../src/main/webapp/resources/js/client.js | 14 ++++++++++++-- .../src/main/webapp/resources/template/client.html | 5 ++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/openid-connect-server-webapp/src/main/webapp/resources/js/client.js b/openid-connect-server-webapp/src/main/webapp/resources/js/client.js index cf9638069..08f4b56d3 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/js/client.js +++ b/openid-connect-server-webapp/src/main/webapp/resources/js/client.js @@ -194,6 +194,8 @@ var ClientView = Backbone.View.extend({ $('.client-more-info-block', this.el).html(this.moreInfoTemplate({client: this.model.toJSON()})); + $('.clientid-full', this.el).hide(); + this.$('.dynamically-registered').tooltip({title: 'This client was dynamically registered'}); return this; @@ -203,7 +205,8 @@ var ClientView = Backbone.View.extend({ "click .btn-edit":"editClient", "click .btn-delete":"deleteClient", "click .btn-whitelist":"whiteListClient", - 'click .toggleMoreInformation': 'toggleMoreInformation' + 'click .toggleMoreInformation': 'toggleMoreInformation', + "click .clientid-substring":"showClientId" }, editClient:function (e) { @@ -277,6 +280,13 @@ var ClientView = Backbone.View.extend({ } }, + showClientId:function(e) { + e.preventDefault(); + + $('.clientid-full', this.el).show(); + + }, + close:function () { $(this.el).unbind(); $(this.el).empty(); @@ -918,7 +928,7 @@ var ClientFormView = Backbone.View.extend({ $("#refresh-token-timeout-time", this.$el).prop('disabled',true); $("#refresh-token-timeout-unit", this.$el).prop('disabled',true); } - + // toggle other dynamic fields this.toggleClientCredentials(); this.previewLogo(); diff --git a/openid-connect-server-webapp/src/main/webapp/resources/template/client.html b/openid-connect-server-webapp/src/main/webapp/resources/template/client.html index ad61a94cb..bd135bdde 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/template/client.html +++ b/openid-connect-server-webapp/src/main/webapp/resources/template/client.html @@ -29,7 +29,10 @@
- <%= client.clientName != null ? client.clientName : ( client.clientId.substr(0,8) + '...' ) %> + <%= client.clientName != null ? client.clientName : ( client.clientId.substr(0,8) + '...' ) %> +
+
+
<% if (client.dynamicallyRegistered) { %>