This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Minor UI fixes for mobile; autofocus (#1499)
* Added configuration for owasp. Synchronize client owap configs with the server configs. Also added a time indicator on failed login attempts to give the user feedback on subsequent failed login attempts. * switched to handlebar template for passing the server's owasp config down to the client. reverted some of the other changes (regarding the http request). * Removed debug code. * Changed variable name to owaspConfig * Fixed minor type-o's and set owasp.config() rather than the underlying configs. * chore(tidy): tidying up minor lint and layout issues * fix(lint): CSS alphabetize warnings (#1498) Fixes css lintings warnings of properties not alphabetized. * fix(authentication) Stops error on signin/signup (#1495) Uses the passport info object to simplify login and remove the need to temporarily cache the redirect within the session. * Moved owasp config into default and reverted other config files. Modified config to be "shared". This will allow future configurations to be easily passed to the client. * fixed 403 redirect if not signed in (#1496) * Update form-article.client.view.html For New Article, delete function no required * UI changes for mobile; autofocus * fixed broken password popover balloon * add e2e test for autofocus * Remove test, fix delete social login button * feat(core): Move template to .github folder * Deprecated $http success/error promise methods (#1508) Replaces the $http service calls with promise based methods of the client-side UsersService for the following: Users Change Password Users Manage Social Accounts Users Password Forgot Users Password Reset Users Signup Users Signin Modifies tests to reflect changes. Closes #1479 * rebase
- Loading branch information
1 parent
f0867c2
commit 73a7c2c
Showing
12 changed files
with
42 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
modules/core/client/directives/autofocus.client.directives.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
// Focus the element on page load | ||
// Unless the user is on a small device, because this could obscure the page with a keyboard | ||
|
||
angular.module('core') | ||
.directive('autofocus', autofocus); | ||
|
||
autofocus.$inject = ['$timeout', '$window']; | ||
|
||
function autofocus($timeout, $window) { | ||
var directive = { | ||
restrict: 'A', | ||
link: link | ||
}; | ||
|
||
return directive; | ||
|
||
function link(scope, element, attrs) { | ||
if ($window.innerWidth >= 800) { | ||
$timeout(function() { | ||
element[0].focus(); | ||
}, 100); | ||
} | ||
} | ||
} | ||
}()); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters