mdd 3.1.1 → 3.1.2
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 +4 -4
- data/app/helpers/mdwa_helper.rb +13 -4
- data/app/views/template/mdwa/_autocomplete_multiple_tag.html.erb +3 -3
- data/app/views/template/mdwa/_autocomplete_remote_multiple_tag.html.erb +5 -2
- data/app/views/template/mdwa/_autocomplete_remote_tag.html.erb +21 -1
- data/lib/generators/mdwa/sandbox/sandbox_generator.rb +30 -7
- data/lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/login_manifest.js +1 -1
- data/lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/system_manifest.js +1 -1
- data/lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/ajaxloader.js +16 -16
- data/lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js +34 -30
- data/lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/batch_update.js +35 -0
- data/lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/xls_export.js +14 -0
- data/lib/generators/mdwa/sandbox/templates/app/assets/stylesheets/jquery/{jquery-ui-1.10.0.custom.css → jquery-ui.css} +60 -57
- data/lib/generators/mdwa/sandbox/templates/app/assets/stylesheets/mdwa/login/login.css +26 -2
- data/lib/generators/mdwa/sandbox/templates/app/assets/stylesheets/mdwa/system_manifest.css +1 -0
- data/lib/generators/mdwa/sandbox/templates/app/assets/stylesheets/mdwa/template/backend.css.erb +11 -91
- data/lib/generators/mdwa/sandbox/templates/app/assets/stylesheets/mdwa/template/menu.css +86 -0
- data/lib/generators/mdwa/sandbox/templates/app/assets/stylesheets/mdwa/template/template.css.erb +71 -18
- data/lib/generators/mdwa/sandbox/templates/app/controllers/a/backend_controller.rb +14 -0
- data/lib/generators/mdwa/sandbox/templates/app/models/permission.rb +2 -2
- data/lib/generators/mdwa/sandbox/templates/app/views/layouts/login.html.erb +4 -1
- data/lib/generators/mdwa/sandbox/templates/app/views/layouts/public.html.erb +3 -3
- data/lib/generators/mdwa/sandbox/templates/app/views/layouts/system.html.erb +6 -4
- data/lib/generators/mdwa/sandbox/templates/app/views/template/mdwa/_login_text.html.erb +4 -0
- data/lib/generators/mdwa/sandbox/templates/app/views/template/mdwa/_menubar.html.erb +3 -0
- data/lib/generators/mdwa/sandbox/templates/app/views/template/mdwa/menubar/_administrators.html.erb +10 -0
- data/lib/generators/mdwa/sandbox/templates/config/initializers/mime_types.rb +2 -0
- data/lib/generators/mdwa/sandbox/templates/config/locales/mdwa.en.yml +8 -0
- data/lib/generators/mdwa/sandbox/templates/deploy.sh +17 -0
- data/lib/generators/mdwa/templates/templates/scaffold/controller.erb +23 -5
- data/lib/generators/mdwa/templates/templates/scaffold/model.erb +61 -19
- data/lib/generators/mdwa/templates/templates/scaffold/views/_form.html.erb +3 -5
- data/lib/generators/mdwa/templates/templates/scaffold/views/_form_fields.html.erb +23 -15
- data/lib/generators/mdwa/templates/templates/scaffold/views/_list.html.erb +38 -26
- data/lib/generators/mdwa/templates/templates/scaffold/views/batch_update.js.erb +3 -0
- data/lib/generators/mdwa/templates/templates/scaffold/views/index.html.erb +19 -4
- data/lib/generators/mdwa/templates/templates/scaffold/views/index.xls.erb +23 -0
- data/lib/generators/mdwa/templates/templates/scaffold/views/menu/menu.html.erb +13 -0
- data/lib/generators/mdwa/templates/templates_generator.rb +5 -0
- data/lib/generators/mdwa/transform/transform_generator.rb +91 -49
- data/lib/generators/mdwa/translate/templates/br/config/initializers/inflections.rb +58 -0
- data/lib/generators/mdwa/translate/templates/br/config/locales/devise.pt-BR.yml +59 -0
- data/lib/generators/mdwa/translate/templates/br/config/locales/mdwa.pt-BR.yml +294 -0
- data/lib/generators/mdwa/translate/templates/br/config/locales/mdwa.specific.pt-BR.yml +2 -0
- data/lib/generators/mdwa/translate/translate_generator.rb +38 -0
- data/lib/mdwa/dsl/entity.rb +1 -0
- data/lib/mdwa/generators/model_attribute.rb +5 -3
- data/lib/mdwa/version.rb +1 -1
- data/mdd.gemspec +4 -1
- data/test/entity_actions_test.rb +0 -1
- data/test/entity_attributes_options_test.rb +1 -2
- data/test/entity_specifications_test.rb +0 -1
- data/test/entity_status_test.rb +40 -0
- data/test/entity_test.rb +6 -7
- data/test/layout_test.rb +0 -1
- data/test/process_test.rb +0 -1
- data/test/requirements_test.rb +0 -1
- data/test/users_test.rb +0 -1
- metadata +52 -8
- data/lib/generators/mdwa/sandbox/templates/app/assets/javascripts/jquery/jquery.popup_window.js +0 -62
- data/lib/generators/mdwa/sandbox/templates/app/views/template/_leftbar.html.erb +0 -11
@@ -3,7 +3,7 @@ html {
|
|
3
3
|
}
|
4
4
|
|
5
5
|
body, input, button, textarea, select, select option {
|
6
|
-
font-family: '
|
6
|
+
font-family: 'Open Sans', sans-serif;
|
7
7
|
}
|
8
8
|
|
9
9
|
body {
|
@@ -38,7 +38,7 @@ div.field {
|
|
38
38
|
|
39
39
|
div.field input, textarea {
|
40
40
|
padding: 0px 10px !important;
|
41
|
-
width: 350px;
|
41
|
+
width: 350px !important;
|
42
42
|
|
43
43
|
border: 1px solid #c2c2c2 !important;
|
44
44
|
border-radius: 5px;
|
@@ -126,4 +126,28 @@ div#mainbody #login_session_text img {
|
|
126
126
|
display:block;
|
127
127
|
margin: 40px auto;
|
128
128
|
text-align: center;
|
129
|
+
}
|
130
|
+
|
131
|
+
div#system_notice {
|
132
|
+
|
133
|
+
background: #f7dc99; /* Old browsers */
|
134
|
+
background: -moz-linear-gradient(top, #f7dc99 0%, #fff6b2 100%); /* FF3.6+ */
|
135
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7dc99), color-stop(100%,#fff6b2)); /* Chrome,Safari4+ */
|
136
|
+
background: -webkit-linear-gradient(top, #f7dc99 0%,#fff6b2 100%); /* Chrome10+,Safari5.1+ */
|
137
|
+
background: -o-linear-gradient(top, #f7dc99 0%,#fff6b2 100%); /* Opera 11.10+ */
|
138
|
+
background: -ms-linear-gradient(top, #f7dc99 0%,#fff6b2 100%); /* IE10+ */
|
139
|
+
background: linear-gradient(to bottom, #f7dc99 0%,#fff6b2 100%); /* W3C */
|
140
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7dc99', endColorstr='#fff6b2',GradientType=0 ); /* IE6-9 */
|
141
|
+
|
142
|
+
position:fixed;
|
143
|
+
top: 0;
|
144
|
+
right: 0;
|
145
|
+
display: block;
|
146
|
+
padding: 15px;
|
147
|
+
margin: 10px;
|
148
|
+
box-shadow: 0 0 5px #fff6b2;
|
149
|
+
border: 1px solid #F4AF0E;
|
150
|
+
border-radius: 5px;
|
151
|
+
z-index: 20;
|
152
|
+
cursor:pointer;
|
129
153
|
}
|
data/lib/generators/mdwa/sandbox/templates/app/assets/stylesheets/mdwa/template/backend.css.erb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
body, input, button, textarea, select, select option {
|
2
|
-
font-family: '
|
2
|
+
font-family: 'Open Sans', sans-serif;
|
3
3
|
}
|
4
4
|
|
5
5
|
body {
|
6
|
-
background: url("<%= asset_path 'mdwa/backend_bg.png' %>");
|
7
6
|
height:100%;
|
8
7
|
font-size: 13px;
|
9
8
|
}
|
@@ -20,10 +19,6 @@ a {
|
|
20
19
|
width: 100%;
|
21
20
|
}
|
22
21
|
|
23
|
-
div#logo {
|
24
|
-
margin: 20px;
|
25
|
-
}
|
26
|
-
|
27
22
|
div#logo a {
|
28
23
|
color: #fff;
|
29
24
|
text-decoration:none;
|
@@ -51,24 +46,19 @@ div#logged_info .welcome, div#logged_info .logout {
|
|
51
46
|
/* Content page header */
|
52
47
|
/***********************/
|
53
48
|
div.page_header {
|
54
|
-
background: #EEEEEE; /* Old browsers */
|
55
|
-
background: -moz-linear-gradient(top, #FFFFFF 0%, #EEEEEE 100%); /* FF3.6+ */
|
56
|
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(100%,#EEEEEE)); /* Chrome,Safari4+ */
|
57
|
-
background: -webkit-linear-gradient(top, #FFFFFF 0%,#EEEEEE 100%); /* Chrome10+,Safari5.1+ */
|
58
|
-
background: -o-linear-gradient(top, #FFFFFF 0%,#EEEEEE 100%); /* Opera 11.10+ */
|
59
|
-
background: -ms-linear-gradient(top, #FFFFFF 0%,#EEEEEE 100%); /* IE10+ */
|
60
|
-
background: linear-gradient(top, #FFFFFF 0%,#EEEEEE 100%); /* W3C */
|
61
|
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EEEEEE',GradientType=0 ); /* IE6-9 */
|
62
|
-
|
63
|
-
|
64
49
|
border-bottom: 1px solid #ccc;
|
65
|
-
padding: 15px
|
50
|
+
padding: 15px 10px;
|
66
51
|
margin: 0;
|
67
|
-
box-shadow: 0 0 5px #aaa;
|
68
52
|
}
|
69
53
|
|
70
|
-
div.
|
71
|
-
|
54
|
+
div.page_header_blank {
|
55
|
+
padding: 15px 30px;
|
56
|
+
margin: 0 0 10px 0;
|
57
|
+
}
|
58
|
+
|
59
|
+
div.page_header h1,
|
60
|
+
div.page_header_blank h1 {
|
61
|
+
font-size: 20px;
|
72
62
|
color: #036;
|
73
63
|
color: black;
|
74
64
|
font-weight: normal;
|
@@ -146,81 +136,11 @@ div.tab_header a:hover {
|
|
146
136
|
/* Content */
|
147
137
|
div#content {
|
148
138
|
background: #fff;
|
149
|
-
left: auto;
|
150
|
-
margin-left: 240px;
|
151
|
-
margin-right: 0;
|
152
|
-
min-height: 800px;
|
153
139
|
padding-bottom: 25px;
|
154
|
-
|
155
|
-
top: auto;
|
156
|
-
width: auto;
|
157
|
-
z-index: 15;
|
158
|
-
box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.7);
|
140
|
+
width: 100%;
|
159
141
|
}
|
160
142
|
|
161
143
|
div.inside {
|
162
144
|
margin:0;
|
163
145
|
padding: 10px;
|
164
|
-
}
|
165
|
-
|
166
|
-
/* Leftbar */
|
167
|
-
#leftbar {
|
168
|
-
display: block;
|
169
|
-
float: left;
|
170
|
-
position: relative;
|
171
|
-
width: 240px;
|
172
|
-
z-index: 16;
|
173
|
-
}
|
174
|
-
|
175
|
-
#leftbar ul {
|
176
|
-
padding: 0;
|
177
|
-
margin: 0;
|
178
|
-
}
|
179
|
-
|
180
|
-
#leftbar ul li {
|
181
|
-
width: 100%;
|
182
|
-
border-bottom: 1px solid #4A4A4A;
|
183
|
-
border-top: 1px solid #858585;
|
184
|
-
list-style-type: none;
|
185
|
-
margin: 0;
|
186
|
-
padding: 0;
|
187
|
-
position: relative;
|
188
|
-
}
|
189
|
-
|
190
|
-
#leftbar ul li a {
|
191
|
-
-moz-box-sizing: border-box;
|
192
|
-
color: #FFFFFF;
|
193
|
-
display: inline-block;
|
194
|
-
font-size: 13px;
|
195
|
-
font-weight: normal;
|
196
|
-
padding: 11px 0;
|
197
|
-
text-decoration: none;
|
198
|
-
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
|
199
|
-
width: 100%;
|
200
|
-
}
|
201
|
-
|
202
|
-
#leftbar ul li a:hover {
|
203
|
-
background-image: rgba(0, 0, 0, 0.075);
|
204
|
-
}
|
205
|
-
|
206
|
-
#leftbar ul.submenu {
|
207
|
-
background: none repeat scroll 0 0 #555555;
|
208
|
-
box-shadow: 0 0 3px #333333 inset;
|
209
|
-
}
|
210
|
-
|
211
|
-
#leftbar ul.submenu li {
|
212
|
-
border:none;
|
213
|
-
}
|
214
|
-
|
215
|
-
#leftbar ul.submenu li a:hover {
|
216
|
-
background-image: rgba(0, 0, 0, 0.075);
|
217
|
-
}
|
218
|
-
|
219
|
-
#leftbar ul li a span {
|
220
|
-
padding-left: 15px;
|
221
|
-
}
|
222
|
-
|
223
|
-
#leftbar ul.submenu li a span {
|
224
|
-
margin:0;
|
225
|
-
padding-left: 25px;
|
226
146
|
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
/* menu */
|
2
|
+
#menu {
|
3
|
+
display: block;
|
4
|
+
height: auto;
|
5
|
+
width: 100%;
|
6
|
+
|
7
|
+
background: #EEEEEE; /* Old browsers */
|
8
|
+
background: -moz-linear-gradient(top, #FFFFFF 0%, #EEEEEE 100%); /* FF3.6+ */
|
9
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(100%,#EEEEEE)); /* Chrome,Safari4+ */
|
10
|
+
background: -webkit-linear-gradient(top, #FFFFFF 0%,#EEEEEE 100%); /* Chrome10+,Safari5.1+ */
|
11
|
+
background: -o-linear-gradient(top, #FFFFFF 0%,#EEEEEE 100%); /* Opera 11.10+ */
|
12
|
+
background: -ms-linear-gradient(top, #FFFFFF 0%,#EEEEEE 100%); /* IE10+ */
|
13
|
+
background: linear-gradient(top, #FFFFFF 0%,#EEEEEE 100%); /* W3C */
|
14
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EEEEEE',GradientType=0 ); /* IE6-9 */
|
15
|
+
|
16
|
+
border-bottom: 1px solid #ccc;
|
17
|
+
margin: 0;
|
18
|
+
box-shadow: 0 0 5px #aaa;
|
19
|
+
}
|
20
|
+
|
21
|
+
#menu ul {
|
22
|
+
padding: 0;
|
23
|
+
margin: 0;
|
24
|
+
width: 100%;
|
25
|
+
}
|
26
|
+
|
27
|
+
#menu ul li {
|
28
|
+
list-style-type: none;
|
29
|
+
margin: 0;
|
30
|
+
padding: 0;
|
31
|
+
display: inline-block;
|
32
|
+
}
|
33
|
+
|
34
|
+
#menu ul li a {
|
35
|
+
color: #444;
|
36
|
+
display: inline-block;
|
37
|
+
font-size: 14px;
|
38
|
+
font-weight: normal;
|
39
|
+
padding: 10px 15px;
|
40
|
+
text-decoration: none;
|
41
|
+
}
|
42
|
+
|
43
|
+
#menu ul li a:hover,
|
44
|
+
#menu ul li a:active,
|
45
|
+
#menu ul li a:focus {
|
46
|
+
background: rgba(0, 0, 0, 0.075);
|
47
|
+
}
|
48
|
+
|
49
|
+
#menu ul.submenu {
|
50
|
+
display: none;
|
51
|
+
box-shadow: 0 0 3px #333333 inset;
|
52
|
+
border-bottom: 1px solid #ddd;
|
53
|
+
}
|
54
|
+
|
55
|
+
#menu ul li:hover ul.submenu {
|
56
|
+
display: block;
|
57
|
+
position: absolute;
|
58
|
+
top: 100px;
|
59
|
+
box-shadow: 2px 2px 4px #b2b2b2;
|
60
|
+
max-width: 200px;
|
61
|
+
}
|
62
|
+
|
63
|
+
#menu ul.submenu li {
|
64
|
+
background: #ffffff; /* Old browsers */
|
65
|
+
background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); /* FF3.6+ */
|
66
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
|
67
|
+
background: -webkit-linear-gradient(top, #ffffff 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */
|
68
|
+
background: -o-linear-gradient(top, #ffffff 0%,#eeeeee 100%); /* Opera 11.10+ */
|
69
|
+
background: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 100%); /* IE10+ */
|
70
|
+
background: linear-gradient(to bottom, #ffffff 0%,#eeeeee 100%); /* W3C */
|
71
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
|
72
|
+
|
73
|
+
border-bottom: 1px solid #ddd;
|
74
|
+
display: block;
|
75
|
+
overflow: hidden;
|
76
|
+
}
|
77
|
+
|
78
|
+
#menu ul.submenu li a {
|
79
|
+
display: block;
|
80
|
+
font-size: 12px;
|
81
|
+
padding: 7px;
|
82
|
+
}
|
83
|
+
|
84
|
+
#menu ul.submenu li a:hover {
|
85
|
+
background-color: rgba(0,0,0, 0.03);
|
86
|
+
}
|
data/lib/generators/mdwa/sandbox/templates/app/assets/stylesheets/mdwa/template/template.css.erb
CHANGED
@@ -137,6 +137,19 @@ a {
|
|
137
137
|
transition: background-position 0.1s linear;
|
138
138
|
}
|
139
139
|
|
140
|
+
a.export,
|
141
|
+
input[type="submit"].export,
|
142
|
+
input[type="button"].export,
|
143
|
+
button.export {
|
144
|
+
background: none;
|
145
|
+
border:none;
|
146
|
+
cursor: pointer;
|
147
|
+
color: #0000ff;
|
148
|
+
text-decoration:underline;
|
149
|
+
font-size: 12px;
|
150
|
+
margin-left: 5px;
|
151
|
+
}
|
152
|
+
|
140
153
|
a.cancel {
|
141
154
|
background: none;
|
142
155
|
color: #ff0000;
|
@@ -171,8 +184,14 @@ a.remove span {
|
|
171
184
|
|
172
185
|
/* nested_forms buttons */
|
173
186
|
a.add_nested_fields {
|
174
|
-
background: url( <%= asset_path 'mdwa/icons/add.png' %>) no-repeat scroll
|
175
|
-
|
187
|
+
background: url( <%= asset_path 'mdwa/icons/add.png' %>) no-repeat scroll 10px 50% padding-box #f2f2f2;
|
188
|
+
border: 1px solid #CCCCCC;
|
189
|
+
border-radius: 4px 4px 4px 4px;
|
190
|
+
display: inline-block;
|
191
|
+
letter-spacing: normal;
|
192
|
+
margin: 10px;
|
193
|
+
padding: 10px 10px 10px 35px;
|
194
|
+
word-spacing: normal;
|
176
195
|
}
|
177
196
|
|
178
197
|
a.remove_nested_fields {
|
@@ -292,20 +311,20 @@ table.list td, div.list div.line {
|
|
292
311
|
}
|
293
312
|
|
294
313
|
div.list div.head {
|
295
|
-
|
296
|
-
|
297
|
-
|
314
|
+
float:left;
|
315
|
+
width:100%;
|
316
|
+
padding: 8px 0;
|
298
317
|
}
|
299
318
|
|
300
319
|
div.list {
|
301
|
-
|
302
|
-
|
320
|
+
padding: 10px 0;
|
321
|
+
float:left;
|
303
322
|
}
|
304
323
|
|
305
324
|
div.list div.line {
|
306
|
-
|
307
|
-
|
308
|
-
|
325
|
+
padding: 10px 0;
|
326
|
+
float:left;
|
327
|
+
width:100%;
|
309
328
|
}
|
310
329
|
|
311
330
|
.odd_line {
|
@@ -381,7 +400,8 @@ div.box {
|
|
381
400
|
}
|
382
401
|
|
383
402
|
p.descricao {
|
384
|
-
margin:
|
403
|
+
margin: 10px;
|
404
|
+
font-size: 13px;
|
385
405
|
}
|
386
406
|
|
387
407
|
.bordered_top {
|
@@ -402,6 +422,25 @@ p.descricao {
|
|
402
422
|
border-left: 1px solid #d2d2d2;
|
403
423
|
}
|
404
424
|
|
425
|
+
.bordered_right {
|
426
|
+
margin-right: 10px;
|
427
|
+
padding-right: 10px;
|
428
|
+
border-right: 1px solid #d2d2d2;
|
429
|
+
}
|
430
|
+
|
431
|
+
.bordered_right h3,
|
432
|
+
.bordered_left h3,
|
433
|
+
.bordered_top h3,
|
434
|
+
.bordered_bottom h3 {
|
435
|
+
margin: 0;
|
436
|
+
padding: 0
|
437
|
+
}
|
438
|
+
|
439
|
+
.bordered_bottom h3 {
|
440
|
+
margin-top: 20px;
|
441
|
+
}
|
442
|
+
|
443
|
+
|
405
444
|
.botao_direita_titulo {
|
406
445
|
margin-top: 8px;
|
407
446
|
text-align:right;
|
@@ -542,15 +581,19 @@ div.field textarea {
|
|
542
581
|
}
|
543
582
|
|
544
583
|
div.topo {
|
545
|
-
|
584
|
+
background: none repeat scroll 0 0 #F5F5F5;
|
585
|
+
border: 1px solid #DDDDDD;
|
586
|
+
margin-bottom: 20px;
|
587
|
+
padding: 10px;
|
546
588
|
}
|
547
589
|
|
548
|
-
|
549
|
-
div.
|
550
|
-
div.
|
551
|
-
div.
|
552
|
-
div.
|
553
|
-
div.
|
590
|
+
|
591
|
+
div.field input[type="text"],
|
592
|
+
div.field input[type="email"],
|
593
|
+
div.field input[type="number"],
|
594
|
+
div.field input[type="password"],
|
595
|
+
div.field select,
|
596
|
+
div.field textarea {
|
554
597
|
width: 100%;
|
555
598
|
border: 1px solid #888;
|
556
599
|
padding: 4px 0;
|
@@ -632,3 +675,13 @@ p.description {
|
|
632
675
|
margin: 5px;
|
633
676
|
font-size: 11px;
|
634
677
|
}
|
678
|
+
|
679
|
+
div.label_height {
|
680
|
+
display: block;
|
681
|
+
height: 20px;
|
682
|
+
}
|
683
|
+
|
684
|
+
div.field.datas input[type="text"].datepicker {
|
685
|
+
display: inline-block;
|
686
|
+
width: 40%;
|
687
|
+
}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
class A::BackendController < ApplicationController
|
3
3
|
|
4
4
|
before_filter :authenticate_a_user!
|
5
|
+
before_filter :guardar_per_page
|
5
6
|
|
6
7
|
check_authorization
|
7
8
|
|
@@ -13,4 +14,17 @@ class A::BackendController < ApplicationController
|
|
13
14
|
return current_a_user
|
14
15
|
end
|
15
16
|
helper_method :current_user
|
17
|
+
|
18
|
+
|
19
|
+
# Uma vez que se altere o per_page, ele vai pra sessão.
|
20
|
+
# Isso facilita buscas globais e não perde o per_page em listas com filtros.
|
21
|
+
def guardar_per_page
|
22
|
+
if params[:per_page].blank?
|
23
|
+
params[:per_page] = session[:per_page]
|
24
|
+
else
|
25
|
+
session[:per_page] = params[:per_page]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
16
30
|
end
|