rails_admin_content 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +38 -0
  3. data/Rakefile +7 -0
  4. data/app/assets/javascripts/develop/manages.js.coffee +96 -0
  5. data/app/assets/javascripts/rails_admin_content.js +22 -0
  6. data/app/assets/stylesheets/develop/manages.css.scss +38 -0
  7. data/app/assets/stylesheets/rails_admin_content.css +19 -0
  8. data/app/assets/stylesheets/site.css +479 -0
  9. data/app/controllers/application_controller.rb +3 -0
  10. data/app/controllers/rails_admin_content/develop/application_controller.rb +5 -0
  11. data/app/controllers/rails_admin_content/develop/manages_controller.rb +77 -0
  12. data/app/views/layouts/rails_admin_content/admin.html.slim +58 -0
  13. data/app/views/rails_admin_content/develop/manages/_content.html.slim +21 -0
  14. data/app/views/rails_admin_content/develop/manages/_filter.html.slim +25 -0
  15. data/app/views/rails_admin_content/develop/manages/_form.html.slim +5 -0
  16. data/app/views/rails_admin_content/develop/manages/_menv.html.slim +8 -0
  17. data/app/views/rails_admin_content/develop/manages/_navbar.html.slim +34 -0
  18. data/app/views/rails_admin_content/develop/manages/details.html.slim +18 -0
  19. data/app/views/rails_admin_content/develop/manages/edit.html.slim +16 -0
  20. data/app/views/rails_admin_content/develop/manages/edit_column.html.slim +30 -0
  21. data/app/views/rails_admin_content/develop/manages/index.html.slim +2 -0
  22. data/app/views/rails_admin_content/develop/manages/new.html.slim +10 -0
  23. data/app/views/rails_admin_content/develop/manages/query.html.slim +24 -0
  24. data/app/views/rails_admin_content/develop/manages/show.html.slim +27 -0
  25. data/config/routes.rb +12 -0
  26. data/lib/assets/codemirror/charisma-app.css +501 -0
  27. data/lib/assets/codemirror/codemirror.css +249 -0
  28. data/lib/assets/codemirror/codemirror.js +5637 -0
  29. data/lib/assets/codemirror/javascript.js +471 -0
  30. data/lib/assets/codemirror/matchbrackets.js +82 -0
  31. data/lib/assets/codemirror/midnight.css +52 -0
  32. data/lib/assets/codemirror/solarized.css +207 -0
  33. data/lib/assets/codemirror/sql.js +267 -0
  34. data/lib/assets/codemirror/twilight.css +26 -0
  35. data/lib/assets/images/add.png +0 -0
  36. data/lib/assets/images/column.png +0 -0
  37. data/lib/assets/images/content.png +0 -0
  38. data/lib/assets/images/details.png +0 -0
  39. data/lib/assets/images/file.png +0 -0
  40. data/lib/assets/images/home.png +0 -0
  41. data/lib/assets/images/search.png +0 -0
  42. data/lib/assets/images/setting.png +0 -0
  43. data/lib/assets/images/user.png +0 -0
  44. data/lib/assets/javascripts/bootstrap/bootstrap-alert.js +100 -0
  45. data/lib/assets/javascripts/jquery/dyndatetime/calendar_zh.js +128 -0
  46. data/lib/assets/javascripts/jquery/dyndatetime/dynDateTime.js +2011 -0
  47. data/lib/assets/javascripts/jquery/editable.js +31 -0
  48. data/lib/assets/javascripts/jquery/jquery.jeditable.js +543 -0
  49. data/lib/assets/stylesheets/bootstrap/bootstrap-app.css +5255 -0
  50. data/lib/assets/stylesheets/dyndatetime/calendar-system.css +251 -0
  51. data/lib/assets/stylesheets/dyndatetime/skins/aqua/active-bg.gif +0 -0
  52. data/lib/assets/stylesheets/dyndatetime/skins/aqua/dark-bg.gif +0 -0
  53. data/lib/assets/stylesheets/dyndatetime/skins/aqua/hover-bg.gif +0 -0
  54. data/lib/assets/stylesheets/dyndatetime/skins/aqua/menuarrow.gif +0 -0
  55. data/lib/assets/stylesheets/dyndatetime/skins/aqua/normal-bg.gif +0 -0
  56. data/lib/assets/stylesheets/dyndatetime/skins/aqua/rowhover-bg.gif +0 -0
  57. data/lib/assets/stylesheets/dyndatetime/skins/aqua/status-bg.gif +0 -0
  58. data/lib/assets/stylesheets/dyndatetime/skins/aqua/theme.css +236 -0
  59. data/lib/assets/stylesheets/dyndatetime/skins/aqua/title-bg.gif +0 -0
  60. data/lib/assets/stylesheets/dyndatetime/skins/aqua/today-bg.gif +0 -0
  61. data/lib/rails_admin_content/client.rb +93 -0
  62. data/lib/rails_admin_content/engine.rb +12 -0
  63. data/lib/rails_admin_content/helper.rb +65 -0
  64. data/lib/rails_admin_content/mysql/adapters/client.rb +18 -0
  65. data/lib/rails_admin_content/paginate.rb +53 -0
  66. data/lib/rails_admin_content/version.rb +3 -0
  67. data/lib/rails_admin_content.rb +5 -0
  68. metadata +180 -0
