feedbacker 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,9 @@
1
1
  <div id="feedback">
2
2
  <div id="compressed_feedback_form_tab">
3
- <%= link_to_function image_tag('feedback_tab.png'), show_feedback %>
3
+ <%= link_to image_tag('feedback_tab.png'), '#', :class => 'toggle_feedback' %>
4
4
  </div>
5
5
  <div id="expanded_feedback_form" style="display:none">
6
- <div id="expanded_feedback_form_tab"><%= link_to_function image_tag('feedback_tab.png'), hide_feedback %></div>
6
+ <div id="expanded_feedback_form_tab"><%= link_to image_tag('feedback_tab.png'), '#', :class => 'toggle_feedback' %></div>
7
7
  <% @remark ||= Remark.new %>
8
8
  <%= render :partial => 'remarks/form' %>
9
9
  </div>
@@ -1,6 +1,6 @@
1
1
  <%= form_for @remark, :remote => true do |f| %>
2
2
  <p><label><%= render :partial => 'remarks/greeting' %></label></p>
3
3
  <div><%= f.text_area :content %></div>
4
- <div id='feedback_submit_button'><%= f.submit 'Submit Feedback' %> <span class="fb_cancel"><%= link_to_function 'Cancel', hide_feedback %></span></div>
4
+ <div id='feedback_submit_button'><%= f.submit 'Submit Feedback' %> <span class="fb_cancel"><%= link_to 'Cancel', '#', :class => 'toggle_feedback' %></span></div>
5
5
  <div id='feedback_thank_you_message' style='display:none'>Thank you for your feedback!</div>
6
6
  <% end %>
@@ -1,7 +1,7 @@
1
1
  $('#feedback_submit_button').hide();
2
2
  $('#feedback_thank_you_message').fadeIn('500')
3
3
  setTimeout(function() {
4
- Feedback.hide_form();
4
+ Feedback.toggle_form();
5
5
  $('#feedback_thank_you_message').hide();
6
6
  $('#feedback_submit_button').show();
7
7
  }, 2000);
@@ -1,12 +1,13 @@
1
1
  Feedback = {
2
- show_form: function() {
3
- $('#expanded_feedback_form').show();
4
- $('#compressed_feedback_form_tab').hide();
5
- },
6
-
7
- hide_form: function() {
8
- $('#compressed_feedback_form_tab').show();
9
- $('#expanded_feedback_form').hide();
2
+ toggle_form: function() {
3
+ $('#compressed_feedback_form_tab').toggle();
4
+ $('#expanded_feedback_form').toggle();
10
5
  }
11
-
12
- }
6
+ }
7
+
8
+ $(document).ready(function() {
9
+ $('a.toggle_feedback').click(function() {
10
+ Feedback.toggle_form();
11
+ return false;
12
+ });
13
+ });
@@ -1,3 +1,3 @@
1
1
  module Feedbacker
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedbacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-07-16 00:00:00.000000000 Z
14
+ date: 2013-09-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -76,7 +76,6 @@ files:
76
76
  - README.md
77
77
  - Rakefile
78
78
  - app/controllers/remarks_controller.rb
79
- - app/helpers/feedbacker_helper.rb
80
79
  - app/mailers/feedback_mailer.rb
81
80
  - app/models/remark.rb
82
81
  - app/observers/remark_observer.rb
@@ -1,9 +0,0 @@
1
- module FeedbackerHelper
2
- def show_feedback
3
- "$('#expanded_feedback_form').show(); $('#compressed_feedback_form_tab').hide();"
4
- end
5
-
6
- def hide_feedback
7
- "$('#compressed_feedback_form_tab').show(); $('#expanded_feedback_form').hide();"
8
- end
9
- end