c80_feedback_form 0.1.0 → 0.1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9254cd62480954cac0fa1f8198f5719fa26cf227
4
- data.tar.gz: cd7f63b514842ddde4f7e8c1275e1b653de51ac1
3
+ metadata.gz: 47bb0f5d179f7899ec6cd191348e1ab96fcaa4c6
4
+ data.tar.gz: 14e07ffb2db886175d952b116d61b37814c0672e
5
5
  SHA512:
6
- metadata.gz: a0ed4b83241cd71e5206869dce8d56d132d6d9d311c928a1ea62c6b37df6da2c5891c55395bf916a5ebe4b7d3f24ca029c7a798b4d365c6623ada703634dfa66
7
- data.tar.gz: 99f50eac5c8cdcb410321309d1ab68a209e7631efc0a3a5377d7a4ea54a7e27e25dfb14742afc7d932ce8294a79d9c24134397cf44f2067302ce959958ccb7ec
6
+ metadata.gz: 656f3ae473e44df3a415daed895e60e1c7bac4d1feff38c66a31caf062c3b103493a8c686470d17280fe6449d6c0ed04d8688ca4d8d84eee42056e0024474adb
7
+ data.tar.gz: fde9ea7b536be8fc09e40dba25e917a5db5a94e43741dc0fcc485ec932ce65d4b57db4c4f26078ea53c0494105f495f6856980ab33c10b998a31bfd85e33ca78
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ [![Gem Version](https://badge.fury.io/rb/c80_feedback_form.svg)](http://badge.fury.io/rb/jquery_lazy_load)
2
+ [![Build Status](https://travis-ci.org/c080609a/c80_feedback_form.svg?branch=master)](https://travis-ci.org/c080609a/c80_feedback_form)
3
+
1
4
  # C80FeedbackForm
2
5
 
3
6
  Gem adds functionality to allow users to send feedback messages from site.
@@ -20,8 +23,19 @@ Or install it yourself as:
20
23
 
21
24
  ## Usage
22
25
 
26
+ NOTE: This gem uses `activeadmin` gem, `jQuery` gem, `bootstrap-sass` gem and `c80_modal_forms` gem.
27
+
28
+ Ensure, that your application's `Gemfile` contains these lines:
29
+ ```ruby
30
+ gem 'activeadmin'
31
+ gem 'jquery-rails'
32
+ gem 'bootstrap-sass'
33
+ gem 'c80_modal_forms'
34
+ ```
35
+
23
36
  You will need to add this line into your `application.js`:
24
37
 
38
+ //= require c80_modals_form
25
39
  //= require c80_feedback_form
26
40
 
27
41
  And add this line into `application.scss`:
@@ -1,2 +1 @@
1
- #= require bootstrap/modal
2
1
  #= require_directory ./frontend
Binary file
@@ -1,3 +1,3 @@
1
1
  module C80FeedbackForm
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c80_feedback_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - C80609A
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-09 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,7 +76,6 @@ files:
76
76
  - app/admin/c80_feedback_form/message_feedbacks.rb
77
77
  - app/assets/javascripts/c80_feedback_form.js.coffee
78
78
  - app/assets/javascripts/frontend/feedback-form-ajax.js
79
- - app/assets/javascripts/frontend/modal_forms.js
80
79
  - app/assets/stylesheets/active_admin_c80_feedback_form.scss
81
80
  - app/assets/stylesheets/backend/active_admin_custom.scss
82
81
  - app/assets/stylesheets/backend/active_admin_custom/message_feedbacks.scss
@@ -96,6 +95,7 @@ files:
96
95
  - app/views/c80_feedback_form/site/shared/_ok_message.html.erb
97
96
  - bin/console
98
97
  - bin/setup
98
+ - c80_feedback_form-0.1.0.gem
99
99
  - c80_feedback_form.gemspec
100
100
  - config/routes.rb
101
101
  - db/migrate/20151207174001_create_c80_feedback_form_message_feedbacks.rb
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 2.4.7
125
+ rubygems_version: 2.5.1
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Enable the feedback feature
@@ -1,65 +0,0 @@
1
- /**
2
- * Created by scout on 3/25/15.
3
- * "методы" по работе с модальными окнами.
4
- *
5
- */
6
-
7
- (function($) {
8
-
9
- $.fn.modal_success = function(){
10
- //console.log("modal_success>");
11
-
12
- // close modal
13
- this.modal('hide');
14
-
15
- // clear form input elements
16
- this.find('input[type="text"]').val('');
17
- this.find('textarea').val('');
18
-
19
- // clear error state
20
- this.clear_previous_errors();
21
- };
22
-
23
- $.fn.render_form_errors = function(errors){
24
-
25
- var $form = this;
26
- this.clear_previous_errors();
27
- var model = this.data('model');
28
-
29
- // show error messages in input form-group help-block
30
- $.each(errors, function(field, messages){
31
- var $input = $('input[name="' + model + '[' + field + ']"]');
32
- if ($input.length == 0) {
33
- $input = $('textarea[name="' + model + '[' + field + ']"]');
34
- }
35
- $input.closest('.form-group').addClass('has-error').find('.help-block').html( messages.join(' ') );
36
- });
37
-
38
- };
39
-
40
- $.fn.clear_previous_errors = function(){
41
- $('.form-group.has-error', this).each(function(){
42
- //console.log($('.help-block', $(this)));
43
- $('.help-block', $(this)).html('');
44
- $(this).removeClass('has-error');
45
- });
46
- $.rails.enableFormElements($(this));
47
- };
48
-
49
- $.fn.my_render_form_errors = function(errors) {
50
-
51
- var model = this.data('model');
52
-
53
- $.each(errors, function(field, messages) {
54
-
55
- var $span = $('span#' + model + '_' + field);
56
- //console.log($span);
57
- $span.closest('.form-group').addClass('has-error');
58
- $span.html( messages.join(' & ') );
59
-
60
- });
61
-
62
- };
63
-
64
- }(jQuery));
65
-