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,269 +1,269 @@
1
- /* CHANGELISTS */
2
-
3
- #changelist {
4
- position: relative;
5
- width: 100%;
6
- }
7
-
8
- #changelist table {
9
- width: 100%;
10
- }
11
-
12
- .change-list .filtered table {
13
- border-right: 1px solid #ddd;
14
- }
15
-
16
- .change-list .filtered {
17
- min-height: 400px;
18
- }
19
-
20
- .change-list .filtered {
21
- background: white url(../images/changelist-bg.gif) top right repeat-y !important;
22
- }
23
-
24
- .change-list .filtered table, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull {
25
- margin-right: 160px !important;
26
- width: auto !important;
27
- }
28
-
29
- .change-list .filtered table tbody th {
30
- padding-right: 1em;
31
- }
32
-
33
- #changelist .toplinks {
34
- border-bottom: 1px solid #ccc !important;
35
- }
36
-
37
- #changelist .paginator {
38
- color: #666;
39
- border-top: 1px solid #eee;
40
- border-bottom: 1px solid #eee;
41
- background: white url(../images/nav-bg.gif) 0 180% repeat-x;
42
- overflow: hidden;
43
- }
44
-
45
- .change-list .filtered .paginator {
46
- border-right: 1px solid #ddd;
47
- }
48
-
49
- /* CHANGELIST TABLES */
50
-
51
- #changelist table thead th {
52
- white-space: nowrap;
53
- vertical-align: middle;
54
- }
55
-
56
- #changelist table thead th:first-child {
57
- width: 1.5em;
58
- text-align: center;
59
- }
60
-
61
- #changelist table tbody td {
62
- border-left: 1px solid #ddd;
63
- }
64
-
65
- #changelist table tbody td:first-child {
66
- border-left: 0;
67
- border-right: 1px solid #ddd;
68
- text-align: center;
69
- }
70
-
71
- #changelist table tfoot {
72
- color: #666;
73
- }
74
-
75
- /* TOOLBAR */
76
-
77
- #changelist #toolbar {
78
- padding: 3px;
79
- border-bottom: 1px solid #ddd;
80
- background: #e1e1e1 url(../images/nav-bg.gif) top left repeat-x;
81
- color: #666;
82
- }
83
-
84
- #changelist #toolbar form input {
85
- font-size: 11px;
86
- padding: 1px 2px;
87
- }
88
-
89
- #changelist #toolbar form #searchbar {
90
- padding: 2px;
91
- }
92
-
93
- #changelist #changelist-search img {
94
- vertical-align: middle;
95
- }
96
-
97
- /* FILTER COLUMN */
98
-
99
- #changelist-filter {
100
- position: absolute;
101
- top: 0;
102
- right: 0;
103
- z-index: 1000;
104
- width: 160px;
105
- border-left: 1px solid #ddd;
106
- background: #efefef;
107
- margin: 0;
108
- }
109
-
110
- #changelist-filter h2 {
111
- font-size: 11px;
112
- padding: 2px 5px;
113
- border-bottom: 1px solid #ddd;
114
- }
115
-
116
- #changelist-filter h3 {
117
- font-size: 12px;
118
- margin-bottom: 0;
119
- }
120
-
121
- #changelist-filter ul {
122
- padding-left: 0;
123
- margin-left: 10px;
124
- }
125
-
126
- #changelist-filter li {
127
- list-style-type: none;
128
- margin-left: 0;
129
- padding-left: 0;
130
- }
131
-
132
- #changelist-filter a {
133
- color: #999;
134
- }
135
-
136
- #changelist-filter a:hover {
137
- color: #036;
138
- }
139
-
140
- #changelist-filter li.selected {
141
- border-left: 5px solid #ccc;
142
- padding-left: 5px;
143
- margin-left: -10px;
144
- }
145
-
146
- #changelist-filter li.selected a {
147
- color: #5b80b2 !important;
148
- }
149
-
150
- /* DATE DRILLDOWN */
151
-
152
- .change-list ul.toplinks {
153
- display: block;
154
- background: white url(../images/nav-bg-reverse.gif) 0 -10px repeat-x;
155
- border-top: 1px solid white;
156
- float: left;
157
- padding: 0 !important;
158
- margin: 0 !important;
159
- width: 100%;
160
- }
161
-
162
- .change-list ul.toplinks li {
163
- float: left;
164
- width: 9em;
165
- padding: 3px 6px;
166
- font-weight: bold;
167
- list-style-type: none;
168
- }
169
-
170
- .change-list ul.toplinks .date-back a {
171
- color: #999;
172
- }
173
-
174
- .change-list ul.toplinks .date-back a:hover {
175
- color: #036;
176
- }
177
-
178
- /* PAGINATOR */
179
-
180
- .paginator {
181
- font-size: 11px;
182
- padding-top: 10px;
183
- padding-bottom: 10px;
184
- line-height: 22px;
185
- margin: 0;
186
- border-top: 1px solid #ddd;
187
- }
188
-
189
- .paginator a:link, .paginator a:visited {
190
- padding: 2px 6px;
191
- border: solid 1px #ccc;
192
- background: white;
193
- text-decoration: none;
194
- }
195
-
196
- .paginator a.showall {
197
- padding: 0 !important;
198
- border: none !important;
199
- }
200
-
201
- .paginator a.showall:hover {
202
- color: #036 !important;
203
- background: transparent !important;
204
- }
205
-
206
- .paginator .end {
207
- border-width: 2px !important;
208
- margin-right: 6px;
209
- }
210
-
211
- .paginator .this-page {
212
- padding: 2px 6px;
213
- font-weight: bold;
214
- font-size: 13px;
215
- vertical-align: top;
216
- }
217
-
218
- .paginator a:hover {
219
- color: white;
220
- background: #5b80b2;
221
- border-color: #036;
222
- }
223
-
224
- /* ACTIONS */
225
-
226
- .filtered .actions {
227
- margin-right: 160px !important;
228
- border-right: 1px solid #ddd;
229
- }
230
-
231
- #changelist table input {
232
- margin: 0;
233
- }
234
-
235
- #changelist table tbody tr.selected {
236
- background-color: #FFFFCC;
237
- }
238
-
239
- #changelist .actions {
240
- color: #999;
241
- padding: 3px;
242
- border-top: 1px solid #fff;
243
- border-bottom: 1px solid #ddd;
244
- background: white url(../images/nav-bg-reverse.gif) 0 -10px repeat-x;
245
- }
246
-
247
- #changelist .actions:last-child {
248
- border-bottom: none;
249
- }
250
-
251
- #changelist .actions select {
252
- border: 1px solid #aaa;
253
- margin-left: 0.5em;
254
- padding: 1px 2px;
255
- }
256
-
257
- #changelist .actions label {
258
- font-size: 11px;
259
- margin-left: 0.5em;
260
- }
261
-
262
- #changelist #action-toggle {
263
- display: none;
264
- }
265
-
266
- #changelist .actions .button {
267
- font-size: 11px;
268
- padding: 1px 2px;
269
- }
1
+ /* CHANGELISTS */
2
+
3
+ #changelist {
4
+ position: relative;
5
+ width: 100%;
6
+ }
7
+
8
+ #changelist table {
9
+ width: 100%;
10
+ }
11
+
12
+ .change-list .filtered table {
13
+ border-right: 1px solid #ddd;
14
+ }
15
+
16
+ .change-list .filtered {
17
+ min-height: 400px;
18
+ }
19
+
20
+ .change-list .filtered {
21
+ background: white url(../images/changelist-bg.gif) top right repeat-y !important;
22
+ }
23
+
24
+ .change-list .filtered table, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull {
25
+ margin-right: 160px !important;
26
+ width: auto !important;
27
+ }
28
+
29
+ .change-list .filtered table tbody th {
30
+ padding-right: 1em;
31
+ }
32
+
33
+ #changelist .toplinks {
34
+ border-bottom: 1px solid #ccc !important;
35
+ }
36
+
37
+ #changelist .paginator {
38
+ color: #666;
39
+ border-top: 1px solid #eee;
40
+ border-bottom: 1px solid #eee;
41
+ background: white url(../images/nav-bg.gif) 0 180% repeat-x;
42
+ overflow: hidden;
43
+ }
44
+
45
+ .change-list .filtered .paginator {
46
+ border-right: 1px solid #ddd;
47
+ }
48
+
49
+ /* CHANGELIST TABLES */
50
+
51
+ #changelist table thead th {
52
+ white-space: nowrap;
53
+ vertical-align: middle;
54
+ }
55
+
56
+ #changelist table thead th:first-child {
57
+ width: 1.5em;
58
+ text-align: center;
59
+ }
60
+
61
+ #changelist table tbody td {
62
+ border-left: 1px solid #ddd;
63
+ }
64
+
65
+ #changelist table tbody td:first-child {
66
+ border-left: 0;
67
+ border-right: 1px solid #ddd;
68
+ text-align: center;
69
+ }
70
+
71
+ #changelist table tfoot {
72
+ color: #666;
73
+ }
74
+
75
+ /* TOOLBAR */
76
+
77
+ #changelist #toolbar {
78
+ padding: 3px;
79
+ border-bottom: 1px solid #ddd;
80
+ background: #e1e1e1 url(../images/nav-bg.gif) top left repeat-x;
81
+ color: #666;
82
+ }
83
+
84
+ #changelist #toolbar form input {
85
+ font-size: 11px;
86
+ padding: 1px 2px;
87
+ }
88
+
89
+ #changelist #toolbar form #searchbar {
90
+ padding: 2px;
91
+ }
92
+
93
+ #changelist #changelist-search img {
94
+ vertical-align: middle;
95
+ }
96
+
97
+ /* FILTER COLUMN */
98
+
99
+ #changelist-filter {
100
+ position: absolute;
101
+ top: 0;
102
+ right: 0;
103
+ z-index: 1000;
104
+ width: 160px;
105
+ border-left: 1px solid #ddd;
106
+ background: #efefef;
107
+ margin: 0;
108
+ }
109
+
110
+ #changelist-filter h2 {
111
+ font-size: 11px;
112
+ padding: 2px 5px;
113
+ border-bottom: 1px solid #ddd;
114
+ }
115
+
116
+ #changelist-filter h3 {
117
+ font-size: 12px;
118
+ margin-bottom: 0;
119
+ }
120
+
121
+ #changelist-filter ul {
122
+ padding-left: 0;
123
+ margin-left: 10px;
124
+ }
125
+
126
+ #changelist-filter li {
127
+ list-style-type: none;
128
+ margin-left: 0;
129
+ padding-left: 0;
130
+ }
131
+
132
+ #changelist-filter a {
133
+ color: #999;
134
+ }
135
+
136
+ #changelist-filter a:hover {
137
+ color: #036;
138
+ }
139
+
140
+ #changelist-filter li.selected {
141
+ border-left: 5px solid #ccc;
142
+ padding-left: 5px;
143
+ margin-left: -10px;
144
+ }
145
+
146
+ #changelist-filter li.selected a {
147
+ color: #5b80b2 !important;
148
+ }
149
+
150
+ /* DATE DRILLDOWN */
151
+
152
+ .change-list ul.toplinks {
153
+ display: block;
154
+ background: white url(../images/nav-bg-reverse.gif) 0 -10px repeat-x;
155
+ border-top: 1px solid white;
156
+ float: left;
157
+ padding: 0 !important;
158
+ margin: 0 !important;
159
+ width: 100%;
160
+ }
161
+
162
+ .change-list ul.toplinks li {
163
+ float: left;
164
+ width: 9em;
165
+ padding: 3px 6px;
166
+ font-weight: bold;
167
+ list-style-type: none;
168
+ }
169
+
170
+ .change-list ul.toplinks .date-back a {
171
+ color: #999;
172
+ }
173
+
174
+ .change-list ul.toplinks .date-back a:hover {
175
+ color: #036;
176
+ }
177
+
178
+ /* PAGINATOR */
179
+
180
+ .paginator {
181
+ font-size: 11px;
182
+ padding-top: 10px;
183
+ padding-bottom: 10px;
184
+ line-height: 22px;
185
+ margin: 0;
186
+ border-top: 1px solid #ddd;
187
+ }
188
+
189
+ .paginator a:link, .paginator a:visited {
190
+ padding: 2px 6px;
191
+ border: solid 1px #ccc;
192
+ background: white;
193
+ text-decoration: none;
194
+ }
195
+
196
+ .paginator a.showall {
197
+ padding: 0 !important;
198
+ border: none !important;
199
+ }
200
+
201
+ .paginator a.showall:hover {
202
+ color: #036 !important;
203
+ background: transparent !important;
204
+ }
205
+
206
+ .paginator .end {
207
+ border-width: 2px !important;
208
+ margin-right: 6px;
209
+ }
210
+
211
+ .paginator .this-page {
212
+ padding: 2px 6px;
213
+ font-weight: bold;
214
+ font-size: 13px;
215
+ vertical-align: top;
216
+ }
217
+
218
+ .paginator a:hover {
219
+ color: white;
220
+ background: #5b80b2;
221
+ border-color: #036;
222
+ }
223
+
224
+ /* ACTIONS */
225
+
226
+ .filtered .actions {
227
+ margin-right: 160px !important;
228
+ border-right: 1px solid #ddd;
229
+ }
230
+
231
+ #changelist table input {
232
+ margin: 0;
233
+ }
234
+
235
+ #changelist table tbody tr.selected {
236
+ background-color: #FFFFCC;
237
+ }
238
+
239
+ #changelist .actions {
240
+ color: #999;
241
+ padding: 3px;
242
+ border-top: 1px solid #fff;
243
+ border-bottom: 1px solid #ddd;
244
+ background: white url(../images/nav-bg-reverse.gif) 0 -10px repeat-x;
245
+ }
246
+
247
+ #changelist .actions:last-child {
248
+ border-bottom: none;
249
+ }
250
+
251
+ #changelist .actions select {
252
+ border: 1px solid #aaa;
253
+ margin-left: 0.5em;
254
+ padding: 1px 2px;
255
+ }
256
+
257
+ #changelist .actions label {
258
+ font-size: 11px;
259
+ margin-left: 0.5em;
260
+ }
261
+
262
+ #changelist #action-toggle {
263
+ display: none;
264
+ }
265
+
266
+ #changelist .actions .button {
267
+ font-size: 11px;
268
+ padding: 1px 2px;
269
+ }