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.
Files changed (35) hide show
  1. data/app/assets/images/ajax-loader.gif +0 -0
  2. data/app/assets/javascripts/application.js +2 -2
  3. data/app/assets/javascripts/validate_login.js +37 -0
  4. data/app/assets/stylesheets/authentication_global.css +1542 -319
  5. data/app/controllers/application_controller.rb +5 -2
  6. data/app/controllers/home_controller.rb +18 -1
  7. data/app/controllers/roles_controller.rb +17 -10
  8. data/app/controllers/users_controller.rb +89 -36
  9. data/app/models/user.rb +9 -4
  10. data/app/views/roles/_form.html.erb +18 -13
  11. data/app/views/roles/index.html.erb +61 -32
  12. data/app/views/users/confirmations/new.html.erb +1 -0
  13. data/app/views/users/edit.html.erb +26 -14
  14. data/app/views/users/first_user.html.erb +99 -0
  15. data/app/views/users/index.html.erb +65 -38
  16. data/app/views/users/new.html.erb +24 -10
  17. data/app/views/users/passwords/edit.html.erb +17 -1
  18. data/app/views/users/passwords/new.html.erb +18 -2
  19. data/app/views/users/sessions/new.html.erb +22 -29
  20. data/app/views/users/unlocks/new.html.erb +6 -6
  21. data/config/initializers/constants.rb +5 -6
  22. data/config/routes.rb +6 -2
  23. data/db/seeds.rb +0 -18
  24. data/lib/generators/mcms_authentication/mcms_authentication_generator.rb +38 -13
  25. data/lib/generators/mcms_authentication/templates/models.rb +16 -34
  26. data/lib/mcms_authentication/engine.rb +32 -3
  27. metadata +5 -10
  28. data/app/assets/javascripts/authentication_global.js +0 -17
  29. data/app/assets/stylesheets/application.css +0 -33
  30. data/app/views/layouts/users/_javascript.html.erb +0 -3
  31. data/app/views/layouts/users/_stylesheet.html.erb +0 -3
  32. data/app/views/layouts/users/devise.html.erb +0 -40
  33. data/app/views/layouts/users/home.html.erb +0 -99
  34. data/lib/mcms_authentication/seeds.rb +0 -14
  35. data/lib/tasks/mcms_authentication_tasks.rake +0 -4
Binary file
@@ -34,9 +34,9 @@
34
34
 
35
35
  // I require jquery_ujs everywhere
36
36
 
37
- //= require jquery_ujs
37
+ //= require jquery_ujs
38
38
 
39
39
  // I didn't included the tree because I may or may not require all javascripts in pages
40
40
 
41
- // require_tree .
41
+ // require_tree .
42
42
 
@@ -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
+ })