caboose-cms 0.3.84 → 0.3.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWJiZWRlZmYyMGNmYWQyMjYzZmFiNTNlYmQ1NjZmMTQ2ZWE0MzViOA==
4
+ NDU1MDBlNzlkMzA1OTAyYTUzZGZmM2QwNGU3ZTg3ZTlkZWJjZTJiZg==
5
5
  data.tar.gz: !binary |-
6
- NTZmODM1MDhlYWU1YzgxM2M1YTZhMjM2MDFkZGZlYjg5OTc0MGMyMA==
6
+ YWE0MzMyMWRiZWUwZWNkOWEzNmEzMzMyNzExYjlmMTVmZmEwYWVjNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- Yjg2ODRkZTc1MjFiNDZjZGVjOTE3NTYwMzViNmU4NGEyYjJjMzFhZmVjZjMz
10
- YmNmZjUzMzA3ZDYzNjE5MzI0Y2YwZjA0MmQzNzA3N2RlYzE2NWY5MDM1NGY5
11
- MTI0NmUzZTllZDNhNmIzNjM2ODZjOWJhN2M3ZWE2MTQ4NjQzNjE=
9
+ YzdiMjZhOTY4MTE4NzI3OTE5YTQyY2FkY2NmODEwNjZiYTJhZjgzNDg1Mjhm
10
+ MmM2NWViNDRmZWVmOGJmODEyYmU0NDk5MDM1MDNiY2ZiNTM2MjVhNTVhZmVh
11
+ ZWRhNjVhNDZmZjVkZmM0Mjc2Nzc3MDYwMDZiMGJiNDZlYjU4NWI=
12
12
  data.tar.gz: !binary |-
13
- N2JkMGU1YjMxMWU5MGE4YjY3NmFhNmZmOTAwYTkwYjEyMDllNDBlZjZhZGVm
14
- MWExNjVlM2MwNTFjOGFiZTlhYzRmMDFlOWMzZWI1MTRhNjQ4ZjdjNWZkNzZm
15
- ZTMwN2NlNGYxMmI0Yjg5MDNmZDhjODRjMzNiYTc3NzAzMzAyYjU=
13
+ ODZkODRjMWYxNDNmNTVjODY5Y2E3ZThmNjBhZjliNDhlNWEzNjJhMThmYjkx
14
+ ZGM5YWNhNmExN2IzOGY1YTEwZTRhNDQ0ZTRlMjI4ZmE5YzQ2MTJkOWNjMjhh
15
+ NjQzZGJlZjlkZjNjMTgwZGRhMjY2NWZkMGNhMjM2OGE2NGVjNTQ=
@@ -171,7 +171,7 @@ module Caboose
171
171
  resp = StdClass.new({
172
172
  'redirect' => '/admin/users'
173
173
  })
174
- render json: resp
174
+ render :json => resp
175
175
  end
176
176
 
177
177
  # GET /admin/users/options
@@ -12,7 +12,7 @@ pic = "http://gravatar.com/avatar/#{gravatar_id}.png?s=150" #&d=/assets/caboose/
12
12
  <div id='controls'>
13
13
  <input type='button' value='Back' onclick="window.location='/admin/users';" />
14
14
  <input type='button' value='Reset Password' onclick="window.location='/admin/users/<%= @edituser.id %>/edit-password';" />
15
- <input type='button' value='Delete User' onclick="deleteUser();" />
15
+ <input type='button' value='Delete User' onclick="delete_user(<%= @edituser.id %>);" />
16
16
  </div>
17
17
 
18
18
  <% content_for :caboose_js do %>
@@ -38,6 +38,29 @@ $(document).ready(function() {
38
38
  on_load: function() { modal.autosize(); }
39
39
  });
40
40
  });
41
+
42
+ function delete_user(user_id, confirm)
43
+ {
44
+ if (!confirm)
45
+ {
46
+ var p = $('<p/>').addClass('note confirm')
47
+ .append('Are you sure you want to delete the user? ')
48
+ .append($('<input/>').attr('type','button').val('Yes').click(function() { delete_user(user_id, true); })).append(' ')
49
+ .append($('<input/>').attr('type','button').val('No').click(function() { $('#message').empty(); }));
50
+ $('#message').empty().append(p);
51
+ return;
52
+ }
53
+ $('#message').html("<p class='loading'>Deleting user...</p>");
54
+ $.ajax({
55
+ url: '/admin/users/' + user_id,
56
+ type: 'delete',
57
+ success: function(resp) {
58
+ if (resp.error) $('#message').html("<p class='note error'>" + resp.error + "</p>");
59
+ if (resp.redirect) window.location = resp.redirect;
60
+ }
61
+ });
62
+ }
63
+
41
64
  </script>
42
65
  <% end %>
43
66
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.3.84'
2
+ VERSION = '0.3.85'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.84
4
+ version: 0.3.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-28 00:00:00.000000000 Z
11
+ date: 2014-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails