joshuaclayton-watchtower 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/Manifest +66 -0
  3. data/README.textile +34 -0
  4. data/Rakefile +35 -0
  5. data/app/controllers/watchtower_controller.rb +3 -0
  6. data/app/helpers/watchtower_helper.rb +27 -0
  7. data/app/models/watched_exception.rb +3 -0
  8. data/app/views/layouts/watchtower.erb +34 -0
  9. data/app/views/watchtower/_recordset.erb +10 -0
  10. data/app/views/watchtower/destroy.js.rjs +0 -0
  11. data/app/views/watchtower/destroy_multiple.js.rjs +6 -0
  12. data/app/views/watchtower/index.html.erb +59 -0
  13. data/app/views/watchtower/index.js.rjs +2 -0
  14. data/app/views/watchtower/show.html.erb +26 -0
  15. data/config/routes.rb +3 -0
  16. data/generators/watchtower/USAGE +1 -0
  17. data/generators/watchtower/templates/README +26 -0
  18. data/generators/watchtower/templates/migrations/create_watched_exceptions.rb +20 -0
  19. data/generators/watchtower/watchtower_generator.rb +12 -0
  20. data/generators/watchtower_assets/USAGE +1 -0
  21. data/generators/watchtower_assets/templates/public/javascripts/watchtower/jquery-1.3.2.min.js +19 -0
  22. data/generators/watchtower_assets/templates/public/javascripts/watchtower/jquery-ui-1.7.1.custom.min.js +160 -0
  23. data/generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.bindings.js +50 -0
  24. data/generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.events.js +102 -0
  25. data/generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.js +65 -0
  26. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/admin.css +60 -0
  27. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/ajax-loader.gif +0 -0
  28. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/bullet-black.png +0 -0
  29. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/buttons/sprite-gray.png +0 -0
  30. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/buttons/x.png +0 -0
  31. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign-red.png +0 -0
  32. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign-sm.png +0 -0
  33. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign.png +0 -0
  34. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/edit-template.gif +0 -0
  35. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/success-badge.png +0 -0
  36. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/nav-admin-shadow.png +0 -0
  37. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/extras.css +86 -0
  38. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/forms.css +312 -0
  39. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/ie.css +31 -0
  40. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  41. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  42. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  43. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  44. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  45. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_ffffff_1x400.png +0 -0
  46. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  47. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  48. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_222222_256x240.png +0 -0
  49. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_2e83ff_256x240.png +0 -0
  50. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_454545_256x240.png +0 -0
  51. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_888888_256x240.png +0 -0
  52. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_cd0a0a_256x240.png +0 -0
  53. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/jquery-ui-1.7.1.custom.css +404 -0
  54. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/reset.css +235 -0
  55. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/screen.css +208 -0
  56. data/generators/watchtower_assets/templates/public/stylesheets/watchtower/watchtower.css +56 -0
  57. data/generators/watchtower_assets/watchtower_assets_generator.rb +19 -0
  58. data/lib/watchtower/application_controller_base.rb +40 -0
  59. data/lib/watchtower/controller_base.rb +54 -0
  60. data/lib/watchtower/watched_exception_base.rb +84 -0
  61. data/lib/watchtower/watched_exceptions_presenter.rb +23 -0
  62. data/lib/watchtower.rb +5 -0
  63. data/rails/init.rb +2 -0
  64. data/tasks/watchtower_tasks.rake +0 -0
  65. data/test/test_helper.rb +3 -0
  66. data/watchtower.gemspec +38 -0
  67. metadata +154 -0
