inline_forms 2.23 → 3.0

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.
Files changed (51) hide show
  1. checksums.yaml +9 -9
  2. data/.gitignore +5 -0
  3. data/bin/inline_forms +41 -414
  4. data/bin/inline_forms_app_template.rb +16 -0
  5. data/bin/inline_forms_installer_core.rb +423 -0
  6. data/lib/app/assets/javascripts/inline_forms.js +12 -32
  7. data/lib/app/assets/javascripts/inline_forms_application.js +7 -1
  8. data/lib/app/assets/stylesheets/inline_forms.css +5 -399
  9. data/lib/app/assets/stylesheets/inline_forms_application.css +3 -3
  10. data/lib/app/controllers/inline_forms_application_controller.rb +1 -2
  11. data/lib/app/controllers/inline_forms_controller.rb +2 -2
  12. data/lib/app/helpers/form_elements/check_list.rb +7 -14
  13. data/lib/app/helpers/form_elements/date.rb +3 -8
  14. data/lib/app/helpers/form_elements/decimal_field.rb +15 -0
  15. data/lib/app/helpers/form_elements/dropdown.rb +1 -1
  16. data/lib/app/helpers/form_elements/dropdown_with_other.rb +153 -0
  17. data/lib/app/helpers/form_elements/dropdown_with_values.rb +1 -1
  18. data/lib/app/helpers/form_elements/info_list.rb +22 -0
  19. data/lib/app/helpers/form_elements/integer_field.rb +15 -0
  20. data/lib/app/helpers/form_elements/kansen_slider.rb +89 -0
  21. data/lib/app/helpers/form_elements/month_year_picker.rb +33 -0
  22. data/lib/app/helpers/form_elements/move.rb +17 -0
  23. data/lib/app/helpers/form_elements/plain_text_area.rb +1 -1
  24. data/lib/app/helpers/form_elements/radio_button.rb +5 -6
  25. data/lib/app/helpers/form_elements/slider_with_values.rb +1 -1
  26. data/lib/app/helpers/form_elements/text_area.rb +12 -10
  27. data/lib/app/helpers/form_elements/text_area_without_ckeditor.rb +1 -1
  28. data/lib/app/helpers/form_elements/text_field.rb +2 -2
  29. data/lib/app/helpers/inline_forms_helper.rb +32 -37
  30. data/lib/app/views/inline_forms/_close.html.erb +12 -2
  31. data/lib/app/views/inline_forms/_edit.html.erb +54 -21
  32. data/lib/app/views/inline_forms/_flash.html.erb +13 -0
  33. data/lib/app/views/inline_forms/_list.html.erb +28 -24
  34. data/lib/app/views/inline_forms/_new.html.erb +52 -60
  35. data/lib/app/views/inline_forms/_new_nested.html.erb +43 -0
  36. data/lib/app/views/inline_forms/_show.html.erb +83 -39
  37. data/lib/app/views/inline_forms/_tree.html.erb +46 -0
  38. data/lib/app/views/layouts/devise.html.erb +4 -14
  39. data/lib/app/views/layouts/inline_forms.html.erb +15 -23
  40. data/lib/inline_forms/version.rb +1 -1
  41. metadata +17 -13
  42. data/lib/app/assets/images/add.png +0 -0
  43. data/lib/app/assets/images/close.png +0 -0
  44. data/lib/app/assets/images/tooltip-bubble-down-left.png +0 -0
  45. data/lib/app/assets/images/tooltip-bubble-down-right.png +0 -0
  46. data/lib/app/assets/images/tooltip-bubble-up-left.png +0 -0
  47. data/lib/app/assets/images/tooltip-bubble-up-right.png +0 -0
  48. data/lib/app/assets/images/trash.png +0 -0
  49. data/lib/app/assets/javascripts/jquery.qtip.js +0 -3395
  50. data/lib/app/assets/stylesheets/jquery.qtip.css +0 -567
  51. data/lib/app/views/inline_forms/_header.html.erb +0 -1
@@ -4,7 +4,13 @@
4
4
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
5
  // the compiled file.
6
6
  //
7
- //= require jquery.qtip
7
+ //= require jquery
8
+ //= require jquery_ujs
8
9
  //= require jquery.ui.all
10
+ //= require jquery.ui.datepicker-nl.js
11
+ //= require foundation
12
+ //= require jquery-scrollto
13
+ //= require jquery.remotipart
14
+ //= require ckeditor/init
9
15
  //= require inline_forms
10
16
 
