Skip to content

Commit eda1f57

Browse files
committed
Added location redirecton after login. Added fade-in on alertify cover
1 parent f4b66e1 commit eda1f57

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

OpenNote/openNote/controllers/loginController.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ openNote.controller("loginController", function($scope, $rootScope, userService,
9292
$scope.$apply(function(){
9393
alertify.success("Credentials Accepted");
9494
$rootScope.$emit("reloadListView", {}); //send and event to tell the list view to reload
95-
$location.path("/folder/");
95+
96+
if($rootScope.entryURL==null)//send them to the page if they requested
97+
$location.path("/folder/");
98+
else
99+
$location.path($rootScope.entryURL)
96100
});
97101
});
98102
}

OpenNote/openNote/openNote.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ openNote.run(function ( $rootScope,
3131

3232
//Authentication and authorization enforcer
3333
if (isLoggedInOrIsOnLoginScreen())//Initial entry if not logged in
34-
forceLogin(event);
34+
forceLogin(event, $location.url());
3535
else//Initial entry after if logged in
3636
if($location.path()!="/" && !$rootScope.showMenu && !$rootScope.showSideBar)//make sure we only fade in/run once
3737
$rootScope.$emit("init");
@@ -47,11 +47,14 @@ openNote.run(function ( $rootScope,
4747

4848
/**
4949
* Force user to login
50+
* @param event - the event this was called
51+
* @param url - the url the user tried to get
5052
*/
51-
var forceLogin = function(event){
53+
var forceLogin = function(event, url){
5254
if(event!=null)
53-
event.preventDefault();
55+
event.preventDefault();
5456

57+
$rootScope.entryURL=url;
5558
$location.path("/");
5659
}
5760

OpenNote/openNote/style/invert/alertify.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@
101101
}
102102

103103
.alertify-cover {
104-
transition: opacity 1s;
105-
background: negation(#CCC, @offset);;
104+
transition: opacity 1s ease-out, width 0s;
105+
background-color: negation(#555, @offset);
106106
height: 100%;
107107
position: fixed;
108108
width: 100%;

0 commit comments

Comments
 (0)