From 32b89adc04203c6ab01dcc012a3d8b171c1d6c38 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 14 Jul 2015 11:19:44 +0200 Subject: [PATCH] Wire up new menu --- .../theme/base/admin/resources/js/services.js | 13 +++--- .../base/admin/resources/partials/menu.html | 34 --------------- .../resources/partials/realm-create.html | 4 +- .../admin/resources/partials/realm-list.html | 8 +++- .../admin/resources/templates/kc-menu.html | 43 ++++++------------- .../keycloak/admin/resources/css/styles.css | 4 +- .../theme/keycloak/admin/theme.properties | 2 +- 7 files changed, 34 insertions(+), 74 deletions(-) diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js index 0398bfa63c..5e9fefda63 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js @@ -884,21 +884,22 @@ module.factory('ClientOrigins', function($resource) { }); module.factory('Current', function(Realm, $route, $rootScope) { - var current = {}; - - current.realms = {}; - current.realm = null; + var current = { + realms: {}, + realm: null + }; $rootScope.$on('$routeChangeStart', function() { - current.realm = null; current.realms = Realm.query(null, function(realms) { + var currentRealm = null; if ($route.current.params.realm) { for (var i = 0; i < realms.length; i++) { if (realms[i].realm == $route.current.params.realm) { - current.realm = realms[i]; + currentRealm = realms[i]; } } } + current.realm = currentRealm; }); }); diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html index 1090d33bd0..c85e83e7ba 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html @@ -22,38 +22,4 @@ - - \ No newline at end of file diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-create.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-create.html index a8cad68154..687ea8e14f 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-create.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-create.html @@ -1,4 +1,4 @@ -
+

Add Realm

@@ -49,3 +49,5 @@
+ + \ No newline at end of file diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-list.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-list.html index b0df8f3a2b..da0a1fb4f1 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-list.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-list.html @@ -1,4 +1,5 @@ -
+
+

Realms

@@ -13,4 +14,7 @@
-
\ No newline at end of file +
+ + + \ No newline at end of file diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html index 985b86cecb..6d937a4bbe 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html @@ -1,32 +1,22 @@ -