@@ -0,0 +1,312 @@
1
+ /** =forms.css
2
+ ************************************************************
3
+ @project FusionaryFramwork
4
+ ************************************************************/
5
+
6
+ /** =image replacement
7
+ ************************************************************/
8
+ .hform .error-message {
9
+ text-indent: -999em; display: block; font-size: 1px !important; overflow: hidden;
10
+ }
11
+
12
+ /** =inputs
13
+ ************************************************************
14
+ @note Wrap inputs with a div and class with the type (text, select, file, etc)
15
+ @note Textareas and password input should get a text class as well as a textarea/password class as need for styling
16
+ ************************************************************/
17
+ input, select, textarea, button { margin: 0; }
18
+ input, select, textarea, button, label { vertical-align: middle; }
19
+
20
+ .text,
21
+ .textarea,
22
+ .select,
23
+ .file,
24
+ fieldset {
25
+ position: relative;
26
+ }
27
+ .text,
28
+ .textarea,
29
+ .select,
30
+ .file,
31
+ fieldset.multi-line {
32
+ margin: 0 0 1em;
33
+ }
34
+ .text,
35
+ .textarea,
36
+ .select,
37
+ .file,
38
+ fieldset,
39
+ .actions {
40
+ clear: both;
41
+ }
42
+ textarea,
43
+ .text input {
44
+ background: #f3f3f3;
45
+ border:1px solid #bbb;
46
+ border-top-width: 2px;
47
+ border-bottom-color: #e2e1dd;
48
+ color: #525252;
49
+ padding: 2px;
50
+ font-size: 14px;
51
+ overflow-y: auto;
52
+ }
53
+ textarea,
54
+ .text input,
55
+ .error.text input:focus,
56
+ .error.text textarea:focus {
57
+ border-color: #bbb;
58
+ border-bottom-color: #e2e1dd;
59
+ }
60
+ select,
61
+ textarea,
62
+ .text input,
63
+ .file input {
64
+ display: block;
65
+ }
66
+ textarea {
67
+ min-height: 80px;
68
+ line-height: 1.2em; /* for jquery.autogrow */
69
+ }
70
+ textarea:focus,
71
+ .text input:focus {
72
+ background-color: #fdffed;
73
+ }
74
+ .fancy input {
75
+ font-weight: bold;
76
+ letter-spacing: -.015em;
77
+ font-size: 16px;
78
+ }
79
+ fieldset.multi-line .text {
80
+ margin-bottom: .25em;
81
+ }
82
+ .checkbox input,
83
+ .radio input,
84
+ .file input {
85
+ width: auto !important; /* ensures widths do not get set with grid classes */
86
+ }
87
+
88
+ /** =labels
89
+ ************************************************************/
90
+ label { cursor: pointer; }
91
+ .text label,
92
+ .select label,
93
+ .file label {
94
+ display: block;
95
+ font-size: 14px;
96
+ font-weight: bold;
97
+ line-height: 1;
98
+ }
99
+ .checkbox label,
100
+ .radio label {
101
+ margin-left: .25em;
102
+ }
103
+
104
+ /** =legends
105
+ ************************************************************/
106
+ .legend {
107
+ color: #acacac;
108
+ font-weight: normal;
109
+ font-size: 16px;
110
+ border-bottom: 1px solid #cacaca;
111
+ padding: 0 0 .25em;
112
+ margin-bottom: .75em;
113
+ }
114
+
115
+ /** =fieldsets
116
+ ************************************************************/
117
+ fieldset { margin: 0 0 1.5em; }
118
+
119
+ /** =actions
120
+ ************************************************************
121
+ @note container for submit buttons, reset, cancel, etc.
122
+ ************************************************************/
123
+ .actions {
124
+ text-align: right;
125
+ border-top: 2px solid #cacaca;
126
+ padding-top: 1.5em;
127
+ }
128
+
129
+ /** =hform
130
+ ************************************************************
131
+ @note Horizontal form (labels and fields side by side)
132
+ ************************************************************/
133
+ .hform .text label,
134
+ .hform .select label,
135
+ .hform .file label,
136
+ .hform .text input,
137
+ .hform .select input,
138
+ .hform .file input,
139
+ .hform select,
140
+ .hform textarea {
141
+ float: left
142
+ }
143
+ .hform .text,
144
+ .hform .select,
145
+ .hform .file {
146
+ clear: left;
147
+ }
148
+ .hform label {
149
+ text-align: right;
150
+ }
151
+ .hform .text label {
152
+ padding: 6px 0 0;
153
+ }
154
+ .hform .fancy label {
155
+ padding: 8px 0 0;
156
+ }
157
+ .hform .file label,
158
+ .hform .select label {
159
+ line-height: 1.4; /* align label in Firefox */
160
+ }
161
+ .hform .actions {
162
+ margin-top: .25em;
163
+ }
164
+
165
+ /** =vform
166
+ ************************************************************
167
+ @note Vertical form (labels on top of fields)
168
+ ************************************************************/
169
+
170
+ /* @note for easy switching between vform and hform, othewise just use the 'access' class */
171
+ .vform label.replace {
172
+ position: absolute;
173
+ left: -999em;
174
+ }
175
+ .vform label {
176
+ margin-bottom: .15em;
177
+ }
178
+
179
+ /** =flash messages
180
+ ************************************************************/
181
+ .box {
182
+ padding: 10px;
183
+ border: 1px solid #ccc;
184
+ background: #F0F0F0;
185
+ color: #555;
186
+ min-height: 40px;
187
+ }
188
+ .box.single-line {
189
+ padding: 15px 10px;
190
+ min-height: 0;
191
+ background-position: 10px 50% !important;
192
+ }
193
+ .box.error { background-color: #FBE3E4; border-color: #FBC2C4; }
194
+ .box.notice { background-color: #FFF6BF; border-color: #FFD324; }
195
+ .box.success { background-color: #E6EFC2; border-color: #C6D880; }
196
+
197
+ .box.error,
198
+ .box.notice,
199
+ .box.success {
200
+ background-repeat: no-repeat;
201
+ background-position: 10px 13px;
202
+ padding-left: 50px;
203
+ }
204
+
205
+ .box.error { background-image: url(assets/images/icons/caution-sign-red.png) }
206
+ .box.notice { background-image: url(assets/images/icons/caution-sign.png) }
207
+ .box.success { background-image: url(assets/images/icons/success-badge.png) }
208
+
209
+ .box a,
210
+ .box a:hover {
211
+ background: none;
212
+ border: 0;
213
+ color: #555;
214
+ }
215
+ .box.error, .box.error a { color: #D12F19; }
216
+ .box.notice, .box.notice a { color: #695E52; }
217
+ .box.success, .box.success a { color: #3D6C10; }
218
+ .box a { text-decoration: underline; }
219
+
220
+ /** =defaulttext jquery plugin
221
+ ************************************************************
222
+ @see git.fusionary.com/fusionary/ee/default_install.git
223
+ ************************************************************/
224
+ .default-text {
225
+ font-style: italic;
226
+ padding: 10px 6px 0;
227
+ }
228
+
229
+ /** =ajax form submission
230
+ ************************************************************/
231
+ form {
232
+ position: relative;
233
+ }
234
+ form .overlay {
235
+ position: absolute;
236
+ top: 0;
237
+ left: 0;
238
+ width: 100%;
239
+ height: 100%;
240
+ background-color: #fff;
241
+ z-index: 100;
242
+ }
243
+ .actions {
244
+ position: relative;
245
+ }
246
+ .loading {
247
+ position: absolute;
248
+ right: 0;
249
+ top: 0;
250
+ height: 100%;
251
+ width: 100%;
252
+ z-index: 100;
253
+ background: #fff;
254
+ padding-top: 1.5em;
255
+ font-style: italic;
256
+ font-weight: bold;
257
+ color: #b3b3b3;
258
+ font-size: 14px;
259
+ }
260
+ .loading img {
261
+ vertical-align: middle;
262
+ margin-left: 5px;
263
+ }
264
+ .error-summary {
265
+ margin-top: 1.5em;
266
+ }
267
+ .error-summary p {
268
+ font-size: 14px;
269
+ font-weight: bold;
270
+ }
271
+
272
+ /** =validation
273
+ ************************************************************/
274
+ .error input, .error textarea {
275
+ border-color: #c69b9b;
276
+ border-bottom-color: #efcaca;
277
+ background-color: #FBE3E4;
278
+ }
279
+ .error label,
280
+ .error label span.required-mark { color: #D12F19; }
281
+ .error-message {
282
+ font-size: 11px;
283
+ color: #D12F19;
284
+ font-weight: normal;
285
+ }
286
+ .error-summary .error-message {
287
+ margin-left: 5px;
288
+ }
289
+ .error-summary li {
290
+ background: none;
291
+ padding: 0;
292
+ font-weight: bold;
293
+ font-size: 18px;
294
+ }
295
+
296
+ .hform .error-message,
297
+ .vform .error-message{
298
+ position: absolute;
299
+ }
300
+ .hform .error-message {
301
+ background: url(assets/images/icons/caution-sign-sm.png) no-repeat;
302
+ width: 17px;
303
+ height: 16px;
304
+ top: 6px;
305
+ right: -22px;
306
+ }
307
+ .vform .error-message,
308
+ .radios .error-message,
309
+ .checkboxes .error-message {
310
+ top: -1px;
311
+ right: 0;
312
+ }
@@ -0,0 +1,31 @@
1
+ /** =ie.css
2
+ ************************************************************
3
+ @project Easel
4
+ ************************************************************/
5
+
6
+ /** =hasLayout
7
+ ************************************************************/
8
+ .vnav a { zoom: 1; }
9
+
10
+ /** =min-height
11
+ ************************************************************/
12
+ * html .box { height: 32px; }
13
+ * html .box.single-line {
14
+ min-height: 0;
15
+ }
16
+
17
+ /** =z-index
18
+ ************************************************************/
19
+
20
+ /** =buttons
21
+ ************************************************************
22
+ @see http://www.filamentgroup.com/lab/styling_the_button_element_with_sliding_doors
23
+ @see http://git.fusionary.com/?p=fusionary/build_tools.git
24
+ ************************************************************/
25
+ button.btn {
26
+ width:auto;
27
+ overflow:visible;
28
+ }
29
+ button.btn {
30
+ zoom: 1;
31
+ }