refinerycms-formtastic 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,266 @@
|
|
1
|
+
/* -------------------------------------------------------------------------------------------------
|
2
|
+
|
3
|
+
It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after
|
4
|
+
this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs.
|
5
|
+
This will allow you to update formtastic.css with new releases without clobbering your own changes.
|
6
|
+
|
7
|
+
This stylesheet forms part of the Formtastic Rails Plugin
|
8
|
+
(c) 2008-2011 Justin French
|
9
|
+
|
10
|
+
--------------------------------------------------------------------------------------------------*/
|
11
|
+
|
12
|
+
/* NORMALIZE AND RESET - obviously inspired by Yahoo's reset.css, but scoped to just .formtastic
|
13
|
+
--------------------------------------------------------------------------------------------------*/
|
14
|
+
.formtastic {
|
15
|
+
margin:0;
|
16
|
+
padding:0;
|
17
|
+
|
18
|
+
ul,
|
19
|
+
ol,
|
20
|
+
li,
|
21
|
+
fieldset,
|
22
|
+
legend,
|
23
|
+
input,
|
24
|
+
button,
|
25
|
+
textarea,
|
26
|
+
select,
|
27
|
+
p {
|
28
|
+
margin:0;
|
29
|
+
padding:0;
|
30
|
+
}
|
31
|
+
|
32
|
+
fieldset {
|
33
|
+
border:0;
|
34
|
+
}
|
35
|
+
|
36
|
+
em,
|
37
|
+
strong {
|
38
|
+
font-style:normal;
|
39
|
+
font-weight:normal;
|
40
|
+
}
|
41
|
+
|
42
|
+
ol,
|
43
|
+
ul {
|
44
|
+
list-style:none;
|
45
|
+
}
|
46
|
+
|
47
|
+
abbr,
|
48
|
+
acronym {
|
49
|
+
border:0;
|
50
|
+
font-variant:normal;
|
51
|
+
}
|
52
|
+
|
53
|
+
legend {
|
54
|
+
white-space:normal;
|
55
|
+
color:#000;
|
56
|
+
}
|
57
|
+
|
58
|
+
|
59
|
+
/* SEMANTIC ERRORS
|
60
|
+
--------------------------------------------------------------------------------------------------*/
|
61
|
+
.errors {
|
62
|
+
color:#cc0000;
|
63
|
+
margin:0.5em 0 1.5em 25%;
|
64
|
+
list-style:square;
|
65
|
+
}
|
66
|
+
|
67
|
+
.errors li {
|
68
|
+
padding:0;
|
69
|
+
border:none;
|
70
|
+
display:list-item;
|
71
|
+
}
|
72
|
+
|
73
|
+
/* INPUTS
|
74
|
+
--------------------------------------------------------------------------------------------------*/
|
75
|
+
.inputs {
|
76
|
+
overflow:hidden; /* clear containing floats */
|
77
|
+
|
78
|
+
input,
|
79
|
+
button,
|
80
|
+
textarea {
|
81
|
+
font-family:sans-serif;
|
82
|
+
font-size:inherit;
|
83
|
+
font-weight:inherit;
|
84
|
+
}
|
85
|
+
|
86
|
+
input,
|
87
|
+
textarea,
|
88
|
+
select {
|
89
|
+
font-size:100%;
|
90
|
+
}
|
91
|
+
|
92
|
+
.input {
|
93
|
+
overflow:hidden; /* clear containing floats */
|
94
|
+
padding:0.5em 0; /* padding and negative margin juggling is for Firefox */
|
95
|
+
margin-top:-0.5em;
|
96
|
+
margin-bottom:1em;
|
97
|
+
}
|
98
|
+
|
99
|
+
/* LEFT ALIGNED LABELS
|
100
|
+
--------------------------------------------------------------------------------------------------*/
|
101
|
+
.input .label {
|
102
|
+
display:block;
|
103
|
+
width:25%;
|
104
|
+
float:left;
|
105
|
+
padding-top:.2em;
|
106
|
+
}
|
107
|
+
|
108
|
+
.fragments .label,
|
109
|
+
.choices .label {
|
110
|
+
position:absolute;
|
111
|
+
width:95%;
|
112
|
+
left:0px;
|
113
|
+
}
|
114
|
+
|
115
|
+
.fragments .label label,
|
116
|
+
.choices .label label {
|
117
|
+
position:absolute;
|
118
|
+
}
|
119
|
+
|
120
|
+
/* NESTED FIELDSETS AND LEGENDS (radio, check boxes and date/time inputs use nested fieldsets)
|
121
|
+
--------------------------------------------------------------------------------------------------*/
|
122
|
+
.choices {
|
123
|
+
position:relative;
|
124
|
+
}
|
125
|
+
|
126
|
+
.choices-group {
|
127
|
+
float:left;
|
128
|
+
width:74%;
|
129
|
+
margin:0;
|
130
|
+
padding:0 0 0 25%;
|
131
|
+
}
|
132
|
+
|
133
|
+
.choice {
|
134
|
+
padding:0;
|
135
|
+
border:0;
|
136
|
+
}
|
137
|
+
|
138
|
+
|
139
|
+
/* INLINE HINTS
|
140
|
+
--------------------------------------------------------------------------------------------------*/
|
141
|
+
.input .inline-hints {
|
142
|
+
color:#666;
|
143
|
+
margin:0.5em 0 0 25%;
|
144
|
+
}
|
145
|
+
|
146
|
+
|
147
|
+
/* INLINE ERRORS
|
148
|
+
--------------------------------------------------------------------------------------------------*/
|
149
|
+
.inline-errors {
|
150
|
+
color:#cc0000;
|
151
|
+
margin:0.5em 0 0 25%;
|
152
|
+
}
|
153
|
+
|
154
|
+
.errors {
|
155
|
+
color:#cc0000;
|
156
|
+
margin:0.5em 0 0 25%;
|
157
|
+
list-style:square;
|
158
|
+
}
|
159
|
+
|
160
|
+
.errors li {
|
161
|
+
padding:0;
|
162
|
+
border:none;
|
163
|
+
display:list-item;
|
164
|
+
}
|
165
|
+
|
166
|
+
|
167
|
+
/* STRING, NUMERIC, PASSWORD, EMAIL, URL, PHONE, SEARCH (ETC) OVERRIDES
|
168
|
+
--------------------------------------------------------------------------------------------------*/
|
169
|
+
.stringish input {
|
170
|
+
width:72%;
|
171
|
+
}
|
172
|
+
|
173
|
+
.stringish input[size] {
|
174
|
+
width:auto;
|
175
|
+
max-width:72%;
|
176
|
+
}
|
177
|
+
|
178
|
+
|
179
|
+
/* TEXTAREA OVERRIDES
|
180
|
+
--------------------------------------------------------------------------------------------------*/
|
181
|
+
.text textarea {
|
182
|
+
width:72%;
|
183
|
+
}
|
184
|
+
|
185
|
+
.text textarea[cols] {
|
186
|
+
width:auto;
|
187
|
+
max-width:72%;
|
188
|
+
}
|
189
|
+
|
190
|
+
|
191
|
+
/* HIDDEN OVERRIDES
|
192
|
+
--------------------------------------------------------------------------------------------------*/
|
193
|
+
.hidden {
|
194
|
+
display:none;
|
195
|
+
}
|
196
|
+
|
197
|
+
|
198
|
+
/* BOOLEAN LABELS
|
199
|
+
--------------------------------------------------------------------------------------------------*/
|
200
|
+
.boolean label {
|
201
|
+
padding-left:25%;
|
202
|
+
display:block;
|
203
|
+
}
|
204
|
+
|
205
|
+
|
206
|
+
/* CHOICE GROUPS
|
207
|
+
--------------------------------------------------------------------------------------------------*/
|
208
|
+
.choices-group {
|
209
|
+
margin-bottom:-0.5em;
|
210
|
+
}
|
211
|
+
|
212
|
+
.choice {
|
213
|
+
margin:0.1em 0 0.5em 0;
|
214
|
+
}
|
215
|
+
|
216
|
+
.choice label {
|
217
|
+
float:none;
|
218
|
+
width:100%;
|
219
|
+
line-height:100%;
|
220
|
+
padding-top:0;
|
221
|
+
margin-bottom:0.6em;
|
222
|
+
}
|
223
|
+
|
224
|
+
|
225
|
+
/* ADJUSTMENTS FOR INPUTS INSIDE LABELS (boolean input, radio input, check_boxes input)
|
226
|
+
--------------------------------------------------------------------------------------------------*/
|
227
|
+
.choice label input,
|
228
|
+
.boolean label input {
|
229
|
+
margin:0 0.3em 0 0.1em;
|
230
|
+
line-height:100%;
|
231
|
+
}
|
232
|
+
|
233
|
+
|
234
|
+
/* FRAGMENTED INPUTS (DATE/TIME/DATETIME)
|
235
|
+
--------------------------------------------------------------------------------------------------*/
|
236
|
+
.fragments {
|
237
|
+
position:relative;
|
238
|
+
}
|
239
|
+
|
240
|
+
.fragments-group {
|
241
|
+
float:left;
|
242
|
+
width:74%;
|
243
|
+
margin:0;
|
244
|
+
padding:0 0 0 25%;
|
245
|
+
}
|
246
|
+
|
247
|
+
.fragment {
|
248
|
+
float:left;
|
249
|
+
width:auto;
|
250
|
+
margin:0 .3em 0 0;
|
251
|
+
padding:0;
|
252
|
+
border:0;
|
253
|
+
}
|
254
|
+
|
255
|
+
.fragment label {
|
256
|
+
display:none;
|
257
|
+
}
|
258
|
+
|
259
|
+
.fragment label input {
|
260
|
+
display:inline;
|
261
|
+
margin:0;
|
262
|
+
padding:0;
|
263
|
+
}
|
264
|
+
}
|
265
|
+
}
|
266
|
+
|
@@ -53,9 +53,10 @@ module Refinery
|
|
53
53
|
|
54
54
|
def editor_only_fieldset_body(form, tab)
|
55
55
|
content_tag(:div, :class => 'page_part', :id => tab.to_s) do
|
56
|
-
form.
|
57
|
-
|
58
|
-
|
56
|
+
form.text_area tab, :rows => 20, :class => 'wymeditor widest'
|
57
|
+
# form.inputs do
|
58
|
+
# form.input tab, :as => :wymeditor
|
59
|
+
# end
|
59
60
|
end
|
60
61
|
end
|
61
62
|
|
@@ -68,4 +69,3 @@ module Refinery
|
|
68
69
|
end
|
69
70
|
end
|
70
71
|
|
71
|
-
Refinery::AdminController.send(:helper, 'refinery/formtastic/page_tabs')
|
@@ -1,10 +1,17 @@
|
|
1
1
|
module Refinery
|
2
2
|
module Formtastic
|
3
3
|
class Engine < Rails::Engine
|
4
|
+
include Refinery::Engine
|
4
5
|
isolate_namespace Refinery::Formtastic
|
6
|
+
engine_name :refinery_formtastic
|
7
|
+
|
8
|
+
before_inclusion do
|
9
|
+
Refinery::AdminController.send :helper, Refinery::Pages::ContentPagesHelper
|
10
|
+
Refinery::AdminController.send(:helper, Refinery::Formtastic::PageTabsHelper)
|
11
|
+
end
|
5
12
|
|
6
13
|
config.after_initialize do
|
7
|
-
Refinery::Core.config.register_stylesheet("formtastic")
|
14
|
+
Refinery::Core.config.register_stylesheet("refinery/formtastic/admin_base")
|
8
15
|
Refinery::Core.config.register_stylesheet("refinery/formtastic/admin")
|
9
16
|
require 'refinery/formtastic/extensions/page_tab'
|
10
17
|
require 'refinery/formtastic/page_tabs_helper'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-formtastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-06-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: refinerycms-core
|
16
|
-
requirement: &
|
16
|
+
requirement: &70305888636900 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.0.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70305888636900
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: formtastic
|
27
|
-
requirement: &
|
27
|
+
requirement: &70305888635480 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.2.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70305888635480
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: refinerycms-testing
|
38
|
-
requirement: &
|
38
|
+
requirement: &70305888634060 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 2.0.5
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70305888634060
|
47
47
|
description: A rails engine which allows the use of Formtastic in the RefineryCMS
|
48
48
|
backend.
|
49
49
|
email: craig@craigambrose.com
|
@@ -52,6 +52,7 @@ extensions: []
|
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
54
|
- app/assets/stylesheets/refinery/formtastic/admin.css.scss
|
55
|
+
- app/assets/stylesheets/refinery/formtastic/admin_base.css.scss
|
55
56
|
- app/helpers/refinery/formtastic/page_tabs_helper.rb
|
56
57
|
- app/inputs/wymeditor_input.rb
|
57
58
|
- config/locales/en.yml
|