radmin 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. data/.gitignore +7 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +4 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README +30 -0
  6. data/Rakefile +9 -0
  7. data/app/controllers/admin/accounts_controller.rb +16 -0
  8. data/app/controllers/admin/passwords_controller.rb +4 -0
  9. data/app/controllers/admin/sessions_controller.rb +13 -0
  10. data/app/controllers/admin/settings_controller.rb +40 -0
  11. data/app/controllers/admin/users_controller.rb +43 -0
  12. data/app/controllers/admin_controller.rb +15 -0
  13. data/app/helpers/admin_helper.rb +45 -0
  14. data/app/models/radmin/assignment.rb +8 -0
  15. data/app/models/radmin/role.rb +8 -0
  16. data/app/models/radmin/setting.rb +38 -0
  17. data/app/models/radmin/user.rb +18 -0
  18. data/app/views/admin/accounts/edit.html.haml +11 -0
  19. data/app/views/admin/passwords/edit.html.haml +11 -0
  20. data/app/views/admin/passwords/new.html.haml +8 -0
  21. data/app/views/admin/sessions/new.html.haml +9 -0
  22. data/app/views/admin/settings/_form.html.haml +12 -0
  23. data/app/views/admin/settings/edit.html.haml +3 -0
  24. data/app/views/admin/settings/index.html.haml +18 -0
  25. data/app/views/admin/settings/new.html.haml +3 -0
  26. data/app/views/admin/users/_form.html.haml +21 -0
  27. data/app/views/admin/users/edit.html.haml +3 -0
  28. data/app/views/admin/users/index.html.haml +18 -0
  29. data/app/views/admin/users/new.html.haml +3 -0
  30. data/app/views/layouts/admin.html.haml +40 -0
  31. data/config/routes.rb +10 -0
  32. data/lib/generators/radmin/install_generator.rb +31 -0
  33. data/lib/generators/radmin/templates/assets/images/admin/topnav_active.gif +0 -0
  34. data/lib/generators/radmin/templates/assets/images/admin/topnav_stretch.gif +0 -0
  35. data/lib/generators/radmin/templates/assets/javascripts/admin/application.js +1 -0
  36. data/lib/generators/radmin/templates/assets/javascripts/admin/jquery.js +16 -0
  37. data/lib/generators/radmin/templates/assets/javascripts/admin/jquery.rails.js +226 -0
  38. data/lib/generators/radmin/templates/assets/stylesheets/admin/reset.css +48 -0
  39. data/lib/generators/radmin/templates/assets/stylesheets/admin/style.css +422 -0
  40. data/lib/generators/radmin/templates/authorization_rules.rb +17 -0
  41. data/lib/generators/radmin/templates/migrations/01_radmin_create_users.rb +17 -0
  42. data/lib/generators/radmin/templates/migrations/02_radmin_create_roles.rb +13 -0
  43. data/lib/generators/radmin/templates/migrations/03_radmin_create_assignments.rb +15 -0
  44. data/lib/generators/radmin/templates/migrations/04_radmin_create_settings.rb +15 -0
  45. data/lib/radmin.rb +5 -0
  46. data/lib/radmin/admin_ui.rb +136 -0
  47. data/lib/radmin/engine.rb +8 -0
  48. data/lib/radmin/i18n.rb +14 -0
  49. data/lib/radmin/version.rb +3 -0
  50. data/lib/tasks/radmin.rake +13 -0
  51. data/radmin.gemspec +32 -0
  52. data/spec/dummy/Rakefile +7 -0
  53. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  54. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  55. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  56. data/spec/dummy/config.ru +4 -0
  57. data/spec/dummy/config/application.rb +45 -0
  58. data/spec/dummy/config/authorization_rules.rb +17 -0
  59. data/spec/dummy/config/boot.rb +10 -0
  60. data/spec/dummy/config/database.yml +22 -0
  61. data/spec/dummy/config/environment.rb +5 -0
  62. data/spec/dummy/config/environments/development.rb +28 -0
  63. data/spec/dummy/config/environments/production.rb +49 -0
  64. data/spec/dummy/config/environments/test.rb +35 -0
  65. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  66. data/spec/dummy/config/initializers/devise.rb +194 -0
  67. data/spec/dummy/config/initializers/inflections.rb +10 -0
  68. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  69. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  70. data/spec/dummy/config/initializers/session_store.rb +8 -0
  71. data/spec/dummy/config/locales/en.yml +5 -0
  72. data/spec/dummy/config/routes.rb +58 -0
  73. data/spec/dummy/db/migrate/20110524171909_radmin_create_users.rb +17 -0
  74. data/spec/dummy/db/migrate/20110524171910_radmin_create_roles.rb +13 -0
  75. data/spec/dummy/db/migrate/20110524171911_radmin_create_assignments.rb +15 -0
  76. data/spec/dummy/db/migrate/20110524171912_radmin_create_settings.rb +15 -0
  77. data/spec/dummy/db/schema.rb +59 -0
  78. data/spec/dummy/public/404.html +26 -0
  79. data/spec/dummy/public/422.html +26 -0
  80. data/spec/dummy/public/500.html +26 -0
  81. data/spec/dummy/public/favicon.ico +0 -0
  82. data/spec/dummy/public/images/admin/topnav_active.gif +0 -0
  83. data/spec/dummy/public/images/admin/topnav_stretch.gif +0 -0
  84. data/spec/dummy/public/javascripts/admin/application.js +1 -0
  85. data/spec/dummy/public/javascripts/admin/jquery.js +16 -0
  86. data/spec/dummy/public/javascripts/admin/jquery.rails.js +226 -0
  87. data/spec/dummy/public/javascripts/application.js +2 -0
  88. data/spec/dummy/public/javascripts/controls.js +965 -0
  89. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  90. data/spec/dummy/public/javascripts/effects.js +1123 -0
  91. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  92. data/spec/dummy/public/javascripts/rails.js +191 -0
  93. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  94. data/spec/dummy/public/stylesheets/admin/reset.css +48 -0
  95. data/spec/dummy/public/stylesheets/admin/style.css +422 -0
  96. data/spec/dummy/script/rails +6 -0
  97. data/spec/dummy/vendor/plugins/dynamic_form/MIT-LICENSE +20 -0
  98. data/spec/dummy/vendor/plugins/dynamic_form/README +13 -0
  99. data/spec/dummy/vendor/plugins/dynamic_form/Rakefile +10 -0
  100. data/spec/dummy/vendor/plugins/dynamic_form/dynamic_form.gemspec +12 -0
  101. data/spec/dummy/vendor/plugins/dynamic_form/init.rb +1 -0
  102. data/spec/dummy/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +300 -0
  103. data/spec/dummy/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +8 -0
  104. data/spec/dummy/vendor/plugins/dynamic_form/lib/dynamic_form.rb +5 -0
  105. data/spec/dummy/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +42 -0
  106. data/spec/dummy/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +370 -0
  107. data/spec/dummy/vendor/plugins/dynamic_form/test/test_helper.rb +9 -0
  108. data/spec/integration/navigation_spec.rb +9 -0
  109. data/spec/radmin_spec.rb +7 -0
  110. data/spec/spec_helper.rb +33 -0
  111. metadata +270 -0
@@ -0,0 +1,191 @@
1
+ (function() {
2
+ // Technique from Juriy Zaytsev
3
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
4
+ function isEventSupported(eventName) {
5
+ var el = document.createElement('div');
6
+ eventName = 'on' + eventName;
7
+ var isSupported = (eventName in el);
8
+ if (!isSupported) {
9
+ el.setAttribute(eventName, 'return;');
10
+ isSupported = typeof el[eventName] == 'function';
11
+ }
12
+ el = null;
13
+ return isSupported;
14
+ }
15
+
16
+ function isForm(element) {
17
+ return Object.isElement(element) && element.nodeName.toUpperCase() == 'FORM'
18
+ }
19
+
20
+ function isInput(element) {
21
+ if (Object.isElement(element)) {
22
+ var name = element.nodeName.toUpperCase()
23
+ return name == 'INPUT' || name == 'SELECT' || name == 'TEXTAREA'
24
+ }
25
+ else return false
26
+ }
27
+
28
+ var submitBubbles = isEventSupported('submit'),
29
+ changeBubbles = isEventSupported('change')
30
+
31
+ if (!submitBubbles || !changeBubbles) {
32
+ // augment the Event.Handler class to observe custom events when needed
33
+ Event.Handler.prototype.initialize = Event.Handler.prototype.initialize.wrap(
34
+ function(init, element, eventName, selector, callback) {
35
+ init(element, eventName, selector, callback)
36
+ // is the handler being attached to an element that doesn't support this event?
37
+ if ( (!submitBubbles && this.eventName == 'submit' && !isForm(this.element)) ||
38
+ (!changeBubbles && this.eventName == 'change' && !isInput(this.element)) ) {
39
+ // "submit" => "emulated:submit"
40
+ this.eventName = 'emulated:' + this.eventName
41
+ }
42
+ }
43
+ )
44
+ }
45
+
46
+ if (!submitBubbles) {
47
+ // discover forms on the page by observing focus events which always bubble
48
+ document.on('focusin', 'form', function(focusEvent, form) {
49
+ // special handler for the real "submit" event (one-time operation)
50
+ if (!form.retrieve('emulated:submit')) {
51
+ form.on('submit', function(submitEvent) {
52
+ var emulated = form.fire('emulated:submit', submitEvent, true)
53
+ // if custom event received preventDefault, cancel the real one too
54
+ if (emulated.returnValue === false) submitEvent.preventDefault()
55
+ })
56
+ form.store('emulated:submit', true)
57
+ }
58
+ })
59
+ }
60
+
61
+ if (!changeBubbles) {
62
+ // discover form inputs on the page
63
+ document.on('focusin', 'input, select, texarea', function(focusEvent, input) {
64
+ // special handler for real "change" events
65
+ if (!input.retrieve('emulated:change')) {
66
+ input.on('change', function(changeEvent) {
67
+ input.fire('emulated:change', changeEvent, true)
68
+ })
69
+ input.store('emulated:change', true)
70
+ }
71
+ })
72
+ }
73
+
74
+ function handleRemote(element) {
75
+ var method, url, params;
76
+
77
+ var event = element.fire("ajax:before");
78
+ if (event.stopped) return false;
79
+
80
+ if (element.tagName.toLowerCase() === 'form') {
81
+ method = element.readAttribute('method') || 'post';
82
+ url = element.readAttribute('action');
83
+ params = element.serialize();
84
+ } else {
85
+ method = element.readAttribute('data-method') || 'get';
86
+ url = element.readAttribute('href');
87
+ params = {};
88
+ }
89
+
90
+ new Ajax.Request(url, {
91
+ method: method,
92
+ parameters: params,
93
+ evalScripts: true,
94
+
95
+ onComplete: function(request) { element.fire("ajax:complete", request); },
96
+ onSuccess: function(request) { element.fire("ajax:success", request); },
97
+ onFailure: function(request) { element.fire("ajax:failure", request); }
98
+ });
99
+
100
+ element.fire("ajax:after");
101
+ }
102
+
103
+ function handleMethod(element) {
104
+ var method = element.readAttribute('data-method'),
105
+ url = element.readAttribute('href'),
106
+ csrf_param = $$('meta[name=csrf-param]')[0],
107
+ csrf_token = $$('meta[name=csrf-token]')[0];
108
+
109
+ var form = new Element('form', { method: "POST", action: url, style: "display: none;" });
110
+ element.parentNode.insert(form);
111
+
112
+ if (method !== 'post') {
113
+ var field = new Element('input', { type: 'hidden', name: '_method', value: method });
114
+ form.insert(field);
115
+ }
116
+
117
+ if (csrf_param) {
118
+ var param = csrf_param.readAttribute('content'),
119
+ token = csrf_token.readAttribute('content'),
120
+ field = new Element('input', { type: 'hidden', name: param, value: token });
121
+ form.insert(field);
122
+ }
123
+
124
+ form.submit();
125
+ }
126
+
127
+
128
+ document.on("click", "*[data-confirm]", function(event, element) {
129
+ var message = element.readAttribute('data-confirm');
130
+ if (!confirm(message)) event.stop();
131
+ });
132
+
133
+ document.on("click", "a[data-remote]", function(event, element) {
134
+ if (event.stopped) return;
135
+ handleRemote(element);
136
+ event.stop();
137
+ });
138
+
139
+ document.on("click", "a[data-method]", function(event, element) {
140
+ if (event.stopped) return;
141
+ handleMethod(element);
142
+ event.stop();
143
+ });
144
+
145
+ document.on("submit", function(event) {
146
+ var element = event.findElement(),
147
+ message = element.readAttribute('data-confirm');
148
+ if (message && !confirm(message)) {
149
+ event.stop();
150
+ return false;
151
+ }
152
+
153
+ var inputs = element.select("input[type=submit][data-disable-with]");
154
+ inputs.each(function(input) {
155
+ input.disabled = true;
156
+ input.writeAttribute('data-original-value', input.value);
157
+ input.value = input.readAttribute('data-disable-with');
158
+ });
159
+
160
+ var element = event.findElement("form[data-remote]");
161
+ if (element) {
162
+ handleRemote(element);
163
+ event.stop();
164
+ }
165
+ });
166
+
167
+ document.on("ajax:after", "form", function(event, element) {
168
+ var inputs = element.select("input[type=submit][disabled=true][data-disable-with]");
169
+ inputs.each(function(input) {
170
+ input.value = input.readAttribute('data-original-value');
171
+ input.removeAttribute('data-original-value');
172
+ input.disabled = false;
173
+ });
174
+ });
175
+
176
+ Ajax.Responders.register({
177
+ onCreate: function(request) {
178
+ var csrf_meta_tag = $$('meta[name=csrf-token]')[0];
179
+
180
+ if (csrf_meta_tag) {
181
+ var header = 'X-CSRF-Token',
182
+ token = csrf_meta_tag.readAttribute('content');
183
+
184
+ if (!request.options.requestHeaders) {
185
+ request.options.requestHeaders = {};
186
+ }
187
+ request.options.requestHeaders[header] = token;
188
+ }
189
+ }
190
+ });
191
+ })();
File without changes
@@ -0,0 +1,48 @@
1
+ html, body, div, span, applet, object, iframe,
2
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
+ a, abbr, acronym, address, big, cite, code,
4
+ del, dfn, em, font, img, ins, kbd, q, s, samp,
5
+ small, strike, strong, sub, sup, tt, var,
6
+ dl, dt, dd, ul, li,
7
+ form, label, legend,
8
+ table, caption, tbody, tfoot, thead, tr, th, td {
9
+ margin: 0;
10
+ padding: 0;
11
+ border: 0;
12
+ outline: 0;
13
+ font-weight: inherit;
14
+ font-style: normal;
15
+ font-size: 100%;
16
+ font-family: inherit;
17
+ }
18
+
19
+ :focus {
20
+ outline: 0;
21
+ }
22
+
23
+ body {
24
+ line-height: 1;
25
+ }
26
+
27
+ ul {
28
+ list-style: none;
29
+ }
30
+
31
+ table {
32
+ border-collapse: collapse;
33
+ border-spacing: 0;
34
+ }
35
+
36
+ caption, th, td {
37
+ text-align: left;
38
+ font-weight: normal;
39
+ }
40
+
41
+ blockquote:before, blockquote:after,
42
+ q:before, q:after {
43
+ content: "";
44
+ }
45
+
46
+ blockquote, q {
47
+ quotes: "" "";
48
+ }
@@ -0,0 +1,422 @@
1
+ html {
2
+ background:#cccccc;
3
+ }
4
+
5
+ body {
6
+ padding:0;
7
+ margin:0;
8
+ font-size:10px;
9
+ font-family:Lucida Grande, Lucida Sans Unicode, verdana, lucida, sans-serif;
10
+ }
11
+
12
+ p {
13
+ padding:1em 0;
14
+ }
15
+
16
+ h1,h2,h3 {
17
+ font-weight:bold;
18
+ }
19
+
20
+ h2 {
21
+ font-size:1.2em;
22
+ margin:1em 0;
23
+ }
24
+
25
+ a {
26
+ color:#1376C9;
27
+ }
28
+
29
+ .nodisp {
30
+ display:none;
31
+ }
32
+
33
+ .clear {
34
+ clear:both;
35
+ }
36
+
37
+ div.spacer40 {
38
+ height:40px;
39
+ }
40
+
41
+ #container {
42
+ width: 970px;
43
+ margin: 0 auto 40px;
44
+ }
45
+
46
+ #header {
47
+ min-height:77px;
48
+ height:auto !important;
49
+ height:77px;
50
+ }
51
+
52
+ ul#navigation {
53
+ margin: 0; padding: 0;
54
+ float: left;
55
+ width: 100%;
56
+ list-style: none;
57
+ position: relative;
58
+ font-size: 1.3em;
59
+ background: url(/images/admin/topnav_stretch.gif) repeat-x;
60
+ }
61
+
62
+ ul#navigation li {
63
+ float: left;
64
+ margin: 0; padding: 0;
65
+ border-right: 1px solid #555;
66
+ }
67
+
68
+ ul#navigation li a {
69
+ padding: 10px 15px;
70
+ display: block;
71
+ color: #f0f0f0;
72
+ text-decoration: none;
73
+ }
74
+
75
+ ul#navigation li a:hover {
76
+ text-decoration:underline;
77
+ }
78
+
79
+ ul#navigation li.current a {
80
+ text-decoration:none;
81
+ }
82
+
83
+ ul#navigation li.current { background: #1376c9 url(/images/admin/topnav_active.gif) repeat-x; }
84
+
85
+ ul#navigation li ul {
86
+ padding: 15px 0;
87
+ position: absolute;
88
+ left: 0;
89
+ width: 100%;
90
+ background: #1376c9;
91
+ color: #fff;
92
+ -moz-border-radius-bottomright:3px;
93
+ -khtml-border-radius-bottomright:3px;
94
+ -webkit-border-bottom-right-radius:3px;
95
+ -moz-border-radius-bottomleft:3px;
96
+ -khtml-border-radius-bottomleft:3px;
97
+ -webkit-border-bottom-left-radius:3px;
98
+ }
99
+
100
+ ul#navigation li ul li { border-right: none; }
101
+ ul#navigation li ul li.current { background: none; }
102
+ ul#navigation li ul li.current a { font-weight:bold; }
103
+
104
+ ul#navigation li ul li:first-child a { border-left:none; }
105
+
106
+ ul#navigation li ul li a {
107
+ padding:0 15px;
108
+ border-left:solid 1px;
109
+ }
110
+
111
+ ul#navigation li ul li a:hover {
112
+ text-decoration:underline;
113
+ }
114
+
115
+ ul#navigation li ul li.current a:hover {
116
+ text-decoration:none;
117
+ }
118
+
119
+ #usernav {
120
+ text-align:right;
121
+ color:#333;
122
+ padding:10px;
123
+ font-size:1.1em;
124
+ }
125
+
126
+ #usernav a {
127
+ color:#333;
128
+ }
129
+
130
+ #usernav a:hover {
131
+ text-decoration:none;
132
+ }
133
+
134
+ #main {
135
+ background:#fff;
136
+ font-size:1.3em;
137
+ -moz-border-radius:3px;
138
+ -khtml-border-radius:3px;
139
+ -webkit-border-radius:3px;
140
+ }
141
+
142
+ #main h1 {
143
+ margin-top:0.25em;
144
+ background:#333333;
145
+ color:#fff;
146
+ font-size:1.2em;
147
+ padding:10px 15px;
148
+ -moz-border-radius-topright:3px;
149
+ -khtml-border-radius-topright:3px;
150
+ -webkit-border-top-right-radius:3px;
151
+ -moz-border-radius-topleft:3px;
152
+ -khtml-border-radius-topleft:3px;
153
+ -webkit-border-top-left-radius:3px;
154
+ }
155
+
156
+ #content {
157
+ padding:15px;
158
+ font-size:1em;
159
+ }
160
+
161
+ #content .box h1 {
162
+ background:none;
163
+ color:#ce1212;
164
+ font-size:190%;
165
+ margin:0;
166
+ padding:0;
167
+ }
168
+
169
+ table {
170
+ width: 100%;
171
+ border-collapse: collapse;
172
+ margin-bottom: 15px;
173
+ }
174
+
175
+ table th {
176
+ padding: 10px;
177
+ text-align: left;
178
+ background: #efefef;
179
+ color: #000;
180
+ font-weight:bold;
181
+ }
182
+
183
+ table th.first {
184
+ width: 30px;
185
+ }
186
+
187
+ table th.last {
188
+ width: 200px;
189
+ }
190
+
191
+ table .checkbox {
192
+ margin-left: 10px;
193
+ }
194
+
195
+ table td {
196
+ padding: 10px;
197
+ border-bottom:1px solid #F0F0EE;
198
+ }
199
+
200
+ table td.last {
201
+ text-align: right;
202
+ white-space:nowrap;
203
+ }
204
+
205
+ #content p { margin:5px 0;}
206
+
207
+ #content p.intro {
208
+ margin-bottom:15px;
209
+ padding:0;
210
+ color:#999;
211
+ margin-top:0;
212
+ line-height:1.3;
213
+ }
214
+
215
+ #content p.sub { font-size:95%; color:#999;}
216
+
217
+ #content table.stats th { font-size:100%; width:40%; color:#000;}
218
+ #content hr { border:0; border-top:5px solid #efefef; margin:15px 0;}
219
+
220
+ #content ul.failed {}
221
+ #content ul.failed li {background:-webkit-gradient(linear, left top, left bottom, from(#efefef), to(#fff)) #efefef; margin-top:10px; padding:10px; overflow:hidden; -webkit-border-radius:5px; border:1px solid #ccc; }
222
+ #content ul.failed li dl dt {font-size:80%; color:#999; width:60px; float:left; padding-top:1px; text-align:right;}
223
+ #content ul.failed li dl dd {margin-bottom:10px; margin-left:70px;}
224
+ #content ul.failed li dl dd .retry { float: right; }
225
+ #content ul.failed li dl dd code, #content ul.failed li dl dd pre { font-family:Monaco, "Courier New", monospace; font-size:90%;}
226
+ #content ul.failed li dl dd.error a {font-family:Monaco, "Courier New", monospace; font-size:90%; }
227
+ #content ul.failed li dl dd.error pre { margin-top:3px; line-height:1.3;}
228
+
229
+ #content p.pagination { background:#efefef; padding:10px; overflow:hidden;}
230
+ #content p.pagination a.less { float:left;}
231
+ #content p.pagination a.more { float:right;}
232
+
233
+ #content .time a.toggle_format {
234
+ text-decoration:none;
235
+ }
236
+
237
+ #content form label,
238
+ #content form .buttons {
239
+ color:#666666;
240
+ display:block;
241
+ margin:1em 0 0.2em 0;
242
+ }
243
+
244
+ #content form .buttons {
245
+ margin-top:2em;
246
+ }
247
+
248
+ #content form .buttons input {
249
+ font-size:120%;
250
+ }
251
+
252
+ #content form label.inline {
253
+ position: relative;
254
+ display: inline;
255
+ top: -2px;
256
+ vertical-align: baseline;
257
+ }
258
+
259
+ #content form input[type="text"],
260
+ #content form input[type="password"],
261
+ #content form select,
262
+ #content form textarea {
263
+ border:1px solid #AAAAAA;
264
+ padding:6px 3px;
265
+ -moz-border-radius:3px;
266
+ -webkit-border-radius:3px;
267
+ -khtml-border-radius:3px;
268
+ }
269
+
270
+ #content form input[type="text"],
271
+ #content form input[type="password"] {
272
+ width:25em;
273
+ }
274
+
275
+ #content form textarea {
276
+ width:99%;
277
+ }
278
+
279
+ #content form input[type=text]:focus,
280
+ #content form input[type=password]:focus,
281
+ #content form textarea:focus {
282
+ outline:none;
283
+ border-color:rgba(204,204,204,.75)!important;
284
+ box-shadow:0 0 8px rgba(204,204,204,.5);
285
+ -moz-box-shadow:0 0 8px rgba(204,204,204,.5);
286
+ -webkit-box-shadow:0 0 8px rgba(204,204,204,.5);
287
+ }
288
+
289
+ #content .box {
290
+ width:30em;
291
+ margin:6em auto 0;
292
+ padding:2em 2em;
293
+ background-color:#EFEFEF;
294
+ border:5px solid #CCCCCC;
295
+ -webkit-border-radius:6px;
296
+ -moz-border-radius:6px;
297
+ }
298
+
299
+ #content .box h1 {
300
+ margin:0 0 1em 0;
301
+ font-size:160%;
302
+ }
303
+
304
+ #content .box form input[type="text"],
305
+ #content .box form input[type="password"] {
306
+ width:27em;
307
+ }
308
+
309
+ #content .toolbar {
310
+ float:right;
311
+ padding:0 10px;
312
+ }
313
+
314
+ /* Pagination */
315
+
316
+ div.pagination {
317
+ padding: 3px;
318
+ margin: 10px;
319
+ clear: both;
320
+ text-align:center;
321
+ }
322
+
323
+ div.pagination a {
324
+ padding: 2px 5px 2px 5px;
325
+ margin: 2px;
326
+ border: 1px solid #CCCCCC;
327
+ text-decoration: none; /* no underline */
328
+ }
329
+
330
+ div.pagination a:hover, div.pagination a:active {
331
+ }
332
+
333
+ div.pagination span.current {
334
+ padding: 2px 5px 2px 5px;
335
+ margin: 2px;
336
+ border: 1px solid #CCCCCC;
337
+ font-weight: bold;
338
+ background-color: #CCCCCC;
339
+ color: #FFF;
340
+ }
341
+
342
+ div.pagination span.disabled {
343
+ padding: 2px 5px 2px 5px;
344
+ margin: 2px;
345
+ border: 1px solid #EEE;
346
+ color: #DDD;
347
+ }
348
+
349
+ #notice, #alert, #error {
350
+ padding:1px 1em;
351
+ }
352
+
353
+ div.preview {
354
+ padding:1em;
355
+ font-size:110%;
356
+ }
357
+
358
+ #notice {
359
+ background-color: #b2e5b2;
360
+ color: #060;
361
+ }
362
+
363
+ #alert, #error {
364
+ background-color:#F3C2C2;
365
+ color:#770000;
366
+ }
367
+
368
+ #content form .fieldWithErrors {
369
+ display: inline;
370
+ }
371
+
372
+ #content form .fieldWithErrors {
373
+ display: inline;
374
+ }
375
+
376
+ #content form .fieldWithErrors input[type="text"],
377
+ #content form .fieldWithErrors input[type="password"],
378
+ #content form .fieldWithErrors select,
379
+ #content form .fieldWithErrors textarea {
380
+ background-color: #F9E1BC;
381
+ }
382
+
383
+ #content form .formError {
384
+ font-size:0.9em;
385
+ padding:0.5em;
386
+ color:#770000;
387
+ }
388
+
389
+ #errorExplanation {
390
+ width: 400px;
391
+ border: 2px solid #CF0000;
392
+ padding: 0px;
393
+ padding-bottom: 12px;
394
+ margin-bottom: 20px;
395
+ background-color: #f0f0f0;
396
+ }
397
+
398
+ #errorExplanation h2 {
399
+ text-align: left;
400
+ font-weight: bold;
401
+ padding: 5px 5px 5px 15px;
402
+ font-size: 12px;
403
+ margin: 0;
404
+ background-color: #c00;
405
+ color: #fff;
406
+ }
407
+
408
+ #errorExplanation p {
409
+ color: #333;
410
+ margin-bottom: 0;
411
+ padding: 8px;
412
+ }
413
+
414
+ #errorExplanation ul {
415
+ margin: 2px 24px;
416
+ }
417
+
418
+ #errorExplanation ul li {
419
+ font-size: 12px;
420
+ list-style: disc;
421
+ }
422
+