KEYCLOAK-1288
This commit is contained in:
parent
f0787d98d1
commit
502efe42c9
3 changed files with 3 additions and 12 deletions
|
@ -1399,7 +1399,6 @@ module.directive('kcReadOnly', function() {
|
|||
|
||||
scope.$watch(attrs.kcReadOnly, function(readOnly) {
|
||||
if (readOnly) {
|
||||
console.debug('readonly');
|
||||
element.find('input').each(disable);
|
||||
element.find('button').each(disable);
|
||||
element.find('select').each(disable);
|
||||
|
|
|
@ -122,10 +122,6 @@ module.controller('RealmDropdownCtrl', function($scope, Realm, Current, Auth, $l
|
|||
$scope.changeRealm = function(selectedRealm) {
|
||||
$location.url("/realms/" + selectedRealm);
|
||||
}
|
||||
|
||||
$scope.refresh = function() {
|
||||
Current.refresh();
|
||||
}
|
||||
});
|
||||
|
||||
module.controller('RealmCreateCtrl', function($scope, Current, Realm, $upload, $http, WhoAmI, $location, Dialog, Notifications, Auth) {
|
||||
|
|
|
@ -830,15 +830,13 @@ module.factory('ClientOrigins', function($resource) {
|
|||
});
|
||||
});
|
||||
|
||||
module.factory('Current', function(Realm, $route) {
|
||||
module.factory('Current', function(Realm, $route, $rootScope) {
|
||||
var current = {};
|
||||
|
||||
current.realms = {};
|
||||
current.realm = null;
|
||||
current.clients = {};
|
||||
current.client = null;
|
||||
|
||||
current.refresh = function() {
|
||||
$rootScope.$on('$routeChangeStart', function() {
|
||||
current.realm = null;
|
||||
current.realms = Realm.query(null, function(realms) {
|
||||
if ($route.current.params.realm) {
|
||||
|
@ -849,9 +847,7 @@ module.factory('Current', function(Realm, $route) {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
current.refresh();
|
||||
});
|
||||
|
||||
return current;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue