mcms_authentication 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/ajax-loader.gif +0 -0
- data/app/assets/javascripts/application.js +2 -2
- data/app/assets/javascripts/validate_login.js +37 -0
- data/app/assets/stylesheets/authentication_global.css +1542 -319
- data/app/controllers/application_controller.rb +5 -2
- data/app/controllers/home_controller.rb +18 -1
- data/app/controllers/roles_controller.rb +17 -10
- data/app/controllers/users_controller.rb +89 -36
- data/app/models/user.rb +9 -4
- data/app/views/roles/_form.html.erb +18 -13
- data/app/views/roles/index.html.erb +61 -32
- data/app/views/users/confirmations/new.html.erb +1 -0
- data/app/views/users/edit.html.erb +26 -14
- data/app/views/users/first_user.html.erb +99 -0
- data/app/views/users/index.html.erb +65 -38
- data/app/views/users/new.html.erb +24 -10
- data/app/views/users/passwords/edit.html.erb +17 -1
- data/app/views/users/passwords/new.html.erb +18 -2
- data/app/views/users/sessions/new.html.erb +22 -29
- data/app/views/users/unlocks/new.html.erb +6 -6
- data/config/initializers/constants.rb +5 -6
- data/config/routes.rb +6 -2
- data/db/seeds.rb +0 -18
- data/lib/generators/mcms_authentication/mcms_authentication_generator.rb +38 -13
- data/lib/generators/mcms_authentication/templates/models.rb +16 -34
- data/lib/mcms_authentication/engine.rb +32 -3
- metadata +5 -10
- data/app/assets/javascripts/authentication_global.js +0 -17
- data/app/assets/stylesheets/application.css +0 -33
- data/app/views/layouts/users/_javascript.html.erb +0 -3
- data/app/views/layouts/users/_stylesheet.html.erb +0 -3
- data/app/views/layouts/users/devise.html.erb +0 -40
- data/app/views/layouts/users/home.html.erb +0 -99
- data/lib/mcms_authentication/seeds.rb +0 -14
- data/lib/tasks/mcms_authentication_tasks.rake +0 -4
Binary file
|
@@ -0,0 +1,37 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
@File Name :authentication_global.js
|
4
|
+
|
5
|
+
@Company Name :Mindfire Solutions Pvt. Ltd.
|
6
|
+
|
7
|
+
@Creator Name :Indranil Mukherjee
|
8
|
+
|
9
|
+
@Date Created :2012-07-20
|
10
|
+
|
11
|
+
@Date Modified :2012-07-20
|
12
|
+
|
13
|
+
@Last Modification Details :Validation adding for user login
|
14
|
+
|
15
|
+
@Purpose :Validation adding for user login
|
16
|
+
|
17
|
+
*/
|
18
|
+
$(document).ready(function(){
|
19
|
+
$('.button').click(function(){
|
20
|
+
$('#login_loader').show();
|
21
|
+
$.ajax({
|
22
|
+
url:" /users/sign_in",
|
23
|
+
type:"POST",
|
24
|
+
data:{"user":{"email": $('#user_email').val(),"password": $('#user_password').val()}},
|
25
|
+
success:function(data){
|
26
|
+
$('#login_loader').hide();
|
27
|
+
window.location.reload(true);
|
28
|
+
},
|
29
|
+
error:function(data){
|
30
|
+
$('#login_loader').hide();
|
31
|
+
$('.notice').html("Invalid email or password");
|
32
|
+
}
|
33
|
+
})
|
34
|
+
return false;
|
35
|
+
|
36
|
+
})
|
37
|
+
})
|