spud_blog 0.9.8 → 0.9.9

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.
@@ -1,19 +1,19 @@
1
- Spud = (typeof(Spud) == 'undefined') ? {} : Spud;
2
- Spud.Admin = (typeof(Spud.Admin) == 'undefined') ? {} : Spud.Admin;
1
+ spud = (typeof(spud) == 'undefined') ? {} : spud;
2
+ spud.admin = (typeof(spud.admin) == 'undefined') ? {} : spud.admin;
3
3
 
4
- Spud.Admin.PostCategories = new function(){
4
+ spud.admin.post_categories = new function(){
5
5
 
6
6
  var self = this;
7
7
  var _cachedCategoryIndex;
8
8
 
9
9
  this.index = function(){
10
- $('.spud_blog_manage_categories').live('click', self.clickedManageCategories);
11
- $('.spud_blog_category_add_new').live('click', self.clickedAddNewCategory);
12
- $('.spud_blog_category_edit').live('click', self.clickedEditCategory);
13
- $('.spud_blog_manage_categories_back').live('click', self.clickedBackButton);
14
- $('.spud_blog_manage_categories_save').live('click', self.submittedPostCategoryForm);
15
- $('.spud_post_category_form').live('submit', self.submittedPostCategoryForm);
16
- $('.spud_blog_category_delete').live('click', self.clickedDeleteCategory);
10
+ $('body').on('click', '.spud_blog_manage_categories', self.clickedManageCategories);
11
+ $('body').on('click', '.spud_blog_category_add_new', self.clickedAddNewCategory);
12
+ $('body').on('click', '.spud_blog_category_edit', self.clickedEditCategory);
13
+ $('body').on('click', '.spud_blog_manage_categories_back', self.clickedBackButton);
14
+ $('body').on('click', '.spud_blog_manage_categories_save', self.submittedPostCategoryForm);
15
+ $('body').on('submit', '.spud_post_category_form', self.submittedPostCategoryForm);
16
+ $('body').on('click', '.spud_blog_category_delete', self.clickedDeleteCategory);
17
17
  };
18
18
 
19
19
  this.clickedManageCategories = function(e){
@@ -1,18 +1,18 @@
1
1
  //= require spud/admin/post_categories
2
2
 
3
- Spud = (typeof(Spud) == 'undefined') ? {} : Spud;
4
- Spud.Admin = (typeof(Spud.Admin) == 'undefined') ? {} : Spud.Admin;
3
+ spud = (typeof(spud) == 'undefined') ? {} : spud;
4
+ spud.admin = (typeof(spud.admin) == 'undefined') ? {} : spud.admin;
5
5
 
6
- Spud.Admin.Posts = new function(){
6
+ spud.admin.posts = new function(){
7
7
 
8
8
  var self = this;
9
9
 
10
10
  this.edit = function(){
11
11
  initDatePicker();
12
12
 
13
- $('.spud_post_add_category').live('click', self.clickedPostAddCategory);
14
- $('.save_post_category_button').live('click', self.submittedPostCategoryForm);
15
- $('.spud_post_category_form').live('submit', self.submittedPostCategoryForm);
13
+ $('body').on('click', '.spud_post_add_category', self.clickedPostAddCategory);
14
+ $('body').on('click', '.save_post_category_button', self.submittedPostCategoryForm);
15
+ $('body').on('submit', '.spud_post_category_form', self.submittedPostCategoryForm);
16
16
  };
17
17
 
18
18
  this.clickedPostAddCategory = function(e){
@@ -1,11 +1,11 @@
1
- Spud = (typeof(Spud) == 'undefined') ? {} : Spud;
1
+ spud = (typeof(spud) == 'undefined') ? {} : spud;
2
2
 
3
- Spud.Blog = new function(){
3
+ spud.blog = new function(){
4
4
 
5
5
  var self = this;
6
6
 
7
7
  this.init = function(){
8
- $('.spud_blog_filter_form').live('submit', self.didSubmitFilterForm)
8
+ $('body').on('submit', '.spud_blog_filter_form', self.didSubmitFilterForm);
9
9
  };
10
10
 
11
11
  this.didSubmitFilterForm = function(event){
@@ -38,4 +38,4 @@ Spud.Blog = new function(){
38
38
  };
39
39
  };
40
40
 
41
- $(document).ready(Spud.Blog.init);
41
+ $(document).ready(spud.blog.init);
@@ -39,6 +39,6 @@
39
39
  </div>
40
40
 
41
41
  <script>
42
- $(document).ready(Spud.Admin.PostCategories.index);
42
+ $(document).ready(spud.admin.post_categories.index);
43
43
  </script>
44
44
  <%end%>
@@ -1,6 +1,9 @@
1
1
  <div class="spud_blog_category_manager">
2
2
  <%= link_to "New Post Category", new_spud_admin_post_category_path, :class => "btn btn-small btn-primary spud_blog_category_add_new", :title => "New Post Category" %>
3
3
  <ul class="spud_blog_category_manager_list">
4
+ <% if @post_categories.length == 0 %>
5
+ <li class="spud_blog_category_manager_empty">You do not have any Post Categories at this time.</li>
6
+ <% end %>
4
7
  <%= render :partial => 'category', :collection => @post_categories[nil] %>
5
8
  </ul>
6
9
  </div>
@@ -113,5 +113,5 @@
113
113
  </div>
114
114
 
115
115
  <script type="text/javascript">
116
- $(document).ready(Spud.Admin.Posts.edit);
116
+ $(document).ready(spud.admin.posts.edit);
117
117
  </script>
@@ -40,6 +40,6 @@
40
40
  </div>
41
41
 
42
42
  <script>
43
- $(document).ready(Spud.Admin.PostCategories.index);
43
+ $(document).ready(spud.admin.post_categories.index);
44
44
  </script>
45
45
  <%end%>
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Blog
3
- VERSION = "0.9.8"
3
+ VERSION = "0.9.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -338,7 +338,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
338
338
  version: '0'
339
339
  segments:
340
340
  - 0
341
- hash: 1225504895788635990
341
+ hash: -2302805393296962866
342
342
  required_rubygems_version: !ruby/object:Gem::Requirement
343
343
  none: false
344
344
  requirements:
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
347
347
  version: '0'
348
348
  segments:
349
349
  - 0
350
- hash: 1225504895788635990
350
+ hash: -2302805393296962866
351
351
  requirements: []
352
352
  rubyforge_project:
353
353
  rubygems_version: 1.8.24