+
+
+
-
-
-
-
+
Loading...
-
+
\ No newline at end of file
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/css/styles.css b/forms/common-themes/src/main/resources/theme/base/admin/resources/css/styles.css
deleted file mode 100644
index e69de29bb2..0000000000
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 52de4a0751..50442ebe08 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
@@ -1078,11 +1078,9 @@ module.directive('collapsable', function() {
// collapsable form fieldsets
module.directive('uncollapsed', function() {
return function(scope, element, attrs) {
- element.prepend('
Icon: collapse ');
+ element.prepend('
');
element.click(function() {
- $(this).toggleClass('collapsed');
- $(this).find('.toggle-icons').toggleClass('kc-icon-collapse').toggleClass('kc-icon-expand');
- $(this).find('.toggle-icons').text($(this).text() == "Icon: expand" ? "Icon: collapse" : "Icon: expand");
+ $(this).find('.toggle-class').toggleClass('fa-angle-down').toggleClass('fa-angle-right');
$(this).parent().find('.form-group').toggleClass('hidden');
});
}
@@ -1091,12 +1089,10 @@ module.directive('uncollapsed', function() {
// collapsable form fieldsets
module.directive('collapsed', function() {
return function(scope, element, attrs) {
- element.prepend('
Icon: expand ');
+ element.prepend('
');
element.parent().find('.form-group').toggleClass('hidden');
element.click(function() {
- $(this).toggleClass('collapsed');
- $(this).find('.toggle-icons').toggleClass('kc-icon-collapse').toggleClass('kc-icon-expand');
- $(this).find('.toggle-icons').text($(this).text() == "Icon: expand" ? "Icon: collapse" : "Icon: expand");
+ $(this).find('.toggle-class').toggleClass('fa-angle-down').toggleClass('fa-angle-right');
$(this).parent().find('.form-group').toggleClass('hidden');
});
}
@@ -1282,7 +1278,7 @@ module.directive('kcSave', function ($compile, Notifications) {
return {
restrict: 'A',
link: function ($scope, elem, attr, ctrl) {
- elem.addClass("btn btn-primary btn-lg");
+ elem.addClass("btn btn-primary");
elem.attr("type","submit");
elem.bind('click', function() {
$scope.$apply(function() {
@@ -1313,7 +1309,7 @@ module.directive('kcReset', function ($compile, Notifications) {
return {
restrict: 'A',
link: function ($scope, elem, attr, ctrl) {
- elem.addClass("btn btn-default btn-lg");
+ elem.addClass("btn btn-default");
elem.attr("type","submit");
elem.bind('click', function() {
$scope.$apply(function() {
@@ -1333,7 +1329,7 @@ module.directive('kcCancel', function ($compile, Notifications) {
return {
restrict: 'A',
link: function ($scope, elem, attr, ctrl) {
- elem.addClass("btn btn-default btn-lg");
+ elem.addClass("btn btn-default");
elem.attr("type","submit");
}
}
@@ -1343,7 +1339,7 @@ module.directive('kcDelete', function ($compile, Notifications) {
return {
restrict: 'A',
link: function ($scope, elem, attr, ctrl) {
- elem.addClass("btn btn-danger btn-lg");
+ elem.addClass("btn btn-danger");
elem.attr("type","submit");
}
}
@@ -1409,27 +1405,39 @@ module.directive('kcReadOnly', function() {
return d;
});
-module.directive('kcNavigation', function ($compile, Notifications) {
+module.directive('kcMenu', function () {
return {
scope: true,
restrict: 'E',
replace: true,
- templateUrl: resourceUrl + '/templates/kc-navigation.html',
-
- compile: function(element, attrs){
- if (!attrs.kcSocial) {
- attrs.kcSocial = false;
- }
- }
+ templateUrl: resourceUrl + '/templates/kc-menu.html'
}
});
-module.directive('kcNavigationClient', function () {
+module.directive('kcTabsRealm', function () {
return {
scope: true,
restrict: 'E',
replace: true,
- templateUrl: resourceUrl + '/templates/kc-navigation-client.html'
+ templateUrl: resourceUrl + '/templates/kc-tabs-realm.html'
+ }
+});
+
+module.directive('kcTabsUser', function () {
+ return {
+ scope: true,
+ restrict: 'E',
+ replace: true,
+ templateUrl: resourceUrl + '/templates/kc-tabs-user.html'
+ }
+});
+
+module.directive('kcTabsClient', function () {
+ return {
+ scope: true,
+ restrict: 'E',
+ replace: true,
+ templateUrl: resourceUrl + '/templates/kc-tabs-client.html'
}
});
@@ -1525,4 +1533,52 @@ module.filter('capitalize', function() {
};
return result;
};
+});
+
+module.directive('kcSidebarResize', function ($window) {
+ return function (scope, element) {
+ function resize() {
+ var navBar = angular.element(document.getElementsByClassName('navbar-pf')).height();
+ var container = angular.element(document.getElementById("view").getElementsByTagName("div")[0]).height();
+ var height = Math.max(container, window.innerHeight - navBar - 3);
+
+ element[0].style['min-height'] = height + 'px';
+ }
+
+ resize();
+
+ var w = angular.element($window);
+ scope.$watch(function () {
+ return {
+ 'h': window.innerHeight,
+ 'w': window.innerWidth
+ };
+ }, function () {
+ resize();
+ }, true);
+ w.bind('resize', function () {
+ scope.$apply();
+ });
+ }
+});
+
+
+
+module.directive('kcTooltip', function($compile) {
+ return {
+ restrict: 'E',
+ replace: false,
+ terminal: true,
+ priority: 1000,
+ link: function link(scope,element, attrs) {
+ var tooltip = element[0].innerText;
+ element[0].innerText = null;
+ element.addClass('hidden');
+
+ var label = angular.element(element.parent().children()[0]);
+ label.append('
');
+
+ $compile(label)(scope);
+ }
+ };
});
\ No newline at end of file
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
index 13941c3d52..e75628d79b 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
@@ -689,10 +689,30 @@ module.controller('ClientDetailCtrl', function($scope, realm, client, serverInfo
$scope.path = $location.path().substring(1).split("/");
});
- $scope.$watch('client', function() {
+ function isChanged() {
if (!angular.equals($scope.client, client)) {
- $scope.changed = true;
+ return true;
}
+ if ($scope.newRedirectUri && $scope.newRedirectUri.length > 0) {
+ return true;
+ }
+ if ($scope.newWebOrigin && $scope.newWebOrigin.length > 0) {
+ return true;
+ }
+ return false;
+ }
+
+ $scope.$watch('client', function() {
+ $scope.changed = isChanged();
+ }, true);
+
+ $scope.$watch('newRedirectUri', function() {
+ $scope.changed = isChanged();
+ }, true);
+
+
+ $scope.$watch('newWebOrigin', function() {
+ $scope.changed = isChanged();
}, true);
$scope.deleteWebOrigin = function(index) {
@@ -705,12 +725,21 @@ module.controller('ClientDetailCtrl', function($scope, realm, client, serverInfo
$scope.deleteRedirectUri = function(index) {
$scope.client.redirectUris.splice(index, 1);
}
+
$scope.addRedirectUri = function() {
$scope.client.redirectUris.push($scope.newRedirectUri);
$scope.newRedirectUri = "";
}
$scope.save = function() {
+ if ($scope.newRedirectUri && $scope.newRedirectUri.length > 0) {
+ $scope.addRedirectUri();
+ }
+
+ if ($scope.newWebOrigin && $scope.newWebOrigin.length > 0) {
+ $scope.addWebOrigin();
+ }
+
if ($scope.samlServerSignature == true) {
$scope.client.attributes["saml.server.signature"] = "true";
} else {
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
index 35a959c94d..54b3eef8c8 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
@@ -626,7 +626,7 @@ module.controller('RealmDefaultRolesCtrl', function ($scope, Realm, realm, clien
});
-module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload, $http, realm, instance, providerFactory, IdentityProvider, serverInfo, $location, Notifications, Dialog) {
+module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload, $http, $route, realm, instance, providerFactory, IdentityProvider, serverInfo, $location, Notifications, Dialog) {
console.log('RealmIdentityProviderCtrl');
$scope.realm = angular.copy(realm);
@@ -832,7 +832,6 @@ module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload
$scope.callbackUrl = $location.absUrl().replace(/\/admin.*/, "/realms/") + realm.realm + "/broker/" ;
$scope.addProvider = function(provider) {
- console.log('addProvider');
$location.url("/create/identity-provider/" + realm.realm + "/" + provider.id);
};
@@ -857,22 +856,22 @@ module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload
IdentityProvider.save({
realm: $scope.realm.realm, alias: ''
}, $scope.identityProvider, function () {
- $location.url("/realms/" + realm.realm + "/identity-provider-settings");
- Notifications.success("The " + $scope.identityProvider.name + " provider has been created.");
+ $location.url("/realms/" + realm.realm + "/identity-provider-settings/provider/" + $scope.identityProvider.providerId + "/" + $scope.identityProvider.alias);
+ Notifications.success("The " + $scope.identityProvider.alias + " provider has been created.");
});
} else {
IdentityProvider.update({
realm: $scope.realm.realm,
id: $scope.identityProvider.internalId
}, $scope.identityProvider, function () {
- $location.url("/realms/" + realm.realm + "/identity-provider-settings");
- Notifications.success("The " + $scope.identityProvider.name + " provider has been update.");
+ $route.reload();
+ Notifications.success("The " + $scope.identityProvider.alias + " provider has been update.");
});
}
};
$scope.cancel = function() {
- $location.url("/realms/" + realm.realm + "/identity-provider-settings");
+ $route.reload();
};
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/brute-force.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/brute-force.html
index f9d5373f80..ebaa6b4a89 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/brute-force.html
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/brute-force.html
@@ -1,127 +1,108 @@
-
-
-
+
+
Settings {{realm.realm|capitalize}}
+
+
+
+
-
-
-
{{realm.realm}} Brute Force Protection
-
+
+
+
\ No newline at end of file
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/claims.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/claims.html
index 2701792167..bdca2ca33a 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/claims.html
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/claims.html
@@ -1,61 +1,61 @@