From b223e1a7afd70cc89a845fef0702199a6f065d59 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Fri, 4 Sep 2015 08:57:16 +0200 Subject: [PATCH] KEYCLOAK-1794 Admin console issues with kc-provider-config directive --- .../theme/base/admin/resources/js/app.js | 46 +++++++------- .../partials/modal/role-selector.html | 63 +++++++++---------- .../templates/kc-provider-config.html | 58 +++++++++-------- 3 files changed, 83 insertions(+), 84 deletions(-) diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js index fe3ce08dde..a30030fde1 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js @@ -1840,7 +1840,6 @@ module.directive('kcTabsUserFederation', function () { }); module.controller('RoleSelectorModalCtrl', function($scope, realm, config, configName, RealmRoles, Client, ClientRole, $modalInstance) { - console.log('realm: ' + realm.realm); $scope.selectedRealmRole = { role: undefined }; @@ -1888,6 +1887,25 @@ module.controller('RoleSelectorModalCtrl', function($scope, realm, config, confi }) }); +module.controller('ProviderConfigCtrl', function ($modal, $scope) { + $scope.openRoleSelector = function (configName, config) { + $modal.open({ + templateUrl: resourceUrl + '/partials/modal/role-selector.html', + controller: 'RoleSelectorModalCtrl', + resolve: { + realm: function () { + return $scope.realm; + }, + config: function () { + return config; + }, + configName: function () { + return configName; + } + } + }) + } +}); module.directive('kcProviderConfig', function ($modal) { return { @@ -1895,32 +1913,12 @@ module.directive('kcProviderConfig', function ($modal) { config: '=', properties: '=', realm: '=', - clients: '=' + clients: '=', + configName: '=' }, restrict: 'E', replace: true, - link: function(scope, element, attrs) { - scope.openRoleSelector = function(configName) { - $modal.open({ - templateUrl: resourceUrl + '/partials/modal/role-selector.html', - controller: 'RoleSelectorModalCtrl', - resolve: { - realm: function () { - return scope.realm; - }, - config: function() { - return scope.config; - }, - configName: function() { - - return configName; - } - } - }) - - }; - - }, + controller: 'ProviderConfigCtrl', templateUrl: resourceUrl + '/templates/kc-provider-config.html' } }); diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/modal/role-selector.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/modal/role-selector.html index 44c60fc7e0..43b165baf9 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/modal/role-selector.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/modal/role-selector.html @@ -4,42 +4,37 @@ -
+
-
- - Realm roles that can be selected. - - -
-
-
-
- - - + +
+
+ + +
-
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html index cbc560e43f..4fee2af1c8 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html @@ -1,28 +1,34 @@ -
- +
+
+ -
- -
-
- -
-
- -
-
- -
-
- -
-
- -
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
- {{option.helpText}} -
+ {{option.helpText}} +
+
\ No newline at end of file