merb-admin 0.8.1 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. data/.gitignore +29 -27
  2. data/Gemfile +24 -22
  3. data/Gemfile.lock +86 -0
  4. data/LICENSE +20 -20
  5. data/README.rdoc +54 -58
  6. data/Rakefile +11 -44
  7. data/app/controllers/application.rb +6 -6
  8. data/app/controllers/main.rb +191 -191
  9. data/app/helpers/application_helper.rb +64 -64
  10. data/app/helpers/main_helper.rb +167 -167
  11. data/app/models/.gitkeep +0 -0
  12. data/app/views/layout/_message.html.erb +10 -10
  13. data/app/views/layout/dashboard.html.erb +34 -34
  14. data/app/views/layout/form.html.erb +48 -48
  15. data/app/views/layout/list.html.erb +42 -42
  16. data/app/views/main/_belongs_to.html.erb +29 -29
  17. data/app/views/main/_big_decimal.html.erb +12 -12
  18. data/app/views/main/_boolean.html.erb +7 -7
  19. data/app/views/main/_date.html.erb +12 -12
  20. data/app/views/main/_datetime.html.erb +12 -12
  21. data/app/views/main/_float.html.erb +12 -12
  22. data/app/views/main/_has_many.html.erb +16 -16
  23. data/app/views/main/_has_one.html.erb +30 -30
  24. data/app/views/main/_integer.html.erb +12 -12
  25. data/app/views/main/_properties.html.erb +18 -18
  26. data/app/views/main/_string.html.erb +15 -15
  27. data/app/views/main/_text.html.erb +11 -11
  28. data/app/views/main/_time.html.erb +12 -12
  29. data/app/views/main/_timestamp.html.erb +12 -12
  30. data/app/views/main/delete.html.erb +28 -28
  31. data/app/views/main/edit.html.erb +19 -19
  32. data/app/views/main/index.html.erb +22 -22
  33. data/app/views/main/list.html.erb +93 -93
  34. data/app/views/main/new.html.erb +16 -16
  35. data/config/init.rb +30 -0
  36. data/config/router.rb +4 -0
  37. data/lib/abstract_model.rb +84 -86
  38. data/lib/active_record_support.rb +147 -147
  39. data/lib/datamapper_support.rb +139 -140
  40. data/lib/generic_support.rb +13 -13
  41. data/lib/merb-admin.rb +99 -99
  42. data/lib/merb-admin/merbtasks.rb +103 -103
  43. data/lib/merb-admin/slicetasks.rb +174 -174
  44. data/lib/merb-admin/spectasks.rb +55 -55
  45. data/lib/merb-admin/version.rb +3 -0
  46. data/lib/sequel_support.rb +275 -275
  47. data/merb-admin.gemspec +42 -232
  48. data/public/javascripts/CollapsedFieldsets.js +85 -85
  49. data/public/javascripts/DateTimeShortcuts.js +255 -255
  50. data/public/javascripts/RelatedObjectLookups.js +96 -96
  51. data/public/javascripts/SelectBox.js +111 -111
  52. data/public/javascripts/SelectFilter2.js +113 -113
  53. data/public/javascripts/actions.js +39 -39
  54. data/public/javascripts/calendar.js +143 -143
  55. data/public/javascripts/core.js +176 -176
  56. data/public/javascripts/dateparse.js +233 -233
  57. data/public/javascripts/getElementsBySelector.js +167 -167
  58. data/public/javascripts/i18n.js +33 -33
  59. data/public/javascripts/ordering.js +137 -137
  60. data/public/javascripts/timeparse.js +94 -94
  61. data/public/javascripts/urlify.js +140 -140
  62. data/public/stylesheets/base.css +746 -746
  63. data/public/stylesheets/changelists.css +269 -269
  64. data/public/stylesheets/dashboard.css +24 -24
  65. data/public/stylesheets/forms.css +327 -327
  66. data/public/stylesheets/global.css +142 -142
  67. data/public/stylesheets/ie.css +50 -50
  68. data/public/stylesheets/layout.css +29 -29
  69. data/public/stylesheets/login.css +54 -54
  70. data/public/stylesheets/master.css +1 -1
  71. data/public/stylesheets/patch-iewin.css +7 -7
  72. data/public/stylesheets/rtl.css +206 -206
  73. data/public/stylesheets/widgets.css +506 -506
  74. data/screenshots/create.png +0 -0
  75. data/screenshots/delete.png +0 -0
  76. data/screenshots/edit.png +0 -0
  77. data/screenshots/index.png +0 -0
  78. data/screenshots/list.png +0 -0
  79. data/screenshots/new.png +0 -0
  80. data/spec/controllers/main_spec.rb +25 -25
  81. data/spec/migrations/activerecord/001_create_divisions_migration.rb +13 -13
  82. data/spec/migrations/activerecord/002_create_drafts_migration.rb +19 -19
  83. data/spec/migrations/activerecord/003_create_leagues_migration.rb +12 -12
  84. data/spec/migrations/activerecord/004_create_players_migration.rb +19 -20
  85. data/spec/migrations/activerecord/005_create_teams_migration.rb +22 -22
  86. data/spec/migrations/sequel/001_create_divisions_migration.rb +15 -15
  87. data/spec/migrations/sequel/002_create_drafts_migration.rb +21 -21
  88. data/spec/migrations/sequel/003_create_leagues_migration.rb +14 -14
  89. data/spec/migrations/sequel/004_create_players_migration.rb +21 -22
  90. data/spec/migrations/sequel/005_create_teams_migration.rb +24 -24
  91. data/spec/models/activerecord/division.rb +7 -7
  92. data/spec/models/activerecord/draft.rb +11 -11
  93. data/spec/models/activerecord/league.rb +6 -6
  94. data/spec/models/activerecord/player.rb +8 -8
  95. data/spec/models/activerecord/team.rb +13 -13
  96. data/spec/models/datamapper/division.rb +12 -12
  97. data/spec/models/datamapper/draft.rb +18 -18
  98. data/spec/models/datamapper/league.rb +11 -11
  99. data/spec/models/datamapper/player.rb +20 -21
  100. data/spec/models/datamapper/team.rb +22 -22
  101. data/spec/models/sequel/division.rb +15 -15
  102. data/spec/models/sequel/draft.rb +19 -19
  103. data/spec/models/sequel/league.rb +14 -14
  104. data/spec/models/sequel/player.rb +18 -18
  105. data/spec/models/sequel/team.rb +21 -21
  106. data/spec/requests/main_spec.rb +763 -763
  107. data/spec/spec_helper.rb +113 -112
  108. metadata +247 -41
  109. data/VERSION +0 -1
