KEYCLOAK-1288

This commit is contained in:
Stian Thorgersen 2015-05-13 11:50:17 +02:00
parent f0787d98d1
commit 502efe42c9
3 changed files with 3 additions and 12 deletions

View file

@ -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);

View file

@ -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) {

View file

@ -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;
});