@@ -1,398 +1,13 @@
1
1
  /*
2
2
  Document : inline_forms
3
3
  Created on : Feb 13, 2011, 10:00:55 AM
4
- Author : ace
5
- Description:
6
- Purpose of the stylesheet follows.
4
+ Author : Ace Suares
5
+ Description: Stylessheet for inline_forms
7
6
  */
8
7
 
9
- /*
10
- TODO customize this sample style
11
- Syntax recommendation http://www.w3.org/TR/REC-CSS2/
12
- */
13
- #flash {
14
- border: 4px solid white;
15
- }
16
- root {
17
- display: block;
18
- }
19
-
20
- body {
21
- background-color: #ffffff;
22
- color: #887E42;
23
- padding: 0;
24
- margin: 0 auto;
25
- font-family: sans-serif;
26
- font-size: 11pt;
27
- max-width: 1200px;
28
- }
29
-
30
- a {
31
- text-decoration: none;
32
- }
33
-
34
- .inline_forms_list {
35
- font-size: 100%;
36
- font-weight: normal;
37
- padding: 0;
38
- padding-bottom: 8px;
39
- margin: 0;
40
- list-style-type: none;
41
- -moz-border-radius: 10px;
42
- -webkit-border-radius: 10px;
43
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0, .4);
44
- -moz-box-shadow: 0 1px 3px rgba(0,0,0, .4);
45
- background-color: #F9EBAE;
46
- }
47
-
48
- .inline_forms_list ul {
49
- list-style-type: none;
50
- padding-left: 0;
51
- }
52
-
53
- .inline_forms_list .new_record_link {
54
- background-color: transparent;
55
- height: 25px;
56
- padding-bottom: 0;
57
- }
58
-
59
- .inline_forms_list .new_record_link a {
60
- float: right;
61
- width: 24px;
62
- height: 24px;
63
- margin: 0;
64
- padding: 0;
65
- }
66
-
67
- .inline_forms_list .new_record_link img {
68
- width: 24px;
69
- height: 24px;
70
- border: 0;
71
- }
72
-
73
- .inline_forms_list li a {
74
- color: #385B7B;
75
- }
76
-
77
- .inline_forms_list li {
78
- padding: 0.5em;
79
- margin-bottom: 0.3em;
80
- }
81
-
82
- .inline_forms_list li.odd {
83
- background-color: #FFE58C;
84
- }
85
-
86
- .inline_forms_list li.even {
87
- background-color: #FFEDB0;
88
- }
89
-
90
- .inline_forms_list li table {
91
- border: 1px solid #EFCA4B;
92
- margin: 0;
93
- padding: 0;
94
- }
95
-
96
- .inline_forms_list table tr th {
97
- padding: 0.2em 0.5em 0.2em 0.2em;
98
- border-bottom: 1px dotted lightgrey;
99
- font-weight: bold;
100
- text-align: left;
101
- background-color: #EFCA4B;
102
- }
103
-
104
- .inline_forms_list li table tr td {
105
- padding: 0.2em 0.5em 0.2em 0.2em;
106
- font-weight: normal;
107
- background-color: #F9EBAE;
108
- }
109
-
110
- .inline_forms_list div.attribute_value {
111
- margin: 0;
112
- }
113
-
114
- .inline_forms_list div.attribute_value a{
115
- color: #385B7B;
116
- }
117
- .attribute_text_area {
118
- width: 600px;
119
- height: 4em;
120
- padding: 0.2em;
121
- background-color: #FFE58C;
122
- border: 1px solid #eee;
123
- -moz-border-radius: 5px;
124
- -webkit-border-radius: 5px;
125
- }
126
-
127
- .header {
128
- border-bottom: 1px solid #EFCA4B;
129
- }
130
-
131
- .form_element_header {
132
- padding-top: 7px;
133
- font-size: 120%;
134
- font-weight: bolder;
135
- }
136
-
137
- .input_text_field {
138
- width: 600px;
139
- height: 1.5em;
140
- padding: 0.2em;
141
- background-color: #FFE58C;
142
- border: 1px solid #eee;
143
- -moz-border-radius: 5px;
144
- -webkit-border-radius: 5px;
145
- }
146
-
147
- .edit_form_field {
148
- position: relative;
149
- }
150
-
151
- .edit_form_checklist ul {
152
- list-style-type: none;
153
- }
154
-
155
- ul.checklist {
156
- list-style-type: none;
157
- margin: 0;
158
- padding: 0;
159
- }
160
-
161
- ul.checklist li {
162
- margin: 0;
163
- padding: 0;
164
- }
165
-
166
-
167
- .edit_form_checklist ul {
168
- margin: 0;
169
- padding: 0;
170
- }
171
-
172
-
173
- .inline_forms_list .edit_form_checklist ul li {
174
- margin: 0;
175
- padding: 0 0 0.3em 0;
176
- }
177
-
178
- .edit_form_checklist ul li .edit_form_checklist_text {
179
- float: left;
180
- padding: 0 0 0 0.2em;
181
- }
182
-
183
- .edit_form_checklist ul li input {
184
- float: left;
185
- padding: 0;
186
- }
187
-
188
- #Header {
189
- background-color: #B94C32;
190
- color: #FFFFFF;
191
- font-weight: bold;
192
- -moz-border-radius: 5px;
193
- -webkit-border-radius: 5px;
194
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0, .4);
195
- -moz-box-shadow: 0 1px 3px rgba(0,0,0, .4);
196
- /* border: 1px solid white;*/
197
- padding: 0.4em;
198
- margin: 0.4em 0 0.3em 0;
199
- }
200
-
201
- /* HEADER */
202
-
203
- #title {
204
- float: left;
205
- height: 1.5em;
206
- }
207
8
 
