From a88ae8258a8a023f8322da8093085e7ed8ad6170 Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Thu, 15 Nov 2012 16:35:17 -0500 Subject: [PATCH] Updated plus and minus buttons in list views, addresses #202 --- .../src/main/webapp/resources/js/admin.js | 11 +++++++---- .../src/main/webapp/resources/template/admin.html | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/openid-connect-server/src/main/webapp/resources/js/admin.js b/openid-connect-server/src/main/webapp/resources/js/admin.js index 78dbaa2b0..0e1b0c0bb 100644 --- a/openid-connect-server/src/main/webapp/resources/js/admin.js +++ b/openid-connect-server/src/main/webapp/resources/js/admin.js @@ -33,7 +33,8 @@ tagName: 'tr', events:{ - "click .icon-minus-sign":function () { + "click .btn":function (e) { + e.preventDefault(); this.$el.tooltip('destroy'); this.model.destroy(); } @@ -60,7 +61,7 @@ }), events:{ - "click button":"addItem", + "click .btn":"addItem", "keypress input":function (e) { // trap the enter key if (e.which == 13) { @@ -82,8 +83,10 @@ }, - addItem:function() { - var input_value = $("input", this.el).val().trim(); + addItem:function(e) { + e.preventDefault(); + + var input_value = $("input", this.el).val().trim(); var model; diff --git a/openid-connect-server/src/main/webapp/resources/template/admin.html b/openid-connect-server/src/main/webapp/resources/template/admin.html index 95cc69a16..1d9cd4629 100644 --- a/openid-connect-server/src/main/webapp/resources/template/admin.html +++ b/openid-connect-server/src/main/webapp/resources/template/admin.html @@ -245,7 +245,7 @@