@@ -0,0 +1,251 @@
1
+ /* The main calendar widget. DIV containing a table. */
2
+
3
+ .calendar {
4
+ position: relative;
5
+ display: none;
6
+ border: 1px solid;
7
+ border-color: #fff #000 #000 #fff;
8
+ font-size: 11px;
9
+ cursor: default;
10
+ background: Window;
11
+ color: WindowText;
12
+ font-family: tahoma,verdana,sans-serif;
13
+ }
14
+
15
+ .calendar table {
16
+ border: 1px solid;
17
+ border-color: #fff #000 #000 #fff;
18
+ font-size: 11px;
19
+ cursor: default;
20
+ background: Window;
21
+ color: WindowText;
22
+ font-family: tahoma,verdana,sans-serif;
23
+ }
24
+
25
+ /* Header part -- contains navigation buttons and day names. */
26
+
27
+ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
28
+ text-align: center;
29
+ padding: 1px;
30
+ border: 1px solid;
31
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
32
+ background: ButtonFace;
33
+ }
34
+
35
+ .calendar .nav {
36
+ background: ButtonFace url(skins/aqua/menuarrow.gif) no-repeat 100% 100%;
37
+ }
38
+
39
+ .calendar thead .title { /* This holds the current "month, year" */
40
+ font-weight: bold;
41
+ padding: 1px;
42
+ border: 1px solid #000;
43
+ background: ActiveCaption;
44
+ color: CaptionText;
45
+ text-align: center;
46
+ }
47
+
48
+ .calendar thead .headrow { /* Row <TR> containing navigation buttons */
49
+ }
50
+
51
+ .calendar thead .daynames { /* Row <TR> containing the day names */
52
+ }
53
+
54
+ .calendar thead .name { /* Cells <TD> containing the day names */
55
+ border-bottom: 1px solid ButtonShadow;
56
+ padding: 2px;
57
+ text-align: center;
58
+ background: ButtonFace;
59
+ color: ButtonText;
60
+ }
61
+
62
+ .calendar thead .weekend { /* How a weekend day name shows in header */
63
+ color: #f00;
64
+ }
65
+
66
+ .calendar thead .hilite { /* How do the buttons in header appear when hover */
67
+ border: 2px solid;
68
+ padding: 0px;
69
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
70
+ }
71
+
72
+ .calendar thead .active { /* Active (pressed) buttons in header */
73
+ border-width: 1px;
74
+ padding: 2px 0px 0px 2px;
75
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
76
+ }
77
+
78
+ /* The body part -- contains all the days in month. */
79
+
80
+ .calendar tbody .day { /* Cells <TD> containing month days dates */
81
+ width: 2em;
82
+ text-align: right;
83
+ padding: 2px 4px 2px 2px;
84
+ }
85
+ .calendar tbody .day.othermonth {
86
+ font-size: 80%;
87
+ color: #aaa;
88
+ }
89
+ .calendar tbody .day.othermonth.oweekend {
90
+ color: #faa;
91
+ }
92
+
93
+ .calendar table .wn {
94
+ padding: 2px 3px 2px 2px;
95
+ border-right: 1px solid ButtonShadow;
96
+ background: ButtonFace;
97
+ color: ButtonText;
98
+ }
99
+
100
+ .calendar tbody .rowhilite td {
101
+ background: Highlight;
102
+ color: HighlightText;
103
+ }
104
+
105
+ .calendar tbody td.hilite { /* Hovered cells <TD> */
106
+ padding: 1px 3px 1px 1px;
107
+ border-top: 1px solid #fff;
108
+ border-right: 1px solid #000;
109
+ border-bottom: 1px solid #000;
110
+ border-left: 1px solid #fff;
111
+ }
112
+
113
+ .calendar tbody td.active { /* Active (pressed) cells <TD> */
114
+ padding: 2px 2px 0px 2px;
115
+ border: 1px solid;
116
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
117
+ }
118
+
119
+ .calendar tbody td.selected { /* Cell showing selected date */
120
+ font-weight: bold;
121
+ border: 1px solid;
122
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
123
+ padding: 2px 2px 0px 2px;
124
+ background: ButtonFace;
125
+ color: ButtonText;
126
+ }
127
+
128
+ .calendar tbody td.weekend { /* Cells showing weekend days */
129
+ color: #f00;
130
+ }
131
+
132
+ .calendar tbody td.today { /* Cell showing today date */
133
+ font-weight: bold;
134
+ color: #00f;
135
+ }
136
+
137
+ .calendar tbody td.disabled { color: GrayText; }
138
+
139
+ .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
140
+ visibility: hidden;
141
+ }
142
+
143
+ .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
144
+ display: none;
145
+ }
146
+
147
+ /* The footer part -- status bar and "Close" button */
148
+
149
+ .calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
150
+ }
151
+
152
+ .calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
153
+ background: ButtonFace;
154
+ padding: 1px;
155
+ border: 1px solid;
156
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
157
+ color: ButtonText;
158
+ text-align: center;
159
+ }
160
+
161
+ .calendar tfoot .hilite { /* Hover style for buttons in footer */
162
+ border-top: 1px solid #fff;
163
+ border-right: 1px solid #000;
164
+ border-bottom: 1px solid #000;
165
+ border-left: 1px solid #fff;
166
+ padding: 1px;
167
+ background: #e4e0d8;
168
+ }
169
+
170
+ .calendar tfoot .active { /* Active (pressed) style for buttons in footer */
171
+ padding: 2px 0px 0px 2px;
172
+ border-top: 1px solid #000;
173
+ border-right: 1px solid #fff;
174
+ border-bottom: 1px solid #fff;
175
+ border-left: 1px solid #000;
176
+ }
177
+
178
+ /* Combo boxes (menus that display months/years for direct selection) */
179
+
180
+ .calendar .combo {
181
+ position: absolute;
182
+ display: none;
183
+ width: 4em;
184
+ top: 0px;
185
+ left: 0px;
186
+ cursor: default;
187
+ border: 1px solid;
188
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
189
+ background: Menu;
190
+ color: MenuText;
191
+ font-size: 90%;
192
+ padding: 1px;
193
+ z-index: 100;
194
+ }
195
+
196
+ .calendar .combo .label,
197
+ .calendar .combo .label-IEfix {
198
+ text-align: center;
199
+ padding: 1px;
200
+ }
201
+
202
+ .calendar .combo .label-IEfix {
203
+ width: 4em;
204
+ }
205
+
206
+ .calendar .combo .active {
207
+ padding: 0px;
208
+ border: 1px solid #000;
209
+ }
210
+
211
+ .calendar .combo .hilite {
212
+ background: Highlight;
213
+ color: HighlightText;
214
+ }
215
+
216
+ .calendar td.time {
217
+ border-top: 1px solid ButtonShadow;
218
+ padding: 1px 0px;
219
+ text-align: center;
220
+ background-color: ButtonFace;
221
+ }
222
+
223
+ .calendar td.time .hour,
224
+ .calendar td.time .minute,
225
+ .calendar td.time .ampm {
226
+ padding: 0px 3px 0px 4px;
227
+ border: 1px solid #889;
228
+ font-weight: bold;
229
+ background-color: Menu;
230
+ }
231
+
232
+ .calendar td.time .ampm {
233
+ text-align: center;
234
+ }
235
+
236
+ .calendar td.time .colon {
237
+ padding: 0px 2px 0px 3px;
238
+ font-weight: bold;
239
+ }
240
+
241
+ .calendar td.time span.hilite {
242
+ border-color: #000;
243
+ background-color: Highlight;
244
+ color: HighlightText;
245
+ }
246
+
247
+ .calendar td.time span.active {
248
+ border-color: #f00;
249
+ background-color: #000;
250
+ color: #0f0;
251
+ }
@@ -0,0 +1,236 @@
1
+ /* Distributed as part of The Coolest DHTML Calendar
2
+ Author: Mihai Bazon, www.bazon.net/mishoo
3
+ Copyright Dynarch.com 2005, www.dynarch.com
4
+ */
5
+
6
+ /* The main calendar widget. DIV containing a table. */
7
+
8
+ div.calendar { position: relative; }
9
+
10
+ .calendar, .calendar table {
11
+ border: 1px solid #bdb2bf;
12
+ font-size: 11px;
13
+ color: #000;
14
+ cursor: default;
15
+ background: url("normal-bg.gif");
16
+ font-family: "trebuchet ms",verdana,tahoma,sans-serif;
17
+ }
18
+
19
+ .calendar {
20
+ border-color: #797979;
21
+ }
22
+
23
+ /* Header part -- contains navigation buttons and day names. */
24
+
25
+ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
26
+ text-align: center; /* They are the navigation buttons */
27
+ padding: 2px; /* Make the buttons seem like they're pressing */
28
+ background: url("title-bg.gif") repeat-x 0 100%; color: #000;
29
+ font-weight: bold;
30
+ }
31
+
32
+ .calendar .nav {
33
+ font-family: verdana,tahoma,sans-serif;
34
+ }
35
+
36
+ .calendar .nav div {
37
+ background: transparent url("menuarrow.gif") no-repeat 100% 100%;
38
+ }
39
+
40
+ .calendar thead tr { background: url("title-bg.gif") repeat-x 0 100%; color: #000; }
41
+
42
+ .calendar thead .title { /* This holds the current "month, year" */
43
+ font-weight: bold; /* Pressing it will take you to the current date */
44
+ text-align: center;
45
+ padding: 2px;
46
+ background: url("title-bg.gif") repeat-x 0 100%; color: #000;
47
+ }
48
+
49
+ .calendar thead .headrow { /* Row <TR> containing navigation buttons */
50
+ }
51
+
52
+ .calendar thead .name { /* Cells <TD> containing the day names */
53
+ border-bottom: 1px solid #797979;
54
+ padding: 2px;
55
+ text-align: center;
56
+ color: #000;
57
+ }
58
+
59
+ .calendar thead .weekend { /* How a weekend day name shows in header */
60
+ color: #c44;
61
+ }
62
+
63
+ .calendar thead .hilite { /* How do the buttons in header appear when hover */
64
+ background: url("hover-bg.gif");
65
+ border-bottom: 1px solid #797979;
66
+ padding: 2px 2px 1px 2px;
67
+ }
68
+
69
+ .calendar thead .active { /* Active (pressed) buttons in header */
70
+ background: url("active-bg.gif"); color: #fff;
71
+ padding: 3px 1px 0px 3px;
72
+ border-bottom: 1px solid #797979;
73
+ }
74
+
75
+ .calendar thead .daynames { /* Row <TR> containing the day names */
76
+ background: url("dark-bg.gif");
77
+ }
78
+
79
+ /* The body part -- contains all the days in month. */
80
+
81
+ .calendar tbody .day { /* Cells <TD> containing month days dates */
82
+ font-family: verdana,tahoma,sans-serif;
83
+ width: 2em;
84
+ color: #000;
85
+ text-align: right;
86
+ padding: 2px 4px 2px 2px;
87
+ }
88
+ .calendar tbody .day.othermonth {
89
+ font-size: 80%;
90
+ color: #999;
91
+ }
92
+ .calendar tbody .day.othermonth.oweekend {
93
+ color: #f99;
94
+ }
95
+
96
+ .calendar table .wn {
97
+ padding: 2px 3px 2px 2px;
98
+ border-right: 1px solid #797979;
99
+ background: url("dark-bg.gif");
100
+ }
101
+
102
+ .calendar tbody .rowhilite td,
103
+ .calendar tbody .rowhilite td.wn {
104
+ background: url("rowhover-bg.gif");
105
+ }
106
+
107
+ .calendar tbody td.today { font-weight: bold; /* background: url("today-bg.gif") no-repeat 70% 50%; */ }
108
+
109
+ .calendar tbody td.hilite { /* Hovered cells <TD> */
110
+ background: url("hover-bg.gif");
111
+ padding: 1px 3px 1px 1px;
112
+ border: 1px solid #bbb;
113
+ }
114
+
115
+ .calendar tbody td.active { /* Active (pressed) cells <TD> */
116
+ padding: 2px 2px 0px 2px;
117
+ }
118
+
119
+ .calendar tbody td.weekend { /* Cells showing weekend days */
120
+ color: #c44;
121
+ }
122
+
123
+ .calendar tbody td.selected { /* Cell showing selected date */
124
+ font-weight: bold;
125
+ border: 1px solid #797979;
126
+ padding: 1px 3px 1px 1px;
127
+ background: url("active-bg.gif"); color: #fff;
128
+ }
129
+
130
+ .calendar tbody .disabled { color: #999; }
131
+
132
+ .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
133
+ visibility: hidden;
134
+ }
135
+
136
+ .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
137
+ display: none;
138
+ }
139
+
140
+ /* The footer part -- status bar and "Close" button */
141
+
142
+ .calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
143
+ text-align: center;
144
+ background: #565;
145
+ color: #fff;
146
+ }
147
+
148
+ .calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
149
+ padding: 2px;
150
+ background: url("status-bg.gif") repeat-x 0 0; color: #000;
151
+ }
152
+
153
+ .calendar tfoot .hilite { /* Hover style for buttons in footer */
154
+ background: #afa;
155
+ border: 1px solid #084;
156
+ color: #000;
157
+ padding: 1px;
158
+ }
159
+
160
+ .calendar tfoot .active { /* Active (pressed) style for buttons in footer */
161
+ background: #7c7;
162
+ padding: 2px 0px 0px 2px;
163
+ }
164
+
165
+ /* Combo boxes (menus that display months/years for direct selection) */
166
+
167
+ .calendar .combo {
168
+ position: absolute;
169
+ display: none;
170
+ top: 0px;
171
+ left: 0px;
172
+ width: 4em;
173
+ cursor: default;
174
+ border-width: 0 1px 1px 1px;
175
+ border-style: solid;
176
+ border-color: #797979;
177
+ background: url("normal-bg.gif"); color: #000;
178
+ z-index: 100;
179
+ font-size: 90%;
180
+ }
181
+
182
+ .calendar .combo .label,
183
+ .calendar .combo .label-IEfix {
184
+ text-align: center;
185
+ padding: 1px;
186
+ }
187
+
188
+ .calendar .combo .label-IEfix {
189
+ width: 4em;
190
+ }
191
+
192
+ .calendar .combo .hilite {
193
+ background: url("hover-bg.gif"); color: #000;
194
+ }
195
+
196
+ .calendar .combo .active {
197
+ background: url("active-bg.gif"); color: #fff;
198
+ font-weight: bold;
199
+ }
200
+
201
+ .calendar td.time {
202
+ border-top: 1px solid #797979;
203
+ padding: 1px 0px;
204
+ text-align: center;
205
+ background: url("dark-bg.gif");
206
+ }
207
+
208
+ .calendar td.time .hour,
209
+ .calendar td.time .minute,
210
+ .calendar td.time .ampm {
211
+ padding: 0px 5px 0px 6px;
212
+ font-weight: bold;
213
+ background: url("normal-bg.gif"); color: #000;
214
+ }
215
+
216
+ .calendar td.time .hour,
217
+ .calendar td.time .minute {
218
+ font-family: monospace;
219
+ }
220
+
221
+ .calendar td.time .ampm {
222
+ text-align: center;
223
+ }
224
+
225
+ .calendar td.time .colon {
226
+ padding: 0px 2px 0px 3px;
227
+ font-weight: bold;
228
+ }
229
+
230
+ .calendar td.time span.hilite {
231
+ background: url("hover-bg.gif"); color: #000;
232
+ }
233
+
234
+ .calendar td.time span.active {
235
+ background: url("active-bg.gif"); color: #fff;
236
+ }