@@ -1,24 +1,24 @@
1
- /* DASHBOARD */
2
-
3
- .dashboard .module table th {
4
- width: 100%;
5
- }
6
-
7
- .dashboard .module table td {
8
- white-space: nowrap;
9
- }
10
-
11
- .dashboard .module table td a {
12
- display: block;
13
- padding-right: .6em;
14
- }
15
-
16
- /* RECENT ACTIONS MODULE */
17
-
18
- .module ul.actionlist {
19
- margin-left: 0;
20
- }
21
-
22
- ul.actionlist li {
23
- list-style-type: none;
24
- }
1
+ /* DASHBOARD */
2
+
3
+ .dashboard .module table th {
4
+ width: 100%;
5
+ }
6
+
7
+ .dashboard .module table td {
8
+ white-space: nowrap;
9
+ }
10
+
11
+ .dashboard .module table td a {
12
+ display: block;
13
+ padding-right: .6em;
14
+ }
15
+
16
+ /* RECENT ACTIONS MODULE */
17
+
18
+ .module ul.actionlist {
19
+ margin-left: 0;
20
+ }
21
+
22
+ ul.actionlist li {
23
+ list-style-type: none;
24
+ }
@@ -1,327 +1,327 @@
1
- @import url('widgets.css');
2
-
3
- /* FORM ROWS */
4
-
5
- .form-row {
6
- overflow: hidden;
7
- padding: 8px 12px;
8
- font-size: 11px;
9
- border-bottom: 1px solid #eee;
10
- }
11
-
12
- .form-row img, .form-row input {
13
- vertical-align: middle;
14
- }
15
-
16
- form .form-row p {
17
- padding-left: 0;
18
- font-size: 11px;
19
- }
20
-
21
- /* FORM LABELS */
22
-
23
- form h4 {
24
- margin: 0 !important;
25
- padding: 0 !important;
26
- border: none !important;
27
- }
28
-
29
- label {
30
- font-weight: normal !important;
31
- color: #666;
32
- font-size: 12px;
33
- }
34
-
35
- .required label, label.required {
36
- font-weight: bold !important;
37
- color: #333 !important;
38
- }
39
-
40
- /* RADIO BUTTONS */
41
-
42
- form ul.radiolist li {
43
- list-style-type: none;
44
- }
45
-
46
- form ul.radiolist label {
47
- float: none;
48
- display: inline;
49
- }
50
-
51
- form ul.inline {
52
- margin-left: 0;
53
- padding: 0;
54
- }
55
-
56
- form ul.inline li {
57
- float: left;
58
- padding-right: 7px;
59
- }
60
-
61
- /* ALIGNED FIELDSETS */
62
-
63
- .aligned label {
64
- display: block;
65
- padding: 3px 10px 0 0;
66
- float: left;
67
- width: 8em;
68
- }
69
-
70
- .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
71
- width: 350px;
72
- }
73
-
74
- form .aligned p, form .aligned ul {
75
- margin-left: 7em;
76
- padding-left: 30px;
77
- }
78
-
79
- form .aligned table p {
80
- margin-left: 0;
81
- padding-left: 0;
82
- }
83
-
84
- form .aligned p.help {
85
- padding-left: 38px;
86
- }
87
-
88
- .aligned .vCheckboxLabel {
89
- float: none !important;
90
- display: inline;
91
- padding-left: 4px;
92
- }
93
-
94
- .colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
95
- width: 610px;
96
- }
97
-
98
- .checkbox-row p.help {
99
- margin-left: 0;
100
- padding-left: 0 !important;
101
- }
102
-
103
- fieldset .field-box {
104
- float: left;
105
- margin-right: 20px;
106
- }
107
-
108
- /* WIDE FIELDSETS */
109
-
110
- .wide label {
111
- width: 15em !important;
112
- }
113
-
114
- form .wide p {
115
- margin-left: 15em;
116
- }
117
-
118
- form .wide p.help {
119
- padding-left: 38px;
120
- }
121
-
122
- .colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
123
- width: 450px;
124
- }
125
-
126
- /* COLLAPSED FIELDSETS */
127
-
128
- fieldset.collapsed * {
129
- display: none;
130
- }
131
-
132
- fieldset.collapsed h2, fieldset.collapsed {
133
- display: block !important;
134
- }
135
-
136
- fieldset.collapsed h2 {
137
- background-image: url(../images/nav-bg.gif);
138
- background-position: bottom left;
139
- color: #999;
140
- }
141
-
142
- fieldset.collapsed .collapse-toggle {
143
- padding: 3px 5px !important;
144
- background: transparent;
145
- display: inline !important;
146
- }
147
-
148
- /* MONOSPACE TEXTAREAS */
149
-
150
- fieldset.monospace textarea {
151
- font-family: "Bitstream Vera Sans Mono",Monaco,"Courier New",Courier,monospace;
152
- }
153
-
154
- /* SUBMIT ROW */
155
-
156
- .submit-row {
157
- padding: 5px 7px;
158
- text-align: right;
159
- background: white url(../images/nav-bg.gif) 0 100% repeat-x;
160
- border: 1px solid #ccc;
161
- margin: 5px 0;
162
- overflow: hidden;
163
- }
164
-
165
- .submit-row input {
166
- margin: 0 0 0 5px;
167
- }
168
-
169
- .submit-row p {
170
- margin: 0.3em;
171
- }
172
-
173
- .submit-row p.deletelink-box {
174
- float: left;
175
- }
176
-
177
- .submit-row .deletelink {
178
- background: url(../images/icon_deletelink.gif) 0 50% no-repeat;
179
- padding-left: 14px;
180
- }
181
-
182
- /* CUSTOM FORM FIELDS */
183
-
184
- .vSelectMultipleField {
185
- vertical-align: top !important;
186
- }
187
-
188
- .vCheckboxField {
189
- border: none;
190
- }
191
-
192
- .vDateField, .vTimeField {
193
- margin-right: 2px;
194
- }
195
-
196
- .vURLField {
197
- width: 30em;
198
- }
199
-
200
- .vLargeTextField, .vXMLLargeTextField {
201
- width: 48em;
202
- }
203
-
204
- .flatpages-flatpage #id_content {
205
- height: 40.2em;
206
- }
207
-
208
- .module table .vPositiveSmallIntegerField {
209
- width: 2.2em;
210
- }
211
-
212
- .vTextField {
213
- width: 20em;
214
- }
215
-
216
- .vIntegerField {
217
- width: 5em;
218
- }
219
-
220
- .vForeignKeyRawIdAdminField {
221
- width: 5em;
222
- }
223
-
224
- /* INLINES */
225
-
226
- .inline-group {
227
- padding: 0;
228
- border: 1px solid #ccc;
229
- margin: 10px 0;
230
- }
231
-
232
- .inline-group .aligned label {
233
- width: 8em;
234
- }
235
-
236
- .inline-related {
237
- position: relative;
238
- }
239
-
240
- .inline-related h3 {
241
- margin: 0;
242
- color: #666;
243
- padding: 3px 5px;
244
- font-size: 11px;
245
- background: #e1e1e1 url(../images/nav-bg.gif) top left repeat-x;
246
- border-bottom: 1px solid #ddd;
247
- }
248
-
249
- .inline-related h3 span.delete {
250
- padding-left: 20px;
251
- position: absolute;
252
- top: 2px;
253
- right: 10px;
254
- }
255
-
256
- .inline-related h3 span.delete label {
257
- margin-left: 2px;
258
- font-size: 11px;
259
- }
260
-
261
- .inline-related fieldset {
262
- margin: 0;
263
- background: #fff;
264
- border: none;
265
- }
266
-
267
- .inline-related fieldset.module h3 {
268
- margin: 0;
269
- padding: 2px 5px 3px 5px;
270
- font-size: 11px;
271
- text-align: left;
272
- font-weight: bold;
273
- background: #bcd;
274
- color: #fff;
275
- }
276
-
277
- .inline-related.tabular fieldset.module table {
278
- width: 100%;
279
- }
280
-
281
- .last-related fieldset {
282
- border: none;
283
- }
284
-
285
- .inline-group .tabular tr.has_original td {
286
- padding-top: 2em;
287
- }
288
-
289
- .inline-group .tabular tr td.original {
290
- padding: 2px 0 0 0;
291
- width: 0;
292
- _position: relative;
293
- }
294
-
295
- .inline-group .tabular th.original {
296
- width: 0px;
297
- padding: 0;
298
- }
299
-
300
- .inline-group .tabular td.original p {
301
- position: absolute;
302
- left: 0;
303
- height: 1.1em;
304
- padding: 2px 7px;
305
- overflow: hidden;
306
- font-size: 9px;
307
- font-weight: bold;
308
- color: #666;
309
- _width: 700px;
310
- }
311
-
312
- .inline-group ul.tools {
313
- padding: 0;
314
- margin: 0;
315
- list-style: none;
316
- }
317
-
318
- .inline-group ul.tools li {
319
- display: inline;
320
- padding: 0 5px;
321
- }
322
-
323
- .inline-group ul.tools a.add {
324
- background: url(../images/icon_addlink.gif) 0 50% no-repeat;
325
- padding-left: 14px;
326
- }
327
-
1
+ @import url('widgets.css');
2
+
3
+ /* FORM ROWS */
4
+
5
+ .form-row {
6
+ overflow: hidden;
7
+ padding: 8px 12px;
8
+ font-size: 11px;
9
+ border-bottom: 1px solid #eee;
10
+ }
11
+
12
+ .form-row img, .form-row input {
13
+ vertical-align: middle;
14
+ }
15
+
16
+ form .form-row p {
17
+ padding-left: 0;
18
+ font-size: 11px;
19
+ }
20
+
21
+ /* FORM LABELS */
22
+
23
+ form h4 {
24
+ margin: 0 !important;
25
+ padding: 0 !important;
26
+ border: none !important;
27
+ }
28
+
29
+ label {
30
+ font-weight: normal !important;
31
+ color: #666;
32
+ font-size: 12px;
33
+ }
34
+
35
+ .required label, label.required {
36
+ font-weight: bold !important;
37
+ color: #333 !important;
38
+ }
39
+
40
+ /* RADIO BUTTONS */
41
+
42
+ form ul.radiolist li {
43
+ list-style-type: none;
44
+ }
45
+
46
+ form ul.radiolist label {
47
+ float: none;
48
+ display: inline;
49
+ }
50
+
51
+ form ul.inline {
52
+ margin-left: 0;
53
+ padding: 0;
54
+ }
55
+
56
+ form ul.inline li {
57
+ float: left;
58
+ padding-right: 7px;
59
+ }
60
+
61
+ /* ALIGNED FIELDSETS */
62
+
63
+ .aligned label {
64
+ display: block;
65
+ padding: 3px 10px 0 0;
66
+ float: left;
67
+ width: 8em;
68
+ }
69
+
70
+ .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
71
+ width: 350px;
72
+ }
73
+
74
+ form .aligned p, form .aligned ul {
75
+ margin-left: 7em;
76
+ padding-left: 30px;
77
+ }
78
+
79
+ form .aligned table p {
80
+ margin-left: 0;
81
+ padding-left: 0;
82
+ }
83
+
84
+ form .aligned p.help {
85
+ padding-left: 38px;
86
+ }
87
+
88
+ .aligned .vCheckboxLabel {
89
+ float: none !important;
90
+ display: inline;
91
+ padding-left: 4px;
92
+ }
93
+
94
+ .colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
95
+ width: 610px;
96
+ }
97
+
98
+ .checkbox-row p.help {
99
+ margin-left: 0;
100
+ padding-left: 0 !important;
101
+ }
102
+
103
+ fieldset .field-box {
104
+ float: left;
105
+ margin-right: 20px;
106
+ }
107
+
108
+ /* WIDE FIELDSETS */
109
+
110
+ .wide label {
111
+ width: 15em !important;
112
+ }
113
+
114
+ form .wide p {
115
+ margin-left: 15em;
116
+ }
117
+
118
+ form .wide p.help {
119
+ padding-left: 38px;
120
+ }
121
+
122
+ .colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
123
+ width: 450px;
124
+ }
125
+
126
+ /* COLLAPSED FIELDSETS */
127
+
128
+ fieldset.collapsed * {
129
+ display: none;
130
+ }
131
+
132
+ fieldset.collapsed h2, fieldset.collapsed {
133
+ display: block !important;
134
+ }
135
+
136
+ fieldset.collapsed h2 {
137
+ background-image: url(../images/nav-bg.gif);
138
+ background-position: bottom left;
139
+ color: #999;
140
+ }
141
+
142
+ fieldset.collapsed .collapse-toggle {
143
+ padding: 3px 5px !important;
144
+ background: transparent;
145
+ display: inline !important;
146
+ }
147
+
148
+ /* MONOSPACE TEXTAREAS */
149
+
150
+ fieldset.monospace textarea {
151
+ font-family: "Bitstream Vera Sans Mono",Monaco,"Courier New",Courier,monospace;
152
+ }
153
+
154
+ /* SUBMIT ROW */
155
+
156
+ .submit-row {
157
+ padding: 5px 7px;
158
+ text-align: right;
159
+ background: white url(../images/nav-bg.gif) 0 100% repeat-x;
160
+ border: 1px solid #ccc;
161
+ margin: 5px 0;
162
+ overflow: hidden;
163
+ }
164
+
165
+ .submit-row input {
166
+ margin: 0 0 0 5px;
167
+ }
168
+
169
+ .submit-row p {
170
+ margin: 0.3em;
171
+ }
172
+
173
+ .submit-row p.deletelink-box {
174
+ float: left;
175
+ }
176
+
177
+ .submit-row .deletelink {
178
+ background: url(../images/icon_deletelink.gif) 0 50% no-repeat;
179
+ padding-left: 14px;
180
+ }
181
+
182
+ /* CUSTOM FORM FIELDS */
183
+
184
+ .vSelectMultipleField {
185
+ vertical-align: top !important;
186
+ }
187
+
188
+ .vCheckboxField {
189
+ border: none;
190
+ }
191
+
192
+ .vDateField, .vTimeField {
193
+ margin-right: 2px;
194
+ }
195
+
196
+ .vURLField {
197
+ width: 30em;
198
+ }
199
+
200
+ .vLargeTextField, .vXMLLargeTextField {
201
+ width: 48em;
202
+ }
203
+
204
+ .flatpages-flatpage #id_content {
205
+ height: 40.2em;
206
+ }
207
+
208
+ .module table .vPositiveSmallIntegerField {
209
+ width: 2.2em;
210
+ }
211
+
212
+ .vTextField {
213
+ width: 20em;
214
+ }
215
+
216
+ .vIntegerField {
217
+ width: 5em;
218
+ }
219
+
220
+ .vForeignKeyRawIdAdminField {
221
+ width: 5em;
222
+ }
223
+
224
+ /* INLINES */
225
+
226
+ .inline-group {
227
+ padding: 0;
228
+ border: 1px solid #ccc;
229
+ margin: 10px 0;
230
+ }
231
+
232
+ .inline-group .aligned label {
233
+ width: 8em;
234
+ }
235
+
236
+ .inline-related {
237
+ position: relative;
238
+ }
239
+
240
+ .inline-related h3 {
241
+ margin: 0;
242
+ color: #666;
243
+ padding: 3px 5px;
244
+ font-size: 11px;
245
+ background: #e1e1e1 url(../images/nav-bg.gif) top left repeat-x;
246
+ border-bottom: 1px solid #ddd;
247
+ }
248
+
249
+ .inline-related h3 span.delete {
250
+ padding-left: 20px;
251
+ position: absolute;
252
+ top: 2px;
253
+ right: 10px;
254
+ }
255
+
256
+ .inline-related h3 span.delete label {
257
+ margin-left: 2px;
258
+ font-size: 11px;
259
+ }
260
+
261
+ .inline-related fieldset {
262
+ margin: 0;
263
+ background: #fff;
264
+ border: none;
265
+ }
266
+
267
+ .inline-related fieldset.module h3 {
268
+ margin: 0;
269
+ padding: 2px 5px 3px 5px;
270
+ font-size: 11px;
271
+ text-align: left;
272
+ font-weight: bold;
273
+ background: #bcd;
274
+ color: #fff;
275
+ }
276
+
277
+ .inline-related.tabular fieldset.module table {
278
+ width: 100%;
279
+ }
280
+
281
+ .last-related fieldset {
282
+ border: none;
283
+ }
284
+
285
+ .inline-group .tabular tr.has_original td {
286
+ padding-top: 2em;
287
+ }
288
+
289
+ .inline-group .tabular tr td.original {
290
+ padding: 2px 0 0 0;
291
+ width: 0;
292
+ _position: relative;
293
+ }
294
+
295
+ .inline-group .tabular th.original {
296
+ width: 0px;
297
+ padding: 0;
298
+ }
299
+
300
+ .inline-group .tabular td.original p {
301
+ position: absolute;
302
+ left: 0;
303
+ height: 1.1em;
304
+ padding: 2px 7px;
305
+ overflow: hidden;
306
+ font-size: 9px;
307
+ font-weight: bold;
308
+ color: #666;
309
+ _width: 700px;
310
+ }
311
+
312
+ .inline-group ul.tools {
313
+ padding: 0;
314
+ margin: 0;
315
+ list-style: none;
316
+ }
317
+
318
+ .inline-group ul.tools li {
319
+ display: inline;
320
+ padding: 0 5px;
321
+ }
322
+
323
+ .inline-group ul.tools a.add {
324
+ background: url(../images/icon_addlink.gif) 0 50% no-repeat;
325
+ padding-left: 14px;
326
+ }
327
+