From 9387d78c48b1996698f504996cf3f38844ad4588 Mon Sep 17 00:00:00 2001 From: ammendonca Date: Thu, 24 Oct 2013 01:17:04 +0100 Subject: [PATCH] KEYCLOAK-118: Several issues fixed: - Tooltips suing Angular UI - Modals with Angular UI and Bootstrap 3.x - Icons using SVG not working - Perform search clicking on enter - Show User/Application name on Delete modal - Show "No results" and "Not configured" alerts when appropriate - Always show cancel button on "New ..." forms. Save shows on changes. - Add null option to Application select on Application Roles - Fixed menus - Other misc fixes... --- .../resources/admin-ui/css/admin-console.css | 14 +++++++------- .../resources/admin-ui/css/admin-console.less | 14 +++++++------- .../META-INF/resources/admin-ui/css/forms.css | 12 ++++++------ .../META-INF/resources/admin-ui/css/forms.less | 12 ++++++------ .../resources/admin/js/controllers/realm.js | 6 +++--- .../resources/admin/js/controllers/users.js | 4 ++-- .../admin/lib/angular/ui-bootstrap-tpls-0.4.0.js | 9 +++++++-- .../admin/partials/application-detail.html | 7 +++---- .../resources/admin/partials/application-list.html | 13 +++++++------ .../admin/partials/application-role-list.html | 4 ++-- .../admin/partials/application-scope-mappings.html | 11 ++++++----- .../resources/admin/partials/realm-detail.html | 3 +-- .../resources/admin/partials/role-list.html | 4 ++-- .../resources/admin/partials/role-mappings.html | 11 ++++++----- .../resources/admin/partials/user-detail.html | 9 ++++----- .../resources/admin/partials/user-list.html | 13 +++++++------ 16 files changed, 76 insertions(+), 70 deletions(-) diff --git a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/admin-console.css b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/admin-console.css index eeeacc99a6..67e940236d 100644 --- a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/admin-console.css +++ b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/admin-console.css @@ -25,22 +25,22 @@ body { } .alert.alert-success { border-color: #4b9e39; - background-image: url(img/feedback-success-sign.svg); + background-image: url(img/feedback-success-sign.png); background-color: #e4f1e1; } .alert.alert-error { border-color: #b91415; - background-image: url(img/feedback-error-sign.svg); + background-image: url(img/feedback-error-sign.png); background-color: #f8e7e7; } .alert.alert-warning { border-color: #f17528; - background-image: url(img/feedback-warning-sign.svg); + background-image: url(img/feedback-warning-sign.png); background-color: #fef1e9; } .alert.alert-info { border-color: #5994b2; - background-image: url(img/feedback-info-sign.svg); + background-image: url(img/feedback-info-sign.png); background-color: #e4f3fa; } /* Header */ @@ -64,7 +64,7 @@ body { border: 1px solid #676c6e; border-radius: 2px; padding: 0 0.54545454545455em; - background: #555a5e url(img/sprite-arrow-down.svg) no-repeat right -26px; + background: #555a5e url(img/sprite-arrow-down.png) no-repeat right -26px; display: block; &:hover, @@ -147,7 +147,7 @@ body { vertical-align: middle; background-color: #555a5e; background-image: none; - background-image: url(img/sprite-arrow-down.svg); + background-image: url(img/sprite-arrow-down.png); background-repeat: no-repeat; background-position: right -26px; border: 1px solid #676c6e; @@ -379,7 +379,7 @@ table + .feedback.inline.warning { .tooltip-box { position: absolute; font-size: 1em; - background-image: url("img/tooltip-box-arrow-right-up.svg"); + background-image: url("img/tooltip-box-arrow-right-up.png"); background-position: right top; background-repeat: no-repeat; padding-top: 1em; diff --git a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/admin-console.less b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/admin-console.less index 817047cfd4..f106fd8c6c 100644 --- a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/admin-console.less +++ b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/admin-console.less @@ -37,25 +37,25 @@ body { &.alert-success { border-color: #4b9e39; - background-image: url(img/feedback-success-sign.svg); + background-image: url(img/feedback-success-sign.png); background-color: #e4f1e1; } &.alert-error { border-color: #b91415; - background-image: url(img/feedback-error-sign.svg); + background-image: url(img/feedback-error-sign.png); background-color: #f8e7e7; } &.alert-warning { border-color: #f17528; - background-image: url(img/feedback-warning-sign.svg); + background-image: url(img/feedback-warning-sign.png); background-color: #fef1e9; } &.alert-info { border-color: #5994b2; - background-image: url(img/feedback-info-sign.svg); + background-image: url(img/feedback-info-sign.png); background-color: #e4f3fa; } } @@ -88,7 +88,7 @@ body { vertical-align: middle; background-color: #555a5e; background-image: none; - background-image: url(img/sprite-arrow-down.svg); + background-image: url(img/sprite-arrow-down.png); background-repeat: no-repeat; background-position: right -26px; border: 1px solid #676c6e; @@ -156,7 +156,7 @@ body { border: 1px solid #676c6e; border-radius: 2px; padding: 0 0.54545454545455em; - background: #555a5e url(img/sprite-arrow-down.svg) no-repeat right -26px; + background: #555a5e url(img/sprite-arrow-down.png) no-repeat right -26px; display: block; &:hover, @@ -463,7 +463,7 @@ table { .tooltip-box { position: absolute; font-size: 1em; - background-image: url("img/tooltip-box-arrow-right-up.svg"); + background-image: url("img/tooltip-box-arrow-right-up.png"); background-position: right top; background-repeat: no-repeat; padding-top: 1em; diff --git a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/forms.css b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/forms.css index 7d3219df35..b8d30662e4 100644 --- a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/forms.css +++ b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/forms.css @@ -295,29 +295,29 @@ button.primary:focus, background-position: 1.27272727272727em 1.63636363636364em; } .feedback.error { - background-image: url(img/feedback-error-arrow-down.svg); + background-image: url(img/feedback-error-arrow-down.png); } .feedback.error p { border-color: #b91415; - background-image: url(img/feedback-error-sign.svg); + background-image: url(img/feedback-error-sign.png); background-color: #f8e7e7; } .feedback.success { - background-image: url(img/feedback-success-arrow-down.svg); + background-image: url(img/feedback-success-arrow-down.png); } .feedback.success p { border-color: #4b9e39; - background-image: url(img/feedback-success-sign.svg); + background-image: url(img/feedback-success-sign.png); background-color: #e4f1e1; } .feedback.warning p { border-color: #f17528; - background-image: url(img/feedback-warning-sign.svg); + background-image: url(img/feedback-warning-sign.png); background-color: #fef1e9; } .feedback.info p { border-color: #5994b2; - background-image: url(img/feedback-info-sign.svg); + background-image: url(img/feedback-info-sign.png); background-color: #e4f3fa; } .feedback.inline { diff --git a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/forms.less b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/forms.less index aabf882bd5..e666300239 100644 --- a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/forms.less +++ b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/forms.less @@ -337,21 +337,21 @@ button.primary, } &.error { - background-image: url(img/feedback-error-arrow-down.svg); + background-image: url(img/feedback-error-arrow-down.png); p { border-color: #b91415; - background-image: url(img/feedback-error-sign.svg); + background-image: url(img/feedback-error-sign.png); background-color: #f8e7e7; } } &.success { - background-image: url(img/feedback-success-arrow-down.svg); + background-image: url(img/feedback-success-arrow-down.png); p { border-color: #4b9e39; - background-image: url(img/feedback-success-sign.svg); + background-image: url(img/feedback-success-sign.png); background-color: #e4f1e1; } } @@ -360,7 +360,7 @@ button.primary, p { border-color: #f17528; - background-image: url(img/feedback-warning-sign.svg); + background-image: url(img/feedback-warning-sign.png); background-color: #fef1e9; } @@ -370,7 +370,7 @@ button.primary, p { border-color: #5994b2; - background-image: url(img/feedback-info-sign.svg); + background-image: url(img/feedback-info-sign.png); background-color: #e4f3fa; } diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js index 1f28e79d9e..387c891c47 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js @@ -40,7 +40,6 @@ module.controller('RealmDropdownCtrl', function($scope, Realm, Current, Auth, $l }; $scope.showNav = function() { var show = Current.realms.length > 0; - console.log('Show dropdown? ' + show); return Auth.loggedIn && show; } }); @@ -137,11 +136,12 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht }; $scope.cancel = function() { - $location.url("/realms"); + //$location.url("/realms"); + window.history.back(); }; $scope.remove = function() { - Dialog.confirmDelete($scope.realm.name, 'realm', function() { + Dialog.confirmDelete($scope.realm.realm, 'realm', function() { Realm.remove($scope.realm, function() { Current.realms = Realm.get(); $location.url("/realms"); diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js index 2a6c2429a6..0d5f4cd966 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js @@ -134,7 +134,7 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio $scope.user = angular.copy(user); $scope.create = !user.username; - $scope.changed = $scope.create; + $scope.changed = false; // $scope.create; $scope.$watch('user', function() { if (!angular.equals($scope.user, user)) { @@ -176,7 +176,7 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio }; $scope.remove = function() { - Dialog.confirmDelete($scope.user.userId, 'user', function() { + Dialog.confirmDelete($scope.user.username, 'user', function() { $scope.user.$remove({ realm : realm.id, userId : $scope.user.username diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/lib/angular/ui-bootstrap-tpls-0.4.0.js b/admin-ui/src/main/resources/META-INF/resources/admin/lib/angular/ui-bootstrap-tpls-0.4.0.js index 2e9eeb9842..b587abd1e0 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/lib/angular/ui-bootstrap-tpls-0.4.0.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/lib/angular/ui-bootstrap-tpls-0.4.0.js @@ -970,8 +970,8 @@ dialogModule.provider("$dialog", function(){ transitionClass: 'fade', triggerClass: 'in', resolve:{}, - backdropFade: false, - dialogFade:false, + backdropFade: true, + dialogFade: true, keyboard: true, // close with esc key backdropClick: true // only in conjunction with backdrop=true /* other options: template, templateUrl, controller */ @@ -1027,6 +1027,7 @@ dialogModule.provider("$dialog", function(){ this.modalEl.addClass(options.transitionClass); this.modalEl.removeClass(options.triggerClass); } + this.modalEl.css("display", "block"); /* FIXME: For BS 3.x support */ this.handledEscapeKey = function(e) { if (e.which === 27) { @@ -2997,6 +2998,8 @@ angular.module("template/datepicker/datepicker.html", []).run(["$templateCache", angular.module("template/dialog/message.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("template/dialog/message.html", + "
\n" + + "
\n" + "
\n" + "

{{ title }}

\n" + "
\n" + @@ -3006,6 +3009,8 @@ angular.module("template/dialog/message.html", []).run(["$templateCache", functi "
\n" + " \n" + "
\n" + + "
\n" + + "
\n" + ""); }]); diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-detail.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-detail.html index 548b96622a..2c11b73c62 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-detail.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-detail.html @@ -104,10 +104,9 @@
- -
@@ -116,7 +115,7 @@ - diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-list.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-list.html index 51d0f13c93..16a16972e1 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-list.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-list.html @@ -16,14 +16,15 @@

You have not configured applications. Add Application

- +
- + @@ -58,7 +59,7 @@
- -
@@ -32,7 +33,7 @@
Application Name Enabled Base URL
-
+
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-role-list.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-role-list.html index fc38d64ae1..2db42a239a 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-role-list.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-role-list.html @@ -40,8 +40,8 @@
-
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-scope-mappings.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-scope-mappings.html index 2c538a1a7d..6ca4b0be39 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-scope-mappings.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/application-scope-mappings.html @@ -35,8 +35,8 @@
- - + +
@@ -57,11 +57,12 @@
-
+
@@ -72,8 +73,8 @@
- - + +
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-detail.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-detail.html index 551fc7c1e1..1567a2f6e7 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-detail.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-detail.html @@ -119,8 +119,7 @@
-
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/role-list.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/role-list.html index c1cb8faf62..bc006d1158 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/role-list.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/role-list.html @@ -36,8 +36,8 @@
-
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/role-mappings.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/role-mappings.html index 33b8a25ca4..be3535c334 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/role-mappings.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/role-mappings.html @@ -6,7 +6,7 @@
@@ -32,8 +32,8 @@
- - + +
@@ -54,6 +54,7 @@
@@ -69,8 +70,8 @@
- - + +
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-detail.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-detail.html index d4b11f9f59..55898e6ccc 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-detail.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-detail.html @@ -9,7 +9,7 @@
- -
@@ -79,7 +78,7 @@ -
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-list.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-list.html index 541aa958cb..6906b59949 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-list.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-list.html @@ -19,10 +19,11 @@
- -
@@ -32,7 +33,7 @@ - + Username Last Name First Name @@ -61,7 +62,7 @@ -