bcms_polling 1.0.0 → 1.0.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.2
@@ -1,5 +1,5 @@
1
1
  <% unless self.controller.instance_variable_defined? :@include_js_http_methods -%>
2
- <%= javascript_include_tag 'jquery', '/bcms/polling/bcms-polling' %>
2
+ <%= javascript_include_tag 'jquery', '/bcms/polling/bcms-polling', 'jquery.cookie' %>
3
3
  <%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? -%>
4
4
  <% self.controller.instance_variable_set(:@include_js_http_methods, true) -%>
5
5
  <% end -%>
@@ -19,10 +19,11 @@
19
19
  <span class="show-results"><%= link_to "See the results", "#", 'data-poll-id'=>@content_block.id, :class => "show-results" %></span>
20
20
  </div>
21
21
 
22
- <% if cookies[cookie_for(@content_block)] -%>
23
- <script type="text/javascript">
24
- $(document).ready(function() {
22
+ <script type="text/javascript">
23
+ $(document).ready(function() {
24
+ var cookie = '<%= cookie_for(@content_block) %>';
25
+ if($.cookie(cookie)){
25
26
  showResults(<%= @content_block.id %>, false);
26
- });
27
- </script>
28
- <% end -%>
27
+ }
28
+ });
29
+ </script>
data/rails/init.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'browsercms'
1
2
  gem_root = File.expand_path(File.join(File.dirname(__FILE__), ".."))
2
3
  Cms.add_to_rails_paths gem_root
3
4
  Cms.add_generator_paths gem_root, "db/migrate/[0-9]*_*.rb"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcms_polling
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - BrowserMedia
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-17 00:00:00 -05:00
18
+ date: 2011-02-23 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies: []
21
21