208
- #logout {
209
- float:right;
210
- height: 1.5em;
211
- }
212
-
213
- #locales {
214
- float: left;
215
- height: 1.5em;
216
- margin-left: 2em;
217
- }
218
-
219
- #locales ul {
220
- list-style: none;
221
- list-style-position: inside;
222
- margin: 0;
223
- padding: 0;
224
- }
225
-
226
- #locales li {
227
- display: inline-block;
228
- height: 1.5em;
229
- }
230
-
231
- #locales li a {
232
- color: white;
233
- }
234
-
235
- #locales li .active_locale {
236
- color: yellow;
237
- }
238
-
239
- #logout a {
240
- color: white;
241
- }
242
9
 
243
- /* END HEADER */
244
10
 
245
-
246
- #tabs {
247
- background-color: #F9EBAE;
248
- -moz-border-radius: 5px;
249
- -webkit-border-radius: 5px;
250
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0, .4);
251
- -moz-box-shadow: 0 1px 3px rgba(0,0,0, .4);
252
- background-image: -moz-linear-gradient(100% 100% 90deg, #F9EBAE, #EFCA4B);
253
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F9EBAE), to(#F9EBAE));
254
- padding: 0.4em;
255
- margin: 0 0 0.4em 0;
256
- font-size: 10pt;
257
- }
258
-
259
- #tabs li {
260
- font-size: 110%;
261
- font-weight: bold;
262
- display: inline-block;
263
- background-color: #EFE06C;
264
- padding: 0.2em 0.3em;
265
- border: 1px solid #385b7b;
266
- -moz-border-radius: 5px;
267
- -webkit-border-radius: 5px;
268
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0, .4);
269
- -moz-box-shadow: 0 1px 3px rgba(0,0,0, .4);
270
- }
271
-
272
- #tabs li:hover {
273
- -webkit-transform: scale(1.2);
274
- -moz-transform: scale(1.2);
275
- -webkit-box-shadow: 0 2px 5px rgba(0,0,0, .5);
276
- -moz-box-shadow: 0 2px 5px rgba(0,0,0, .5);
277
- }
278
-
279
-
280
- #tabs li a {
281
- color: #887E42;
282
- }
283
-
284
- #tabs .current {
285
- font-weight: bold;
286
- color: #385B7B;
287
- background-color: #FFECAB;
288
- border: 2px solid #385b7b;
289
- }
290
-
291
- #admin_tabs {
292
- background-color: #FFEBAE;
293
- -moz-border-radius: 5px;
294
- -webkit-border-radius: 5px;
295
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0, .4);
296
- -moz-box-shadow: 0 1px 3px rgba(0,0,0, .4);
297
- background-image: -moz-linear-gradient(100% 100% 90deg, #FFEBAE, #E0CA4B);
298
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFEBAE), to(#FFEBAE));
299
- padding: 0.4em;
300
- margin: 0 0 0.4em 0;
301
- font-size: 10pt;
302
- }
303
-
304
- #admin_tabs li {
305
- font-size: 110%;
306
- font-weight: bold;
307
- display: inline-block;
308
- background-color: #EFE06C;
309
- padding: 0.2em 0.3em;
310
- border: 1px solid #385b7b;
311
- -moz-border-radius: 5px;
312
- -webkit-border-radius: 5px;
313
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0, .4);
314
- -moz-box-shadow: 0 1px 3px rgba(0,0,0, .4);
315
- }
316
-
317
- #admin_tabs li:hover {
318
- -webkit-transform: scale(1.2);
319
- -moz-transform: scale(1.2);
320
- -webkit-box-shadow: 0 2px 5px rgba(0,0,0, .5);
321
- -moz-box-shadow: 0 2px 5px rgba(0,0,0, .5);
322
- }
323
-
324
-
325
- #admin_tabs li a {
326
- color: #887E42;
327
- }
328
-
329
- #admin_tabs .current {
330
- font-weight: bold;
331
- color: #385B7B;
332
- background-color: #FFECAB;
333
- border: 2px solid #385b7b;
334
- }
335
-
336
- .close_icon {
337
- border: 0;
338
- margin: 1px;
339
- padding: 0;
340
- float:right;
341
- }
342
-
343
- .pagination {
344
- padding: 0;
345
- margin: 0;
346
- margin-bottom: 5px;
347
- }
348
-
349
- .pagination a, .pagination span, .pagination em {
350
- font-size: 70%;
351
- padding-left:8px;
352
- padding-right:8px;
353
- padding-top:5px;
354
- padding-bottom: 5px;
355
- border: solid #999999 1px;
356
- text-decoration: none;
357
- color:black;
358
- background-color: #EBEAE9;
359
- background-image: -moz-linear-gradient(100% 100% 90deg, #cccccc,#EBEAE9);
360
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#cccccc), to(#EBEAE9));
361
- -moz-border-radius: 5px;
362
- -webkit-border-radius: 5px;
363
- -webkit-box-shadow: 0 2px 3px rgba(0,0,0, .4);
364
- -moz-box-shadow: 0 2px 3px rgba(0,0,0, .4);
365
- }
366
-
367
- .pagination a:hover {
368
- color:white;
369
- background-color: #EFCA4B;
370
- background-image: -moz-linear-gradient(100% 100% 90deg, #F9EBAE,#EFCA4B);
371
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#EFCA4B), to(#F9EBAE));
372
- }
373
-
374
- .pagination em {
375
- background-color: #eeeeee;
376
- color: black;
377
- background-image: -moz-linear-gradient(100% 100% 90deg, #eeeeee, #ffffff);
378
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ffffff), to(#eeeeee));
379
- }
380
-
381
- .pagination span.disabled {
382
- color: #AAA; }
383
-
384
- #paginate_info {
385
- color: #ffffff;
386
- font-weight: bold;
387
- -moz-border-radius: 5px;
388
- -webkit-border-radius: 5px;
389
- -webkit-box-shadow: 0 1px 1px rgba(0,0,0, .1);
390
- -moz-box-shadow: 0 1px 1px rgba(0,0,0, .1);
391
- background-color: #EFCA4B;
392
- padding: 0.7em;
393
- margin: 0 1em 0.4em 1em;
394
-
395
- }
396
11
  .error {
397
12
  color: #ffffff;
398
13
  font-weight: bold;
@@ -448,17 +63,8 @@ ul.checklist li {
448
63
  font-family: monospace;
449
64
  }
450
65
 
451
- .ui-tooltip-content ul {
452
- padding: 0;
453
- margin: 0;
454
- list-style-type: none;
455
- }
456
66
 
457
- .ui-tooltip-content ul li {
458
- margin-left: 20px;
459
- }
67
+ /* LEFT */
68
+
69
+
460
70
 
461
- .ui-tooltip-content ul li:first-letter
462
- {
463
- margin-left: -20px;
464
- }
@@ -2,6 +2,6 @@
2
2
  * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
3
  * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
4
  * the top of the compiled file, but it's generally better to create a new file per style scope.
5
- *= require 'inline_forms'
6
- *= require 'jquery.qtip'
7
- */
5
+ *
6
+ *= require inline_forms
7
+ */
@@ -9,9 +9,8 @@ class InlineFormsApplicationController < ActionController::Base
9
9
  #set the locale based on the subdomain
10
10
  def set_locale
11
11
  I18n.locale = extract_locale_from_subdomain || I18n.default_locale
12
-
13
12
  end
14
-
13
+
15
14
  # Get locale code from request subdomain (like http://it.application.local:3000)
16
15
  def extract_locale_from_subdomain
17
16
  locale = request.subdomains.first