soapbox 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
@@ -13,12 +13,12 @@
13
13
  '/soapbox/stylesheets/jquery.fileupload-ui.css',
14
14
  "/soapbox/stylesheets/admin"
15
15
  %>
16
- <%= javascript_include_tag "/soapbox/javascripts/jquery-1.4.2.min.js",
16
+ <%= javascript_include_tag "/soapbox/javascripts/jquery-1.6.2.min.js",
17
17
  # "/soapbox/javascripts/jquery.tools.min.js",
18
18
  "/soapbox/javascripts/jquery-ui-1.8rc3.custom.min.js",
19
19
  "/soapbox/javascripts/jquery.ui.nestedSortable.js",
20
20
  "/soapbox/javascripts/jquery.timepicker.js",
21
- "/soapbox/javascripts/rails.js",
21
+ "/soapbox/javascripts/rails-1.6.js",
22
22
  "/soapbox/javascripts/jquery.formtastic.js",
23
23
  '/soapbox/javascripts/tiny_mce/jquery.tinymce.js',
24
24
  '/soapbox/javascripts/tiny_mce/init.js',
@@ -59,8 +59,7 @@ class SoapboxScaffoldGenerator < Rails::Generators::NamedBase
59
59
  look_for = "# Admin Resources"
60
60
  gsub_file('config/routes.rb', /(#{Regexp.escape(look_for)})/mi){|match| "#{match}\n resources :#{plural_name}"}
61
61
 
62
- # this moved to the migration
63
- # Plugin.create({ :title => plural_name.titleize, :route => "admin_#{plural_name}_path", :active => true})
62
+ Plugin.create({ :title => plural_name.titleize, :route => "admin_#{plural_name}_path", :active => true})
64
63
 
65
64
  puts "IMPORTANT"
66
65
  puts "---------------------------------------"
@@ -44,11 +44,22 @@ $(function() {
44
44
  $(this).addClass("selected").parents("ol, ul, li").addClass("selected")
45
45
  }
46
46
  });
47
+
47
48
  ////////////////////////////////////////////////////////////////////////////////
48
49
  // admin notices
49
50
  $(".notice, .alert").delay(1500).slideUp()
50
51
 
51
52
  $("#admin_tabs li.selected ul").css("margin-left", "-"+$("#admin_tabs li.selected ul").width()+"px")
53
+
54
+ ////////////////////////////////////////////////////////////////////////////////
55
+ // ajax checks
56
+ $('input[data-remote]').click(function () {
57
+ data = {}
58
+ data[$(this).attr("name")] = $(this).is(":checked");
59
+ data[$('meta[name=csrf-param]').attr('content')] = $('meta[name=csrf-token]').attr('content');
60
+ $.put( $(this).attr("href")+".js", data);
61
+ });
62
+
52
63
  });
53
64
 
54
65
  ////////////////////////////////////////////////////////////////////////////////
@@ -35,10 +35,11 @@ jQuery(function ($) {
35
35
  if (el.is("form, select"))
36
36
  var data = el.serializeArray()
37
37
  else if(el.is("input[type=checkbox]"))
38
- var data = [ { name : el.attr("name"), value: el.attr("checked") } ]
38
+ var data = { name : el.attr("name"), value: el.attr("checked"), authenticity_token: csrf_token }
39
39
  else
40
40
  var data = []
41
41
  // original
42
+ console.log(data)
42
43
  // var data = el.is('form') ? el.serializeArray() : [];
43
44
  $.ajax({
44
45
  url: url,
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{soapbox}
8
- s.version = "0.2.7"
8
+ s.version = "0.2.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Gabe Coyne}, %q{Killit Creative}]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soapbox
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 7
10
- version: 0.2.7
9
+ - 8
10
+ version: 0.2.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gabe Coyne