diff --git a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/js/controllers.js b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/js/controllers.js
index cbe254a1a4..9147e17d5b 100755
--- a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/js/controllers.js
+++ b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/js/controllers.js
@@ -183,8 +183,6 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht
module.controller('UserListCtrl', function($scope, realm, User) {
$scope.realm = realm;
- $scope.users = [];
- //$scope.search = "Search...";
$scope.searchQuery = function() {
console.log('search: ' + $scope.search);
@@ -253,9 +251,15 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio
};
});
-module.controller('RoleListCtrl', function($scope, realm, roles) {
+module.controller('RoleListCtrl', function($scope, $location, realm, roles) {
$scope.realm = realm;
$scope.roles = roles;
+
+ $scope.$watch(function() {
+ return $location.path();
+ }, function() {
+ $scope.path = $location.path().substring(1).split("/");
+ });
});
module.controller('RoleDetailCtrl', function($scope, realm, role, Role, $location, Dialog, Notifications) {
@@ -265,6 +269,12 @@ module.controller('RoleDetailCtrl', function($scope, realm, role, Role, $locatio
$scope.changed = $scope.create;
+ $scope.$watch(function() {
+ return $location.path();
+ }, function() {
+ $scope.path = $location.path().substring(1).split("/");
+ });
+
$scope.$watch('role', function() {
if (!angular.equals($scope.role, role)) {
$scope.changed = true;
@@ -272,34 +282,28 @@ module.controller('RoleDetailCtrl', function($scope, realm, role, Role, $locatio
}, true);
$scope.save = function() {
- if ($scope.roleForm.$valid) {
+ if ($scope.create) {
+ Role.save({
+ realm: realm.id
+ }, $scope.role, function (data, headers) {
+ $scope.changed = false;
+ role = angular.copy($scope.role);
- if ($scope.create) {
- Role.save({
- realm: realm.id
- }, $scope.role, function (data, headers) {
- $scope.changed = false;
- role = angular.copy($scope.role);
+ var l = headers().location;
+ var id = l.substring(l.lastIndexOf("/") + 1);
+ $location.url("/realms/" + realm.id + "/roles/" + id);
+ Notifications.success("Created role");
- var l = headers().location;
- var id = l.substring(l.lastIndexOf("/") + 1);
- $location.url("/realms/" + realm.id + "/roles/" + id);
- Notifications.success("Created role");
-
- });
- } else {
- Role.update({
- realm : realm.id,
- roleId : role.id
- }, $scope.role, function() {
- $scope.changed = false;
- role = angular.copy($scope.role);
- Notifications.success("Saved changes to role");
- });
- }
-
- } else {
- $scope.roleForm.showErrors = true;
+ });
+ } else {
+ Role.update({
+ realm : realm.id,
+ roleId : role.id
+ }, $scope.role, function() {
+ $scope.changed = false;
+ role = angular.copy($scope.role);
+ Notifications.success("Saved changes to role");
+ });
}
};
diff --git a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/application-detail.html b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/application-detail.html
index ddf08bc63e..8bd656f9ba 100755
--- a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/application-detail.html
+++ b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/application-detail.html
@@ -2,16 +2,24 @@
-
+
+
New Application
Application {{application.name}}
diff --git a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/application-list.html b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/application-list.html
index 4128751ace..174f65d544 100755
--- a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/application-list.html
+++ b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/application-list.html
@@ -2,18 +2,19 @@
-
+
Applications
- Table of realm applications
+ Table of realm applications
+ No configured applications...
-
+
@@ -30,7 +31,7 @@
| Base URL |
-
+
diff --git a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/realm-detail.html b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/realm-detail.html
index b997e5dc4a..cd3d0ba18b 100755
--- a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/realm-detail.html
+++ b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/realm-detail.html
@@ -4,9 +4,9 @@
diff --git a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/realm-menu.html b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/realm-menu.html
index cee7ac9ccb..73f0ae592c 100755
--- a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/realm-menu.html
+++ b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/realm-menu.html
@@ -1,5 +1,5 @@
- - Realm Settings
+ - Realm Settings
- Users
- Applications
diff --git a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/role-detail.html b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/role-detail.html
index 0c68075d40..0aeae23552 100755
--- a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/role-detail.html
+++ b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/partials/role-detail.html
@@ -1,60 +1,59 @@
-
-
-
-
- New Role
-
-
- Realm Role {{role.name}}
-
-
- Please fill in
- all required fields
+
+
+
- * Required fields
+
+ New Realm Role
+ Realm Role {{role.name}}
+ * Required fields
+ |