spaghetti 0.4.0 → 0.4.1

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,7 +1,6 @@
1
1
  module SpaghettiHelpers
2
2
  def spaghetti name, path_or_items, options = {}
3
3
  output = ''.html_safe
4
- puts path_or_items.class.name
5
4
  if path_or_items.class.name == 'String'
6
5
  output << "<div class=\"#{ name } spaghetti spaghetti-empty\" data-spaghetti-enabled=\"1\" data-spaghetti-url=\"#{ path_or_items }\" data-spaghetti-next-page=\"1\"><div class=\"#{ name }-items\"></div><div class=\"throbber\">#{ image_tag 'throbber.gif' }</div></div>".html_safe
7
6
  else
@@ -1,3 +1,3 @@
1
1
  module Spaghetti
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -15,7 +15,9 @@ $(function() {
15
15
  }
16
16
 
17
17
  $('.spaghetti-empty').each(function() {
18
+ $(this).data('spaghetti-enabled', 0);
18
19
  $(this).removeClass('spaghetti-empty');
20
+ $(this).addClass('spaghetti-loading');
19
21
  $.ajax({
20
22
  url: $(this).data('spaghetti-url') + '?page=' + $(this).data('spaghetti-next-page'),
21
23
  type: 'get',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaghetti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-23 00:00:00.000000000 Z
12
+ date: 2012-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jquery-rails
@@ -63,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
63
  version: '0'
64
64
  segments:
65
65
  - 0
66
- hash: -1716258726040714666
66
+ hash: -2308180961251975086
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  none: false
69
69
  requirements:
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  version: '0'
73
73
  segments:
74
74
  - 0
75
- hash: -1716258726040714666
75
+ hash: -2308180961251975086
76
76
  requirements: []
77
77
  rubyforge_project:
78
78
  rubygems_version: 1.8.24