ajax_forms 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +34 -0
  3. data/app/assets/javascripts/ajax_forms/application.js +17 -0
  4. data/app/assets/javascripts/ajax_forms/fancybox.js +26 -0
  5. data/app/assets/javascripts/ajax_forms/select2.js +110 -0
  6. data/app/assets/stylesheets/ajax_forms/application.css +15 -0
  7. data/app/controllers/ajax_forms/application_controller.rb +4 -0
  8. data/app/helpers/ajax_forms/application_helper.rb +4 -0
  9. data/app/views/_error_messages.html.erb +10 -0
  10. data/app/views/layouts/_application.html.erb +9 -0
  11. data/app/views/quick_response.js.erb +7 -0
  12. data/config/routes.rb +24 -0
  13. data/lib/ajax_forms.rb +12 -0
  14. data/lib/ajax_forms/dsl.rb +68 -0
  15. data/lib/ajax_forms/engine.rb +5 -0
  16. data/lib/ajax_forms/version.rb +3 -0
  17. data/lib/tasks/ajax_forms_tasks.rake +4 -0
  18. data/test/ajax_forms_test.rb +7 -0
  19. data/test/dummy/README.rdoc +28 -0
  20. data/test/dummy/Rakefile +6 -0
  21. data/test/dummy/app/assets/javascripts/application.js +13 -0
  22. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  23. data/test/dummy/app/controllers/application_controller.rb +5 -0
  24. data/test/dummy/app/helpers/application_helper.rb +2 -0
  25. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  26. data/test/dummy/bin/bundle +3 -0
  27. data/test/dummy/bin/rails +4 -0
  28. data/test/dummy/bin/rake +4 -0
  29. data/test/dummy/config.ru +4 -0
  30. data/test/dummy/config/application.rb +23 -0
  31. data/test/dummy/config/boot.rb +5 -0
  32. data/test/dummy/config/database.yml +25 -0
  33. data/test/dummy/config/environment.rb +5 -0
  34. data/test/dummy/config/environments/development.rb +37 -0
  35. data/test/dummy/config/environments/production.rb +82 -0
  36. data/test/dummy/config/environments/test.rb +39 -0
  37. data/test/dummy/config/initializers/assets.rb +8 -0
  38. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  39. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  40. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  41. data/test/dummy/config/initializers/inflections.rb +16 -0
  42. data/test/dummy/config/initializers/mime_types.rb +4 -0
  43. data/test/dummy/config/initializers/session_store.rb +3 -0
  44. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  45. data/test/dummy/config/locales/en.yml +23 -0
  46. data/test/dummy/config/routes.rb +4 -0
  47. data/test/dummy/config/secrets.yml +22 -0
  48. data/test/dummy/public/404.html +67 -0
  49. data/test/dummy/public/422.html +67 -0
  50. data/test/dummy/public/500.html +66 -0
  51. data/test/dummy/public/favicon.ico +0 -0
  52. data/test/integration/navigation_test.rb +10 -0
  53. data/test/test_helper.rb +15 -0
  54. metadata +272 -0
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ fixtures :all
5
+
6
+ # test "the truth" do
7
+ # assert true
8
+ # end
9
+ end
10
+
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
metadata ADDED
@@ -0,0 +1,272 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ajax_forms
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.16
5
+ platform: ruby
6
+ authors:
7
+ - Guillermo Bisheimer, Christian Pfarher
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jquery
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: select2-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.5'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 3.5.9.1
51
+ type: :runtime
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '3.5'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 3.5.9.1
61
+ - !ruby/object:Gem::Dependency
62
+ name: chosen-rails
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.2'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 1.2.0
71
+ type: :runtime
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '1.2'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 1.2.0
81
+ - !ruby/object:Gem::Dependency
82
+ name: fancybox2-rails
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '0.2'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 0.2.8
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.2'
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 0.2.8
101
+ - !ruby/object:Gem::Dependency
102
+ name: activeadmin-select2
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ type: :runtime
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ - !ruby/object:Gem::Dependency
116
+ name: will_paginate
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - "~>"
120
+ - !ruby/object:Gem::Version
121
+ version: '3.0'
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 3.0.4
125
+ type: :runtime
126
+ prerelease: false
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.0'
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: 3.0.4
135
+ - !ruby/object:Gem::Dependency
136
+ name: sqlite3
137
+ requirement: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ type: :development
143
+ prerelease: false
144
+ version_requirements: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - "~>"
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ description: Allow search and fast creation of records in selectors (by select2 plugin)
150
+ in ActiveAdmin with Formtastic. It useg modal forms for new records submitted using
151
+ AJAX
152
+ email:
153
+ - gbisheimer@bys-control.com.ar, c.pfarher@gmail.com
154
+ executables: []
155
+ extensions: []
156
+ extra_rdoc_files: []
157
+ files:
158
+ - Rakefile
159
+ - app/assets/javascripts/ajax_forms/application.js
160
+ - app/assets/javascripts/ajax_forms/fancybox.js
161
+ - app/assets/javascripts/ajax_forms/select2.js
162
+ - app/assets/stylesheets/ajax_forms/application.css
163
+ - app/controllers/ajax_forms/application_controller.rb
164
+ - app/helpers/ajax_forms/application_helper.rb
165
+ - app/views/_error_messages.html.erb
166
+ - app/views/layouts/_application.html.erb
167
+ - app/views/quick_response.js.erb
168
+ - config/routes.rb
169
+ - lib/ajax_forms.rb
170
+ - lib/ajax_forms/dsl.rb
171
+ - lib/ajax_forms/engine.rb
172
+ - lib/ajax_forms/version.rb
173
+ - lib/tasks/ajax_forms_tasks.rake
174
+ - test/ajax_forms_test.rb
175
+ - test/dummy/README.rdoc
176
+ - test/dummy/Rakefile
177
+ - test/dummy/app/assets/javascripts/application.js
178
+ - test/dummy/app/assets/stylesheets/application.css
179
+ - test/dummy/app/controllers/application_controller.rb
180
+ - test/dummy/app/helpers/application_helper.rb
181
+ - test/dummy/app/views/layouts/application.html.erb
182
+ - test/dummy/bin/bundle
183
+ - test/dummy/bin/rails
184
+ - test/dummy/bin/rake
185
+ - test/dummy/config.ru
186
+ - test/dummy/config/application.rb
187
+ - test/dummy/config/boot.rb
188
+ - test/dummy/config/database.yml
189
+ - test/dummy/config/environment.rb
190
+ - test/dummy/config/environments/development.rb
191
+ - test/dummy/config/environments/production.rb
192
+ - test/dummy/config/environments/test.rb
193
+ - test/dummy/config/initializers/assets.rb
194
+ - test/dummy/config/initializers/backtrace_silencers.rb
195
+ - test/dummy/config/initializers/cookies_serializer.rb
196
+ - test/dummy/config/initializers/filter_parameter_logging.rb
197
+ - test/dummy/config/initializers/inflections.rb
198
+ - test/dummy/config/initializers/mime_types.rb
199
+ - test/dummy/config/initializers/session_store.rb
200
+ - test/dummy/config/initializers/wrap_parameters.rb
201
+ - test/dummy/config/locales/en.yml
202
+ - test/dummy/config/routes.rb
203
+ - test/dummy/config/secrets.yml
204
+ - test/dummy/public/404.html
205
+ - test/dummy/public/422.html
206
+ - test/dummy/public/500.html
207
+ - test/dummy/public/favicon.ico
208
+ - test/integration/navigation_test.rb
209
+ - test/test_helper.rb
210
+ homepage: https://github.com/bys-control/activeadmin-ajax_forms
211
+ licenses:
212
+ - MIT
213
+ metadata: {}
214
+ post_install_message:
215
+ rdoc_options: []
216
+ require_paths:
217
+ - lib
218
+ required_ruby_version: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ required_rubygems_version: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - ">="
226
+ - !ruby/object:Gem::Version
227
+ version: '0'
228
+ requirements: []
229
+ rubyforge_project:
230
+ rubygems_version: 2.2.2
231
+ signing_key:
232
+ specification_version: 4
233
+ summary: Allow search and fast creation of records on html selectors using ajax forms
234
+ in ActiveAdmin with formtastic
235
+ test_files:
236
+ - test/ajax_forms_test.rb
237
+ - test/dummy/config.ru
238
+ - test/dummy/config/environment.rb
239
+ - test/dummy/config/boot.rb
240
+ - test/dummy/config/environments/production.rb
241
+ - test/dummy/config/environments/test.rb
242
+ - test/dummy/config/environments/development.rb
243
+ - test/dummy/config/routes.rb
244
+ - test/dummy/config/initializers/cookies_serializer.rb
245
+ - test/dummy/config/initializers/mime_types.rb
246
+ - test/dummy/config/initializers/wrap_parameters.rb
247
+ - test/dummy/config/initializers/assets.rb
248
+ - test/dummy/config/initializers/session_store.rb
249
+ - test/dummy/config/initializers/backtrace_silencers.rb
250
+ - test/dummy/config/initializers/inflections.rb
251
+ - test/dummy/config/initializers/filter_parameter_logging.rb
252
+ - test/dummy/config/locales/en.yml
253
+ - test/dummy/config/application.rb
254
+ - test/dummy/config/database.yml
255
+ - test/dummy/config/secrets.yml
256
+ - test/dummy/README.rdoc
257
+ - test/dummy/app/views/layouts/application.html.erb
258
+ - test/dummy/app/helpers/application_helper.rb
259
+ - test/dummy/app/assets/javascripts/application.js
260
+ - test/dummy/app/assets/stylesheets/application.css
261
+ - test/dummy/app/controllers/application_controller.rb
262
+ - test/dummy/Rakefile
263
+ - test/dummy/bin/rails
264
+ - test/dummy/bin/bundle
265
+ - test/dummy/bin/rake
266
+ - test/dummy/public/500.html
267
+ - test/dummy/public/favicon.ico
268
+ - test/dummy/public/404.html
269
+ - test/dummy/public/422.html
270
+ - test/integration/navigation_test.rb
271
+ - test/test_helper.rb
272
+ has_rdoc: