From 29089943d0334da8d28e9e0a279759d437767588 Mon Sep 17 00:00:00 2001 From: Gabriel Cardoso Date: Tue, 22 Oct 2013 14:13:13 -0200 Subject: [PATCH] Design adjustments --- .../resources/admin-ui/css/admin-console.css | 41 ++++++++++++++- .../resources/admin-ui/css/admin-console.less | 47 +++++++++++++++++- .../META-INF/resources/admin-ui/css/forms.css | 2 +- .../resources/admin-ui/css/forms.less | 2 +- .../css/img/feedback-warning-sign.png | Bin 0 -> 387 bytes .../META-INF/resources/admin/index.html | 2 +- .../admin/js/controllers/applications.js | 10 ++-- .../resources/admin/js/controllers/realm.js | 10 ++-- .../resources/admin/js/controllers/users.js | 6 +-- .../admin/partials/application-list.html | 4 +- .../resources/admin/partials/menu.html | 4 +- .../admin/partials/realm-detail.html | 2 +- .../resources/admin/partials/role-list.html | 10 ++-- 13 files changed, 109 insertions(+), 31 deletions(-) create mode 100644 admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/img/feedback-warning-sign.png 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 fdbc43aea9..eeeacc99a6 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 @@ -5,9 +5,44 @@ body { color: #4d5258; font-family: "Open Sans", sans-serif; } +/* Feedback */ .feedback-aligner { top: 0.9em; } +.alert { + position: relative; + display: inline-block; + text-align: left; + border-width: 1px; + margin: 0; + font-size: 1.1em; + padding: 0.90909090909091em 3.63636363636364em; + background-repeat: no-repeat; + background-position: 1.27272727272727em center; + line-height: 1.4em; + border-radius: 2px; + color: #4d5258; +} +.alert.alert-success { + border-color: #4b9e39; + background-image: url(img/feedback-success-sign.svg); + background-color: #e4f1e1; +} +.alert.alert-error { + border-color: #b91415; + background-image: url(img/feedback-error-sign.svg); + background-color: #f8e7e7; +} +.alert.alert-warning { + border-color: #f17528; + background-image: url(img/feedback-warning-sign.svg); + background-color: #fef1e9; +} +.alert.alert-info { + border-color: #5994b2; + background-image: url(img/feedback-info-sign.svg); + background-color: #e4f3fa; +} /* Header */ .header.rcue .navbar.primary .navbar-inner { min-height: 42px; @@ -138,10 +173,11 @@ body { border: none; margin: 0; padding: 0; - float: right; + display: inline-block; + vertical-align: middle; font-size: 0.76923076923077em; margin-left: 1em; - margin-top: 1.4em; + margin-top: 0.7em; } .header.rcue .navbar.primary .nav > li a#refresh:hover { background: none; @@ -236,6 +272,7 @@ body { font-weight: 100; font-size: 2.4em; margin-bottom: 1.04166666666667em; + margin-top: 1em; } #content-area #content h2 span { color: #a1a1a1; 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 0ce652fc39..817047cfd4 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 @@ -15,10 +15,51 @@ body { font-family: @open-sans; } +/* Feedback */ + .feedback-aligner { top: 0.9em; } +.alert { + position: relative; + display: inline-block; + text-align: left; + border-width: 1px; + margin: 0; + font-size: 1.1em; + padding: 0.90909090909091em 3.63636363636364em; + background-repeat: no-repeat; + background-position: 1.27272727272727em center; + line-height: 1.4em; + border-radius: 2px; + color: #4d5258; + + &.alert-success { + border-color: #4b9e39; + background-image: url(img/feedback-success-sign.svg); + background-color: #e4f1e1; + } + + &.alert-error { + border-color: #b91415; + background-image: url(img/feedback-error-sign.svg); + background-color: #f8e7e7; + } + + &.alert-warning { + border-color: #f17528; + background-image: url(img/feedback-warning-sign.svg); + background-color: #fef1e9; + } + + &.alert-info { + border-color: #5994b2; + background-image: url(img/feedback-info-sign.svg); + background-color: #e4f3fa; + } +} + /* Header */ @@ -78,10 +119,11 @@ body { border: none; margin: 0; padding: 0; - float: right; + display: inline-block; + vertical-align: middle; font-size: 0.76923076923077em; margin-left: 1em; - margin-top: 1.4em; + margin-top: 0.7em; &:hover { background: none; @@ -279,6 +321,7 @@ body { font-weight: 100; font-size: 2.4em; margin-bottom: 1.04166666666667em; + margin-top: 1em; span { color: @text-light-grey; 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 63caf6213f..7d3219df35 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 @@ -829,7 +829,7 @@ input[type="email"].tiny { } .breadcrumb { background: none; - margin: 5px 0 5px 0; + margin: 5px 0 0 0; padding: 0; } .breadcrumb li a { 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 1643a35cc0..aabf882bd5 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 @@ -1007,7 +1007,7 @@ input[type="email"] { .breadcrumb { background: none; - margin: 5px 0 5px 0; + margin: 5px 0 0 0; padding: 0; li { diff --git a/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/img/feedback-warning-sign.png b/admin-ui-styles/src/main/resources/META-INF/resources/admin-ui/css/img/feedback-warning-sign.png new file mode 100644 index 0000000000000000000000000000000000000000..834d5050d153f846b76517eebb7ebcd26ce41414 GIT binary patch literal 387 zcmV-}0et?6P)<=hW5?Y` zC1nXov*U@?NEb7+d!*{u3qTUmM6ot58cnq$RNd2=86RW&ZdfTqj{i~rpabKT{}WYU hJ -
{{notification.message}}
+
Success! {{notification.message}}
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js index b46ca115a3..cc28637c9b 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js @@ -120,7 +120,7 @@ module.controller('ApplicationRoleDetailCtrl', function($scope, realm, applicati var l = headers().location; var id = l.substring(l.lastIndexOf("/") + 1); $location.url("/realms/" + realm.id + "/applications/" + application.id + "/roles/" + id); - Notifications.success("Created role"); + Notifications.success("The role has been created."); }); } else { @@ -131,7 +131,7 @@ module.controller('ApplicationRoleDetailCtrl', function($scope, realm, applicati }, $scope.role, function() { $scope.changed = false; role = angular.copy($scope.role); - Notifications.success("Saved changes to role"); + Notifications.success("Your changes have been saved to the role."); }); } }; @@ -154,7 +154,7 @@ module.controller('ApplicationRoleDetailCtrl', function($scope, realm, applicati role : $scope.role.name }, function() { $location.url("/realms/" + realm.id + "/applications/" + application.id + "/roles"); - Notifications.success("Deleted role"); + Notifications.success("The role has been deleted."); }); }); }; @@ -231,7 +231,7 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application, }, $scope.application, function() { $scope.changed = false; application = angular.copy($scope.application); - Notifications.success("Saved changes to application"); + Notifications.success("Your changes have been saved to the application."); }); } @@ -257,7 +257,7 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application, id : $scope.application.id }, function() { $location.url("/realms/" + realm.id + "/applications"); - Notifications.success("Deleted application"); + Notifications.success("The application has been deleted."); }); }); }; 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 e35f0bcb0e..1f28e79d9e 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 @@ -145,7 +145,7 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht Realm.remove($scope.realm, function() { Current.realms = Realm.get(); $location.url("/realms"); - Notifications.success("Deleted realm"); + Notifications.success("The realm has been deleted."); }); }); }; @@ -182,7 +182,7 @@ module.controller('RealmRequiredCredentialsCtrl', function($scope, Realm, realm, $scope.changed = false; Realm.update(realmCopy, function () { $location.url("/realms/" + realm.id + "/required-credentials"); - Notifications.success("Saved changes to realm"); + Notifications.success("Your changes have been saved to the realm."); }); } else { $scope.realmForm.showErrors = true; @@ -235,7 +235,7 @@ module.controller('RealmTokenDetailCtrl', function($scope, Realm, realm, $http, $scope.changed = false; Realm.update(realmCopy, function () { $location.url("/realms/" + realm.id + "/token-settings"); - Notifications.success("Saved changes to realm"); + Notifications.success("Your changes have been saved to the realm."); }); } else { $scope.realmForm.showErrors = true; @@ -290,7 +290,7 @@ module.controller('RoleDetailCtrl', function($scope, realm, role, Role, $locatio var l = headers().location; var id = l.substring(l.lastIndexOf("/") + 1); $location.url("/realms/" + realm.id + "/roles/" + id); - Notifications.success("Created role"); + Notifications.success("The role has been created."); }); } else { @@ -322,7 +322,7 @@ module.controller('RoleDetailCtrl', function($scope, realm, role, Role, $locatio role : $scope.role.name }, function() { $location.url("/realms/" + realm.id + "/roles"); - Notifications.success("Deleted role"); + Notifications.success("The role has been deleted."); }); }); }; 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 e925d15400..2a6c2429a6 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 @@ -182,7 +182,7 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio userId : $scope.user.username }, function() { $location.url("/realms/" + realm.id + "/users"); - Notifications.success("Deleted user"); + Notifications.success("The user has been deleted."); }); }); }; @@ -210,7 +210,7 @@ module.controller('RoleMappingCtrl', function($scope, realm, User, users, role, realm : $scope.realmId, role : role }); - Notifications.success("Added role mapping for user"); + Notifications.success("The role mapping has been added for the user."); }); } } @@ -229,7 +229,7 @@ module.controller('RoleMappingCtrl', function($scope, realm, User, users, role, role : role }); - Notifications.success("Removed role mapping for user"); + Notifications.success("The role mapping has been removed for the user."); }); } } 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 150b6636ab..24d9bd7557 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 @@ -13,8 +13,8 @@
  • Applications
  • {{realm.realm}} Applications

    -