You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by sk...@apache.org on 2018/10/01 14:56:35 UTC
syncope git commit: [SYNCOPE-1367] Added some accessibility features
to Enduser
Repository: syncope
Updated Branches:
refs/heads/2_0_X 0e73508a2 -> 3285cc036
[SYNCOPE-1367] Added some accessibility features to Enduser
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3285cc03
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3285cc03
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3285cc03
Branch: refs/heads/2_0_X
Commit: 3285cc036e94028fd7219d16d1ca35f25ab5e322
Parents: 0e73508
Author: skylark17 <ma...@tirasa.net>
Authored: Mon Oct 1 16:56:13 2018 +0200
Committer: skylark17 <ma...@tirasa.net>
Committed: Mon Oct 1 16:56:13 2018 +0200
----------------------------------------------------------------------
client/enduser/pom.xml | 4 +
.../resources/app/css/accessibility.css | 44 ++++++
.../app/css/accessibility/accessibilityFont.css | 78 ++++++++++
.../app/css/accessibility/accessibilityHC.css | 150 +++++++++++++++++++
.../META-INF/resources/app/css/editUser.css | 8 +-
.../META-INF/resources/app/css/init.css | 22 +++
.../resources/META-INF/resources/app/index.html | 34 ++++-
.../resources/META-INF/resources/app/js/app.js | 11 +-
.../js/controllers/AccessibilityController.js | 89 +++++++++++
.../js/directives/navigationButtonsPartial.js | 5 +-
.../resources/app/js/directives/ngEnter.js | 39 +++++
.../resources/app/js/util/assetsManager.js | 16 +-
.../app/views/navigationButtonsPartial.html | 9 +-
.../app/views/templates/editUserTemplate.html | 5 +-
.../views/templates/passwordresetTemplate.html | 9 +-
.../resources/app/views/user-credentials.html | 5 +-
.../app/views/user-derived-schemas.html | 5 +-
.../resources/app/views/user-form-finish.html | 6 +-
.../resources/app/views/user-groups.html | 5 +-
.../resources/app/views/user-plain-schemas.html | 5 +-
.../resources/app/views/user-resources.html | 5 +-
.../app/views/user-virtual-schemas.html | 5 +-
.../src/main/resources/customTemplate.json | 3 +-
.../src/test/resources/customTemplate.json | 3 +-
.../src/main/resources/customTemplate.json | 3 +-
.../src/test/resources/customTemplate.json | 3 +-
pom.xml | 7 +-
27 files changed, 530 insertions(+), 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/pom.xml
----------------------------------------------------------------------
diff --git a/client/enduser/pom.xml b/client/enduser/pom.xml
index 78be32c..8f92084 100644
--- a/client/enduser/pom.xml
+++ b/client/enduser/pom.xml
@@ -118,6 +118,10 @@ under the License.
<groupId>org.webjars</groupId>
<artifactId>kendo-ui-core</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.webjars.bowergithub.angular</groupId>
+ <artifactId>bower-angular-aria</artifactId>
+ </dependency>
<!--Bootstrap-->
<dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility.css
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility.css b/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility.css
new file mode 100644
index 0000000..04c57a5
--- /dev/null
+++ b/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility.css
@@ -0,0 +1,44 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+#accessibility {
+ display: block;
+}
+
+.btn-accessibility {
+ position: absolute;
+ right: 0;
+ font-size: 12px;
+ padding: 15px 15px 0 0;
+}
+
+.btn-accessibility i {
+ font-size: 30px;
+}
+
+.btn-accessibility:hover {
+ cursor:pointer;
+}
+
+#change_contrast {
+ top: 0;
+}
+#change_fontSize {
+ top: 40px;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility/accessibilityFont.css
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility/accessibilityFont.css b/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility/accessibilityFont.css
new file mode 100644
index 0000000..fa4310c
--- /dev/null
+++ b/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility/accessibilityFont.css
@@ -0,0 +1,78 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+body {
+ font-size: 400%;
+}
+
+.nav-button,
+#login-btn,
+#resetpassword,
+#status-buttons a,
+#login-container a,
+.form-group input,
+.form-group select,
+.panel-title,
+#questionCaptcha,
+#refresh,
+.suggestions,
+.k-notification-wrap,
+.btn-secondary,
+ .card-body #attribute .fa {
+ font-size: 20px;
+}
+
+.k-picker-wrap {
+ font-size: 17px;
+}
+
+#finish {
+ margin-right: 0;
+}
+#navButtons {
+ padding-right: 20px;
+}
+
+.k-notification-wrap {
+ padding: .1em .2em;
+ line-height: 1.5;
+}
+
+.select2-choices li {
+ line-height: 1 !important;
+}
+
+.select2-choices li .ui-select-match-close {
+ -ms-transform: scale(1.5); /* IE */
+ -moz-transform: scale(1.5); /* FF */
+ -webkit-transform: scale(1.5); /* Safari and Chrome */
+ -o-transform: scale(1.5); /* Opera */
+}
+
+input[type=checkbox] {
+ -ms-transform: scale(2); /* IE */
+ -moz-transform: scale(2); /* FF */
+ -webkit-transform: scale(2); /* Safari and Chrome */
+ -o-transform: scale(2); /* Opera */
+}
+
+/* Workaround - to avoid nav buttons not to be vertically aligned */
+#navButtons .float-right {
+ font-size: 1px;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility/accessibilityHC.css
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility/accessibilityHC.css b/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility/accessibilityHC.css
new file mode 100644
index 0000000..235daaf
--- /dev/null
+++ b/client/enduser/src/main/resources/META-INF/resources/app/css/accessibility/accessibilityHC.css
@@ -0,0 +1,150 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+.btn-accessibility {
+ color: #ffffff;
+}
+
+
+/* EditUser
+============================================================================= */
+html,
+body {
+ height: 100%;
+}
+body {
+ background: #464646;
+}
+
+#form-container .page-header,
+#previous,
+#next,
+#save,
+#finish,
+#resetpassword {
+ background: #464646;
+ color: #ffffff;
+}
+
+#previous:hover,
+#next:hover,
+#save:hover,
+#finish:hover,
+#resetpassword:hover {
+ background: #6d6d6d;
+}
+
+#form-container .btn-danger {
+ background-color: #a93f3c;
+ border-color: #ffffff;
+}
+
+
+#form-container,
+#form-container .panel {
+ background-color: #151515;
+ color: #ffffff;
+}
+
+#form-container input,
+#form-container select,
+#form-container select option,
+#form-container label,
+.k-icon,
+.card-header h5 a {
+ color: #ffffff;
+}
+
+#form-container input:disabled {
+ background: #6d6d6d;
+}
+
+#form-container input,
+#form-container select,
+#form-container select option,
+span.k-datepicker,
+span.k-timepicker,
+span.k-datetimepicker,
+span.k-colorpicker,
+span.k-numerictextbox,
+span.k-combobox,
+span.k-dropdown,
+.k-toolbar .k-split-button,
+.k-autocomplete.k-state-default,
+.k-picker-wrap.k-state-default,
+.k-numeric-wrap.k-state-default,
+.k-dropdown-wrap.k-state-default {
+ background: #313131;
+}
+
+.card-header,
+.ui-select-choices-row:hover {
+ background-color: #6d6d6d;
+}
+
+.select2-choices,
+.select2-drop-active {
+ background-color: #3e3e3e;
+ color: #ffffff;
+}
+
+
+/* Login
+============================================================================= */
+#login-container .card {
+ background-color: #151515;
+ color: #ffffff;
+}
+
+#login-container .login-logo {
+ background-color: rgba(255, 255, 255, 0.15);
+ border-radius: 10px;
+
+ margin: 0px auto 20px auto;
+}
+
+#login-container input,
+#login-container select,
+#login-container select option {
+ color: #ffffff;
+ background: #313131;
+}
+
+#login-container input:disabled {
+ background: #6d6d6d;
+}
+
+#login-container .btn-link {
+ color: #ffffff;
+}
+#login-container .btn-link:focus,
+#login-container .btn-link:hover {
+ color: #b5dcff;
+}
+
+#login-container .login-btn {
+ color: #ffffff;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6a9647), color-stop(100%,#48543d));
+
+ background: #464646;
+}
+
+#login-container .form-group {
+ margin-bottom: 20px;
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css b/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css
index 41ba63c..536b41a 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css
+++ b/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css
@@ -32,13 +32,13 @@ under the License.
background-color: #F7F7F7;
}
-#form-container .breadcrumb-header{
+#form-container .breadcrumb-header {
margin: auto;
width: 80%;
padding:10px;
}
-#form-container .page-header {
+#form-container .page-header {
background: -moz-linear-gradient(top, #a9db80 0%, #96c56f 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9db80), color-stop(100%,#96c56f)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #a9db80 0%,#96c56f 100%); /* Chrome10+,Safari5.1+ */
@@ -196,7 +196,7 @@ span.k-datetimepicker{
/** Button breadcrumb **/
.btn-breadcrumb .btn:not(:last-child):after {
- border-left: 10px solid white;
+ border-left: 10px solid #ffffff;
}
.btn-breadcrumb .btn:not(:last-child):before {
margin-left: 1px;
@@ -380,7 +380,7 @@ div[role="tablist"] {
input[type=file] {
display: block;
- color: white !important;
+ color: #ffffff !important;
}
#form-container {
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/css/init.css
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/css/init.css b/client/enduser/src/main/resources/META-INF/resources/app/css/init.css
new file mode 100644
index 0000000..21555b4
--- /dev/null
+++ b/client/enduser/src/main/resources/META-INF/resources/app/css/init.css
@@ -0,0 +1,22 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+#accessibility {
+ display: none;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/index.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/index.html b/client/enduser/src/main/resources/META-INF/resources/app/index.html
index 6ef3c4d..4a13796 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/index.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/index.html
@@ -44,20 +44,39 @@ under the License.
<link href="../webjars/ng-password-strength/${ng-password-strength.version}/dist/styles/main.css" rel="stylesheet" type="text/css">
<link href="../webjars/select2/${select2.version}/select2.css" rel="stylesheet"/>
+ <link href="css/init.css" rel="stylesheet" type="text/css"/>
<link href="css/customSpinner.css" rel="stylesheet" type="text/css"/>
</head>
<body ng-cloak >
- <!--[if lt IE 7]>
- <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
- <![endif]-->
+ <!--[if lt IE 7]>
+ <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+ <![endif]-->
- <span id="notifications"></span>
+ <span id="notifications"></span>
<treasure-overlay-spinner active='spinner.active'>
- <div ui-view ng-cloak ng-controller="ApplicationController" ng-init="initApplication()">
+ <div ng-cloak ng-controller="ApplicationController" ng-init="initApplication()">
+ <div id="accessibility" ng-controller="AccessibilityController">
+ <div id="change_contrast" class="btn-accessibility"
+ ng-init="checkPref(HC_THEME_PREF)">
+ <i ng-click="switchTheme()"
+ aria-label="Toggle high contrast colors mode" tabindex="0" accesskey="H"
+ class="fa fa-adjust">
+ </i>
+ </div>
+ <div id="change_fontSize" class="btn-accessibility"
+ ng-init="checkPref(FONT_SIZE_PREF)">
+ <i ng-click="switchIncreasedFont()"
+ aria-label="Toggle font size increment" tabindex="0" accesskey="F"
+ class="fa fa-font">
+ </i>
+ </div>
+ </div>
- </div>
+ <!-- Dynamic view -->
+ <div ui-view></div>
+ </div>
</treasure-overlay-spinner>
<script src="../webjars/jquery/${jquery.version}/jquery.js"></script>
@@ -86,6 +105,7 @@ under the License.
<script src="../webjars/angular-translate-loader-partial/${angular-translate-loader-partial.version}/angular-translate-loader-partial.js"></script>
<script src="../webjars/angular-translate-storage-cookie/${angular-translate.version}/angular-translate-storage-cookie.js"></script>
<script src="../webjars/bootstrap-fileinput/${bootstrap-fileinput.version}/js/fileinput.js"></script>
+ <script src="../webjars/angular-aria/angular-aria.min.js" ></script>
<!--main angular application-->
<script src="js/app.js"></script>
@@ -110,6 +130,7 @@ under the License.
<script src="js/controllers/SAML2SPController.js"></script>
<script src="js/controllers/OIDCClientController.js"></script>
<script src="js/controllers/UserController.js"></script>
+ <script src="js/controllers/AccessibilityController.js"></script>
<!--directives-->
<script src="js/directives/dynamicPlainAttribute.js"></script>
<script src="js/directives/dynamicDerivedAttribute.js"></script>
@@ -128,6 +149,7 @@ under the License.
<script src="js/directives/validateDropdown.js"></script>
<script src="js/directives/fileInput.js"></script>
<script src="js/directives/dynamicTemplateItem.js"></script>
+ <script src="js/directives/ngEnter.js"></script>
<!--validator-->
<script src="js/validator/validationRules.js"></script>
<script src="js/validator/validationExecutor.js"></script>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/app.js b/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
index 0ed272a..1714467 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
@@ -42,7 +42,8 @@ var app = angular.module('SyncopeEnduserApp', [
'self',
'info',
'ngCookies',
- 'pascalprecht.translate'
+ 'pascalprecht.translate',
+ 'ngAria'
]);
app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$translateProvider', '$translatePartialLoaderProvider',
@@ -262,7 +263,7 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$translate
* SYNCOPE-780
*/
$httpProvider.defaults.headers.common["If-Modified-Since"] = "0";
- $httpProvider.interceptors.push(function ($q, $rootScope, $location) {
+ $httpProvider.interceptors.push(function ($q, $rootScope) {
return {
'request': function (config, a, b) {
//if the url is an html, we're changing page
@@ -297,8 +298,8 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$translate
};
});
}]);
-app.run(['$rootScope', '$location', '$state', 'AuthService', '$transitions',
- function ($rootScope, $location, $state, AuthService, $transitions) {
+app.run(['$rootScope', '$state', 'AuthService', '$transitions',
+ function ($rootScope, $state, AuthService, $transitions) {
/*
|--------------------------------------------------------------------------
| Main of Syncope Enduser application
@@ -465,7 +466,7 @@ app.controller('ApplicationController', ['$scope', '$rootScope', 'InfoService',
};
$rootScope.getWizardFirstStep = function () {
- return ($scope.wizardFirstStep ? ('.' + $scope.wizardFirstStep) : '');
+ return $scope.wizardFirstStep ? ('.' + $scope.wizardFirstStep) : '';
};
InfoService.getInfo().then(
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/AccessibilityController.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/AccessibilityController.js b/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/AccessibilityController.js
new file mode 100644
index 0000000..1d9e799
--- /dev/null
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/AccessibilityController.js
@@ -0,0 +1,89 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ **/
+
+'use strict';
+angular.module("home").controller("AccessibilityController", ['$scope', 'AssetsManager', '$window',
+ function ($scope, AssetsManager, $window) {
+
+ var darkThemeFiles = [
+ 'css/accessibility/accessibilityHC.css'
+ ];
+
+ var fontSizeFiles = [
+ 'css/accessibility/accessibilityFont.css'
+ ];
+
+ $scope.FONT_SIZE_PREF = "font_size_pref";
+ $scope.HC_THEME_PREF = "hc_theme_pref";
+
+ var doSwitch = function (check, files) {
+ if (!check) {
+ for (var i = 0; i < files.length; i++) {
+ AssetsManager.remove(files[i], "css");
+ }
+ } else {
+ for (var i = 0; i < files.length; i++) {
+ AssetsManager.inject(AssetsManager.accessibilityCssId + "_" + i, files[i], "css");
+ }
+ }
+ };
+
+ var savePreference = function (key, value) {
+ $window.localStorage.setItem(key, value);
+ };
+
+ var getPreference = function (key) {
+ var storageValue = $window.localStorage.getItem(key);
+ if (storageValue === null) {
+ savePreference(key, "false");
+ }
+ return storageValue === 'true';
+ };
+
+ $scope.isHighContrast = getPreference($scope.HC_THEME_PREF);
+ $scope.isIncreasedFont = getPreference($scope.FONT_SIZE_PREF);
+
+ $scope.checkPref = function (pref) {
+ switch (pref) {
+ case $scope.FONT_SIZE_PREF:
+ doSwitch($scope.isIncreasedFont, fontSizeFiles);
+ break;
+
+ case $scope.HC_THEME_PREF:
+ doSwitch($scope.isHighContrast, darkThemeFiles);
+ break;
+
+ default:
+ break;
+ }
+ };
+
+ $scope.switchTheme = function () {
+ $scope.isHighContrast = !$scope.isHighContrast;
+ doSwitch($scope.isHighContrast, darkThemeFiles);
+ savePreference($scope.HC_THEME_PREF, $scope.isHighContrast);
+ };
+
+ $scope.switchIncreasedFont = function () {
+ $scope.isIncreasedFont = !$scope.isIncreasedFont;
+ doSwitch($scope.isIncreasedFont, fontSizeFiles);
+ savePreference($scope.FONT_SIZE_PREF, $scope.isIncreasedFont);
+ };
+
+ }]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/js/directives/navigationButtonsPartial.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/directives/navigationButtonsPartial.js b/client/enduser/src/main/resources/META-INF/resources/app/js/directives/navigationButtonsPartial.js
index 6d0d81d..67a70d5 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/directives/navigationButtonsPartial.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/directives/navigationButtonsPartial.js
@@ -41,9 +41,9 @@ angular.module('self')
}
},
controller: function ($scope) {
- $scope.validateAndNext = function (event, state) {
+ $scope.validateAndNext = function ($event, state) {
//getting the enclosing form in order to access to its name
- var currentForm = GenericUtil.getEnclosingForm(event.target);
+ var currentForm = GenericUtil.getEnclosingForm($event.target);
if (currentForm !== null) {
if (ValidationExecutor.validate(currentForm, $scope.$parent)) {
if (state) {
@@ -53,7 +53,6 @@ angular.module('self')
}
}
}
-
};
$scope.nextTab = function (state) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/js/directives/ngEnter.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/directives/ngEnter.js b/client/enduser/src/main/resources/META-INF/resources/app/js/directives/ngEnter.js
new file mode 100644
index 0000000..4f7e5a9
--- /dev/null
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/directives/ngEnter.js
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+'use strict';
+
+angular.module('self')
+ .directive('ngEnter', function ($parse) {
+
+ return function (scope, element, attrs) {
+ element.bind("keydown keypress", function (event) {
+ // check enter key pressed
+ if (event.which === 13) {
+ scope.$apply(function () {
+ $parse(attrs.ngEnter)(scope, {
+ $event: event
+ });
+ });
+
+ event.preventDefault();
+ }
+ });
+ };
+
+ });
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/js/util/assetsManager.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/util/assetsManager.js b/client/enduser/src/main/resources/META-INF/resources/app/js/util/assetsManager.js
index 48ec119..6402f84 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/util/assetsManager.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/util/assetsManager.js
@@ -23,20 +23,30 @@ angular.module('SyncopeEnduserApp')
.factory("AssetsManager", ['$q', function ($q) {
var assetsManager = {};
+ assetsManager.accessibilityCssId = "access_css";
+
var createLink = function (id, url, deferred) {
- if (!angular.element('link#' + id).length && !angular.element('link[href="' + url + '"').length) {
+ if (!angular.element('link[href="' + url + '"').length) {
var link = document.createElement('link');
+ link.id = id;
link.rel = 'stylesheet';
link.href = url;
link.onload = deferred.resolve;
link.onerror = deferred.reject;
- angular.element('head').append(link);
+
+ var themeElems = angular.element('[id*="' + assetsManager.accessibilityCssId + '"]');
+ if (themeElems.length) {
+ angular.element(themeElems[0]).before(link);
+ } else {
+ angular.element('head').append(link);
+ }
}
};
var createScript = function (id, url, deferred) {
- if (!angular.element('script#' + id).length && !angular.element('script[src="' + url + '"').length) {
+ if (!angular.element('script[src="' + url + '"').length) {
var script = document.createElement('script');
+ script.id = id;
script.src = url;
script.onload = deferred.resolve;
script.onerror = deferred.reject;
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtonsPartial.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtonsPartial.html b/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtonsPartial.html
index cd2f907..1676b73 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtonsPartial.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtonsPartial.html
@@ -17,12 +17,15 @@ specific language governing permissions and limitations
under the License.
-->
<div class="float-right">
- <a ng-show="next !== 'none'" id="next" class="btn btn-secondary btn-default" ng-click="validateAndNext($event)">
+ <a ng-show="next !== 'none'" id="next" ng-click="validateAndNext($event)"
+ class="btn btn-secondary btn-default"
+ ng-enter="validateAndNext($event)" tabindex="0">
{{'NEXT'| translate}}
<span class="fa fa-arrow-circle-right"></span>
</a>
- <a ng-show="previous !== 'none'" id="previous"
- ng-click="previousTab()" class="btn btn-secondary btn-default float-left">
+ <a ng-show="previous !== 'none'" id="previous" ng-click="previousTab()"
+ class="btn btn-secondary btn-default float-left"
+ tabindex="0" ng-enter="previousTab()">
<span class="fa fa-arrow-circle-left"></span>
{{'PREVIOUS'| translate}}
</a>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/templates/editUserTemplate.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/templates/editUserTemplate.html b/client/enduser/src/main/resources/META-INF/resources/app/views/templates/editUserTemplate.html
index a309f71..396bfe7 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/templates/editUserTemplate.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/templates/editUserTemplate.html
@@ -31,11 +31,12 @@ under the License.
<div growl reference="2" inline="true"></div>
<div id="status-buttons" class="btn-group btn-breadcrumb">
<a class="btn btn-secondary btn-default breadcrumb-btn-elem breadcrumb-home"
- ng-show="createMode" ng-click="logout()">
+ tabindex="0" ng-enter="logout()" ng-show="createMode" ng-click="logout()">
<i class="fa fa-home"></i>
</a>
+
<a id="logout" class="btn btn-secondary btn-default breadcrumb-btn-elem"
- ng-show="!createMode" ng-click="logout()">
+ tabindex="0" ng-enter="logout()" ng-show="!createMode" ng-click="logout()">
<i class="fa fa-power-off" style="color:red"></i>
</a>
<!-- add class breadcrumb-disabled-link to buttons to prevent click -->
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/templates/passwordresetTemplate.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/templates/passwordresetTemplate.html b/client/enduser/src/main/resources/META-INF/resources/app/views/templates/passwordresetTemplate.html
index b2d6a3b..12be2a8 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/templates/passwordresetTemplate.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/templates/passwordresetTemplate.html
@@ -25,11 +25,13 @@ under the License.
</div>
<div class="breadcrumb-header text-center">
<div id="status-buttons" class="btn-group btn-breadcrumb">
- <a class="btn btn-default breadcrumb-btn-elem breadcrumb-home" ng-click="logout()">
+ <a class="btn btn-default breadcrumb-btn-elem breadcrumb-home" ng-click="logout()"
+ tabindex="0" ng-enter="logout()">
<i class="fa fa-home"></i>
</a>
<!--add class breadcrumb-disabled-link to buttons to prevent click-->
- <a ui-sref-active="active" class="btn btn-secondary btn-default active">{{'USERDETAILS'| translate}}</a>
+ <a ui-sref-active="active" tabindex="0"
+ class="btn btn-secondary btn-default active">{{'USERDETAILS'| translate}}</a>
</div>
</div>
<form class="signup-form" name="passwordResetForm" ng-submit="resetPassword(user)" novalidate>
@@ -61,7 +63,8 @@ under the License.
</div>
</div>
<div class="col-xs-6">
- <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()">
+ <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()"
+ tabindex="0" ng-enter="logout()">
{{'CANCEL'| translate}}
</a>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html
index 6a3524e..68d442c 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html
@@ -68,7 +68,8 @@ under the License.
<div id="attribute" class="form-group row justify-content-between p-0">
<div class="col-xs-3">
- <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()">
+ <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0"
+ ng-enter="logout()" ng-click="logout()">
{{'CANCEL'| translate}}
</a>
</div>
@@ -85,7 +86,7 @@ under the License.
ng-show="!createMode || (createMode && endReached)">
<button id="finish" type="button" tabindex="0"
class="btn btn-secondary btn-default float-right nav-button"
- ng-click="finish()">
+ ng-enter="logout()" ng-click="finish()">
{{'FINISH'| translate}}
</button>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html
index 8146e44..1464f7c 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html
@@ -22,7 +22,8 @@ under the License.
<div id="attribute" class="form-group row justify-content-between p-0">
<div class="col-xs-3">
- <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()">
+ <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0"
+ ng-enter="logout()" ng-click="logout()">
{{'CANCEL'| translate}}
</a>
</div>
@@ -39,7 +40,7 @@ under the License.
ng-show="!createMode || (createMode && endReached)">
<button id="finish" type="button" tabindex="0"
class="btn btn-secondary btn-default float-right nav-button"
- ng-click="finish()">
+ ng-enter="finish()" ng-click="finish()">
{{'FINISH'| translate}}
</button>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/user-form-finish.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-form-finish.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-form-finish.html
index ad3485b..9f01174 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-form-finish.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-form-finish.html
@@ -24,7 +24,8 @@ under the License.
<!--navigation buttons-->
<div class="col-xs-3">
- <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()">
+ <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0"
+ ng-enter="logout()" ng-click="logout()">
{{'CANCEL'| translate}}
</a>
</div>
@@ -36,7 +37,8 @@ under the License.
</navigation-buttons-partial>
</div>
<div class="col-xs-2 float-right p-0">
- <button id="save" type="submit" tabindex="0" class="btn btn-secondary btn-default float-right nav-button">
+ <button id="save" type="submit" tabindex="0"
+ class="btn btn-secondary btn-default float-right nav-button">
{{'SAVE'| translate}}
</button>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html
index dbec0ac..7784cfb 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html
@@ -35,7 +35,8 @@ under the License.
<div id="attribute" class="form-group row justify-content-between p-0">
<div class="col-xs-3">
- <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()">
+ <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0"
+ ng-enter="logout()" ng-click="logout()">
{{'CANCEL'| translate}}
</a>
</div>
@@ -52,7 +53,7 @@ under the License.
ng-show="!createMode || (createMode && endReached)">
<button id="finish" type="button" tabindex="0"
class="btn btn-secondary btn-default float-right nav-button"
- ng-click="finish()">
+ ng-enter="finish()" ng-click="finish()">
{{'FINISH'| translate}}
</button>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html
index d04c466..860e2e2 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html
@@ -22,7 +22,8 @@ under the License.
<div id="attribute" class="form-group row justify-content-between p-0">
<div class="col-xs-3">
- <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()">
+ <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0"
+ ng-enter="logout()" ng-click="logout()">
{{'CANCEL'| translate}}
</a>
</div>
@@ -39,7 +40,7 @@ under the License.
ng-show="!createMode || (createMode && endReached)">
<button id="finish" type="button" tabindex="0"
class="btn btn-secondary btn-default float-right nav-button"
- ng-click="finish()">
+ ng-enter="finish()" ng-click="finish()">
{{'FINISH'| translate}}
</button>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html
index a8cde79..9d09da1 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html
@@ -22,7 +22,8 @@ under the License.
<div id="attribute" class="form-group row justify-content-between p-0">
<div class="col-xs-3">
- <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()">
+ <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0"
+ ng-enter="logout()" ng-click="logout()">
{{'CANCEL'| translate}}
</a>
</div>
@@ -39,7 +40,7 @@ under the License.
ng-show="!createMode || (createMode && endReached)">
<button id="finish" type="button" tabindex="0"
class="btn btn-secondary btn-default float-right nav-button"
- ng-click="finish()">
+ ng-enter="finish()" ng-click="finish()">
{{'FINISH'| translate}}
</button>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html
index 216d624..fd7e27c 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html
@@ -22,7 +22,8 @@ under the License.
<div id="attribute" class="form-group row justify-content-between p-0">
<div class="col-xs-3">
- <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0" ng-click="logout()">
+ <a id="cancel" class="btn btn-danger float-left nav-button" tabindex="0"
+ ng-enter="logout()" ng-click="logout()">
{{'CANCEL'| translate}}
</a>
</div>
@@ -39,7 +40,7 @@ under the License.
ng-show="!createMode || (createMode && endReached)">
<button id="finish" type="button" tabindex="0"
class="btn btn-secondary btn-default float-right nav-button"
- ng-click="finish()">
+ ng-enter="finish()" ng-click="finish()">
{{'FINISH'| translate}}
</button>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/main/resources/customTemplate.json
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/customTemplate.json b/client/enduser/src/main/resources/customTemplate.json
index 6b0efc1..9b760b9 100644
--- a/client/enduser/src/main/resources/customTemplate.json
+++ b/client/enduser/src/main/resources/customTemplate.json
@@ -31,7 +31,8 @@
{
"css": [
"css/notification.css",
- "css/app.css"
+ "css/app.css",
+ "css/accessibility.css"
]
},
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/client/enduser/src/test/resources/customTemplate.json
----------------------------------------------------------------------
diff --git a/client/enduser/src/test/resources/customTemplate.json b/client/enduser/src/test/resources/customTemplate.json
index 0636b31..3fcb140 100644
--- a/client/enduser/src/test/resources/customTemplate.json
+++ b/client/enduser/src/test/resources/customTemplate.json
@@ -34,7 +34,8 @@
{
"css": [
"css/app.css",
- "css/notification.css"
+ "css/notification.css",
+ "css/accessibility.css"
]
},
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/fit/enduser-reference/src/main/resources/customTemplate.json
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/main/resources/customTemplate.json b/fit/enduser-reference/src/main/resources/customTemplate.json
index 6b0efc1..9b760b9 100644
--- a/fit/enduser-reference/src/main/resources/customTemplate.json
+++ b/fit/enduser-reference/src/main/resources/customTemplate.json
@@ -31,7 +31,8 @@
{
"css": [
"css/notification.css",
- "css/app.css"
+ "css/app.css",
+ "css/accessibility.css"
]
},
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/fit/enduser-reference/src/test/resources/customTemplate.json
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/customTemplate.json b/fit/enduser-reference/src/test/resources/customTemplate.json
index 6b0efc1..9b760b9 100644
--- a/fit/enduser-reference/src/test/resources/customTemplate.json
+++ b/fit/enduser-reference/src/test/resources/customTemplate.json
@@ -31,7 +31,8 @@
{
"css": [
"css/notification.css",
- "css/app.css"
+ "css/app.css",
+ "css/accessibility.css"
]
},
http://git-wip-us.apache.org/repos/asf/syncope/blob/3285cc03/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a387059..8db8281 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1563,7 +1563,12 @@ under the License.
<groupId>org.webjars.bower</groupId>
<artifactId>angular-translate-storage-cookie</artifactId>
<version>${angular-translate.version}</version>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars.bowergithub.angular</groupId>
+ <artifactId>bower-angular-aria</artifactId>
+ <version>${angular.version}</version>
+ </dependency>
<dependency>
<groupId>org.webjars.bower</groupId>