##// END OF EJS Templates
version bump to 0.8...
marcink -
r362:558eb7c5 rhodecode-0.0.0.8.0 default
parent child Browse files
Show More
@@ -0,0 +1,302 b''
1 /* -----------------------------------------------------------
2 header
3 ----------------------------------------------------------- */
4
5 #header #header-inner
6 {
7 background: #b0b0b0 url("../../images/colors/blue/header_inner.png") repeat-x;
8 }
9
10 /* -----------------------------------------------------------
11 header -> home
12 ----------------------------------------------------------- */
13
14 #header #header-inner #home a
15 {
16 background: url("../../images/colors/blue/button_home.png");
17 }
18
19 /* -----------------------------------------------------------
20 header -> quick
21 ----------------------------------------------------------- */
22
23 #header #header-inner #quick li a
24 {
25 background: #336699 url("../../images/colors/blue/quick_l.png") no-repeat top left;
26 }
27
28 #header #header-inner #quick li span
29 {
30 background: url("../../images/colors/blue/quick_r.png") no-repeat top right;
31 border-left: 1px solid #3f6f9f;
32 }
33
34 #header #header-inner #quick li span.icon
35 {
36 background: url("../../images/colors/blue/quick_l.png") no-repeat top left;
37 border-right: 1px solid #2e5c89;
38 }
39
40 #header #header-inner #quick li a:hover
41 {
42 background: #4e4e4e url("../../images/colors/blue/quick_l_selected.png") no-repeat top left;
43 }
44
45 #header #header-inner #quick li a:hover span
46 {
47 background: url("../../images/colors/blue/quick_r_selected.png") no-repeat top right;
48 }
49
50 #header #header-inner #quick li a:hover span.icon
51 {
52 background: url("../../images/colors/blue/quick_l_selected.png") no-repeat top left;
53 }
54
55 /* -----------------------------------------------------------
56 header corners
57 ----------------------------------------------------------- */
58
59 #header #header-inner div.corner
60 {
61 background: url("../../images/colors/blue/header_inner_corners.png") no-repeat;
62 }
63
64 #header #header-inner div.tl
65 {
66 top: 0;
67 left: 0;
68 background-position: 0 0;
69 }
70
71 #header #header-inner div.tr
72 {
73 top: 0;
74 right: 0;
75 background-position: -6px 0;
76 }
77
78 /* -----------------------------------------------------------
79 content -> left -> menu
80 ----------------------------------------------------------- */
81
82 #content #left #menu h6.selected
83 {
84 background: #00376e url("../../images/colors/blue/menu_selected.png") repeat-x;
85 }
86
87 #content #left #menu h6.selected a
88 {
89 background: url("../../images/colors/blue/menu_l_selected.png") no-repeat top left;
90 }
91
92 #content #left #menu h6.selected span
93 {
94 background: url("../../images/colors/blue/menu_r_selected.png") no-repeat top right;
95 }
96
97 #content #left #menu ul
98 {
99 background: #376ea6;
100 }
101
102 #content #left #menu li
103 {
104 border-top: 1px solid #4377ab;
105 border-bottom: 1px solid #326395;
106 }
107
108 #content #left #menu li a
109 {
110 background: url("../../images/colors/blue/menu_arrow.png") no-repeat 0 9px;
111 }
112
113 #content #left #menu li a:hover
114 {
115 color: #b9dcff;
116 }
117
118 #content #left #menu li.collapsible
119 {
120 background: url("../../images/colors/blue/menu_border.png") no-repeat top left;
121 }
122
123 #content #left #menu li.collapsible a.minus
124 {
125 border-bottom: 1px solid #326395;
126 }
127
128 #content #left #menu li ul
129 {
130 border-left: 18px solid #326395;
131 }
132
133 #content #left #menu li ul li
134 {
135 background: url("../../images/colors/blue/menu_arrow.png") no-repeat 10px 9px;
136 border-top: 1px solid #4377ab;
137 border-bottom: 1px solid #326395;
138 }
139
140 /* -----------------------------------------------------------
141 content -> right -> box / title
142 ----------------------------------------------------------- */
143
144 #content div.box div.title
145 {
146 background: #336699 url("../../images/colors/blue/title.png") repeat-x;
147 }
148
149 #content div.box div.title ul.links li a
150 {
151 background: url("../../images/colors/blue/title_link.png") no-repeat top left;
152 border-left: 1px solid #316293;
153 }
154
155 #content div.box div.title ul.links li a:hover
156 {
157 background: url("../../images/colors/blue/title_tab_selected.png") no-repeat bottom center;
158 color: #bfe3ff;
159 }
160
161 #content div.box div.title ul.links li.ui-tabs-selected a
162 {
163 background: url("../../images/colors/blue/title_tab_selected.png") no-repeat bottom center;
164 color: #bfe3ff;
165 }
166
167 /* -----------------------------------------------------------
168 content -> right -> box / search
169 ----------------------------------------------------------- */
170
171 #content div.box div.title div.search
172 {
173 background: url("../../images/colors/blue/title_link.png") no-repeat top left;
174 border-left: 1px solid #316293;
175 }
176
177 #content div.box div.title div.search div.input input
178 {
179 border: 1px solid #316293;
180 }
181
182 #content div.box div.title div.search div.button input.ui-state-default
183 {
184 background: #4e85bb url("../../images/colors/blue/button_highlight.png") repeat-x;
185 border: 1px solid #316293;
186 border-left: none;
187 color: #FFFFFF;
188 }
189
190 #content div.box div.title div.search div.button input.ui-state-hover
191 {
192 background: #46a0c1 url("../../images/colors/blue/button_highlight_selected.png") repeat-x;
193 border: 1px solid #316293;
194 border-left: none;
195 color: #FFFFFF;
196 }
197
198 /* -----------------------------------------------------------
199 content -> right -> forms -> button
200 ----------------------------------------------------------- */
201
202 #content div.box div.form div.fields div.field div.highlight .ui-state-default
203 {
204 background: #4e85bb url("../../images/colors/blue/button_highlight.png") repeat-x;
205 border-top: 1px solid #5c91a4;
206 border-left: 1px solid #2a6f89;
207 border-right: 1px solid #2b7089;
208 border-bottom: 1px solid #1a6480;
209 color: #ffffff;
210 }
211
212 #content div.box div.form div.fields div.field div.highlight .ui-state-hover
213 {
214 background: #46a0c1 url("../../images/colors/blue/button_highlight_selected.png") repeat-x;
215 border-top: 1px solid #78acbf;
216 border-left: 1px solid #34819e;
217 border-right: 1px solid #35829f;
218 border-bottom: 1px solid #257897;
219 color: #ffffff;
220 }
221
222 /* -----------------------------------------------------------
223 content -> right -> forms -> buttons
224 ----------------------------------------------------------- */
225
226 #content div.box div.form div.fields div.buttons div.highlight input.ui-state-default
227 {
228 background: #4e85bb url("../../images/colors/blue/button_highlight.png") repeat-x;
229 border-top: 1px solid #5c91a4;
230 border-left: 1px solid #2a6f89;
231 border-right: 1px solid #2b7089;
232 border-bottom: 1px solid #1a6480;
233 color: #ffffff;
234 }
235
236 #content div.box div.form div.fields div.buttons div.highlight input.ui-state-hover
237 {
238 background: #46a0c1 url("../../images/colors/blue/button_highlight_selected.png") repeat-x;
239 border-top: 1px solid #78acbf;
240 border-left: 1px solid #34819e;
241 border-right: 1px solid #35829f;
242 border-bottom: 1px solid #257897;
243 color: #ffffff;
244 }
245
246 /* -----------------------------------------------------------
247 login -> title
248 ----------------------------------------------------------- */
249
250 #login div.title
251 {
252 background: #003367 url("../../images/colors/blue/header_inner.png") repeat-x;
253 }
254
255 /* -----------------------------------------------------------
256 login -> title / corners
257 ----------------------------------------------------------- */
258
259 #login div.title div.corner
260 {
261 background: url("../../images/colors/blue/login_corners.png") no-repeat;
262 }
263
264 #login div.title div.tl
265 {
266 top: 0;
267 left: 0;
268 background-position: 0 0;
269 }
270
271 #login div.title div.tr
272 {
273 top: 0;
274 right: 0;
275 background-position: -6px 0;
276 }
277
278 /* -----------------------------------------------------------
279 jquery ui -> select styling
280 ----------------------------------------------------------- */
281
282 .ui-selectmenu-open li.ui-selectmenu-item-focus { background: #376ea6; }
283 .ui-selectmenu-open li.ui-selectmenu-item-focus a { color: #ffffff; }
284
285 /* -----------------------------------------------------------
286 jquery ui -> datepicker
287 ----------------------------------------------------------- */
288 .ui-datepicker td span, .ui-datepicker td a:hover { background: #376ea6; color: #ffffff; }
289 .ui-datepicker td span, .ui-datepicker td.ui-datepicker-current-day a { background: #376ea6; color: #ffffff; }
290
291 /* -----------------------------------------------------------
292 jquery ui -> autocomplete
293 ----------------------------------------------------------- */
294
295 .ui-autocomplete .ui-menu-item a:hover { background: #376ea6; color: #ffffff; }
296
297 /* -----------------------------------------------------------
298 jquery ui -> dialog
299 ----------------------------------------------------------- */
300
301 .ui-dialog { border: 1px solid #336699; }
302 .ui-dialog .ui-dialog-titlebar { background: #336699 url("../../images/colors/blue/title.png") repeat-x; } No newline at end of file
@@ -0,0 +1,53 b''
1 /* http://meyerweb.com/eric/tools/css/reset/ */
2 /* v1.0 | 20080212 */
3
4 html, body, div, span, applet, object, iframe,
5 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
6 a, abbr, acronym, address, big, cite, code,
7 del, dfn, em, font, img, ins, kbd, q, s, samp,
8 small, strike, strong, sub, sup, tt, var,
9 b, u, i, center,
10 dl, dt, dd, ol, ul, li,
11 fieldset, form, label, legend,
12 table, caption, tbody, tfoot, thead, tr, th, td {
13 margin: 0;
14 padding: 0;
15 border: 0;
16 outline: 0;
17 font-size: 100%;
18 vertical-align: baseline;
19 background: transparent;
20 }
21 body {
22 line-height: 1;
23 }
24 ol, ul {
25 list-style: none;
26 }
27 blockquote, q {
28 quotes: none;
29 }
30 blockquote:before, blockquote:after,
31 q:before, q:after {
32 content: '';
33 content: none;
34 }
35
36 /* remember to define focus styles! */
37 :focus {
38 outline: 0;
39 }
40
41 /* remember to highlight inserts somehow! */
42 ins {
43 text-decoration: none;
44 }
45 del {
46 text-decoration: line-through;
47 }
48
49 /* tables still need 'cellspacing="0"' in the markup */
50 table {
51 border-collapse: collapse;
52 border-spacing: 0;
53 } No newline at end of file
This diff has been collapsed as it changes many lines, (3624 lines changed) Show them Hide them
@@ -0,0 +1,3624 b''
1 /* -----------------------------------------------------------
2 main stylesheet
3 ----------------------------------------------------------- */
4
5 html
6 {
7 height: 100%;
8 }
9
10 body
11 {
12 margin: 0;
13 padding: 0;
14 height: 100%;
15 background: #d1d1d1 url("../images/background.png") repeat;
16 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
17 font-size: 11px;
18 }
19
20 /* -----------------------------------------------------------
21 images
22 ----------------------------------------------------------- */
23
24 img
25 {
26 border: none;
27 }
28
29 /* -----------------------------------------------------------
30 anchors
31 ----------------------------------------------------------- */
32
33 a
34 {
35 color: #0066CC;
36 text-decoration: none;
37 cursor: pointer;
38 }
39
40 a:hover
41 {
42 color: #000000;
43 text-decoration: underline;
44 }
45
46 /* -----------------------------------------------------------
47 headings
48 ----------------------------------------------------------- */
49
50 h1, h2, h3, h4, h5, h6
51 {
52 color: #292929;
53 font-weight: bold;
54 }
55
56 h1
57 {
58 font-size: 22px;
59 }
60
61 h2
62 {
63 font-size: 20px;
64 }
65
66 h3
67 {
68 font-size: 18px;
69 }
70
71 h4
72 {
73 font-size: 16px;
74 }
75
76 h5
77 {
78 font-size: 14px;
79 }
80
81 h6
82 {
83 font-size: 11px;
84 }
85
86 /* -----------------------------------------------------------
87 lists
88 ----------------------------------------------------------- */
89
90 ul.circle { list-style-type: circle; }
91 ul.disc { list-style-type: disc; }
92 ul.square { list-style-type: square; }
93 ol.lower-roman { list-style-type: lower-roman; }
94 ol.upper-roman { list-style-type: upper-roman; }
95 ol.lower-alpha { list-style-type: lower-alpha; }
96 ol.upper-alpha { list-style-type: upper-alpha; }
97 ol.decimal { list-style-type: decimal; }
98
99 /* -----------------------------------------------------------
100 colors
101 ----------------------------------------------------------- */
102
103 div.color
104 {
105 margin: 7px 0 0 60px;
106 padding: 1px 1px 1px 0px;
107 clear: both;
108 overflow: hidden;
109 position: absolute;
110 background: #FFFFFF;
111 }
112
113 div.color a
114 {
115 margin: 0 0 0 1px;
116 padding: 0;
117 width: 15px;
118 height: 15px;
119 display: block;
120 float: left;
121 }
122
123 div.color a.blue
124 {
125 background: #376ea6;
126 }
127
128 div.color a.green
129 {
130 background: #85924b;
131 }
132
133 div.color a.brown
134 {
135 background: #9b6e42;
136 }
137
138 div.color a.purple
139 {
140 background: #88528b;
141 }
142
143 div.color a.red
144 {
145 background: #bd3220;
146 }
147
148 div.color a.greyblue
149 {
150 background: #566e86;
151 }
152
153 /* -----------------------------------------------------------
154 options
155 ----------------------------------------------------------- */
156
157 div.options
158 {
159 margin: 7px 0 0 162px;
160 padding: 0;
161 clear: both;
162 overflow: hidden;
163 position: absolute;
164 background: #FFFFFF;
165 }
166
167 div.options a
168 {
169 margin: 0;
170 padding: 3px 8px 3px 8px;
171 height: 1%;
172 display: block;
173 text-decoration: none;
174 }
175
176 div.options a:hover
177 {
178 text-decoration: none;
179 }
180
181 /* -----------------------------------------------------------
182 header
183 ----------------------------------------------------------- */
184
185 #header
186 {
187 margin: 0;
188 padding: 0 60px 0 60px;
189 background: #b0b0b0 url("../images/header_background.png") repeat;
190 }
191
192
193 /* -----------------------------------------------------------
194 header -> user
195 ----------------------------------------------------------- */
196
197 #header ul#logged-user
198 {
199 margin: 0;
200 padding: 0;
201 float: right;
202 }
203
204 #header ul#logged-user li
205 {
206 margin: 0;
207 padding: 10px 12px 10px 12px;
208 list-style: none;
209 float: left;
210 border-left: 1px solid #bbbbbb;
211 border-right: 1px solid #a5a5a5;
212 }
213
214 #header ul#logged-user li.first
215 {
216 border-left: none;
217 }
218
219 #header ul#logged-user li.last
220 {
221 border-right: none;
222 }
223
224 #header ul#logged-user li a
225 {
226 color: #4e4e4e;
227 font-weight: bold;
228 text-decoration: none;
229 }
230
231 #header ul#logged-user li a:hover
232 {
233 color: #376ea6;
234 text-decoration: underline;
235 }
236
237 #header ul#logged-user li.highlight a
238 {
239 color: #ffffff;
240 }
241
242 #header ul#logged-user li.highlight a:hover
243 {
244 color: #376ea6;
245 }
246
247 #header #header-inner
248 {
249 margin: 0;
250 padding: 0;
251 height: 40px;
252 clear: both;
253 position: relative;
254 background: #003367 url("../images/colors/blue/header_inner.png") repeat-x;
255 border-bottom: 6px solid #ffffff;
256 }
257
258 /* -----------------------------------------------------------
259 header -> home
260 ----------------------------------------------------------- */
261
262 #header #header-inner #home
263 {
264 float: left;
265 }
266
267 #header #header-inner #home a
268 {
269 margin: 0;
270 padding: 0;
271 height: 40px;
272 width: 46px;
273 display: block;
274 background: url("../images/colors/blue/button_home.png");
275 background-position: 0 0;
276 }
277
278 #header #header-inner #home a:hover
279 {
280 background-position: 0 -40px;
281 }
282
283 /* -----------------------------------------------------------
284 header -> logo
285 ----------------------------------------------------------- */
286
287 #header #header-inner #logo
288 {
289 float: left;
290 }
291
292 #header #header-inner #logo h1
293 {
294 margin: 13px 0 0 13px;
295 padding: 0;
296 color: #FFFFFF;
297 font-size: 14px;
298 text-transform: uppercase;
299 }
300
301 #header #header-inner #logo a
302 {
303 color: #ffffff;
304 text-decoration: none;
305 }
306
307 #header #header-inner #logo a:hover
308 {
309 color: #dabf29;
310 }
311
312 /* -----------------------------------------------------------
313 header -> quick
314 ----------------------------------------------------------- */
315
316 #header #header-inner #quick,
317 #header #header-inner #quick ul
318 {
319 margin: 10px 5px 0 0;
320 padding: 0;
321 position: relative;
322 float: right;
323 list-style-type: none;
324 list-style-position: outside;
325 }
326
327 #header #header-inner #quick li
328 {
329 margin: 0 4px 0 0;
330 padding: 0;
331 position: relative;
332 float: left;
333 }
334
335 #header #header-inner #quick li a
336 {
337 top: 0;
338 left: 0;
339 padding: 0;
340 height: 1%;
341 display: block;
342 clear: both;
343 overflow: hidden;
344 background: #336699 url("../images/colors/blue/quick_l.png") no-repeat top left;
345 color: #FFFFFF;
346 font-weight: bold;
347 text-decoration: none;
348 }
349
350 #header #header-inner #quick li span
351 {
352 top: 0;
353 right: 0;
354 margin: 0;
355 padding: 10px 12px 8px 10px;
356 height: 1%;
357 display: block;
358 float: left;
359 background: url("../images/colors/blue/quick_r.png") no-repeat top right;
360 border-left: 1px solid #3f6f9f;
361 }
362
363 #header #header-inner #quick li span.icon
364 {
365 top: 0;
366 left: 0;
367 padding: 8px 8px 4px 8px;
368 background: url("../images/colors/blue/quick_l.png") no-repeat top left;
369 border-left: none;
370 border-right: 1px solid #2e5c89;
371 }
372
373 #header #header-inner #quick li a:hover
374 {
375 background: #4e4e4e;
376 }
377
378 #header #header-inner #quick li a:hover span
379 {
380 background: url("../images/colors/blue/quick_r_selected.png") no-repeat top right;
381 border-left: 1px solid #545454;
382 }
383
384 #header #header-inner #quick li a:hover span.icon
385 {
386 background: url("../images/colors/blue/quick_l_selected.png") no-repeat top left;
387 border-left: none;
388 border-right: 1px solid #464646;
389 }
390
391 #header #header-inner #quick ul
392 {
393 top: 29px;
394 right: 0;
395 margin: 0;
396 padding: 0;
397 width: 200px;
398 display: none;
399 position: absolute;
400 background: #FFFFFF;
401 border: 1px solid #666;
402 border-top: 1px solid #003367;
403 }
404
405 #header #header-inner #quick li ul li
406 {
407 border-bottom: 1px solid #dddddd;
408 }
409
410 #header #header-inner #quick li ul li.last
411 {
412 border: none;
413 }
414
415 #header #header-inner #quick li ul li a.repos,#header #header-inner #quick li ul li a.repos:hover
416 {
417 margin: 0;
418 padding: 12px 9px 7px 28px;
419 width: 167px;
420 background: #FFFFFF url("../images/icons/folder_edit.png") no-repeat 8px 9px;
421 }
422 #header #header-inner #quick li ul li a.users,#header #header-inner #quick li ul li a.users:hover
423 {
424 margin: 0;
425 padding: 12px 9px 7px 28px;
426 width: 167px;
427 background: #FFFFFF url("../images/icons/user_edit.png") no-repeat 8px 9px;
428 }
429 #header #header-inner #quick li ul li a.settings,#header #header-inner #quick li ul li a.settings:hover
430 {
431 margin: 0;
432 padding: 12px 9px 7px 28px;
433 width: 167px;
434 background: #FFFFFF url("../images/icons/cog.png") no-repeat 8px 9px;
435 }
436
437 #header #header-inner #quick li ul li a.permissions,#header #header-inner #quick li ul li a.permissions:hover
438 {
439 margin: 0;
440 padding: 12px 9px 7px 28px;
441 width: 167px;
442 background: #FFFFFF url("../images/icons/key.png") no-repeat 8px 9px;
443 }
444
445 #header #header-inner #quick li ul li a
446 {
447 margin: 0;
448 padding: 7px 9px 7px 9px;
449 height: 1%;
450 width: 182px;
451 height: auto;
452 display: block;
453 float: left;
454 background: #FFFFFF;
455 color: #0066CC;
456 font-weight: normal;
457 }
458
459 #header #header-inner #quick li ul li a:hover
460 {
461 color: #000000;
462 background: #FFFFFF;
463 }
464
465 #header #header-inner #quick ul ul
466 {
467 top: auto;
468 }
469
470 #header #header-inner #quick li ul ul
471 {
472 right: 200px;
473 }
474
475 #header #header-inner #quick li:hover ul ul,
476 #header #header-inner #quick li:hover ul ul ul,
477 #header #header-inner #quick li:hover ul ul ul ul
478 {
479 display: none;
480 }
481
482 #header #header-inner #quick li:hover ul,
483 #header #header-inner #quick li li:hover ul,
484 #header #header-inner #quick li li li:hover ul,
485 #header #header-inner #quick li li li li:hover ul
486 {
487 display: block;
488 }
489
490 /* -----------------------------------------------------------
491 header corners
492 ----------------------------------------------------------- */
493
494 #header #header-inner div.corner
495 {
496 height: 6px;
497 width: 6px;
498 position: absolute;
499 background: url("../images/colors/blue/header_inner_corners.png") no-repeat;
500 }
501
502 #header #header-inner div.tl
503 {
504 top: 0;
505 left: 0;
506 background-position: 0 0;
507 }
508
509 #header #header-inner div.tr
510 {
511 top: 0;
512 right: 0;
513 background-position: -6px 0;
514 }
515
516 /* -----------------------------------------------------------
517 content
518 ----------------------------------------------------------- */
519
520 #content
521 {
522 margin: 10px 0 0 0;
523 padding: 0;
524 min-height: 100%;
525 clear: both;
526 overflow: hidden;
527 background: url("../images/content.png") repeat-y top left;
528 }
529
530 /* -----------------------------------------------------------
531 content -> left
532 ----------------------------------------------------------- */
533
534 #content #left
535 {
536 left: 0;
537 width: 280px;
538 position: absolute;
539 }
540
541 /* -----------------------------------------------------------
542 content -> left -> menu
543 ----------------------------------------------------------- */
544
545 #content #left #menu
546 {
547 margin: 5px 10px 0 60px;
548 padding: 0;
549 clear: both;
550 overflow: hidden;
551 }
552
553 /* -----------------------------------------------------------
554 content -> left -> menu / heading
555 ----------------------------------------------------------- */
556
557 #content #left #menu h6
558 {
559 margin: 5px 0 0 0;
560 padding: 0;
561 clear: both;
562 overflow: hidden;
563 background: #dfdfdf url("../images/menu.png") repeat-x;
564 color: #6e6e6e;
565 }
566
567 #content #left #menu h6 a
568 {
569 margin: 0;
570 padding: 0;
571 height: 1%;
572 display: block;
573 clear: both;
574 overflow: hidden;
575 background: url("../images/menu_l.png") no-repeat top left;
576 color: #6e6e6e;
577 text-decoration: none;
578 }
579
580 #content #left #menu h6 span
581 {
582 margin: 0;
583 padding: 9px 10px 10px 10px;
584 height: 1%;
585 display: block;
586 background: url("../images/menu_r.png") no-repeat top right;
587 }
588
589 #content #left #menu h6.selected
590 {
591 background: #00376e url("../images/colors/blue/menu_selected.png") repeat-x;
592 color: #FFFFFF;
593 }
594
595 #content #left #menu h6.selected a
596 {
597 background: url("../images/colors/blue/menu_l_selected.png") no-repeat top left;
598 color: #ffffff;
599 }
600
601 #content #left #menu h6.selected span
602 {
603 background: url("../images/colors/blue/menu_r_selected.png") no-repeat top right;
604 }
605
606 /* -----------------------------------------------------------
607 content -> left -> menu / links
608 ----------------------------------------------------------- */
609
610 #content #left #menu ul
611 {
612 margin: 0;
613 padding: 0;
614 background: #376ea6;
615 }
616
617 #content #left #menu ul.opened
618 {
619 display: block;
620 }
621
622 #content #left #menu ul.closed
623 {
624 display: none;
625 }
626
627 #content #left #menu li
628 {
629 margin: 0;
630 padding: 0;
631 clear: both;
632 overflow: hidden;
633 list-style: none;
634 border-bottom: 1px solid #5f8bb7;
635 color: #ffffff;
636 }
637
638 #content #left #menu li a
639 {
640 margin: 0 0 0 6px;
641 padding: 8px 0 8px 18px;
642 height: 1%;
643 display: block;
644 float: left;
645 background: url("../images/colors/colors/blue/menu_arrow.png") no-repeat 0 9px;
646 color: #ffffff;
647 text-decoration: none;
648 }
649
650 #content #left #menu li a:hover
651 {
652 color: #b9dcff;
653 }
654
655 /* -----------------------------------------------------------
656 content -> left -> menu / collapsible
657 ----------------------------------------------------------- */
658
659 #content #left #menu li.collapsible
660 {
661 background: url("../images/colors/blue/menu_border.png") no-repeat top left;
662 }
663
664 #content #left #menu li.collapsible a
665 {
666 margin: 0 0 0 6px;
667 padding: 8px 0 8px 0;
668 height: 1%;
669 display: block;
670 background: transparent;
671 float: left;
672 font-weight: bold;
673 }
674
675 #content #left #menu li.collapsible a.plus
676 {
677 margin: 0;
678 padding: 8px 0 9px 24px;
679 height: 10px;
680 width: 10px;
681 display: block;
682 float: left;
683 background: url("../images/menu_plus.png") no-repeat 5px 10px;
684 border: none;
685 }
686
687 #content #left #menu li.collapsible a.minus
688 {
689 margin: 0;
690 padding: 8px 0 9px 24px;
691 height: 10px;
692 width: 10px;
693 display: block;
694 float: left;
695 background: url("../images/menu_minus.png") no-repeat 5px 10px;
696 border: none;
697 }
698
699 #content #left #menu li ul
700 {
701 margin: 0;
702 padding: 0;
703 border-left: 18px solid #285889;
704 }
705
706 #content #left #menu li ul.expanded
707 {
708 display: block;
709 }
710
711 #content #left #menu li ul.collapsed
712 {
713 display: none;
714 }
715
716 #content #left #menu li ul li
717 {
718 margin: 0;
719 padding: 0;
720 clear: both;
721 overflow: hidden;
722 list-style: none;
723 border-bottom: 1px solid #5f8bb7;
724 color: #ffffff;
725 }
726
727 #content #left #menu li.collapsible ul li a
728 {
729 font-weight: normal;
730 }
731
732 #content #left #menu li.last
733 {
734 border-bottom: none;
735 }
736
737 /* -----------------------------------------------------------
738 content -> left -> date picker
739 ----------------------------------------------------------- */
740
741 #content #left #date-picker
742 {
743 margin: 10px 10px 0 60px;
744 padding: 0;
745 clear: both;
746 overflow: hidden;
747 }
748
749 #content #left #date-picker .ui-datepicker
750 {
751 width: auto;
752 padding: 0;
753 clear: both;
754 overflow: hidden;
755 background: #FFFFFF;
756 border: 1px solid #d1d1d1;
757 }
758
759 #content #left #date-picker .ui-datepicker .ui-datepicker-header
760 {
761 padding: 5px 0;
762 }
763
764 #content #left #date-picker .ui-datepicker .ui-datepicker-prev
765 {
766 top: 5px;
767 left: 4px;
768 }
769
770 #content #left #date-picker .ui-datepicker .ui-datepicker-next
771 {
772 top: 5px;
773 right: 4px;
774 }
775
776 #content #left #date-picker .ui-datepicker .ui-datepicker-prev-hover
777 {
778 top: 5px;
779 left: 4px;
780 }
781
782 #content #left #date-picker .ui-datepicker .ui-datepicker-next-hover
783 {
784 top: 5px;
785 right: 4px;
786 }
787
788 /* -----------------------------------------------------------
789 content -> right
790 ----------------------------------------------------------- */
791
792 #content #right
793 {
794 margin: 0 60px 10px 290px;
795 }
796
797 /* -----------------------------------------------------------
798 content -> right -> box
799 ----------------------------------------------------------- */
800
801 #content div.box
802 {
803 margin: 0 0 10px 0;
804 padding: 0 0 10px 0;
805 clear: both;
806 overflow: hidden;
807 background: #ffffff;
808 }
809
810 #content div.box-left
811 {
812 margin: 0 0 10px;
813 width: 49%;
814 clear: none;
815 float: left;
816 }
817
818 #content div.box-right
819 {
820 margin: 0 0 10px;
821 width: 49%;
822 clear: none;
823 float: right;
824 }
825
826 /* -----------------------------------------------------------
827 content -> right -> box / title
828 ----------------------------------------------------------- */
829
830 #content div.box div.title
831 {
832 margin: 0 0 20px 0;
833 padding: 0;
834 clear: both;
835 overflow: hidden;
836 background: #336699 url("../images/colors/blue/title.png") repeat-x;
837 }
838
839 #content div.box div.title h5
840 {
841 margin: 0;
842 padding: 11px 0 11px 10px;
843 float: left;
844 border: none;
845 color: #ffffff;
846 text-transform: uppercase;
847 }
848
849 #content div.box div.title ul.links
850 {
851 margin: 0;
852 padding: 0;
853 float: right;
854 }
855
856 #content div.box div.title ul.links li
857 {
858 margin: 0;
859 padding: 0;
860 list-style: none;
861 float: left;
862 }
863
864 #content div.box div.title ul.links li a
865 {
866 margin: 0;
867 padding: 13px 16px 12px 16px;
868 height: 1%;
869 display: block;
870 float: left;
871 background: url("../images/colors/blue/title_link.png") no-repeat top left;
872 border-left: 1px solid #316293;
873 color: #ffffff;
874 font-size: 11px;
875 font-weight: bold;
876 text-decoration: none;
877 }
878
879 #content div.box div.title ul.links li a:hover
880 {
881 color: #bfe3ff;
882 }
883
884 #content div.box div.title ul.links li.ui-tabs-selected a
885 {
886 background: url("../../../resources/images/colors/blue/title_tab_selected.png") no-repeat bottom center;
887 color: #bfe3ff;
888 }
889
890 /* -----------------------------------------------------------
891 content -> right -> box / headings
892 ----------------------------------------------------------- */
893
894 #content div.box h1,
895 #content div.box h2,
896 #content div.box h3,
897 #content div.box h4,
898 #content div.box h5,
899 #content div.box h6
900 {
901 margin: 10px 20px 10px 20px;
902 padding: 0 0 15px 0;
903 clear: both;
904 overflow: hidden;
905 border-bottom: 1px solid #DDDDDD;
906 }
907
908 /* -----------------------------------------------------------
909 content -> right -> box / paragraphs
910 ----------------------------------------------------------- */
911
912 #content div.box p
913 {
914 margin: 0 24px 10px 24px;
915 padding: 0;
916 color: #5f5f5f;
917 font-size: 12px;
918 line-height: 150%;
919 }
920
921 #content div.box blockquote
922 {
923 margin: 0 34px 0 34px;
924 padding: 0 0 0 14px;
925 border-left: 4px solid #DDDDDD;
926 color: #5f5f5f;
927 font-size: 11px;
928 line-height: 150%;
929 }
930
931 #content div.box blockquote p
932 {
933 margin: 10px 0 10px 0;
934 padding: 0;
935 }
936
937 /* -----------------------------------------------------------
938 content -> right -> box / lists
939 ----------------------------------------------------------- */
940
941 #content div.box dl
942 {
943 margin: 10px 24px 10px 24px;
944 }
945
946 #content div.box dt
947 {
948 margin: 0;
949 font-size: 12px;
950 }
951
952 #content div.box dd
953 {
954 margin: 0;
955 padding: 8px 0 8px 15px;
956 font-size: 12px;
957 }
958
959 #content div.box ul.left
960 {
961 float: left;
962 }
963
964 #content div.box ol.left
965 {
966 float: left;
967 }
968
969 #content div.box li
970 {
971 padding: 4px 0 4px 0;
972 font-size: 12px;
973 }
974
975 #content div.box ol.lower-roman,
976 #content div.box ol.upper-roman
977 {
978 margin: 10px 24px 10px 44px;
979 }
980
981 #content div.box ol.lower-alpha,
982 #content div.box ol.upper-alpha
983 {
984 margin: 10px 24px 10px 44px;
985 }
986
987 #content div.box ol.decimal
988 {
989 margin: 10px 24px 10px 44px;
990 }
991
992 #content div.box ul.disc,
993 #content div.box ul.circle
994 {
995 margin: 10px 24px 10px 38px;
996 }
997
998 #content div.box ul.square
999 {
1000 margin: 10px 24px 10px 40px;
1001 }
1002
1003 /* -----------------------------------------------------------
1004 content -> right -> box / images
1005 ----------------------------------------------------------- */
1006
1007 #content div.box img.left
1008 {
1009 margin: 10px 10px 10px 0;
1010 border: none;
1011 float: left;
1012 }
1013
1014 #content div.box img.right
1015 {
1016 margin: 10px 0 10px 10px;
1017 border: none;
1018 float: right;
1019 }
1020
1021 /* -----------------------------------------------------------
1022 content -> right -> box / messages
1023 ----------------------------------------------------------- */
1024
1025 #content div.box div.messages
1026 {
1027 margin: 0 20px 0 20px;
1028 padding: 0;
1029 clear: both;
1030 overflow: hidden;
1031 }
1032
1033 #content div.box div.message
1034 {
1035 margin: 0 0 10px 0;
1036 padding: 0;
1037 clear: both;
1038 overflow: hidden;
1039 }
1040
1041 #content div.box div.message div.image
1042 {
1043 margin: 9px 0 0 5px;
1044 padding: 6px;
1045 float: left;
1046 }
1047
1048 #content div.box div.message div.image img
1049 {
1050 margin: 0;
1051 vertical-align: middle;
1052 }
1053
1054 #content div.box div.message div.text
1055 {
1056 margin: 0;
1057 padding: 9px 6px 9px 6px;
1058 float: left;
1059 }
1060
1061 #content div.box div.message div.dismiss
1062 {
1063 margin: 0;
1064 padding: 0;
1065 float: right;
1066 }
1067
1068 #content div.box div.message div.dismiss a
1069 {
1070 margin: 15px 14px 0 0;
1071 padding: 0;
1072 height: 16px;
1073 width: 16px;
1074 display: block;
1075 background: url("../images/icons/cross.png") no-repeat;
1076 }
1077
1078 #content div.box div.message div.text h1,
1079 #content div.box div.message div.text h2,
1080 #content div.box div.message div.text h3,
1081 #content div.box div.message div.text h4,
1082 #content div.box div.message div.text h5,
1083 #content div.box div.message div.text h6
1084 {
1085 margin: 0;
1086 padding: 0px;
1087 border: none;
1088 }
1089
1090 #content div.box div.message div.text span
1091 {
1092 margin: 0;
1093 padding: 5px 0 0 0;
1094 height: 1%;
1095 display: block;
1096 }
1097
1098 #content div.box div.message-error
1099 {
1100 height: 1%;
1101 clear: both;
1102 overflow: hidden;
1103 background: #FBE3E4;
1104 border: 1px solid #FBC2C4;
1105 color: #860006;
1106 }
1107
1108 #content div.box div.message-error h6
1109 {
1110 color: #860006;
1111 }
1112
1113 #content div.box div.message-warning
1114 {
1115 height: 1%;
1116 clear: both;
1117 overflow: hidden;
1118 background: #FFF6BF;
1119 border: 1px solid #FFD324;
1120 color: #5f5200;
1121 }
1122
1123 #content div.box div.message-warning h6
1124 {
1125 color: #5f5200;
1126 }
1127
1128 #content div.box div.message-notice
1129 {
1130 height: 1%;
1131 clear: both;
1132 overflow: hidden;
1133 background: #8FBDE0;
1134 border: 1px solid #6BACDE;
1135 color: #003863;
1136 }
1137
1138 #content div.box div.message-notice h6
1139 {
1140 color: #003863;
1141 }
1142
1143 #content div.box div.message-success
1144 {
1145 height: 1%;
1146 clear: both;
1147 overflow: hidden;
1148 background: #E6EFC2;
1149 border: 1px solid #C6D880;
1150 color: #4e6100;
1151 }
1152
1153 #content div.box div.message-success h6
1154 {
1155 color: #4e6100;
1156 }
1157
1158 /* -----------------------------------------------------------
1159 content -> right -> box / forms
1160 ----------------------------------------------------------- */
1161
1162 #content div.box div.form
1163 {
1164 margin: 0;
1165 padding: 0 20px 10px 20px;
1166 clear: both;
1167 overflow: hidden;
1168 }
1169
1170 #content div.box div.form div.fields
1171 {
1172 margin: 0;
1173 padding: 0;
1174 clear: both;
1175 overflow: hidden;
1176 }
1177
1178 #content div.box div.form div.fields div.field
1179 {
1180 margin: 0;
1181 padding: 10px 0 10px 0;
1182 height: 1%;
1183 border-bottom: 1px solid #DDDDDD;
1184 clear: both;
1185 overflow: hidden;
1186 }
1187
1188 #content div.box div.form div.fields div.field-first
1189 {
1190 padding: 0 0 10px 0;
1191 }
1192
1193 #content div.box div.form div.fields div.field span.error-message
1194 {
1195 margin: 8px 0 0 0;
1196 padding: 0;
1197 height: 1%;
1198 display: block;
1199 color: #FF0000;
1200 }
1201
1202 #content div.box div.form div.fields div.field span.success
1203 {
1204 margin: 8px 0 0 0;
1205 padding: 0;
1206 height: 1%;
1207 display: block;
1208 color: #316309;
1209 }
1210
1211 /* -----------------------------------------------------------
1212 content -> right -> forms -> labels
1213 ----------------------------------------------------------- */
1214
1215 #content div.box div.form div.fields div.field div.label
1216 {
1217 left: 310px;
1218 margin: 0;
1219 padding: 8px 0 0 5px;
1220 width: auto;
1221 position: absolute;
1222 }
1223
1224 #content div.box-left div.form div.fields div.field div.label,
1225 #content div.box-right div.form div.fields div.field div.label
1226 {
1227 left: 0;
1228 margin: 0;
1229 padding: 0 0 8px 0;
1230 width: auto;
1231 position: relative;
1232 }
1233
1234 /* -----------------------------------------------------------
1235 content -> right -> forms -> label (select)
1236 ----------------------------------------------------------- */
1237
1238 #content div.box div.form div.fields div.field div.label-select
1239 {
1240 padding: 2px 0 0 5px;
1241 }
1242
1243 #content div.box-left div.form div.fields div.field div.label-select,
1244 #content div.box-right div.form div.fields div.field div.label-select
1245 {
1246 padding: 0 0 8px 0;
1247 }
1248
1249 /* -----------------------------------------------------------
1250 content -> right -> forms -> label (checkbox)
1251 ----------------------------------------------------------- */
1252
1253 #content div.box div.form div.fields div.field div.label-checkbox
1254 {
1255 padding: 0 0 0 5px;
1256 }
1257
1258 /* -----------------------------------------------------------
1259 content -> right -> forms -> label (radio)
1260 ----------------------------------------------------------- */
1261
1262 #content div.box div.form div.fields div.field div.label-radio
1263 {
1264 padding: 0 0 0 5px;
1265 }
1266
1267 /* -----------------------------------------------------------
1268 content -> right -> forms -> label (textarea)
1269 ----------------------------------------------------------- */
1270
1271 #content div.box div.form div.fields div.field div.label-textarea
1272 {
1273 padding: 0 0 0 5px;
1274 }
1275
1276 #content div.box-left div.form div.fields div.field div.label-textarea,
1277 #content div.box-right div.form div.fields div.field div.label-textarea
1278 {
1279 padding: 0 0 8px 0;
1280 }
1281
1282 /* -----------------------------------------------------------
1283 content -> right -> forms -> labels (label)
1284 ----------------------------------------------------------- */
1285
1286 #content div.box div.form div.fields div.field div.label label
1287 {
1288 color: #393939;
1289 font-weight: bold;
1290 }
1291
1292 #content div.box div.form div.fields div.field div.label span
1293 {
1294 margin: 0;
1295 padding: 2px 0 0 0;
1296 height: 1%;
1297 display: block;
1298 color: #363636;
1299 }
1300
1301 /* -----------------------------------------------------------
1302 content -> right -> forms -> input
1303 ----------------------------------------------------------- */
1304
1305 #content div.box div.form div.fields div.field div.input
1306 {
1307 margin: 0 0 0 200px;
1308 padding: 0;
1309 }
1310
1311 #content div.box-left div.form div.fields div.field div.input,
1312 #content div.box-right div.form div.fields div.field div.input
1313 {
1314 margin: 0;
1315 padding: 7px 7px 6px 7px;
1316 border-top: 1px solid #b3b3b3;
1317 border-left: 1px solid #b3b3b3;
1318 border-right: 1px solid #eaeaea;
1319 border-bottom: 1px solid #eaeaea;
1320 }
1321
1322 #content div.box div.form div.fields div.field div.input input
1323 {
1324 margin: 0;
1325 padding: 7px 7px 6px 7px;
1326 background: #FFFFFF;
1327 border-top: 1px solid #b3b3b3;
1328 border-left: 1px solid #b3b3b3;
1329 border-right: 1px solid #eaeaea;
1330 border-bottom: 1px solid #eaeaea;
1331 color: #000000;
1332 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1333 font-size: 11px;
1334 }
1335
1336 #content div.box-left div.form div.fields div.field div.input input,
1337 #content div.box-right div.form div.fields div.field div.input input
1338 {
1339 width: 100%;
1340 padding: 0;
1341 border: none;
1342 }
1343
1344 #content div.box div.form div.fields div.field div.input input.small
1345 {
1346 width: 30%;
1347 }
1348
1349 #content div.box div.form div.fields div.field div.input input.medium
1350 {
1351 width: 55%;
1352 }
1353
1354 #content div.box div.form div.fields div.field div.input input.large
1355 {
1356 width: 85%;
1357 }
1358
1359 #content div.box div.form div.fields div.field div.input input.date
1360 {
1361 width: 177px;
1362 }
1363
1364 #content div.box div.form div.fields div.field div.input input.button
1365 {
1366 margin: 0;
1367 padding: 4px 8px 4px 8px;
1368 background: #D4D0C8;
1369 border-top: 1px solid #FFFFFF;
1370 border-left: 1px solid #FFFFFF;
1371 border-right: 1px solid #404040;
1372 border-bottom: 1px solid #404040;
1373 color: #000000;
1374 }
1375
1376 #content div.box div.form div.fields div.field div.input input.error
1377 {
1378 background: #FBE3E4;
1379 border-top: 1px solid #e1b2b3;
1380 border-left: 1px solid #e1b2b3;
1381 border-right: 1px solid #FBC2C4;
1382 border-bottom: 1px solid #FBC2C4;
1383 }
1384
1385 #content div.box div.form div.fields div.field div.input input.success
1386 {
1387 background: #E6EFC2;
1388 border-top: 1px solid #cebb98;
1389 border-left: 1px solid #cebb98;
1390 border-right: 1px solid #c6d880;
1391 border-bottom: 1px solid #c6d880;
1392 }
1393
1394 #content div.box div.form div.fields div.field div.input img.ui-datepicker-trigger
1395 {
1396 margin: 0 0 0 6px;
1397 }
1398
1399 /* -----------------------------------------------------------
1400 content -> right -> forms -> input (file styling)
1401 ----------------------------------------------------------- */
1402
1403 #content div.box div.form div.fields div.field div.input a.ui-input-file
1404 {
1405 margin: 0 0 0 6px;
1406 padding: 0;
1407 width: 28px;
1408 height: 28px;
1409 display: inline;
1410 position: absolute;
1411 overflow: hidden;
1412 cursor: pointer;
1413 background: #e5e3e3 url("../images/button_browse.png") no-repeat;
1414 border: none;
1415 text-decoration: none;
1416 }
1417
1418 #content div.box div.form div.fields div.field div.input a:hover.ui-input-file
1419 {
1420 background: #e5e3e3 url("../images/button_browse_selected.png") no-repeat;
1421 }
1422
1423 /* -----------------------------------------------------------
1424 content -> right -> forms -> textarea
1425 ----------------------------------------------------------- */
1426
1427 #content div.box div.form div.fields div.field div.textarea
1428 {
1429 margin: 0 0 0 200px;
1430 padding: 10px;
1431 border-top: 1px solid #b3b3b3;
1432 border-left: 1px solid #b3b3b3;
1433 border-right: 1px solid #eaeaea;
1434 border-bottom: 1px solid #eaeaea;
1435 }
1436
1437 #content div.box div.form div.fields div.field div.textarea-editor
1438 {
1439 padding: 0;
1440 border: 1px solid #dddddd;
1441 }
1442
1443 #content div.box-left div.form div.fields div.field div.textarea,
1444 #content div.box-right div.form div.fields div.field div.textarea
1445 {
1446 margin: 0;
1447 }
1448
1449 #content div.box div.form div.fields div.field div.textarea textarea
1450 {
1451 margin: 0;
1452 padding: 0;
1453 width: 100%;
1454 height: 220px;
1455 overflow: hidden;
1456 background: #FFFFFF;
1457 border-width: 0;
1458 color: #000000;
1459 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1460 font-size: 11px;
1461 outline: none;
1462 }
1463
1464 #content div.box-left div.form div.fields div.field div.textarea textarea,
1465 #content div.box-right div.form div.fields div.field div.textarea textarea
1466 {
1467 width: 100%;
1468 height: 100px;
1469 }
1470
1471 #content div.box div.form div.fields div.field div.textarea textarea.error
1472 {
1473 padding: 3px 10px 10px 23px;
1474 background-color: #FBE3E4;
1475 background-image: url("../../../resources/images/icons/exclamation.png");
1476 background-repeat: no-repeat;
1477 background-position: 3px 3px;
1478 border: 1px solid #FBC2C4;
1479 }
1480
1481 #content div.box div.form div.fields div.field div.textarea textarea.success
1482 {
1483 padding: 3px 10px 10px 23px;
1484 background-color: #E6EFC2;
1485 background-image: url("../../../resources/images/icons/accept.png");
1486 background-repeat: no-repeat;
1487 background-position: 3px 3px;
1488 border: 1px solid #C6D880;
1489 }
1490
1491 /* -----------------------------------------------------------
1492 content -> right -> forms -> textarea (tinymce editor)
1493 ----------------------------------------------------------- */
1494
1495 #content div.box div.form div.fields div.field div.textarea table
1496 {
1497 margin: 0;
1498 padding: 0;
1499 width: 100%;
1500 border: none;
1501 }
1502
1503 #content div.box div.form div.fields div.field div.textarea table td
1504 {
1505 padding: 0;
1506 background: #DDDDDD;
1507 border: none;
1508 }
1509
1510 #content div.box div.form div.fields div.field div.textarea table td table
1511 {
1512 margin: 0;
1513 padding: 0;
1514 width: auto;
1515 border: none;
1516 }
1517
1518 #content div.box div.form div.fields div.field div.textarea table td table td
1519 {
1520 padding: 5px 5px 5px 0;
1521 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1522 font-size: 11px;
1523 }
1524
1525 #content div.box div.form div.fields div.field div.textarea table td table td a
1526 {
1527 border: none;
1528 }
1529
1530 #content div.box div.form div.fields div.field div.textarea table td table td a.mceButtonActive
1531 {
1532 background: #b1b1b1;
1533 }
1534
1535 /* -----------------------------------------------------------
1536 content -> right -> forms -> select
1537 ----------------------------------------------------------- */
1538
1539 #content div.box div.form div.fields div.field div.select
1540 {
1541 margin: 0 0 0 200px;
1542 padding: 0;
1543 }
1544
1545 #content div.box div.form div.fields div.field div.select a:hover
1546 {
1547 color: #000000;
1548 text-decoration: none;
1549 }
1550
1551 #content div.box div.form div.fields div.field div.select select
1552 {
1553 margin: 0;
1554 }
1555
1556 /* -----------------------------------------------------------
1557 content -> right -> forms -> select (jquery styling)
1558 ----------------------------------------------------------- */
1559
1560 #content div.box div.form div.fields div.field div.select a.ui-selectmenu-focus
1561 {
1562 border: 1px solid #666666;
1563 }
1564
1565 #content div.box div.form div.fields div.field div.select a.ui-selectmenu
1566 {
1567 color: #565656;
1568 text-decoration: none;
1569 }
1570
1571 #content div.box div.form div.fields div.field div.select a.ui-selectmenu:hover
1572 {
1573 color: #000000;
1574 text-decoration: none;
1575 }
1576
1577 #content div.box div.form div.fields div.field div.select a.ui-selectmenu-focus span.ui-icon
1578 {
1579 background-image: url(../images/ui/ui-icons_222222_256x240.png);
1580 }
1581
1582 /* -----------------------------------------------------------
1583 content -> right -> forms -> element focus
1584 ----------------------------------------------------------- */
1585
1586 #content div.box div.form div.fields div.field input[type=text]:focus,
1587 #content div.box div.form div.fields div.field input[type=password]:focus,
1588 #content div.box div.form div.fields div.field input[type=file]:focus,
1589 #content div.box div.form div.fields div.field textarea:focus,
1590 #content div.box div.form div.fields div.field select:focus
1591 {
1592 background: #f6f6f6;
1593 border-color: #666;
1594 }
1595
1596 /* -----------------------------------------------------------
1597 content -> right -> forms -> checkboxes
1598 ----------------------------------------------------------- */
1599
1600 #content div.box div.form div.fields div.field div.checkboxes
1601 {
1602 margin: 0 0 0 200px;
1603 padding: 0;
1604 }
1605
1606 #content div.box div.form div.fields div.field div.checkboxes div.checkbox
1607 {
1608 margin: 0;
1609 padding: 2px 0 2px 0;
1610 clear: both;
1611 overflow: hidden;
1612 }
1613
1614 #content div.box div.form div.fields div.field div.checkboxes div.checkbox input
1615 {
1616 margin: 0;
1617 float: left;
1618 }
1619
1620 #content div.box div.form div.fields div.field div.checkboxes div.checkbox label
1621 {
1622 margin: 3px 0 0 4px;
1623 height: 1%;
1624 display: block;
1625 float: left;
1626 }
1627
1628 /* -----------------------------------------------------------
1629 content -> right -> forms -> radios
1630 ----------------------------------------------------------- */
1631
1632 #content div.box div.form div.fields div.field div.radios
1633 {
1634 margin: 0 0 0 200px;
1635 padding: 0;
1636 }
1637
1638 #content div.box div.form div.fields div.field div.radios div.radio
1639 {
1640 margin: 0;
1641 padding: 2px 0 2px 0;
1642 clear: both;
1643 overflow: hidden;
1644 }
1645
1646 #content div.box div.form div.fields div.field div.radios div.radio input
1647 {
1648 margin: 0;
1649 float: left;
1650 }
1651
1652 #content div.box div.form div.fields div.field div.radios div.radio label
1653 {
1654 margin: 3px 0 0 4px;
1655 height: 1%;
1656 display: block;
1657 float: left;
1658 }
1659
1660 /* -----------------------------------------------------------
1661 content -> right -> forms -> buttons
1662 ----------------------------------------------------------- */
1663
1664 #content div.box div.form div.fields div.buttons
1665 {
1666 margin: 10px 0 0 200px;
1667 padding: 0;
1668 }
1669
1670 #content div.box-left div.form div.fields div.buttons,
1671 #content div.box-right div.form div.fields div.buttons
1672 {
1673 margin: 10px 0 0 0;
1674 }
1675
1676 #content div.box div.form div.fields div.buttons input
1677 {
1678 margin: 0;
1679 color: #000000;
1680 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1681 font-size: 11px;
1682 font-weight: bold;
1683 }
1684
1685 /* -----------------------------------------------------------
1686 content -> right -> forms -> buttons (jquery styling)
1687 ----------------------------------------------------------- */
1688
1689 #content div.box div.form div.fields div.buttons input.ui-state-default
1690 {
1691 margin: 0;
1692 padding: 6px 12px 6px 12px;
1693 background: #e5e3e3 url("../images/button.png") repeat-x;
1694 border-top: 1px solid #DDDDDD;
1695 border-left: 1px solid #c6c6c6;
1696 border-right: 1px solid #DDDDDD;
1697 border-bottom: 1px solid #c6c6c6;
1698 color: #515151;
1699 outline: none;
1700 }
1701
1702 #content div.box div.form div.fields div.buttons input.ui-state-hover
1703 {
1704 margin: 0;
1705 padding: 6px 12px 6px 12px;
1706 background: #b4b4b4 url("../images/button_selected.png") repeat-x;
1707 border-top: 1px solid #cccccc;
1708 border-left: 1px solid #bebebe;
1709 border-right: 1px solid #b1b1b1;
1710 border-bottom: 1px solid #afafaf;
1711 color: #515151;
1712 outline: none;
1713 }
1714
1715 #content div.box div.form div.fields div.buttons div.highlight
1716 {
1717 display: inline;
1718 }
1719
1720 #content div.box div.form div.fields div.buttons div.highlight input.ui-state-default
1721 {
1722 margin: 0;
1723 padding: 6px 12px 6px 12px;
1724 background: #4e85bb url("../images/colors/blue/button_highlight.png") repeat-x;
1725 border-top: 1px solid #5c91a4;
1726 border-left: 1px solid #2a6f89;
1727 border-right: 1px solid #2b7089;
1728 border-bottom: 1px solid #1a6480;
1729 color: #FFFFFF;
1730 }
1731
1732 #content div.box div.form div.fields div.buttons div.highlight input.ui-state-hover
1733 {
1734 margin: 0;
1735 padding: 6px 12px 6px 12px;
1736 background: #46a0c1 url("../images/colors/blue/button_highlight_selected.png") repeat-x;
1737 border-top: 1px solid #78acbf;
1738 border-left: 1px solid #34819e;
1739 border-right: 1px solid #35829f;
1740 border-bottom: 1px solid #257897;
1741 color: #FFFFFF;
1742 }
1743
1744 /* -----------------------------------------------------------
1745 content -> right -> box / tables
1746 ----------------------------------------------------------- */
1747
1748 #content div.box div.table
1749 {
1750 margin: 0;
1751 padding: 0 20px 10px 20px;
1752 clear: both;
1753 overflow: hidden;
1754 }
1755
1756 #content div.box table
1757 {
1758 margin: 0;
1759 padding: 0;
1760 width: 100%;
1761 border-collapse: collapse;
1762 }
1763
1764 #content div.box table th
1765 {
1766 padding: 10px;
1767 background: #eeeeee;
1768 border-bottom: 1px solid #dddddd;
1769 }
1770
1771 #content div.box table th.left
1772 {
1773 text-align: left;
1774 }
1775
1776 #content div.box table th.right
1777 {
1778 text-align: right;
1779 }
1780
1781 #content div.box table th.center
1782 {
1783 text-align: center;
1784 }
1785
1786 #content div.box table th.selected
1787 {
1788 padding: 0;
1789 vertical-align: middle;
1790 }
1791
1792 #content div.box table th.selected input
1793 {
1794 margin: 0;
1795 }
1796
1797 #content div.box table td
1798 {
1799 padding: 5px;
1800 background: #ffffff;
1801 border-bottom: 1px solid #cdcdcd;
1802 }
1803
1804 #content div.box table tr.selected td
1805 {
1806 background: #FFFFCC;
1807 }
1808
1809 #content div.box table td.selected
1810 {
1811 padding: 0;
1812 width: 3%;
1813 text-align: center;
1814 vertical-align: middle;
1815 }
1816
1817 #content div.box table td.selected input
1818 {
1819 margin: 0;
1820 }
1821
1822 #content div.box table td.action
1823 {
1824 width: 45%;
1825 text-align: left;
1826 }
1827
1828 #content div.box table td.user
1829 {
1830 width: 10%;
1831 text-align: center;
1832 }
1833
1834 #content div.box table td.date
1835 {
1836 width: 33%;
1837 text-align: center;
1838 }
1839
1840 #content div.box table td.address
1841 {
1842 width: 10%;
1843 text-align: center;
1844 }
1845
1846 /* -----------------------------------------------------------
1847 content -> right -> box / table action
1848 ----------------------------------------------------------- */
1849
1850 #content div.box div.action
1851 {
1852 margin: 10px 0 0 0;
1853 padding: 0;
1854 float: right;
1855 background: #FFFFFF;
1856 text-align: right;
1857 }
1858
1859 #content div.box div.action a:hover
1860 {
1861 color: #000000;
1862 text-decoration: none;
1863 }
1864
1865 #content div.box div.action select
1866 {
1867 margin: 0;
1868 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1869 font-size: 11px;
1870 }
1871
1872 #content div.box div.action div.button
1873 {
1874 margin: 6px 0 0 0;
1875 padding: 0;
1876 text-align: right;
1877 }
1878
1879 #content div.box div.action div.button input
1880 {
1881 margin: 0;
1882 color: #000000;
1883 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1884 font-size: 11px;
1885 font-weight: bold;
1886 }
1887
1888 #content div.box div.action div.button input.ui-state-default
1889 {
1890 margin: 0;
1891 padding: 6px 12px 6px 12px;
1892 background: #e5e3e3 url("../images/button.png") repeat-x;
1893 border-top: 1px solid #DDDDDD;
1894 border-left: 1px solid #c6c6c6;
1895 border-right: 1px solid #DDDDDD;
1896 border-bottom: 1px solid #c6c6c6;
1897 color: #515151;
1898 }
1899
1900 #content div.box div.action div.button input.ui-state-hover
1901 {
1902 margin: 0;
1903 padding: 6px 12px 6px 12px;
1904 background: #b4b4b4 url("../images/button_selected.png") repeat-x;
1905 border-top: 1px solid #cccccc;
1906 border-left: 1px solid #bebebe;
1907 border-right: 1px solid #b1b1b1;
1908 border-bottom: 1px solid #afafaf;
1909 color: #515151;
1910 }
1911
1912 #content div.box div.action .ui-selectmenu
1913 {
1914 margin: 0;
1915 padding: 0;
1916 }
1917
1918 #content div.box div.action a.ui-selectmenu-focus
1919 {
1920 border: 1px solid #666666;
1921 }
1922
1923 #content div.box div.action a.ui-selectmenu-focus span.ui-icon
1924 {
1925 background-image: url(../images/ui/ui-icons_222222_256x240.png);
1926 }
1927
1928 /* -----------------------------------------------------------
1929 content -> right -> pagination
1930 ----------------------------------------------------------- */
1931
1932 #content div.box div.pagination
1933 {
1934 margin: 10px 0 0 0;
1935 padding: 0;
1936 height: 1%;
1937 clear: both;
1938 overflow: hidden;
1939 }
1940
1941 #content div.box div.pagination div.results
1942 {
1943 margin: 0;
1944 padding: 0;
1945 text-align: left;
1946 float: left
1947 }
1948
1949 #content div.box div.pagination div.results span
1950 {
1951 margin: 0;
1952 padding: 6px 8px 6px 8px;
1953 height: 1%;
1954 display: block;
1955 float: left;
1956 background: #ebebeb url("../images/pager.png") repeat-x;
1957 border-top: 1px solid #dedede;
1958 border-left: 1px solid #cfcfcf;
1959 border-right: 1px solid #c4c4c4;
1960 border-bottom: 1px solid #c4c4c4;
1961 color: #4A4A4A;
1962 font-weight: bold;
1963 }
1964
1965 #content div.box div.pagination ul.pager
1966 {
1967 margin: 0;
1968 padding: 0;
1969 float: right;
1970 text-align: right;
1971 }
1972
1973 #content div.box div.pagination ul.pager li
1974 {
1975 margin: 0 0 0 4px;
1976 padding: 0;
1977 height: 1%;
1978 float: left;
1979 list-style: none;
1980 background: #ebebeb url("../images/pager.png") repeat-x;
1981 border-top: 1px solid #dedede;
1982 border-left: 1px solid #cfcfcf;
1983 border-right: 1px solid #c4c4c4;
1984 border-bottom: 1px solid #c4c4c4;
1985 color: #4A4A4A;
1986 font-weight: bold;
1987 }
1988
1989 #content div.box div.pagination ul.pager li.separator
1990 {
1991 padding: 6px;
1992 }
1993
1994 #content div.box div.pagination ul.pager li.current
1995 {
1996 padding: 6px;
1997 background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
1998 border-top: 1px solid #cccccc;
1999 border-left: 1px solid #bebebe;
2000 border-right: 1px solid #b1b1b1;
2001 border-bottom: 1px solid #afafaf;
2002 color: #515151;
2003 }
2004
2005 #content div.box div.pagination ul.pager li.disabled
2006 {
2007 padding: 6px;
2008 color: #B4B4B4;
2009 }
2010
2011 #content div.box div.pagination ul.pager li a
2012 {
2013 margin: 0;
2014 padding: 6px;
2015 height: 1%;
2016 display: block;
2017 float: left;
2018 color: #515151;
2019 text-decoration: none;
2020 }
2021
2022 #content div.box div.pagination ul.pager li a:hover,
2023 #content div.box div.pagination ul.pager li a:active
2024 {
2025 margin: -1px;
2026 background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
2027 border-top: 1px solid #cccccc;
2028 border-left: 1px solid #bebebe;
2029 border-right: 1px solid #b1b1b1;
2030 border-bottom: 1px solid #afafaf;
2031 }
2032
2033 /* -----------------------------------------------------------
2034 content -> webhelpers pagination
2035 ----------------------------------------------------------- */
2036
2037 #content div.box div.pagination-wh
2038 {
2039 margin: 10px 0 0 0;
2040 padding: 0;
2041 height: 1%;
2042 clear: both;
2043 overflow: hidden;
2044 text-align: right;
2045 }
2046
2047 #content div.box div.pagination-wh div.results
2048 {
2049 margin: 0;
2050 padding: 0;
2051 text-align: left;
2052 float: left
2053 }
2054
2055 #content div.box div.pagination-wh div.results span
2056 {
2057 margin: 0;
2058 padding: 6px 8px 6px 8px;
2059 height: 1%;
2060 display: block;
2061 float: left;
2062 background: #ebebeb url("../images/pager.png") repeat-x;
2063 border-top: 1px solid #dedede;
2064 border-left: 1px solid #cfcfcf;
2065 border-right: 1px solid #c4c4c4;
2066 border-bottom: 1px solid #c4c4c4;
2067 color: #4A4A4A;
2068 font-weight: bold;
2069 }
2070
2071 #content div.box div.pagination-left{
2072 float:left;
2073 }
2074 #content div.box div.pagination-right{
2075 float:right;
2076 }
2077
2078 #content div.box div.pagination-wh a,
2079 #content div.box div.pagination-wh span.pager_dotdot
2080 {
2081 margin: 0 0 0 4px;
2082 padding: 6px;
2083 height: 1%;
2084 float: left;
2085 background: #ebebeb url("../images/pager.png") repeat-x;
2086 border-top: 1px solid #dedede;
2087 border-left: 1px solid #cfcfcf;
2088 border-right: 1px solid #c4c4c4;
2089 border-bottom: 1px solid #c4c4c4;
2090 color: #4A4A4A;
2091 font-weight: bold;
2092 }
2093 #content div.box div.pagination-wh span.pager_curpage
2094 {
2095 margin: 0 0 0 4px;
2096 padding: 6px;
2097 height: 1%;
2098 float: left;
2099 background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
2100 border-top: 1px solid #cccccc;
2101 border-left: 1px solid #bebebe;
2102 border-right: 1px solid #b1b1b1;
2103 border-bottom: 1px solid #afafaf;
2104 color: #515151;
2105 font-weight: bold;
2106 }
2107
2108 #content div.box div.pagination-wh a.disabled
2109 {
2110 padding: 6px;
2111 color: #B4B4B4;
2112 }
2113
2114
2115 #content div.box div.pagination-wh a:hover,
2116 #content div.box div.pagination-wh a:active
2117 {
2118 background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
2119 border-top: 1px solid #cccccc;
2120 border-left: 1px solid #bebebe;
2121 border-right: 1px solid #b1b1b1;
2122 border-bottom: 1px solid #afafaf;
2123 text-decoration: none;
2124 }
2125
2126
2127 /* -----------------------------------------------------------
2128 content -> right -> traffic chart
2129 ----------------------------------------------------------- */
2130
2131 #content div.box div.traffic
2132 {
2133 margin: 0;
2134 padding: 0 20px 10px 20px;
2135 clear: both;
2136 overflow: hidden;
2137 }
2138
2139 #content div.box div.traffic div.legend
2140 {
2141 margin: 0 0 10px 0;
2142 padding: 0 0 10px 0;
2143 clear: both;
2144 overflow: hidden;
2145 border-bottom: 1px solid #dddddd;
2146 }
2147
2148 #content div.box div.traffic div.legend h6
2149 {
2150 margin: 0;
2151 padding: 0;
2152 float: left;
2153 border: none;
2154 }
2155
2156 #content div.box div.traffic div.legend ul
2157 {
2158 margin: 0;
2159 padding: 0;
2160 float: right;
2161 }
2162
2163 #content div.box div.traffic div.legend li
2164 {
2165 margin: 0;
2166 padding: 0 8px 0 4px;
2167 list-style: none;
2168 float: left;
2169 font-size: 11px;
2170 }
2171
2172 #content div.box div.traffic div.legend li.visits
2173 {
2174 border-left: 12px solid #edc240;
2175 }
2176
2177 #content div.box div.traffic div.legend li.pageviews
2178 {
2179 border-left: 12px solid #afd8f8;
2180 }
2181
2182 #content div.box div.traffic table
2183 {
2184 width: auto;
2185 }
2186
2187 #content div.box div.traffic table td
2188 {
2189 padding: 2px 3px 3px 3px;
2190 background: transparent;
2191 border: none;
2192 }
2193
2194 #content div.box div.traffic table td.legendLabel
2195 {
2196 padding: 0 3px 2px 3px;
2197 }
2198
2199 /* -----------------------------------------------------------
2200 footer
2201 ----------------------------------------------------------- */
2202
2203 #footer
2204 {
2205 margin: 0;
2206 padding: 5px 0 5px 0;
2207 clear: both;
2208 overflow: hidden;
2209 background: #2a2a2a;
2210 text-align: right;
2211 }
2212
2213 #footer p
2214 {
2215 margin: 0 80px 0 80px;
2216 padding: 10px 0 10px 0;
2217 color: #ffffff;
2218 }
2219
2220 /* -----------------------------------------------------------
2221 login
2222 ----------------------------------------------------------- */
2223
2224 #login
2225 {
2226 margin: 10% auto 0 auto;
2227 padding: 0;
2228 width: 420px;
2229 }
2230
2231 /* -----------------------------------------------------------
2232 login -> colors
2233 ----------------------------------------------------------- */
2234
2235 #login div.color
2236 {
2237 margin: 10px auto 0 auto;
2238 padding: 3px 3px 3px 0;
2239 clear: both;
2240 overflow: hidden;
2241 background: #FFFFFF;
2242 }
2243
2244 #login div.color a
2245 {
2246 margin: 0 0 0 3px;
2247 padding: 0;
2248 width: 20px;
2249 height: 20px;
2250 display: block;
2251 float: left;
2252 }
2253
2254 /* -----------------------------------------------------------
2255 login -> title
2256 ----------------------------------------------------------- */
2257
2258 #login div.title
2259 {
2260 margin: 0 auto;
2261 padding: 0;
2262 width: 420px;
2263 clear: both;
2264 overflow: hidden;
2265 position: relative;
2266 background: #003367 url("../images/colors/blue/header_inner.png") repeat-x;
2267 }
2268
2269 #login div.title h5
2270 {
2271 margin: 10px;
2272 padding: 0;
2273 color: #ffffff;
2274 }
2275
2276 /* -----------------------------------------------------------
2277 login -> title / corners
2278 ----------------------------------------------------------- */
2279
2280 #login div.title div.corner
2281 {
2282 height: 6px;
2283 width: 6px;
2284 position: absolute;
2285 background: url("../images/colors/blue/login_corners.png") no-repeat;
2286 }
2287
2288 #login div.title div.tl
2289 {
2290 top: 0;
2291 left: 0;
2292 background-position: 0 0;
2293 }
2294
2295 #login div.title div.tr
2296 {
2297 top: 0;
2298 right: 0;
2299 background-position: -6px 0;
2300 }
2301
2302 #login div.inner
2303 {
2304 margin: 0 auto;
2305 padding: 20px;
2306 width: 380px;
2307 background: #FFFFFF url("../images/login.png") no-repeat top left;
2308 border-top: none;
2309 border-bottom: none;
2310 }
2311
2312 /* -----------------------------------------------------------
2313 login -> form
2314 ----------------------------------------------------------- */
2315
2316 #login div.form
2317 {
2318 margin: 0;
2319 padding: 0;
2320 clear: both;
2321 overflow: hidden;
2322 }
2323
2324 #login div.form div.fields
2325 {
2326 margin: 0;
2327 padding: 0;
2328 clear: both;
2329 overflow: hidden;
2330 }
2331
2332 #login div.form div.fields div.field
2333 {
2334 margin: 0;
2335 padding: 0 0 10px 0;
2336 clear: both;
2337 overflow: hidden;
2338 }
2339
2340 #login div.form div.fields div.field span.error-message
2341 {
2342 margin: 8px 0 0 0;
2343 padding: 0;
2344 height: 1%;
2345 display: block;
2346 color: #FF0000;
2347 }
2348
2349 #login div.form div.fields div.field div.label
2350 {
2351 margin: 2px 10px 0 0;
2352 padding: 5px 0 0 5px;
2353 width: 173px;
2354 float: left;
2355 text-align: right;
2356 }
2357
2358 #login div.form div.fields div.field div.label label
2359 {
2360 color: #000000;
2361 font-weight: bold;
2362 }
2363
2364 #login div.form div.fields div.field div.label span
2365 {
2366 margin: 0;
2367 padding: 2px 0 0 0;
2368 height: 1%;
2369 display: block;
2370 color: #363636;
2371 }
2372
2373 #login div.form div.fields div.field div.input
2374 {
2375 margin: 0;
2376 padding: 0;
2377 float: left;
2378 }
2379
2380 #login div.form div.fields div.field div.input input
2381 {
2382 margin: 0;
2383 padding: 7px 7px 6px 7px;
2384 width: 176px;
2385 background: #FFFFFF;
2386 border-top: 1px solid #b3b3b3;
2387 border-left: 1px solid #b3b3b3;
2388 border-right: 1px solid #eaeaea;
2389 border-bottom: 1px solid #eaeaea;
2390 color: #000000;
2391 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
2392 font-size: 11px;
2393 }
2394
2395 #login div.form div.fields div.field div.input input.error
2396 {
2397 background: #FBE3E4;
2398 border-top: 1px solid #e1b2b3;
2399 border-left: 1px solid #e1b2b3;
2400 border-right: 1px solid #FBC2C4;
2401 border-bottom: 1px solid #FBC2C4;
2402 }
2403
2404 #login div.form div.fields div.field div.input input.success
2405 {
2406 background: #E6EFC2;
2407 border-top: 1px solid #cebb98;
2408 border-left: 1px solid #cebb98;
2409 border-right: 1px solid #c6d880;
2410 border-bottom: 1px solid #c6d880;
2411 }
2412
2413 #login div.form div.fields div.field div.input div.link
2414 {
2415 margin: 6px 0 0 0;
2416 padding: 0;
2417 text-align: right;
2418 }
2419
2420 #login div.form div.fields div.field div.checkbox
2421 {
2422 margin: 0 0 0 184px;
2423 padding: 0;
2424 }
2425
2426 #login div.form div.fields div.field div.checkbox label
2427 {
2428 color: #565656;
2429 font-weight: bold;
2430 }
2431
2432 #login div.form div.fields div.buttons
2433 {
2434 margin: 0;
2435 padding: 10px 0 0 0;
2436 clear: both;
2437 overflow: hidden;
2438 border-top: 1px solid #DDDDDD;
2439 text-align: right;
2440 }
2441
2442 #login div.form div.fields div.buttons input
2443 {
2444 margin: 0;
2445 color: #000000;
2446 font-size: 1.0em;
2447 font-weight: bold;
2448 font-family: Verdana, Helvetica, Sans-Serif;
2449 }
2450
2451 #login div.form div.fields div.buttons input.ui-state-default
2452 {
2453 margin: 0;
2454 padding: 6px 12px 6px 12px;
2455 background: #e5e3e3 url("../images/button.png") repeat-x;
2456 border-top: 1px solid #DDDDDD;
2457 border-left: 1px solid #c6c6c6;
2458 border-right: 1px solid #DDDDDD;
2459 border-bottom: 1px solid #c6c6c6;
2460 color: #515151;
2461 }
2462
2463 #login div.form div.fields div.buttons input.ui-state-hover
2464 {
2465 margin: 0;
2466 padding: 6px 12px 6px 12px;
2467 background: #b4b4b4 url("../images/button_selected.png") repeat-x;
2468 border-top: 1px solid #cccccc;
2469 border-left: 1px solid #bebebe;
2470 border-right: 1px solid #b1b1b1;
2471 border-bottom: 1px solid #afafaf;
2472 color: #515151;
2473 }
2474
2475 /* -----------------------------------------------------------
2476 login -> links
2477 ----------------------------------------------------------- */
2478
2479 #login div.form div.links
2480 {
2481 margin: 10px 0 0 0;
2482 padding: 0 0 2px 0;
2483 clear: both;
2484 overflow: hidden;
2485 }
2486
2487 /* -----------------------------------------------------------
2488 register
2489 ----------------------------------------------------------- */
2490
2491 #register
2492 {
2493 margin: 10% auto 0 auto;
2494 padding: 0;
2495 width: 420px;
2496 }
2497
2498 /* -----------------------------------------------------------
2499 register -> colors
2500 ----------------------------------------------------------- */
2501
2502 #register div.color
2503 {
2504 margin: 10px auto 0 auto;
2505 padding: 3px 3px 3px 0;
2506 clear: both;
2507 overflow: hidden;
2508 background: #FFFFFF;
2509 }
2510
2511 #register div.color a
2512 {
2513 margin: 0 0 0 3px;
2514 padding: 0;
2515 width: 20px;
2516 height: 20px;
2517 display: block;
2518 float: left;
2519 }
2520
2521 /* -----------------------------------------------------------
2522 register -> title
2523 ----------------------------------------------------------- */
2524
2525 #register div.title
2526 {
2527 margin: 0 auto;
2528 padding: 0;
2529 width: 420px;
2530 clear: both;
2531 overflow: hidden;
2532 position: relative;
2533 background: #003367 url("../images/colors/blue/header_inner.png") repeat-x;
2534 }
2535
2536 #register div.title h5
2537 {
2538 margin: 10px;
2539 padding: 0;
2540 color: #ffffff;
2541 }
2542
2543 /* -----------------------------------------------------------
2544 register -> inner
2545 ----------------------------------------------------------- */
2546 #register div.title div.corner
2547 {
2548 height: 6px;
2549 width: 6px;
2550 position: absolute;
2551 background: url("../images/colors/blue/login_corners.png") no-repeat;
2552 }
2553
2554 #register div.title div.tl
2555 {
2556 top: 0;
2557 left: 0;
2558 background-position: 0 0;
2559 }
2560
2561 #register div.title div.tr
2562 {
2563 top: 0;
2564 right: 0;
2565 background-position: -6px 0;
2566
2567 }
2568 #register div.inner
2569 {
2570 margin: 0 auto;
2571 padding: 20px;
2572 width: 380px;
2573 background: #FFFFFF;
2574 border-top: none;
2575 border-bottom: none;
2576 }
2577
2578 /* -----------------------------------------------------------
2579 register -> form
2580 ----------------------------------------------------------- */
2581
2582 #register div.form
2583 {
2584 margin: 0;
2585 padding: 0;
2586 clear: both;
2587 overflow: hidden;
2588 }
2589
2590 #register div.form div.fields
2591 {
2592 margin: 0;
2593 padding: 0;
2594 clear: both;
2595 overflow: hidden;
2596 }
2597
2598 #register div.form div.fields div.field
2599 {
2600 margin: 0;
2601 padding: 0 0 10px 0;
2602 clear: both;
2603 overflow: hidden;
2604 }
2605
2606 #register div.form div.fields div.field span.error-message
2607 {
2608 margin: 8px 0 0 0;
2609 padding: 0;
2610 height: 1%;
2611 display: block;
2612 color: #FF0000;
2613 }
2614
2615 #register div.form div.fields div.field div.label
2616 {
2617 margin: 2px 10px 0 0;
2618 padding: 5px 0 0 5px;
2619 width: 82px;
2620 float: left;
2621 text-align: right;
2622 }
2623
2624 #register div.form div.fields div.field div.label label
2625 {
2626 color: #000000;
2627 font-weight: bold;
2628 }
2629
2630 #register div.form div.fields div.field div.label span
2631 {
2632 margin: 0;
2633 padding: 2px 0 0 0;
2634 height: 1%;
2635 display: block;
2636 color: #363636;
2637 }
2638
2639 #register div.form div.fields div.field div.input
2640 {
2641 margin: 0;
2642 padding: 0;
2643 float: left;
2644 }
2645
2646 #register div.form div.fields div.field div.input input
2647 {
2648 margin: 0;
2649 padding: 7px 7px 6px 7px;
2650 width: 266px;
2651 background: #FFFFFF;
2652 border-top: 1px solid #b3b3b3;
2653 border-left: 1px solid #b3b3b3;
2654 border-right: 1px solid #eaeaea;
2655 border-bottom: 1px solid #eaeaea;
2656 color: #000000;
2657 font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
2658 font-size: 11px;
2659 }
2660
2661 #register div.form div.fields div.field div.input input.error
2662 {
2663 background: #FBE3E4;
2664 border-top: 1px solid #e1b2b3;
2665 border-left: 1px solid #e1b2b3;
2666 border-right: 1px solid #FBC2C4;
2667 border-bottom: 1px solid #FBC2C4;
2668 }
2669
2670 #register div.form div.fields div.field div.input input.success
2671 {
2672 background: #E6EFC2;
2673 border-top: 1px solid #cebb98;
2674 border-left: 1px solid #cebb98;
2675 border-right: 1px solid #c6d880;
2676 border-bottom: 1px solid #c6d880;
2677 }
2678
2679 #register div.form div.fields div.field div.input div.link
2680 {
2681 margin: 6px 0 0 0;
2682 padding: 0;
2683 text-align: right;
2684 }
2685
2686 #register div.form div.fields div.field div.checkbox
2687 {
2688 margin: 0 0 0 184px;
2689 padding: 0;
2690 }
2691
2692 #register div.form div.fields div.field div.checkbox label
2693 {
2694 color: #565656;
2695 font-weight: bold;
2696 }
2697
2698 #register div.form div.fields div.buttons
2699 {
2700 margin: 0;
2701 padding: 10px 0 0 97px;
2702 clear: both;
2703 overflow: hidden;
2704 border-top: 1px solid #DDDDDD;
2705 text-align: left;
2706 }
2707
2708 #register div.form div.fields div.buttons input
2709 {
2710 margin: 0;
2711 color: #000000;
2712 font-size: 1.0em;
2713 font-weight: bold;
2714 font-family: Verdana, Helvetica, Sans-Serif;
2715 }
2716
2717 #register div.form div.fields div.buttons input.ui-state-default
2718 {
2719 margin: 0;
2720 padding: 6px 12px 6px 12px;
2721 background: #e5e3e3 url("../images/button.png") repeat-x;
2722 border-top: 1px solid #DDDDDD;
2723 border-left: 1px solid #c6c6c6;
2724 border-right: 1px solid #DDDDDD;
2725 border-bottom: 1px solid #c6c6c6;
2726 color: #515151;
2727 }
2728 #register div.form div.fields div.buttons div.highlight input.ui-state-default
2729 {
2730 background:url("../images/colors/blue/button_highlight.png") repeat-x scroll 0 0 #4E85BB;
2731 border-color:#5C91A4 #2B7089 #1A6480 #2A6F89;
2732 border-style:solid;
2733 border-width:1px;
2734 color:#FFFFFF;
2735 }
2736
2737
2738
2739 #register div.form div.fields div.buttons input.ui-state-hover
2740 {
2741 margin: 0;
2742 padding: 6px 12px 6px 12px;
2743 background: #b4b4b4 url("../images/button_selected.png") repeat-x;
2744 border-top: 1px solid #cccccc;
2745 border-left: 1px solid #bebebe;
2746 border-right: 1px solid #b1b1b1;
2747 border-bottom: 1px solid #afafaf;
2748 color: #515151;
2749 }
2750
2751
2752 /* -----------------------------------------------------------
2753 CHANGESETS
2754 ----------------------------------------------------------- */
2755 #changeset_content {
2756 border:1px solid #CCCCCC;
2757 padding:5px;
2758 }
2759
2760 #changeset_content .container .wrapper {
2761 width: 600px;
2762 }
2763
2764 #changeset_content .container {
2765 height: 120px;
2766 }
2767
2768 #changeset_content .container .left {
2769 float: left;
2770 width: 70%;
2771 padding-left: 5px;
2772 }
2773
2774 #changeset_content .container .right {
2775 float: right;
2776 width: 25%;
2777 text-align: right;
2778 }
2779
2780 #changeset_content .container .left .date {
2781 font-weight: bold;
2782 }
2783
2784 #changeset_content .container .left .author {
2785
2786 }
2787
2788 #changeset_content .container .left .message {
2789 font-style: italic;
2790 color: #556CB5;
2791 }
2792
2793 .cs_files {
2794
2795 }
2796
2797 .cs_files .cs_added {
2798 background: url("/images/icons/page_white_add.png") no-repeat scroll 3px;
2799 /*background-color:#BBFFBB;*/
2800 height: 16px;
2801 padding-left: 20px;
2802 margin-top: 7px;
2803 text-align: left;
2804 }
2805
2806 .cs_files .cs_changed {
2807 background: url("/images/icons/page_white_edit.png") no-repeat scroll
2808 3px;
2809 /*background-color: #FFDD88;*/
2810 height: 16px;
2811 padding-left: 20px;
2812 margin-top: 7px;
2813 text-align: left;
2814 }
2815
2816 .cs_files .cs_removed {
2817 background: url("/images/icons/page_white_delete.png") no-repeat scroll
2818 3px;
2819 /*background-color: #FF8888;*/
2820 height: 16px;
2821 padding-left: 20px;
2822 margin-top: 7px;
2823 text-align: left;
2824 }
2825
2826
2827
2828 /* -----------------------------------------------------------
2829 CHANGESETS - CANVAS
2830 ----------------------------------------------------------- */
2831
2832 #graph {
2833 overflow: hidden;
2834 }
2835
2836 #graph_nodes {
2837 width: 160px;
2838 float: left;
2839 margin-left:-50px;
2840 margin-top: 5px;
2841 }
2842
2843 #graph_content {
2844 width: 800px;
2845 float: left;
2846 }
2847
2848 #graph_content .container_header {
2849 border: 1px solid #CCCCCC;
2850 padding:10px;
2851 }
2852
2853 #graph_content .container .wrapper {
2854 width: 600px;
2855 }
2856
2857 #graph_content .container {
2858 border-bottom: 1px solid #CCCCCC;
2859 border-left: 1px solid #CCCCCC;
2860 border-right: 1px solid #CCCCCC;
2861 min-height: 80px;
2862 overflow: hidden;
2863 }
2864
2865 #graph_content .container .left {
2866 float: left;
2867 width: 70%;
2868 padding-left: 5px;
2869 }
2870
2871 #graph_content .container .right {
2872 float: right;
2873 width: 25%;
2874 text-align: right;
2875 }
2876
2877 #graph_content .container .left .date {
2878 font-weight: bold;
2879 }
2880
2881 #graph_content .container .left .author {
2882
2883 }
2884
2885 #graph_content .container .left .message {
2886 font-size: 80%;
2887 }
2888
2889 .right div {
2890 clear: both;
2891 }
2892
2893 .right .changes .added,.changed,.removed {
2894 border: 1px solid #DDDDDD;
2895 display: block;
2896 float: right;
2897 font-size: 0.75em;
2898 text-align: center;
2899 min-width: 15px;
2900 }
2901
2902 .right .changes .added {
2903 background: #BBFFBB;
2904 }
2905
2906 .right .changes .changed {
2907 background: #FFDD88;
2908 }
2909
2910 .right .changes .removed {
2911 background: #FF8888;
2912 }
2913
2914 .right .merge {
2915 vertical-align: top;
2916 font-size: 60%;
2917 font-weight: bold;
2918 }
2919
2920 .right .merge img {
2921 vertical-align: bottom;
2922 }
2923
2924 .right .parent {
2925 font-size: 90%;
2926 font-family: monospace;
2927 }
2928
2929
2930
2931 /* -----------------------------------------------------------
2932 FILE BROWSER
2933 ----------------------------------------------------------- */
2934 div.browserblock {
2935 overflow: hidden;
2936 padding: 0px;
2937 border: 1px solid #ccc;
2938 background: #f8f8f8;
2939 font-size: 100%;
2940 line-height: 100%;
2941 /* new */
2942 line-height: 125%;
2943 }
2944
2945 div.browserblock .browser-header {
2946 border-bottom: 1px solid #CCCCCC;
2947 background: #FFFFFF;
2948 color: blue;
2949 padding: 10px 0 10px 0;
2950 }
2951
2952 div.browserblock .browser-header span {
2953 margin-left: 25px;
2954 font-weight: bold;
2955 }
2956
2957 div.browserblock .browser-body {
2958 background: #EEEEEE;
2959 }
2960
2961 table.code-browser {
2962 border-collapse: collapse;
2963 width: 100%;
2964 }
2965
2966 table.code-browser tr {
2967 margin: 3px;
2968 }
2969
2970 table.code-browser thead th {
2971 background-color: #EEEEEE;
2972 height: 20px;
2973 font-size: 1.1em;
2974 font-weight: bold;
2975 text-align: center;
2976 text-align: left;
2977 padding-left: 10px;
2978 }
2979
2980 table.code-browser tbody tr {
2981
2982 }
2983
2984 table.code-browser tbody td {
2985 padding-left: 10px;
2986 height: 20px;
2987 }
2988 table.code-browser .browser-file {
2989 background: url("/images/icons/document_16.png") no-repeat scroll 3px;
2990 height: 16px;
2991 padding-left: 20px;
2992 text-align: left;
2993 }
2994
2995 table.code-browser .browser-dir {
2996 background: url("/images/icons/folder_16.png") no-repeat scroll 3px;
2997 height: 16px;
2998 padding-left: 20px;
2999 text-align: left;
3000 }
3001
3002
3003 /* -----------------------------------------------------------
3004 INFOBOX
3005 ----------------------------------------------------------- */
3006 .info_box *{
3007 background:url("../../images/pager.png") repeat-x scroll 0 0 #EBEBEB;
3008 border-color:#DEDEDE #C4C4C4 #C4C4C4 #CFCFCF;
3009 border-style:solid;
3010 border-width:1px;
3011 color:#4A4A4A;
3012 display:block;
3013 font-weight:bold;
3014 height:1%;
3015 padding:4px 6px;
3016 display: inline;
3017 }
3018 .info_box span{
3019 margin-left:3px;
3020 margin-righ:3px;
3021 }
3022 .info_box input {
3023 padding:3px 6px;
3024 }
3025
3026 /* -----------------------------------------------------------
3027 TOOLTIP
3028 ----------------------------------------------------------- */
3029 .yui-overlay,.yui-panel-container {
3030 visibility: hidden;
3031 position: absolute;
3032 z-index: 2;
3033 }
3034
3035 .yui-tt {
3036 visibility: hidden;
3037 position: absolute;
3038 color: #666666;
3039 background-color: #FFFFFF;
3040 font-family: arial, helvetica, verdana, sans-serif;
3041 padding: 8px;
3042 border: 2px solid #556CB5;
3043 font: 100% sans-serif;
3044 width: auto;
3045 opacity: 1.0;
3046 }
3047
3048 .yui-tt-shadow {
3049 display: none;
3050 }
3051
3052 /* -----------------------------------------------------------
3053 AUTOCOMPLETE
3054 ----------------------------------------------------------- */
3055
3056 .ac{
3057 vertical-align: top;
3058
3059 }
3060 .ac .match {
3061 font-weight:bold;
3062 }
3063
3064 .ac .yui-ac {
3065 position: relative;
3066 font-family: arial;
3067 font-size: 100%;
3068 }
3069
3070 .ac .perm_ac{
3071 width:15em;
3072 }
3073 /* styles for input field */
3074 .ac .yui-ac-input {
3075 width: 100%;
3076 }
3077
3078 /* styles for results container */
3079 .ac .yui-ac-container {
3080 position: absolute;
3081 top: 1.6em;
3082 width: 100%;
3083 }
3084
3085 /* styles for header/body/footer wrapper within container */
3086 .ac .yui-ac-content {
3087 position: absolute;
3088 width: 100%;
3089 border: 1px solid #808080;
3090 background: #fff;
3091 overflow: hidden;
3092 z-index: 9050;
3093 }
3094
3095 /* styles for container shadow */
3096 .ac .yui-ac-shadow {
3097 position: absolute;
3098 margin: .3em;
3099 width: 100%;
3100 background: #000;
3101 -moz-opacity: 0.10;
3102 opacity: .10;
3103 filter: alpha(opacity = 10);
3104 z-index: 9049;
3105 }
3106
3107 /* styles for results list */
3108 .ac .yui-ac-content ul {
3109 margin: 0;
3110 padding: 0;
3111 width: 100%;
3112 }
3113
3114 /* styles for result item */
3115 .ac .yui-ac-content li {
3116 margin: 0;
3117 padding: 2px 5px;
3118 cursor: default;
3119 white-space: nowrap;
3120 }
3121
3122 /* styles for prehighlighted result item */
3123 .ac .yui-ac-content li.yui-ac-prehighlight {
3124 background: #B3D4FF;
3125 }
3126
3127 /* styles for highlighted result item */
3128 .ac .yui-ac-content li.yui-ac-highlight {
3129 background: #556CB5;
3130 color: #FFF;
3131 }
3132
3133
3134 /* -----------------------------------------------------------
3135 ACTION ICONS
3136 ----------------------------------------------------------- */
3137 .add_icon {
3138 background: url("/images/icons/add.png") no-repeat scroll 3px ;
3139 height: 16px;
3140 padding-left: 20px;
3141 padding-top: 1px;
3142 text-align: left;
3143 }
3144
3145 .edit_icon {
3146 background: url("/images/icons/folder_edit.png") no-repeat scroll 3px;
3147 height: 16px;
3148 padding-left: 20px;
3149 padding-top: 1px;
3150 text-align: left;
3151 }
3152
3153 .delete_icon {
3154 background: url("/images/icons/delete.png") no-repeat scroll 3px;
3155 height: 16px;
3156 padding-left: 20px;
3157 padding-top: 1px;
3158 text-align: left;
3159 }
3160
3161 .rss_icon {
3162 background: url("/images/icons/rss_16.png") no-repeat scroll 3px;
3163 height: 16px;
3164 padding-left: 20px;
3165 padding-top: 1px;
3166 text-align: left;
3167 }
3168
3169 .atom_icon {
3170 background: url("/images/icons/atom.png") no-repeat scroll 3px;
3171 height: 16px;
3172 padding-left: 20px;
3173 padding-top: 1px;
3174 text-align: left;
3175 }
3176
3177 .archive_icon {
3178 background: url("/images/icons/compress.png") no-repeat scroll 3px;
3179 height: 16px;
3180 padding-left: 20px;
3181 text-align: left;
3182 padding-top: 1px;
3183 }
3184
3185
3186
3187
3188 .action_button {
3189 border: 0px;
3190 display: block;
3191 }
3192
3193 .action_button:hover {
3194 border: 0px;
3195 font-style: italic;
3196 cursor: pointer;
3197 }
3198
3199 /* -----------------------------------------------------------
3200 BREADCRUMBS
3201 ----------------------------------------------------------- */
3202
3203 .breadcrumbs{
3204 border:medium none;
3205 color:#FFFFFF;
3206 float:left;
3207 margin:0;
3208 padding:11px 0 11px 10px;
3209 text-transform:uppercase;
3210 font-weight: bold;
3211 font-size: 14px;
3212 }
3213 .breadcrumbs a{
3214 color: #FFFFFF;
3215 }
3216
3217
3218 /* -----------------------------------------------------------
3219 FLASH MSG
3220 ----------------------------------------------------------- */
3221 .flash_msg ul {
3222 margin: 0;
3223 padding: 0px 0px 10px 0px;
3224 }
3225
3226 .error_msg {
3227 background-color: #FFCFCF;
3228 background-image: url("/images/icons/error_msg.png");
3229 border: 1px solid #FF9595;
3230 color: #CC3300;
3231 }
3232
3233 .warning_msg {
3234 background-color: #FFFBCC;
3235 background-image: url("/images/icons/warning_msg.png");
3236 border: 1px solid #FFF35E;
3237 color: #C69E00;
3238 }
3239
3240 .success_msg {
3241 background-color: #D5FFCF;
3242 background-image: url("/images/icons/success_msg.png");
3243 border: 1px solid #97FF88;
3244 color: #009900;
3245 }
3246
3247 .notice_msg {
3248 background-color: #DCE3FF;
3249 background-image: url("/images/icons/notice_msg.png");
3250 border: 1px solid #93A8FF;
3251 color: #556CB5;
3252 }
3253
3254 .success_msg,.error_msg,.notice_msg,.warning_msg {
3255 background-position: 10px center;
3256 background-repeat: no-repeat;
3257 font-size: 12px;
3258 font-weight: bold;
3259 min-height: 14px;
3260 line-height: 14px;
3261 margin-bottom: 0px;
3262 margin-top: 0px;
3263 padding: 6px 10px 6px 40px;
3264 display: block;
3265 overflow: auto;
3266 }
3267
3268 #msg_close {
3269 background: transparent url("icons/cross_grey_small.png") no-repeat
3270 scroll 0 0;
3271 cursor: pointer;
3272 height: 16px;
3273 position: absolute;
3274 right: 5px;
3275 top: 5px;
3276 width: 16px;
3277 }
3278 /* -----------------------------------------------------------
3279 YUI FLOT
3280 ----------------------------------------------------------- */
3281
3282 div#commit_history{
3283 float: left;
3284 }
3285 div#legend_data{
3286 float:left;
3287
3288 }
3289 div#legend_container {
3290 float: left;
3291 }
3292
3293 div#legend_container table,div#legend_choices table{
3294 width:auto !important;
3295 }
3296
3297 div#legend_container table td{
3298 border: none !important;
3299 padding: 2px !important;
3300 }
3301
3302 div#legend_choices table td{
3303 border: none !important;
3304 padding: 0px !important;
3305 }
3306
3307 div#legend_choices{
3308 float:left;
3309 }
3310
3311 /* -----------------------------------------------------------
3312 PERMISSIONS TABLE
3313 ----------------------------------------------------------- */
3314 table#permissions_manage{
3315 width: 0 !important;
3316
3317 }
3318 table#permissions_manage span.private_repo_msg{
3319 style="font-size: 0.8em"
3320 }
3321 table#permissions_manage tr#add_perm_input td{
3322 vertical-align:middle;
3323
3324 }
3325
3326
3327 /* -----------------------------------------------------------
3328 jquery ui
3329 ----------------------------------------------------------- */
3330
3331 .ui-helper-hidden { display: none; }
3332 .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
3333 .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
3334
3335 /* -----------------------------------------------------------
3336 jquery ui -> icons
3337 ----------------------------------------------------------- */
3338
3339 .ui-icon { width: 16px; height: 16px; background-image: url(../images/ui/ui-icons_222222_256x240.png); }
3340 .ui-widget-content .ui-icon {background-image: url(../images/ui/ui-icons_222222_256x240.png); }
3341 .ui-widget-header .ui-icon {background-image: url(../images/ui/ui-icons_222222_256x240.png); }
3342 .ui-state-default .ui-icon { background-image: url(../images/ui/ui-icons_ef8c08_256x240.png); }
3343 .ui-state-hover .ui-icon, .ui-state-focus .ui-icon { background-image: url(../images/ui/ui-icons_ef8c08_256x240.png); }
3344 .ui-state-active .ui-icon {background-image: url(../images/ui/ui-icons_ef8c08_256x240.png); }
3345 .ui-state-highlight .ui-icon {background-image: url(../images/ui/ui-icons_228ef1_256x240.png); }
3346 .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../images/ui/ui-icons_ffd27a_256x240.png); }
3347
3348 /* -----------------------------------------------------------
3349 jquery ui -> icon positioning
3350 ----------------------------------------------------------- */
3351 .ui-icon-carat-1-n { background-position: 0 0; }
3352 .ui-icon-carat-1-ne { background-position: -16px 0; }
3353 .ui-icon-carat-1-e { background-position: -32px 0; }
3354 .ui-icon-carat-1-se { background-position: -48px 0; }
3355 .ui-icon-carat-1-s { background-position: -64px 0; }
3356 .ui-icon-carat-1-sw { background-position: -80px 0; }
3357 .ui-icon-carat-1-w { background-position: -96px 0; }
3358 .ui-icon-carat-1-nw { background-position: -112px 0; }
3359 .ui-icon-carat-2-n-s { background-position: -128px 0; }
3360 .ui-icon-carat-2-e-w { background-position: -144px 0; }
3361 .ui-icon-triangle-1-n { background-position: 0 -16px; }
3362 .ui-icon-triangle-1-ne { background-position: -16px -16px; }
3363 .ui-icon-triangle-1-e { background-position: -32px -16px; }
3364 .ui-icon-triangle-1-se { background-position: -48px -16px; }
3365 .ui-icon-triangle-1-s { background-position: -64px -16px; }
3366 .ui-icon-triangle-1-sw { background-position: -80px -16px; }
3367 .ui-icon-triangle-1-w { background-position: -96px -16px; }
3368 .ui-icon-triangle-1-nw { background-position: -112px -16px; }
3369 .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
3370 .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
3371 .ui-icon-arrow-1-n { background-position: 0 -32px; }
3372 .ui-icon-arrow-1-ne { background-position: -16px -32px; }
3373 .ui-icon-arrow-1-e { background-position: -32px -32px; }
3374 .ui-icon-arrow-1-se { background-position: -48px -32px; }
3375 .ui-icon-arrow-1-s { background-position: -64px -32px; }
3376 .ui-icon-arrow-1-sw { background-position: -80px -32px; }
3377 .ui-icon-arrow-1-w { background-position: -96px -32px; }
3378 .ui-icon-arrow-1-nw { background-position: -112px -32px; }
3379 .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
3380 .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
3381 .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
3382 .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
3383 .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
3384 .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
3385 .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
3386 .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
3387 .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
3388 .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
3389 .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
3390 .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
3391 .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
3392 .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
3393 .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
3394 .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
3395 .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
3396 .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
3397 .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
3398 .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
3399 .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
3400 .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
3401 .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
3402 .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
3403 .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
3404 .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
3405 .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
3406 .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
3407 .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
3408 .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
3409 .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
3410 .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
3411 .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
3412 .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
3413 .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
3414 .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
3415 .ui-icon-arrow-4 { background-position: 0 -80px; }
3416 .ui-icon-arrow-4-diag { background-position: -16px -80px; }
3417 .ui-icon-extlink { background-position: -32px -80px; }
3418 .ui-icon-newwin { background-position: -48px -80px; }
3419 .ui-icon-refresh { background-position: -64px -80px; }
3420 .ui-icon-shuffle { background-position: -80px -80px; }
3421 .ui-icon-transfer-e-w { background-position: -96px -80px; }
3422 .ui-icon-transferthick-e-w { background-position: -112px -80px; }
3423 .ui-icon-folder-collapsed { background-position: 0 -96px; }
3424 .ui-icon-folder-open { background-position: -16px -96px; }
3425 .ui-icon-document { background-position: -32px -96px; }
3426 .ui-icon-document-b { background-position: -48px -96px; }
3427 .ui-icon-note { background-position: -64px -96px; }
3428 .ui-icon-mail-closed { background-position: -80px -96px; }
3429 .ui-icon-mail-open { background-position: -96px -96px; }
3430 .ui-icon-suitcase { background-position: -112px -96px; }
3431 .ui-icon-comment { background-position: -128px -96px; }
3432 .ui-icon-person { background-position: -144px -96px; }
3433 .ui-icon-print { background-position: -160px -96px; }
3434 .ui-icon-trash { background-position: -176px -96px; }
3435 .ui-icon-locked { background-position: -192px -96px; }
3436 .ui-icon-unlocked { background-position: -208px -96px; }
3437 .ui-icon-bookmark { background-position: -224px -96px; }
3438 .ui-icon-tag { background-position: -240px -96px; }
3439 .ui-icon-home { background-position: 0 -112px; }
3440 .ui-icon-flag { background-position: -16px -112px; }
3441 .ui-icon-calendar { background-position: -32px -112px; }
3442 .ui-icon-cart { background-position: -48px -112px; }
3443 .ui-icon-pencil { background-position: -64px -112px; }
3444 .ui-icon-clock { background-position: -80px -112px; }
3445 .ui-icon-disk { background-position: -96px -112px; }
3446 .ui-icon-calculator { background-position: -112px -112px; }
3447 .ui-icon-zoomin { background-position: -128px -112px; }
3448 .ui-icon-zoomout { background-position: -144px -112px; }
3449 .ui-icon-search { background-position: -160px -112px; }
3450 .ui-icon-wrench { background-position: -176px -112px; }
3451 .ui-icon-gear { background-position: -192px -112px; }
3452 .ui-icon-heart { background-position: -208px -112px; }
3453 .ui-icon-star { background-position: -224px -112px; }
3454 .ui-icon-link { background-position: -240px -112px; }
3455 .ui-icon-cancel { background-position: 0 -128px; }
3456 .ui-icon-plus { background-position: -16px -128px; }
3457 .ui-icon-plusthick { background-position: -32px -128px; }
3458 .ui-icon-minus { background-position: -48px -128px; }
3459 .ui-icon-minusthick { background-position: -64px -128px; }
3460 .ui-icon-close { background-position: -80px -128px; }
3461 .ui-icon-closethick { background-position: -96px -128px; }
3462 .ui-icon-key { background-position: -112px -128px; }
3463 .ui-icon-lightbulb { background-position: -128px -128px; }
3464 .ui-icon-scissors { background-position: -144px -128px; }
3465 .ui-icon-clipboard { background-position: -160px -128px; }
3466 .ui-icon-copy { background-position: -176px -128px; }
3467 .ui-icon-contact { background-position: -192px -128px; }
3468 .ui-icon-image { background-position: -208px -128px; }
3469 .ui-icon-video { background-position: -224px -128px; }
3470 .ui-icon-script { background-position: -240px -128px; }
3471 .ui-icon-alert { background-position: 0 -144px; }
3472 .ui-icon-info { background-position: -16px -144px; }
3473 .ui-icon-notice { background-position: -32px -144px; }
3474 .ui-icon-help { background-position: -48px -144px; }
3475 .ui-icon-check { background-position: -64px -144px; }
3476 .ui-icon-bullet { background-position: -80px -144px; }
3477 .ui-icon-radio-off { background-position: -96px -144px; }
3478 .ui-icon-radio-on { background-position: -112px -144px; }
3479 .ui-icon-pin-w { background-position: -128px -144px; }
3480 .ui-icon-pin-s { background-position: -144px -144px; }
3481 .ui-icon-play { background-position: 0 -160px; }
3482 .ui-icon-pause { background-position: -16px -160px; }
3483 .ui-icon-seek-next { background-position: -32px -160px; }
3484 .ui-icon-seek-prev { background-position: -48px -160px; }
3485 .ui-icon-seek-end { background-position: -64px -160px; }
3486 .ui-icon-seek-start { background-position: -80px -160px; }
3487 /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
3488 .ui-icon-seek-first { background-position: -80px -160px; }
3489 .ui-icon-stop { background-position: -96px -160px; }
3490 .ui-icon-eject { background-position: -112px -160px; }
3491 .ui-icon-volume-off { background-position: -128px -160px; }
3492 .ui-icon-volume-on { background-position: -144px -160px; }
3493 .ui-icon-power { background-position: 0 -176px; }
3494 .ui-icon-signal-diag { background-position: -16px -176px; }
3495 .ui-icon-signal { background-position: -32px -176px; }
3496 .ui-icon-battery-0 { background-position: -48px -176px; }
3497 .ui-icon-battery-1 { background-position: -64px -176px; }
3498 .ui-icon-battery-2 { background-position: -80px -176px; }
3499 .ui-icon-battery-3 { background-position: -96px -176px; }
3500 .ui-icon-circle-plus { background-position: 0 -192px; }
3501 .ui-icon-circle-minus { background-position: -16px -192px; }
3502 .ui-icon-circle-close { background-position: -32px -192px; }
3503 .ui-icon-circle-triangle-e { background-position: -48px -192px; }
3504 .ui-icon-circle-triangle-s { background-position: -64px -192px; }
3505 .ui-icon-circle-triangle-w { background-position: -80px -192px; }
3506 .ui-icon-circle-triangle-n { background-position: -96px -192px; }
3507 .ui-icon-circle-arrow-e { background-position: -112px -192px; }
3508 .ui-icon-circle-arrow-s { background-position: -128px -192px; }
3509 .ui-icon-circle-arrow-w { background-position: -144px -192px; }
3510 .ui-icon-circle-arrow-n { background-position: -160px -192px; }
3511 .ui-icon-circle-zoomin { background-position: -176px -192px; }
3512 .ui-icon-circle-zoomout { background-position: -192px -192px; }
3513 .ui-icon-circle-check { background-position: -208px -192px; }
3514 .ui-icon-circlesmall-plus { background-position: 0 -208px; }
3515 .ui-icon-circlesmall-minus { background-position: -16px -208px; }
3516 .ui-icon-circlesmall-close { background-position: -32px -208px; }
3517 .ui-icon-squaresmall-plus { background-position: -48px -208px; }
3518 .ui-icon-squaresmall-minus { background-position: -64px -208px; }
3519 .ui-icon-squaresmall-close { background-position: -80px -208px; }
3520 .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
3521 .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
3522 .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
3523 .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
3524 .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
3525 .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
3526
3527 /* -----------------------------------------------------------
3528 jquery ui -> tabs
3529 ----------------------------------------------------------- */
3530 .ui-tabs .ui-tabs-hide { display: none; }
3531
3532 /* -----------------------------------------------------------
3533 jquery ui -> datepicker
3534 ----------------------------------------------------------- */
3535 .ui-datepicker { width: 17em; padding: .2em .2em 0; background: #FFFFFF; border: 1px solid #000000; border-top: none; }
3536 .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; background: #F6F6F6; }
3537 .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 1px; width: 1.8em; height: 1.8em; }
3538 .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
3539 .ui-datepicker .ui-datepicker-prev { left: 0; }
3540 .ui-datepicker .ui-datepicker-next { right: 0; }
3541 .ui-datepicker .ui-datepicker-prev-hover { left: 0; }
3542 .ui-datepicker .ui-datepicker-next-hover { right: 0; }
3543 .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
3544 .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
3545 .ui-datepicker .ui-datepicker-title select { margin:1px 0; }
3546 .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
3547 .ui-datepicker select.ui-datepicker-month,
3548 .ui-datepicker select.ui-datepicker-year { width: 49%;}
3549 .ui-datepicker table {width: 100%; border-collapse: collapse; margin:0 0 .4em; }
3550 .ui-datepicker th { padding: .7em .3em; text-align: center; border: 0; }
3551 .ui-datepicker td { border: 0; padding: 1px; }
3552 .ui-datepicker td span, .ui-datepicker td a { display: block; padding: 3px; text-align: center; text-decoration: none; }
3553 .ui-datepicker td span, .ui-datepicker td a:hover { background: #376ea6; color: #ffffff; }
3554 .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
3555 .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
3556 .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
3557 .ui-datepicker td span, .ui-datepicker td.ui-datepicker-today a { background: #DDDDDD; color: #585858; }
3558 .ui-datepicker td span, .ui-datepicker td.ui-datepicker-current-day a { background: #376ea6; color: #ffffff; }
3559
3560 /* -----------------------------------------------------------
3561 jquery ui -> datepicker / multiple calenders
3562 ----------------------------------------------------------- */
3563 .ui-datepicker.ui-datepicker-multi { width:auto; }
3564 .ui-datepicker-multi .ui-datepicker-group { float:left; }
3565 .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
3566 .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
3567 .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
3568 .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
3569 .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
3570 .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
3571 .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
3572 .ui-datepicker-row-break { clear:both; width:100%; }
3573
3574 /* -----------------------------------------------------------
3575 jquery ui -> datepicker / rtl support
3576 ----------------------------------------------------------- */
3577 .ui-datepicker-rtl { direction: rtl; }
3578 .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
3579 .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
3580 .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
3581 .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
3582 .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
3583 .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
3584 .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
3585 .ui-datepicker-rtl .ui-datepicker-group { float:right; }
3586 .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
3587 .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
3588
3589 /* -----------------------------------------------------------
3590 jquery ui -> select styling
3591 ----------------------------------------------------------- */
3592
3593 .ui-selectmenu
3594 {
3595 display: block;
3596 position: relative;
3597 overflow: hidden;
3598 background: #ffffff;
3599 border-top: 1px solid #b3b3b3;
3600 border-left: 1px solid #b3b3b3;
3601 border-right: 1px solid #eaeaea;
3602 border-bottom: 1px solid #eaeaea;
3603 text-align: left;
3604 text-decoration: none;
3605 }
3606
3607 .ui-selectmenu-icon { position:absolute; right:6px; margin-top:-8px; top: 50%; }
3608 .ui-selectmenu-menu { padding:0; margin:0; list-style:none; position:absolute; top: 0; visibility: hidden; overflow: auto; }
3609 .ui-selectmenu-open { background: #ffffff; border: 1px solid #666666; border-top: none; visibility: visible; }
3610 .ui-selectmenu-menu-popup { margin-top: -1px; }
3611 .ui-selectmenu-menu-dropdown { }
3612 .ui-selectmenu-menu li { padding:0; margin:0; display: block; border-top: 1px dotted transparent; border-bottom: 1px dotted transparent; border-right-width: 0 !important; border-left-width: 0 !important; }
3613 .ui-selectmenu-menu li a,.ui-selectmenu-status {line-height: 1.4em; display:block; padding: 5px 0 5px 8px; outline:none; text-decoration:none; color: #000000; }
3614 .ui-selectmenu-menu li.ui-selectmenu-hasIcon a,
3615 .ui-selectmenu-hasIcon .ui-selectmenu-status { margin-left: 5px; padding-left: 20px; position: relative; }
3616 .ui-selectmenu-menu li .ui-icon, .ui-selectmenu-status .ui-icon { position: absolute; top: 1em; margin-top: -8px; left: 0; }
3617 .ui-selectmenu-status { line-height: 1.4em; }
3618 .ui-selectmenu-open li.ui-selectmenu-item-focus { background: #376ea6; }
3619 .ui-selectmenu-open li.ui-selectmenu-item-focus a { color: #ffffff; }
3620 .ui-selectmenu-open li.ui-selectmenu-item-selected { background: #dfdfdf; }
3621 .ui-selectmenu-open li.ui-selectmenu-item-selected a { color: #000000; }
3622 .ui-selectmenu-menu li span,.ui-selectmenu-status span { display:block; margin-bottom: .2em; }
3623 .ui-selectmenu-menu .ui-selectmenu-group .ui-selectmenu-group-label { line-height: 1.4em; display:block; padding:.6em .5em 0; }
3624 .ui-selectmenu-menu .ui-selectmenu-group ul { margin: 0; padding: 0; } No newline at end of file
@@ -0,0 +1,36 b''
1 /* -----------------------------------------------------------
2 content
3 ----------------------------------------------------------- */
4
5 #content
6 {
7 margin: 10px 60px 0 60px;
8 padding: 0;
9 min-height: 100%;
10 clear: both;
11 overflow: hidden;
12 background: transparent;
13 }
14
15 /* -----------------------------------------------------------
16 content -> right -> forms -> labels
17 ----------------------------------------------------------- */
18
19 #content div.box div.form div.fields div.field div.label
20 {
21 left: 80px;
22 margin: 0;
23 padding: 8px 0 0 5px;
24 width: auto;
25 position: absolute;
26 }
27
28 #content div.box-left div.form div.fields div.field div.label,
29 #content div.box-right div.form div.fields div.field div.label
30 {
31 left: 0;
32 margin: 0;
33 padding: 0 0 8px 0;
34 width: auto;
35 position: relative;
36 } No newline at end of file
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,1 b''
1 if(!document.createElement("canvas").getContext){(function(){var R=Math;var S=R.round;var O=R.sin;var a=R.cos;var J=R.abs;var Y=R.sqrt;var A=10;var K=A/2;function G(){return this.context_||(this.context_=new M(this))}var Q=Array.prototype.slice;function b(c,d,e){var Z=Q.call(arguments,2);return function(){return c.apply(d,Z.concat(Q.call(arguments)))}}var H={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var c=Z||document;c.createElement("canvas");c.attachEvent("onreadystatechange",b(this.init_,this,c))}},init_:function(e){if(!e.namespaces.g_vml_){e.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!e.namespaces.g_o_){e.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!e.styleSheets.ex_canvas_){var d=e.createStyleSheet();d.owningElement.id="ex_canvas_";d.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=e.getElementsByTagName("canvas");for(var Z=0;Z<c.length;Z++){this.initElement(c[Z])}},initElement:function(c){if(!c.getContext){c.getContext=G;c.innerHTML="";c.attachEvent("onpropertychange",X);c.attachEvent("onresize",B);var Z=c.attributes;if(Z.width&&Z.width.specified){c.style.width=Z.width.nodeValue+"px"}else{c.width=c.clientWidth}if(Z.height&&Z.height.specified){c.style.height=Z.height.nodeValue+"px"}else{c.height=c.clientHeight}}return c}};function X(c){var Z=c.srcElement;switch(c.propertyName){case"width":Z.style.width=Z.attributes.width.nodeValue+"px";Z.getContext().clearRect();break;case"height":Z.style.height=Z.attributes.height.nodeValue+"px";Z.getContext().clearRect();break}}function B(c){var Z=c.srcElement;if(Z.firstChild){Z.firstChild.style.width=Z.clientWidth+"px";Z.firstChild.style.height=Z.clientHeight+"px"}}H.init();var E=[];for(var V=0;V<16;V++){for(var U=0;U<16;U++){E[V*16+U]=V.toString(16)+U.toString(16)}}function N(){return[[1,0,0],[0,1,0],[0,0,1]]}function D(e,d){var c=N();for(var Z=0;Z<3;Z++){for(var h=0;h<3;h++){var f=0;for(var g=0;g<3;g++){f+=e[Z][g]*d[g][h]}c[Z][h]=f}}return c}function T(c,Z){Z.fillStyle=c.fillStyle;Z.lineCap=c.lineCap;Z.lineJoin=c.lineJoin;Z.lineWidth=c.lineWidth;Z.miterLimit=c.miterLimit;Z.shadowBlur=c.shadowBlur;Z.shadowColor=c.shadowColor;Z.shadowOffsetX=c.shadowOffsetX;Z.shadowOffsetY=c.shadowOffsetY;Z.strokeStyle=c.strokeStyle;Z.globalAlpha=c.globalAlpha;Z.arcScaleX_=c.arcScaleX_;Z.arcScaleY_=c.arcScaleY_;Z.lineScale_=c.lineScale_}function C(c){var f,e=1;c=String(c);if(c.substring(0,3)=="rgb"){var h=c.indexOf("(",3);var Z=c.indexOf(")",h+1);var g=c.substring(h+1,Z).split(",");f="#";for(var d=0;d<3;d++){f+=E[Number(g[d])]}if(g.length==4&&c.substr(3,1)=="a"){e=g[3]}}else{f=c}return{color:f,alpha:e}}function P(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function M(c){this.m_=N();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=A*1;this.globalAlpha=1;this.canvas=c;var Z=c.ownerDocument.createElement("div");Z.style.width=c.clientWidth+"px";Z.style.height=c.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";c.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var I=M.prototype;I.clearRect=function(){this.element_.innerHTML=""};I.beginPath=function(){this.currentPath_=[]};I.moveTo=function(c,Z){var d=this.getCoords_(c,Z);this.currentPath_.push({type:"moveTo",x:d.x,y:d.y});this.currentX_=d.x;this.currentY_=d.y};I.lineTo=function(c,Z){var d=this.getCoords_(c,Z);this.currentPath_.push({type:"lineTo",x:d.x,y:d.y});this.currentX_=d.x;this.currentY_=d.y};I.bezierCurveTo=function(d,c,j,i,h,f){var Z=this.getCoords_(h,f);var g=this.getCoords_(d,c);var e=this.getCoords_(j,i);L(this,g,e,Z)};function L(Z,e,d,c){Z.currentPath_.push({type:"bezierCurveTo",cp1x:e.x,cp1y:e.y,cp2x:d.x,cp2y:d.y,x:c.x,y:c.y});Z.currentX_=c.x;Z.currentY_=c.y}I.quadraticCurveTo=function(h,d,c,Z){var g=this.getCoords_(h,d);var f=this.getCoords_(c,Z);var i={x:this.currentX_+2/3*(g.x-this.currentX_),y:this.currentY_+2/3*(g.y-this.currentY_)};var e={x:i.x+(f.x-this.currentX_)/3,y:i.y+(f.y-this.currentY_)/3};L(this,i,e,f)};I.arc=function(k,i,j,f,c,d){j*=A;var o=d?"at":"wa";var l=k+a(f)*j-K;var n=i+O(f)*j-K;var Z=k+a(c)*j-K;var m=i+O(c)*j-K;if(l==Z&&!d){l+=0.125}var e=this.getCoords_(k,i);var h=this.getCoords_(l,n);var g=this.getCoords_(Z,m);this.currentPath_.push({type:o,x:e.x,y:e.y,radius:j,xStart:h.x,yStart:h.y,xEnd:g.x,yEnd:g.y})};I.rect=function(d,c,Z,e){this.moveTo(d,c);this.lineTo(d+Z,c);this.lineTo(d+Z,c+e);this.lineTo(d,c+e);this.closePath()};I.strokeRect=function(d,c,Z,e){var f=this.currentPath_;this.beginPath();this.moveTo(d,c);this.lineTo(d+Z,c);this.lineTo(d+Z,c+e);this.lineTo(d,c+e);this.closePath();this.stroke();this.currentPath_=f};I.fillRect=function(d,c,Z,e){var f=this.currentPath_;this.beginPath();this.moveTo(d,c);this.lineTo(d+Z,c);this.lineTo(d+Z,c+e);this.lineTo(d,c+e);this.closePath();this.fill();this.currentPath_=f};I.createLinearGradient=function(c,e,Z,d){var f=new W("gradient");f.x0_=c;f.y0_=e;f.x1_=Z;f.y1_=d;return f};I.createRadialGradient=function(e,g,d,c,f,Z){var h=new W("gradientradial");h.x0_=e;h.y0_=g;h.r0_=d;h.x1_=c;h.y1_=f;h.r1_=Z;return h};I.drawImage=function(s,e){var l,j,n,AA,q,o,u,AC;var m=s.runtimeStyle.width;var r=s.runtimeStyle.height;s.runtimeStyle.width="auto";s.runtimeStyle.height="auto";var k=s.width;var y=s.height;s.runtimeStyle.width=m;s.runtimeStyle.height=r;if(arguments.length==3){l=arguments[1];j=arguments[2];q=o=0;u=n=k;AC=AA=y}else{if(arguments.length==5){l=arguments[1];j=arguments[2];n=arguments[3];AA=arguments[4];q=o=0;u=k;AC=y}else{if(arguments.length==9){q=arguments[1];o=arguments[2];u=arguments[3];AC=arguments[4];l=arguments[5];j=arguments[6];n=arguments[7];AA=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AB=this.getCoords_(l,j);var f=u/2;var c=AC/2;var z=[];var Z=10;var i=10;z.push(" <g_vml_:group",' coordsize="',A*Z,",",A*i,'"',' coordorigin="0,0"',' style="width:',Z,"px;height:",i,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var g=[];g.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",S(AB.x/A),",","Dy=",S(AB.y/A),"");var x=AB;var v=this.getCoords_(l+n,j);var t=this.getCoords_(l,j+AA);var p=this.getCoords_(l+n,j+AA);x.x=R.max(x.x,v.x,t.x,p.x);x.y=R.max(x.y,v.y,t.y,p.y);z.push("padding:0 ",S(x.x/A),"px ",S(x.y/A),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",g.join(""),", sizingmethod='clip');")}else{z.push("top:",S(AB.y/A),"px;left:",S(AB.x/A),"px;")}z.push(' ">','<g_vml_:image src="',s.src,'"',' style="width:',A*n,"px;"," height:",A*AA,'px;"',' cropleft="',q/k,'"',' croptop="',o/y,'"',' cropright="',(k-q-u)/k,'"',' cropbottom="',(y-o-AC)/y,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",z.join(""))};I.stroke=function(AE){var j=[];var k=false;var AP=C(AE?this.fillStyle:this.strokeStyle);var AA=AP.color;var AK=AP.alpha*this.globalAlpha;var f=10;var m=10;j.push("<g_vml_:shape",' filled="',!!AE,'"',' style="position:absolute;width:',f,"px;height:",m,'px;"',' coordorigin="0 0" coordsize="',A*f," ",A*m,'"',' stroked="',!AE,'"',' path="');var l=false;var AO={x:null,y:null};var w={x:null,y:null};for(var AJ=0;AJ<this.currentPath_.length;AJ++){var AI=this.currentPath_[AJ];var AN;switch(AI.type){case"moveTo":AN=AI;j.push(" m ",S(AI.x),",",S(AI.y));break;case"lineTo":j.push(" l ",S(AI.x),",",S(AI.y));break;case"close":j.push(" x ");AI=null;break;case"bezierCurveTo":j.push(" c ",S(AI.cp1x),",",S(AI.cp1y),",",S(AI.cp2x),",",S(AI.cp2y),",",S(AI.x),",",S(AI.y));break;case"at":case"wa":j.push(" ",AI.type," ",S(AI.x-this.arcScaleX_*AI.radius),",",S(AI.y-this.arcScaleY_*AI.radius)," ",S(AI.x+this.arcScaleX_*AI.radius),",",S(AI.y+this.arcScaleY_*AI.radius)," ",S(AI.xStart),",",S(AI.yStart)," ",S(AI.xEnd),",",S(AI.yEnd));break}if(AI){if(AO.x==null||AI.x<AO.x){AO.x=AI.x}if(w.x==null||AI.x>w.x){w.x=AI.x}if(AO.y==null||AI.y<AO.y){AO.y=AI.y}if(w.y==null||AI.y>w.y){w.y=AI.y}}}j.push(' ">');if(!AE){var v=this.lineScale_*this.lineWidth;if(v<1){AK*=v}j.push("<g_vml_:stroke",' opacity="',AK,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',P(this.lineCap),'"',' weight="',v,'px"',' color="',AA,'" />')}else{if(typeof this.fillStyle=="object"){var n=this.fillStyle;var t=0;var AH={x:0,y:0};var AB=0;var r=1;if(n.type_=="gradient"){var q=n.x0_/this.arcScaleX_;var d=n.y0_/this.arcScaleY_;var o=n.x1_/this.arcScaleX_;var AQ=n.y1_/this.arcScaleY_;var AM=this.getCoords_(q,d);var AL=this.getCoords_(o,AQ);var h=AL.x-AM.x;var g=AL.y-AM.y;t=Math.atan2(h,g)*180/Math.PI;if(t<0){t+=360}if(t<0.000001){t=0}}else{var AM=this.getCoords_(n.x0_,n.y0_);var Z=w.x-AO.x;var e=w.y-AO.y;AH={x:(AM.x-AO.x)/Z,y:(AM.y-AO.y)/e};Z/=this.arcScaleX_*A;e/=this.arcScaleY_*A;var AG=R.max(Z,e);AB=2*n.r0_/AG;r=2*n.r1_/AG-AB}var z=n.colors_;z.sort(function(i,c){return i.offset-c.offset});var u=z.length;var y=z[0].color;var x=z[u-1].color;var AD=z[0].alpha*this.globalAlpha;var AC=z[u-1].alpha*this.globalAlpha;var AF=[];for(var AJ=0;AJ<u;AJ++){var s=z[AJ];AF.push(s.offset*r+AB+" "+s.color)}j.push('<g_vml_:fill type="',n.type_,'"',' method="none" focus="100%"',' color="',y,'"',' color2="',x,'"',' colors="',AF.join(","),'"',' opacity="',AC,'"',' g_o_:opacity2="',AD,'"',' angle="',t,'"',' focusposition="',AH.x,",",AH.y,'" />')}else{j.push('<g_vml_:fill color="',AA,'" opacity="',AK,'" />')}}j.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",j.join(""))};I.fill=function(){this.stroke(true)};I.closePath=function(){this.currentPath_.push({type:"close"})};I.getCoords_=function(d,c){var Z=this.m_;return{x:A*(d*Z[0][0]+c*Z[1][0]+Z[2][0])-K,y:A*(d*Z[0][1]+c*Z[1][1]+Z[2][1])-K}};I.save=function(){var Z={};T(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=D(N(),this.m_)};I.restore=function(){T(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};I.translate=function(d,c){var Z=[[1,0,0],[0,1,0],[d,c,1]];this.m_=D(Z,this.m_)};I.rotate=function(d){var f=a(d);var e=O(d);var Z=[[f,e,0],[-e,f,0],[0,0,1]];this.m_=D(Z,this.m_)};I.scale=function(f,e){this.arcScaleX_*=f;this.arcScaleY_*=e;var c=[[f,0,0],[0,e,0],[0,0,1]];var Z=this.m_=D(c,this.m_);var d=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];this.lineScale_=Y(J(d))};I.clip=function(){};I.arcTo=function(){};I.createPattern=function(){return new F};function W(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}W.prototype.addColorStop=function(c,Z){Z=C(Z);this.colors_.push({offset:c,color:Z.color,alpha:Z.alpha})};function F(){}G_vmlCanvasManager=H;CanvasRenderingContext2D=M;CanvasGradient=W;CanvasPattern=F})()}; No newline at end of file
This diff has been collapsed as it changes many lines, (2483 lines changed) Show them Hide them
@@ -0,0 +1,2483 b''
1 /**
2 \file yui.flot.js
3 \brief Javascript plotting library for YUI based on Flot v. 0.5.
4 \details
5 This file contains a port of Flot for YUI
6
7 Copyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights embodied
8 in the content of this file are licenced by Yahoo! Inc. under the BSD (revised)
9 open source license.
10
11 Requires yahoo-dom-event and datasource which you can get here:
12 <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.7.0/build/yahoo-dom-event/yahoo-dom-event.js&2.7.0/build/datasource/datasource-min.js"></script>
13
14 Datasource is optional, you only need it if one of your axes has its mode set to "time"
15 */
16
17 (function() {
18 var L = YAHOO.lang;
19 var UA = YAHOO.env.ua;
20 var DOM = YAHOO.util.Dom;
21 var E = YAHOO.util.Event;
22
23 if(!DOM.createElementFromMarkup) {
24 DOM.createElementFromMarkup = function(markup) {
25 var p=document.createElement('div');
26 p.innerHTML = markup;
27 var e = p.firstChild;
28 return p.removeChild(e);
29 };
30 }
31
32 if(!DOM.removeElement) {
33 DOM.removeElement = function(el) {
34 return el.parentNode.removeChild(el);
35 };
36 }
37
38 function Plot(target_, data_, options_) {
39 // data is on the form:
40 // [ series1, series2 ... ]
41 // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
42 // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label" }
43
44 var series = [],
45 options = {
46 // the color theme used for graphs
47 colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
48 locale: "en",
49 legend: {
50 show: true,
51 noColumns: 1, // number of colums in legend table
52 labelFormatter: null, // fn: string -> string
53 labelBoxBorderColor: "#ccc", // border color for the little label boxes
54 container: null, // container (as jQuery object) to put legend in, null means default on top of graph
55 position: "ne", // position of default legend container within plot
56 margin: 5, // distance from grid edge to default legend container within plot
57 backgroundColor: null, // null means auto-detect
58 backgroundOpacity: 0.85 // set to 0 to avoid background
59 },
60 xaxis: {
61 mode: null, // null or "time"
62 min: null, // min. value to show, null means set automatically
63 max: null, // max. value to show, null means set automatically
64 autoscaleMargin: null, // margin in % to add if auto-setting min/max
65 ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks
66 tickFormatter: null, // fn: number -> string
67 label: null,
68 labelWidth: null, // size of tick labels in pixels
69 labelHeight: null,
70
71 scaleType: 'linear', // may be 'linear' or 'log'
72
73 // mode specific options
74 tickDecimals: null, // no. of decimals, null means auto
75 tickSize: null, // number or [number, "unit"]
76 minTickSize: null, // number or [number, "unit"]
77 timeformat: null // format string to use
78 },
79 yaxis: {
80 label: null,
81 autoscaleMargin: 0.02
82 },
83 x2axis: {
84 label: null,
85 autoscaleMargin: null
86 },
87 y2axis: {
88 label: null,
89 autoscaleMargin: 0.02
90 },
91 points: {
92 show: false,
93 radius: 3,
94 lineWidth: 2, // in pixels
95 fill: true,
96 fillColor: "#ffffff"
97 },
98 lines: {
99 // we don't put in show: false so we can see
100 // whether lines were actively disabled
101 lineWidth: 2, // in pixels
102 fill: false,
103 fillColor: null
104 },
105 bars: {
106 show: false,
107 lineWidth: 2, // in pixels
108 barWidth: 1, // in units of the x axis
109 fill: true,
110 fillColor: null,
111 align: "left" // or "center"
112 },
113 grid: {
114 show: true,
115 showLines: true,
116 color: "#545454", // primary color used for outline and labels
117 backgroundColor: null, // null for transparent, else color
118 tickColor: "#dddddd", // color used for the ticks
119 labelMargin: 5, // in pixels
120 labelFontSize: 16,
121 borderWidth: 2, // in pixels
122 borderColor: null, // set if different from the grid color
123 markings: null, // array of ranges or fn: axes -> array of ranges
124 markingsColor: "#f4f4f4",
125 markingsLineWidth: 2,
126 // interactive stuff
127 clickable: false,
128 hoverable: false,
129 autoHighlight: true, // highlight in case mouse is near
130 mouseActiveRadius: 10 // how far the mouse can be away to activate an item
131 },
132 selection: {
133 mode: null, // one of null, "x", "y" or "xy"
134 color: "#e8cfac"
135 },
136 crosshair: {
137 mode: null, // one of null, "x", "y" or "xy",
138 color: "#aa0000"
139 },
140 shadowSize: 3
141 },
142 canvas = null, // the canvas for the plot itself
143 overlay = null, // canvas for interactive stuff on top of plot
144 eventHolder = null, // jQuery object that events should be bound to
145 ctx = null, octx = null,
146 target = DOM.get(target_),
147 axes = { xaxis: {}, yaxis: {}, x2axis: {}, y2axis: {} },
148 plotOffset = { left: 0, right: 0, top: 0, bottom: 0},
149 canvasWidth = 0, canvasHeight = 0,
150 plotWidth = 0, plotHeight = 0,
151 // dedicated to storing data for buggy standard compliance cases
152 workarounds = {};
153
154 this.setData = setData;
155 this.setupGrid = setupGrid;
156 this.draw = draw;
157 this.clearSelection = clearSelection;
158 this.setSelection = setSelection;
159 this.getCanvas = function() { return canvas; };
160 this.getPlotOffset = function() { return plotOffset; };
161 this.getData = function() { return series; };
162 this.getAxes = function() { return axes; };
163 this.setCrosshair = setCrosshair;
164 this.clearCrosshair = function () { setCrosshair(null); };
165 this.highlight = highlight;
166 this.unhighlight = unhighlight;
167
168 // initialize
169 parseOptions(options_);
170 setData(data_);
171 constructCanvas();
172 setupGrid();
173 draw();
174
175 var plot = this;
176
177 plot.createEvent('plotclick');
178 plot.createEvent('plothover');
179 plot.createEvent('plotselected');
180 plot.createEvent('plotunselected');
181
182
183
184 function setData(d) {
185 series = parseData(d);
186
187 fillInSeriesOptions();
188 processData();
189 }
190
191 function normalizeData(d) {
192 var possible_controls = ['x', 'time', 'date'];
193
194 if (L.isArray(d)) {
195 d = { data: d };
196 } else {
197 d = L.merge(d);
198 }
199
200 if(d.disabled) {
201 return undefined;
202 }
203
204 if (d.data.length === 0) {
205 return undefined;
206 }
207
208 var j, k;
209
210 // Make a copy so we don't obliterate the caller's data
211 var _data = [];
212
213 if (L.isArray(d.data[0])) {
214 for(j=0; j<d.data.length; j++) {
215 if(d.data[j]) {
216 var x = d.data[j][0];
217 var y = d.data[j][1];
218
219 if(L.isObject(x) && x.getTime) x = x.getTime()/1000;
220 else x = parseFloat(x);
221
222 if(L.isObject(y) && y.getTime) y = y.getTime()/1000;
223 else y = parseFloat(y);
224
225 _data.push({ x: x, y: y});
226 } else {
227 _data.push(d.data[j]);
228 }
229 }
230 d.control='x';
231 d.schema='y';
232 } else {
233 for(j=0; j<d.data.length; j++) {
234 _data.push({});
235 for(k in d.data[j]) {
236 if(L.isObject(d.data[j][k]) && d.data[j][k].getTime)
237 _data[j][k] = d.data[j][k].getTime()/1000;
238 else
239 _data[j][k] = parseFloat(d.data[j][k]);
240 }
241 }
242 }
243
244 d.data = _data;
245
246 if (!d.control) {
247 // try to guess the control field
248 for (j=0; j<possible_controls.length; j++) {
249 if(possible_controls[j] in d.data[0]) {
250 d.control = possible_controls[j];
251 break;
252 }
253 }
254 }
255
256 if (!d.schema) {
257 d.schema = [];
258 for(k in d.data[0]) {
259 if(!d.control) {
260 d.control = k;
261 }
262 if(k !== d.control) {
263 d.schema.push(k);
264 }
265 }
266 }
267
268 return L.merge(d, {dropped: []});
269 }
270
271 function markDroppedPoints(s) {
272 var l=s.data.length;
273
274 if(l <= canvasWidth/10 || options.dontDropPoints) { // at least 10px per point
275 return s;
276 }
277
278 var dropperiod = 1-canvasWidth/10/l;
279 var drops = 0;
280 var points = l;
281
282 for(var j=0; j<l; j++) {
283 var x = s.data[j].x;
284 var y = s.data[j].y;
285
286 s.dropped[j] = (drops > 1);
287 if(s.dropped[j]) {
288 drops-=1;
289 }
290
291 if(!isNaN(x) && !isNaN(x))
292 drops+=dropperiod;
293 else {
294 drops=0; // bonus for a null point
295 points--;
296 dropperiod=1-canvasWidth/10/points;
297 }
298 }
299
300 return s;
301 }
302
303 function splitSeries(s) {
304 var res = [];
305
306 for(var k=0; k<s.schema.length; k++) {
307 res[k] = L.merge(s, {data: []});
308 if(s.label && L.isObject(s.label) && s.label[s.schema[k]]) {
309 res[k].label = s.label[s.schema[k]];
310 }
311 if(s.color && L.isObject(s.color) && s.color[s.schema[k]]) {
312 res[k].color = s.color[s.schema[k]];
313 }
314 }
315
316 for(var i=0; i<s.data.length; i++) {
317 var d = s.data[i];
318 for(k=0; k<s.schema.length; k++) {
319 var tuple = { x: d[s.control], y: d[s.schema[k]] };
320 res[k].data.push(tuple);
321 res[k].control='x';
322 res[k].schema='y';
323 }
324 }
325
326 return res;
327 }
328
329 function parseData(d) {
330 if(d.length === 0) {
331 return null;
332 }
333
334 // get the canvas width so we know if we have to drop points
335 canvasWidth = parseInt(DOM.getStyle(target, 'width'), 10);
336
337 // First we normalise the data into a standard format
338 var s, res = [];
339 for (var i = 0; i < d.length; ++i) {
340 s = normalizeData(d[i]);
341 if(typeof s === 'undefined')
342 continue;
343
344 if(L.isArray(s.schema)) {
345 s = splitSeries(s);
346 }
347 else {
348 s = [s];
349 }
350
351 for(var k=0; k<s.length; k++) {
352 s[k] = markDroppedPoints(s[k]);
353 res.push(s[k]);
354 }
355 }
356
357 return res;
358 }
359
360 function parseOptions(o) {
361 if (options.grid.borderColor == null)
362 options.grid.borderColor = options.grid.color;
363
364 if(typeof o === 'undefined') {
365 return;
366 }
367 o = YAHOO.lang.merge(o);
368 for(var k in o) {
369 if(L.isObject(o[k]) && L.isObject(options[k])) {
370 L.augmentObject(options[k], o[k], true);
371 delete o[k];
372 }
373 }
374 L.augmentObject(options, o, true);
375 }
376
377 function fillInSeriesOptions() {
378 var i;
379
380 // collect what we already got of colors
381 var neededColors = series.length,
382 usedColors = [],
383 assignedColors = [];
384 for (i = 0; i < series.length; ++i) {
385 var sc = series[i].color;
386 if (sc != null) {
387 --neededColors;
388 if (typeof sc == "number")
389 assignedColors.push(sc);
390 else
391 usedColors.push(parseColor(series[i].color));
392 }
393 }
394
395 // we might need to generate more colors if higher indices
396 // are assigned
397 for (i = 0; i < assignedColors.length; ++i) {
398 neededColors = Math.max(neededColors, assignedColors[i] + 1);
399 }
400
401 // produce colors as needed
402 var colors = [], variation = 0;
403 i = 0;
404 while (colors.length < neededColors) {
405 var c;
406 if (options.colors.length == i) // check degenerate case
407 c = new Color(100, 100, 100);
408 else
409 c = parseColor(options.colors[i]);
410
411 // vary color if needed
412 var sign = variation % 2 == 1 ? -1 : 1;
413 var factor = 1 + sign * Math.ceil(variation / 2) * 0.2;
414 c.scale(factor, factor, factor);
415
416 // FIXME: if we're getting too close to something else,
417 // we should probably skip this one
418 colors.push(c);
419
420 ++i;
421 if (i >= options.colors.length) {
422 i = 0;
423 ++variation;
424 }
425 }
426
427 // fill in the options
428 var colori = 0, s;
429 for (i = 0; i < series.length; ++i) {
430 s = series[i];
431
432 // assign colors
433 if (s.color == null) {
434 s.color = colors[colori].toString();
435 ++colori;
436 }
437 else if (typeof s.color == "number")
438 s.color = colors[s.color].toString();
439
440 // copy the rest
441 s.lines = L.merge(options.lines, s.lines || {});
442 s.points = L.merge(options.points, s.points || {});
443 s.bars = L.merge(options.bars, s.bars || {});
444
445 // turn on lines automatically in case nothing is set
446 if (s.lines.show == null && !s.bars.show && !s.points.show)
447 s.lines.show = true;
448
449 if (s.shadowSize == null)
450 s.shadowSize = options.shadowSize;
451
452 if (s.xaxis && s.xaxis == 2)
453 s.xaxis = axes.x2axis;
454 else
455 s.xaxis = axes.xaxis;
456 if (s.yaxis && s.yaxis >= 2) {
457 if(!axes['y' + s.yaxis + 'axis'])
458 axes['y' + s.yaxis + 'axis'] = {};
459 if(!options['y' + s.yaxis + 'axis'])
460 options['y' + s.yaxis + 'axis'] = { autoscaleMargin: 0.02 };
461 s.yaxis = axes['y' + s.yaxis + 'axis'];
462 }
463 else
464 s.yaxis = axes.yaxis;
465 }
466 }
467
468 function processData() {
469 var topSentry = Number.POSITIVE_INFINITY,
470 bottomSentry = Number.NEGATIVE_INFINITY,
471 axis;
472
473 for (axis in axes) {
474 axes[axis].datamin = topSentry;
475 axes[axis].datamax = bottomSentry;
476 axes[axis].min = options[axis].min;
477 axes[axis].max = options[axis].max;
478 axes[axis].used = false;
479 }
480
481 for (var i = 0; i < series.length; ++i) {
482 var s = series[i];
483 var data = s.data,
484 axisx = s.xaxis, axisy = s.yaxis,
485 xmin = topSentry, xmax = bottomSentry,
486 ymin = topSentry, ymax = bottomSentry,
487 x, y, p;
488
489 axisx.used = axisy.used = true;
490
491 if (s.bars.show) {
492 // make sure we got room for the bar
493 var delta = s.bars.align == "left" ? 0 : -s.bars.barWidth/2;
494 xmin += delta;
495 xmax += delta + s.bars.barWidth;
496 }
497
498 for (var j = 0; j < data.length; ++j) {
499 p = data[j];
500
501 if(data[j] === null)
502 continue;
503
504 x = p.x;
505 y = p.y;
506
507 if(L.isObject(x) && x.getTime) { // this is a Date object
508 x = x.getTime()/1000;
509 }
510
511 if(L.isObject(y) && y.getTime) { // this is a Date object
512 y = y.getTime()/1000;
513 }
514
515 // convert to number
516 if (x != null && !isNaN(x = +x)) {
517 if (x < xmin)
518 xmin = x;
519 if (x > xmax)
520 xmax = x;
521 }
522 else
523 x = null;
524
525 if (y != null && !isNaN(y = +y)) {
526 if (y < ymin)
527 ymin = y;
528 if (y > ymax)
529 ymax = y;
530 }
531 else
532 y = null;
533
534 if (x == null || y == null)
535 data[j] = x = y = null; // mark this point invalid
536 }
537
538 axisx.datamin = Math.min(axisx.datamin, xmin);
539 axisx.datamax = Math.max(axisx.datamax, xmax);
540 axisy.datamin = Math.min(axisy.datamin, ymin);
541 axisy.datamax = Math.max(axisy.datamax, ymax);
542 }
543 }
544
545 function constructCanvas() {
546 function makeCanvas(width, height, container, style) {
547 var c = document.createElement('canvas');
548 c.width = width;
549 c.height = height;
550 if (typeof G_vmlCanvasManager !== 'undefined') // excanvas hack
551 c = G_vmlCanvasManager.initElement(c);
552
553 if(style) {
554 for(var k in style) {
555 c.style[k] = style[k];
556 }
557 }
558 container.appendChild(c);
559
560 return c;
561 }
562
563 canvasWidth = parseInt(DOM.getStyle(target, 'width'), 10);
564 canvasHeight = parseInt(DOM.getStyle(target, 'height'), 10);
565 target.innerHTML = ""; // clear target
566 target.style.position = "relative"; // for positioning labels and overlay
567
568 if (canvasWidth <= 0 || canvasHeight <= 0)
569 throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight;
570
571 if (YAHOO.env.ua.ie) {
572 G_vmlCanvasManager.init_(document);
573 }
574
575 // the canvas
576 canvas = makeCanvas(canvasWidth, canvasHeight, target);
577 ctx = canvas.getContext("2d");
578
579 // overlay canvas for interactive features
580 overlay = makeCanvas(canvasWidth, canvasHeight, target, { position: 'absolute', left: '0px', top: '0px' });
581 octx = overlay.getContext("2d");
582
583 // we include the canvas in the event holder too, because IE 7
584 // sometimes has trouble with the stacking order
585 eventHolder = [overlay, canvas];
586
587 // bind events
588 if (options.selection.mode != null || options.crosshair.mode != null || options.grid.hoverable) {
589 E.on(eventHolder, 'mousemove', onMouseMove);
590
591 if (options.selection.mode != null)
592 E.on(eventHolder, "mousedown", onMouseDown);
593 }
594
595 if (options.crosshair.mode != null)
596 E.on(eventHolder, "mouseout", onMouseOut);
597
598 if (options.grid.clickable)
599 E.on(eventHolder, "click", onClick);
600 }
601
602 function setupGrid() {
603 function setupAxis(axis, options, type) {
604 setRange(axis, options);
605 prepareTickGeneration(axis, options);
606 setTicks(axis, options);
607 // add transformation helpers
608 if (type == 'x') {
609 // data point to canvas coordinate
610 axis.p2c = function (p) { return (p - axis.min) * axis.scale; };
611 // canvas coordinate to data point
612 axis.c2p = function (c) { return axis.min + c / axis.scale; };
613 }
614 else {
615 axis.p2c = function (p) { return (axis.max - p) * axis.scale; };
616 axis.c2p = function (c) { return axis.max - c / axis.scale; };
617 }
618 }
619
620 for (var axis in axes)
621 setupAxis(axes[axis], options[axis], axis.charAt(0));
622
623 setSpacing();
624 if(options.grid.show)
625 insertLabels();
626 insertLegend();
627 insertAxisLabels();
628 }
629
630 function setRange(axis, axisOptions) {
631 var min = axisOptions.min != null ? (axisOptions.scaleType == 'log' ? Math.log(axisOptions.min<=0?1:axisOptions.min) * Math.LOG10E : axisOptions.min) : axis.datamin;
632 var max = axisOptions.max != null ? (axisOptions.scaleType == 'log' ? Math.log(axisOptions.max) * Math.LOG10E : axisOptions.max) : axis.datamax;
633
634 if(axisOptions.mode === 'time') {
635 if(L.isObject(min) && min.getTime) min = min.getTime()/1000;
636 if(L.isObject(max) && max.getTime) max = max.getTime()/1000;
637 }
638
639 // degenerate case
640 if (min == Number.POSITIVE_INFINITY)
641 min = 0;
642 if (max == Number.NEGATIVE_INFINITY)
643 max = 1;
644
645 if (max - min == 0.0) {
646 // degenerate case
647 var widen = max == 0 ? 1 : 0.01;
648
649 if (axisOptions.min == null)
650 min -= widen;
651 // alway widen max if we couldn't widen min to ensure we
652 // don't fall into min == max which doesn't work
653 if (axisOptions.max == null || axisOptions.min != null)
654 max += widen;
655 }
656 else {
657 // consider autoscaling
658 var margin = axisOptions.autoscaleMargin;
659 if (margin != null) {
660 if (axisOptions.min == null) {
661 min -= (max - min) * margin;
662 // make sure we don't go below zero if all values
663 // are positive
664 if (min < 0 && axis.datamin >= 0)
665 min = 0;
666 }
667 if (axisOptions.max == null) {
668 max += (max - min) * margin;
669 if (max > 0 && axis.datamax <= 0)
670 max = 0;
671 }
672 }
673 }
674 axis.min = min;
675 axis.max = max;
676 }
677
678 function prepareTickGeneration(axis, axisOptions) {
679 // estimate number of ticks
680 var noTicks;
681 if (typeof axisOptions.ticks == "number" && axisOptions.ticks > 0)
682 noTicks = axisOptions.ticks;
683 else if (axis == axes.xaxis || axis == axes.x2axis)
684 noTicks = canvasWidth / 100;
685 else
686 noTicks = canvasHeight / 60;
687
688 var delta = (axis.max - axis.min) / noTicks;
689 var size, generator, unit, formatter, magn, norm;
690
691 if (axisOptions.mode == "time") {
692 // pretty handling of time
693
694 delta*=1000;
695
696 // map of app. size of time units in milliseconds
697 var timeUnitSize = {
698 "second": 1000,
699 "minute": 60 * 1000,
700 "hour": 60 * 60 * 1000,
701 "day": 24 * 60 * 60 * 1000,
702 "month": 30 * 24 * 60 * 60 * 1000,
703 "year": 365.2425 * 24 * 60 * 60 * 1000
704 };
705
706
707 // the allowed tick sizes, after 1 year we use
708 // an integer algorithm
709 var spec = [
710 [1, "second"], [2, "second"], [5, "second"], [10, "second"],
711 [30, "second"],
712 [1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"],
713 [30, "minute"],
714 [1, "hour"], [2, "hour"], [4, "hour"],
715 [8, "hour"], [12, "hour"],
716 [1, "day"], [2, "day"], [3, "day"],
717 [0.25, "month"], [0.5, "month"], [1, "month"],
718 [2, "month"], [3, "month"], [6, "month"],
719 [1, "year"]
720 ];
721
722 var minSize = 0;
723 if (axisOptions.minTickSize != null) {
724 if (typeof axisOptions.tickSize == "number")
725 minSize = axisOptions.tickSize;
726 else
727 minSize = axisOptions.minTickSize[0] * timeUnitSize[axisOptions.minTickSize[1]];
728 }
729
730 for (var i = 0; i < spec.length - 1; ++i)
731 if (delta < (spec[i][0] * timeUnitSize[spec[i][1]]
732 + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2
733 && spec[i][0] * timeUnitSize[spec[i][1]] >= minSize)
734 break;
735 size = spec[i][0];
736 unit = spec[i][1];
737
738 // special-case the possibility of several years
739 if (unit == "year") {
740 magn = Math.pow(10, Math.floor(Math.log(delta / timeUnitSize.year) / Math.LN10));
741 norm = (delta / timeUnitSize.year) / magn;
742 if (norm < 1.5)
743 size = 1;
744 else if (norm < 3)
745 size = 2;
746 else if (norm < 7.5)
747 size = 5;
748 else
749 size = 10;
750
751 size *= magn;
752 }
753
754 if (axisOptions.tickSize) {
755 size = axisOptions.tickSize[0];
756 unit = axisOptions.tickSize[1];
757 }
758
759 generator = function(axis) {
760 var ticks = [],
761 tickSize = axis.tickSize[0], unit = axis.tickSize[1],
762 d = new Date(axis.min*1000);
763
764 var step = tickSize * timeUnitSize[unit];
765
766 if (unit == "second")
767 d.setUTCSeconds(floorInBase(d.getUTCSeconds(), tickSize));
768 if (unit == "minute")
769 d.setUTCMinutes(floorInBase(d.getUTCMinutes(), tickSize));
770 if (unit == "hour")
771 d.setUTCHours(floorInBase(d.getUTCHours(), tickSize));
772 if (unit == "month")
773 d.setUTCMonth(floorInBase(d.getUTCMonth(), tickSize));
774 if (unit == "year")
775 d.setUTCFullYear(floorInBase(d.getUTCFullYear(), tickSize));
776
777 // reset smaller components
778 d.setUTCMilliseconds(0);
779 if (step >= timeUnitSize.minute)
780 d.setUTCSeconds(0);
781 if (step >= timeUnitSize.hour)
782 d.setUTCMinutes(0);
783 if (step >= timeUnitSize.day)
784 d.setUTCHours(0);
785 if (step >= timeUnitSize.day * 4)
786 d.setUTCDate(1);
787 if (step >= timeUnitSize.year)
788 d.setUTCMonth(0);
789
790
791 var carry = 0, v = Number.NaN, prev;
792 do {
793 prev = v;
794 v = d.getTime();
795 ticks.push({ v: v/1000, label: axis.tickFormatter(v, axis) });
796 if (unit == "month") {
797 if (tickSize < 1) {
798 // a bit complicated - we'll divide the month
799 // up but we need to take care of fractions
800 // so we don't end up in the middle of a day
801 d.setUTCDate(1);
802 var start = d.getTime();
803 d.setUTCMonth(d.getUTCMonth() + 1);
804 var end = d.getTime();
805 d.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize);
806 carry = d.getUTCHours();
807 d.setUTCHours(0);
808 }
809 else
810 d.setUTCMonth(d.getUTCMonth() + tickSize);
811 }
812 else if (unit == "year") {
813 d.setUTCFullYear(d.getUTCFullYear() + tickSize);
814 }
815 else
816 d.setTime(v + step);
817 } while (v < axis.max*1000 && v != prev);
818
819 return ticks;
820 };
821
822 formatter = function (v, axis) {
823 var d = new Date(v);
824
825 // first check global format
826 if (axisOptions.timeformat != null)
827 return YAHOO.util.Date.format(d, {format: axisOptions.timeformat}, options.locale);
828
829 var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];
830 var span = axis.max - axis.min;
831 span*=1000;
832
833 if (t < timeUnitSize.minute)
834 var fmt = "%k:%M:%S";
835 else if (t < timeUnitSize.day) {
836 if (span < 2 * timeUnitSize.day)
837 fmt = "%k:%M";
838 else
839 fmt = "%b %d %k:%M";
840 }
841 else if (t < timeUnitSize.month)
842 fmt = "%b %d";
843 else if (t < timeUnitSize.year) {
844 if (span < timeUnitSize.year/2)
845 fmt = "%b";
846 else
847 fmt = "%b %Y";
848 }
849 else
850 fmt = "%Y";
851
852 return YAHOO.util.Date.format(d, {format: fmt}, axisOptions.timelang);
853 };
854 }
855 else {
856 // pretty rounding of base-10 numbers
857 var maxDec = axisOptions.tickDecimals;
858 var dec = -Math.floor(Math.log(delta) / Math.LN10);
859 if (maxDec != null && dec > maxDec)
860 dec = maxDec;
861
862 magn = Math.pow(10, -dec);
863 norm = delta / magn; // norm is between 1.0 and 10.0
864
865 if (norm < 1.5)
866 size = 1;
867 else if (norm < 3) {
868 size = 2;
869 // special case for 2.5, requires an extra decimal
870 if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {
871 size = 2.5;
872 ++dec;
873 }
874 }
875 else if (norm < 7.5)
876 size = 5;
877 else
878 size = 10;
879
880 size *= magn;
881
882 if (axisOptions.minTickSize != null && size < axisOptions.minTickSize)
883 size = axisOptions.minTickSize;
884
885 if (axisOptions.tickSize != null)
886 size = axisOptions.tickSize;
887
888 axis.tickDecimals = Math.max(0, (maxDec != null) ? maxDec : dec);
889
890 generator = function (axis) {
891 var ticks = [];
892
893 // spew out all possible ticks
894 var start = floorInBase(axis.min, axis.tickSize),
895 i = 0, v = Number.NaN, prev;
896 do {
897 prev = v;
898 v = start + i * axis.tickSize;
899 var t=v;
900 if(axis.scaleType == 'log') {
901 t = Math.exp(t / Math.LOG10E);
902 }
903 ticks.push({ v: v, label: axis.tickFormatter(t, axis) });
904 ++i;
905 } while (v < axis.max && v != prev);
906 return ticks;
907 };
908
909 formatter = function (v, axis) {
910 return v.toFixed(axis.tickDecimals);
911 };
912 }
913
914 axis.scaleType = axisOptions.scaleType;
915 axis.tickSize = unit ? [size, unit] : size;
916 axis.tickGenerator = generator;
917 if (L.isFunction(axisOptions.tickFormatter))
918 axis.tickFormatter = function (v, axis) { return "" + axisOptions.tickFormatter(v, axis); };
919 else
920 axis.tickFormatter = formatter;
921 if (axisOptions.labelWidth != null)
922 axis.labelWidth = axisOptions.labelWidth;
923 if (axisOptions.labelHeight != null)
924 axis.labelHeight = axisOptions.labelHeight;
925 }
926
927 function setTicks(axis, axisOptions) {
928 axis.ticks = [];
929
930 if (!axis.used)
931 return;
932
933 if (axisOptions.ticks == null)
934 axis.ticks = axis.tickGenerator(axis);
935 else if (typeof axisOptions.ticks == "number") {
936 if (axisOptions.ticks > 0)
937 axis.ticks = axis.tickGenerator(axis);
938 }
939 else if (axisOptions.ticks) {
940 var ticks = axisOptions.ticks;
941
942 if (L.isFunction(ticks))
943 // generate the ticks
944 ticks = ticks({ min: axis.min, max: axis.max });
945
946 // clean up the user-supplied ticks, copy them over
947 var v;
948 for (var i = 0; i < ticks.length; ++i) {
949 var label = null;
950 var t = ticks[i];
951 if (typeof t == "object") {
952 v = t[0];
953 if (t.length > 1)
954 label = t[1];
955 }
956 else
957 v = t;
958 if (axisOptions.scaleType == 'log') {
959 if (label == null)
960 label = v;
961 v = Math.log(v) * Math.LOG10E;
962 }
963
964 if (label == null)
965 label = axis.tickFormatter(v, axis);
966 axis.ticks[i] = { v: v, label: label };
967 }
968 }
969
970 if (axisOptions.autoscaleMargin != null && axis.ticks.length > 0) {
971 // snap to ticks
972 if (axisOptions.min == null)
973 axis.min = Math.min(axis.min, axis.ticks[0].v);
974 if (axisOptions.max == null && axis.ticks.length > 1)
975 axis.max = Math.min(axis.max, axis.ticks[axis.ticks.length - 1].v);
976 }
977 }
978
979 function setSpacing() {
980 function measureXLabels(axis) {
981 if(options.grid.show){
982 // to avoid measuring the widths of the labels, we
983 // construct fixed-size boxes and put the labels inside
984 // them, we don't need the exact figures and the
985 // fixed-size box content is easy to center
986 if (axis.labelWidth == null)
987 axis.labelWidth = canvasWidth / 6;
988
989 // measure x label heights
990 if (axis.labelHeight == null) {
991 var labels = [];
992 for (var i = 0; i < axis.ticks.length; ++i) {
993 var l = axis.ticks[i].label;
994 if (l)
995 labels.push('<div class="tickLabel" style="float:left;width:' + axis.labelWidth + 'px">' + l + '</div>');
996 }
997
998 axis.labelHeight = 0;
999 if (labels.length > 0) {
1000 var dummyDiv = target.appendChild(DOM.createElementFromMarkup('<div style="position:absolute;top:-10000px;width:10000px;font-size:smaller">'
1001 + labels.join("") + '<div style="clear:left"></div></div>'));
1002 axis.labelHeight = dummyDiv.offsetHeight;
1003 target.removeChild(dummyDiv);
1004 }
1005 }
1006 }
1007 else{
1008 axis.labelHeight = 0;
1009 axis.labelWidth = 0;
1010 }
1011 }
1012
1013 function measureYLabels(axis) {
1014 if(options.grid.show){
1015 if (axis.labelWidth == null || axis.labelHeight == null) {
1016 var labels = [], l;
1017 // calculate y label dimensions
1018 for (var i = 0; i < axis.ticks.length; ++i) {
1019 l = axis.ticks[i].label;
1020 if (l)
1021 labels.push('<div class="tickLabel">' + l + '</div>');
1022 }
1023
1024 if (labels.length > 0) {
1025 var dummyDiv = target.appendChild(DOM.createElementFromMarkup('<div style="position:absolute;top:-10000px;font-size:smaller">'
1026 + labels.join("") + '</div>'));
1027 if (axis.labelWidth == null)
1028 axis.labelWidth = dummyDiv.offsetWidth;
1029 if (axis.labelHeight == null)
1030 axis.labelHeight = dummyDiv.firstChild.offsetHeight;
1031 target.removeChild(dummyDiv);
1032 }
1033
1034 if (axis.labelWidth == null)
1035 axis.labelWidth = 0;
1036 if (axis.labelHeight == null)
1037 axis.labelHeight = 0;
1038 }
1039 }
1040 else{
1041 axis.labelHeight = 0;
1042 axis.labelWidth = 0;
1043 }
1044 }
1045
1046 measureXLabels(axes.xaxis);
1047 measureYLabels(axes.yaxis);
1048 measureXLabels(axes.x2axis);
1049 measureYLabels(axes.y2axis);
1050 // get the most space needed around the grid for things
1051 // that may stick out
1052 var maxOutset = (options.grid.show) ? options.grid.borderWidth : 0;
1053 for (var i = 0; i < series.length; ++i)
1054 maxOutset = (Math.max(maxOutset, 2 * (((series[i].points.show) ? series[i].points.radius : 0 ) + series[i].points.lineWidth/2)));
1055
1056 plotOffset.left = plotOffset.right = plotOffset.top = plotOffset.bottom = maxOutset;
1057
1058 var margin = options.grid.labelMargin + options.grid.borderWidth;
1059
1060 if (axes.xaxis.labelHeight > 0)
1061 plotOffset.bottom = Math.max(maxOutset, axes.xaxis.labelHeight + margin);
1062 if (axes.yaxis.labelWidth > 0)
1063 plotOffset.left = Math.max(maxOutset, axes.yaxis.labelWidth + margin);
1064
1065 if (axes.x2axis.labelHeight > 0)
1066 plotOffset.top = Math.max(maxOutset, axes.x2axis.labelHeight + margin);
1067
1068 if (axes.y2axis.labelWidth > 0)
1069 plotOffset.right = Math.max(maxOutset, axes.y2axis.labelWidth + margin);
1070
1071 plotWidth = canvasWidth - plotOffset.left - plotOffset.right;
1072 plotHeight = canvasHeight - plotOffset.bottom - plotOffset.top;
1073
1074 // precompute how much the axis is scaling a point in canvas space
1075 for(var axis in axes) {
1076 axes[axis].scale = (axis.charAt(0) == 'x' ? plotWidth : plotHeight) / (axes[axis].max - axes[axis].min);
1077 }
1078 }
1079
1080 function draw() {
1081 drawGrid();
1082 for (var i = 0; i < series.length; i++) {
1083 drawSeries(series[i]);
1084 }
1085 }
1086
1087 function extractRange(ranges, coord) {
1088 var firstAxis = coord + "axis",
1089 secondaryAxis = coord + "2axis",
1090 axis, from, to, reverse;
1091
1092 if (ranges[firstAxis]) {
1093 axis = firstAxis;
1094 }
1095 else if (ranges[secondaryAxis]) {
1096 axis = secondaryAxis;
1097 }
1098 else {
1099 return { from: null, to: null, axis: axes[firstAxis] };
1100 }
1101
1102 from = ranges[axis].from;
1103 to = ranges[axis].to;
1104
1105 if (options[axis].scaleType == 'log') {
1106 if (from != null)
1107 from = Math.log(from) * Math.LOG10E;
1108 if (to != null)
1109 to = Math.log(to) * Math.LOG10E;
1110 }
1111
1112 axis = axes[axis];
1113
1114 // auto-reverse as an added bonus
1115 if (from != null && to != null && from > to)
1116 return { from: to, to: from, axis: axis };
1117
1118 return { from: from, to: to, axis: axis };
1119 }
1120
1121 function drawGrid() {
1122 var i;
1123
1124 ctx.save();
1125 ctx.clearRect(0, 0, canvasWidth, canvasHeight);
1126 ctx.translate(plotOffset.left, plotOffset.top);
1127
1128 // draw background, if any
1129 if (options.grid.backgroundColor) {
1130 ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, "rgba(255, 255, 255, 0)");
1131 ctx.fillRect(0, 0, plotWidth, plotHeight);
1132 }
1133
1134 // draw markings
1135 var markings = options.grid.markings;
1136 if (markings) {
1137 if (L.isFunction(markings))
1138 markings = markings({ xaxis: axes.xaxis, yaxis: axes.yaxis, x2axis: axes.x2axis, y2axis: axes.y2axis });
1139
1140 for (i = 0; i < markings.length; ++i) {
1141 var m = markings[i],
1142 xrange = extractRange(m, "x"),
1143 yrange = extractRange(m, "y");
1144
1145 // fill in missing
1146 if (xrange.from == null)
1147 xrange.from = xrange.axis.min;
1148 if (xrange.to == null)
1149 xrange.to = xrange.axis.max;
1150 if (yrange.from == null)
1151 yrange.from = yrange.axis.min;
1152 if (yrange.to == null)
1153 yrange.to = yrange.axis.max;
1154
1155 // clip
1156 if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||
1157 yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)
1158 continue;
1159
1160 xrange.from = Math.max(xrange.from, xrange.axis.min);
1161 xrange.to = Math.min(xrange.to, xrange.axis.max);
1162 yrange.from = Math.max(yrange.from, yrange.axis.min);
1163 yrange.to = Math.min(yrange.to, yrange.axis.max);
1164
1165 if (xrange.from == xrange.to && yrange.from == yrange.to)
1166 continue;
1167
1168 // then draw
1169 xrange.from = xrange.axis.p2c(xrange.from);
1170 xrange.to = xrange.axis.p2c(xrange.to);
1171 yrange.from = yrange.axis.p2c(yrange.from);
1172 yrange.to = yrange.axis.p2c(yrange.to);
1173
1174 if (xrange.from == xrange.to || yrange.from == yrange.to) {
1175 // draw line
1176 ctx.strokeStyle = m.color || options.grid.markingsColor;
1177 ctx.beginPath();
1178 ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth;
1179 ctx.moveTo(xrange.from, yrange.from);
1180 ctx.lineTo(xrange.to, yrange.to);
1181 ctx.stroke();
1182 }
1183 else {
1184 // fill area
1185 ctx.fillStyle = m.color || options.grid.markingsColor;
1186 ctx.fillRect(xrange.from, yrange.to,
1187 xrange.to - xrange.from,
1188 yrange.from - yrange.to);
1189 }
1190 }
1191 }
1192
1193 if(options.grid.show && options.grid.showLines) {
1194 // draw the inner grid
1195 ctx.lineWidth = 1;
1196 ctx.strokeStyle = options.grid.tickColor;
1197 ctx.beginPath();
1198 var v, axis = axes.xaxis;
1199 for (i = 0; i < axis.ticks.length; ++i) {
1200 v = axis.ticks[i].v;
1201 if (v <= axis.min || v >= axes.xaxis.max)
1202 continue; // skip those lying on the axes
1203
1204 ctx.moveTo(Math.floor(axis.p2c(v)) + ctx.lineWidth/2, 0);
1205 ctx.lineTo(Math.floor(axis.p2c(v)) + ctx.lineWidth/2, plotHeight);
1206 }
1207
1208 axis = axes.yaxis;
1209 for (i = 0; i < axis.ticks.length; ++i) {
1210 v = axis.ticks[i].v;
1211 if (v <= axis.min || v >= axis.max)
1212 continue;
1213
1214 ctx.moveTo(0, Math.floor(axis.p2c(v)) + ctx.lineWidth/2);
1215 ctx.lineTo(plotWidth, Math.floor(axis.p2c(v)) + ctx.lineWidth/2);
1216 }
1217
1218 axis = axes.x2axis;
1219 for (i = 0; i < axis.ticks.length; ++i) {
1220 v = axis.ticks[i].v;
1221 if (v <= axis.min || v >= axis.max)
1222 continue;
1223
1224 ctx.moveTo(Math.floor(axis.p2c(v)) + ctx.lineWidth/2, -5);
1225 ctx.lineTo(Math.floor(axis.p2c(v)) + ctx.lineWidth/2, 5);
1226 }
1227
1228 axis = axes.y2axis;
1229 for (i = 0; i < axis.ticks.length; ++i) {
1230 v = axis.ticks[i].v;
1231 if (v <= axis.min || v >= axis.max)
1232 continue;
1233
1234 ctx.moveTo(plotWidth-5, Math.floor(axis.p2c(v)) + ctx.lineWidth/2);
1235 ctx.lineTo(plotWidth+5, Math.floor(axis.p2c(v)) + ctx.lineWidth/2);
1236 }
1237
1238 ctx.stroke();
1239 }
1240
1241 if (options.grid.show && options.grid.borderWidth) {
1242 // draw border
1243 var bw = options.grid.borderWidth;
1244 ctx.lineWidth = bw;
1245 ctx.strokeStyle = options.grid.borderColor;
1246 ctx.lineJoin = "round";
1247 ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);
1248 }
1249
1250 ctx.restore();
1251 }
1252
1253 function insertLabels() {
1254 DOM.getElementsByClassName("tickLabels", "div", target, DOM.removeElement);
1255
1256 var html = ['<div class="tickLabels" style="font-size:smaller;color:' + options.grid.color + '">'];
1257
1258 function addLabels(axis, labelGenerator) {
1259 for (var i = 0; i < axis.ticks.length; ++i) {
1260 var tick = axis.ticks[i];
1261 if (!tick.label || tick.v < axis.min || tick.v > axis.max)
1262 continue;
1263 html.push(labelGenerator(tick, axis));
1264 }
1265 }
1266
1267 var margin = options.grid.labelMargin + options.grid.borderWidth;
1268
1269 addLabels(axes.xaxis, function (tick, axis) {
1270 return '<div style="position:absolute;top:' + (plotOffset.top + plotHeight + margin) + 'px;left:' + Math.round(plotOffset.left + axis.p2c(tick.v) - axis.labelWidth/2) + 'px;width:' + axis.labelWidth + 'px;text-align:center" class="tickLabel">' + tick.label + "</div>";
1271 });
1272
1273
1274 addLabels(axes.yaxis, function (tick, axis) {
1275 return '<div style="position:absolute;top:' + Math.round(plotOffset.top + axis.p2c(tick.v) - axis.labelHeight/2) + 'px;right:' + (plotOffset.right + plotWidth + margin) + 'px;width:' + axis.labelWidth + 'px;text-align:right" class="tickLabel">' + tick.label + "</div>";
1276 });
1277
1278 addLabels(axes.x2axis, function (tick, axis) {
1279 return '<div style="position:absolute;bottom:' + (plotOffset.bottom + plotHeight + margin) + 'px;left:' + Math.round(plotOffset.left + axis.p2c(tick.v) - axis.labelWidth/2) + 'px;width:' + axis.labelWidth + 'px;text-align:center" class="tickLabel">' + tick.label + "</div>";
1280 });
1281
1282 addLabels(axes.y2axis, function (tick, axis) {
1283 return '<div style="position:absolute;top:' + Math.round(plotOffset.top + axis.p2c(tick.v) - axis.labelHeight/2) + 'px;left:' + (plotOffset.left + plotWidth + margin) +'px;width:' + axis.labelWidth + 'px;text-align:left" class="tickLabel">' + tick.label + "</div>";
1284 });
1285
1286 html.push('</div>');
1287
1288 target.appendChild(DOM.createElementFromMarkup(html.join("")));
1289 }
1290
1291 function insertAxisLabels() {
1292 var xLocation, yLocation;
1293 if( options.xaxis.label ) {
1294 yLocation = plotOffset.top + plotHeight + ( axes.xaxis.labelHeight * 1.5 );
1295 xLocation = plotOffset.left;
1296 DOM.getElementsByClassName("xaxislabel", "div", target, DOM.removeElement);
1297 target.appendChild(
1298 DOM.createElementFromMarkup(
1299 "<div class='xaxislabel' style='color:" + options.grid.color + ";width:" + plotWidth + "px;"
1300 + "text-align:center;position:absolute;top:" + yLocation + "px;left:" + xLocation + "px;'>"
1301 + options.xaxis.label + "</div>"
1302 )
1303 );
1304 }
1305 if( options.yaxis.label ) {
1306 xLocation = plotOffset.left - ( axes.yaxis.labelWidth * 2 ) - options.grid.labelFontSize;
1307 yLocation = plotOffset.top + plotHeight/2;
1308 DOM.getElementsByClassName("yaxislabel", "div", target, DOM.removeElement);
1309
1310 target.appendChild(
1311 DOM.createElementFromMarkup(
1312 "<div class='yaxislabel' style='-moz-transform:rotate(270deg);-webkit-transform:rotate(270deg);writing-mode:tb-rl;filter:flipV flipH;color:" + options.grid.color + ";"
1313 + "text-align:center;position:absolute;top:" + yLocation + "px;left:" + xLocation + "px;'>"
1314 + options.yaxis.label + "</div>")
1315 );
1316 }
1317 }
1318
1319 function drawSeries(series) {
1320 if (series.lines.show)
1321 drawSeriesLines(series);
1322 if (series.bars.show)
1323 drawSeriesBars(series);
1324 if (series.points.show)
1325 drawSeriesPoints(series);
1326 }
1327
1328 function drawSeriesLines(series) {
1329 function plotLine(data, xoffset, yoffset, axisx, axisy) {
1330 var prev = null, cur=null, drawx = null, drawy = null;
1331
1332 ctx.beginPath();
1333 for (var i = 0; i < data.length; i++) {
1334 prev = cur;
1335 cur = data[i];
1336
1337 if(prev == null || cur == null)
1338 continue;
1339
1340 var x1 = prev.x, y1 = prev.y,
1341 x2 = cur.x, y2 = cur.y;
1342
1343 // clip with ymin
1344 if (y1 <= y2 && y1 < axisy.min) {
1345 if (y2 < axisy.min)
1346 continue; // line segment is outside
1347 // compute new intersection point
1348 x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
1349 y1 = axisy.min;
1350 }
1351 else if (y2 <= y1 && y2 < axisy.min) {
1352 if (y1 < axisy.min)
1353 continue;
1354 x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
1355 y2 = axisy.min;
1356 }
1357
1358 // clip with ymax
1359 if (y1 >= y2 && y1 > axisy.max) {
1360 if (y2 > axisy.max)
1361 continue;
1362 x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
1363 y1 = axisy.max;
1364 }
1365 else if (y2 >= y1 && y2 > axisy.max) {
1366 if (y1 > axisy.max)
1367 continue;
1368 x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
1369 y2 = axisy.max;
1370 }
1371
1372 // clip with xmin
1373 if (x1 <= x2 && x1 < axisx.min) {
1374 if (x2 < axisx.min)
1375 continue;
1376 y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
1377 x1 = axisx.min;
1378 }
1379 else if (x2 <= x1 && x2 < axisx.min) {
1380 if (x1 < axisx.min)
1381 continue;
1382 y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
1383 x2 = axisx.min;
1384 }
1385
1386 // clip with xmax
1387 if (x1 >= x2 && x1 > axisx.max) {
1388 if (x2 > axisx.max)
1389 continue;
1390 y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
1391 x1 = axisx.max;
1392 }
1393 else if (x2 >= x1 && x2 > axisx.max) {
1394 if (x1 > axisx.max)
1395 continue;
1396 y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
1397 x2 = axisx.max;
1398 }
1399
1400 if (drawx != axisx.p2c(x1) + xoffset || drawy != axisy.p2c(y1) + yoffset)
1401 ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);
1402
1403 drawx = axisx.p2c(x2) + xoffset;
1404 drawy = axisy.p2c(y2) + yoffset;
1405 ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);
1406 }
1407 ctx.stroke();
1408 }
1409
1410 function plotLineArea(data, axisx, axisy) {
1411 var prev, cur = null,
1412 bottom = Math.min(Math.max(0, axisy.min), axisy.max),
1413 top, lastX = 0, areaOpen = false;
1414
1415 for (var i = 0; i < data.length; i++) {
1416 prev = cur;
1417 cur = data[i];
1418
1419 if (areaOpen && x1 != null && x2 == null) {
1420 // close area
1421 ctx.lineTo(axisx.p2c(lastX), axisy.p2c(bottom));
1422 ctx.fill();
1423 areaOpen = false;
1424 continue;
1425 }
1426
1427 if (prev == null || cur == null) {
1428 if(areaOpen) {
1429 ctx.lineTo(axisx.p2c(lastX), axisy.p2c(bottom));
1430 ctx.fill();
1431 }
1432 areaOpen = false;
1433 continue;
1434 }
1435
1436 var x1 = prev.x, y1 = prev.y,
1437 x2 = cur.x, y2 = cur.y;
1438
1439 // clip x values
1440
1441 // clip with xmin
1442 if (x1 <= x2 && x1 < axisx.min) {
1443 if (x2 < axisx.min)
1444 continue;
1445 y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
1446 x1 = axisx.min;
1447 }
1448 else if (x2 <= x1 && x2 < axisx.min) {
1449 if (x1 < axisx.min)
1450 continue;
1451 y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
1452 x2 = axisx.min;
1453 }
1454
1455 // clip with xmax
1456 if (x1 >= x2 && x1 > axisx.max) {
1457 if (x2 > axisx.max)
1458 continue;
1459 y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
1460 x1 = axisx.max;
1461 }
1462 else if (x2 >= x1 && x2 > axisx.max) {
1463 if (x1 > axisx.max)
1464 continue;
1465 y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
1466 x2 = axisx.max;
1467 }
1468
1469 if (!areaOpen) {
1470 // open area
1471 ctx.beginPath();
1472 ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));
1473 areaOpen = true;
1474 }
1475
1476 // now first check the case where both is outside
1477 if (y1 >= axisy.max && y2 >= axisy.max) {
1478 ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
1479 ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));
1480 lastX = x2;
1481 continue;
1482 }
1483 else if (y1 <= axisy.min && y2 <= axisy.min) {
1484 ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));
1485 ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
1486 lastX = x2;
1487 continue;
1488 }
1489
1490 // else it's a bit more complicated, there might
1491 // be two rectangles and two triangles we need to fill
1492 // in; to find these keep track of the current x values
1493 var x1old = x1, x2old = x2;
1494
1495 // and clip the y values, without shortcutting
1496
1497 // clip with ymin
1498 if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {
1499 x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
1500 y1 = axisy.min;
1501 }
1502 else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {
1503 x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
1504 y2 = axisy.min;
1505 }
1506
1507 // clip with ymax
1508 if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {
1509 x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
1510 y1 = axisy.max;
1511 }
1512 else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {
1513 x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
1514 y2 = axisy.max;
1515 }
1516
1517
1518 // if the x value was changed we got a rectangle
1519 // to fill
1520 if (x1 != x1old) {
1521 if (y1 <= axisy.min)
1522 top = axisy.min;
1523 else
1524 top = axisy.max;
1525
1526 ctx.lineTo(axisx.p2c(x1old), axisy.p2c(top));
1527 ctx.lineTo(axisx.p2c(x1), axisy.p2c(top));
1528 }
1529
1530 // fill the triangles
1531 ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));
1532 ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
1533
1534 // fill the other rectangle if it's there
1535 if (x2 != x2old) {
1536 if (y2 <= axisy.min)
1537 top = axisy.min;
1538 else
1539 top = axisy.max;
1540
1541 ctx.lineTo(axisx.p2c(x2), axisy.p2c(top));
1542 ctx.lineTo(axisx.p2c(x2old), axisy.p2c(top));
1543 }
1544
1545 lastX = Math.max(x2, x2old);
1546 }
1547
1548 if (areaOpen) {
1549 ctx.lineTo(axisx.p2c(lastX), axisy.p2c(bottom));
1550 ctx.fill();
1551 }
1552 }
1553
1554 ctx.save();
1555 ctx.translate(plotOffset.left, plotOffset.top);
1556 ctx.lineJoin = "round";
1557
1558 var lw = series.lines.lineWidth,
1559 sw = series.shadowSize;
1560 // FIXME: consider another form of shadow when filling is turned on
1561 if (lw > 0 && sw > 0) {
1562 // draw shadow as a thick and thin line with transparency
1563 ctx.lineWidth = sw;
1564 ctx.strokeStyle = "rgba(0,0,0,0.1)";
1565 var xoffset = 1;
1566 plotLine(series.data, xoffset, Math.sqrt((lw/2 + sw/2)*(lw/2 + sw/2) - xoffset*xoffset), series.xaxis, series.yaxis);
1567 ctx.lineWidth = sw/2;
1568 plotLine(series.data, xoffset, Math.sqrt((lw/2 + sw/4)*(lw/2 + sw/4) - xoffset*xoffset), series.xaxis, series.yaxis);
1569 }
1570
1571 ctx.lineWidth = lw;
1572 ctx.strokeStyle = series.color;
1573 var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);
1574 if (fillStyle) {
1575 ctx.fillStyle = fillStyle;
1576 plotLineArea(series.data, series.xaxis, series.yaxis);
1577 }
1578
1579 if (lw > 0)
1580 plotLine(series.data, 0, 0, series.xaxis, series.yaxis);
1581 ctx.restore();
1582 }
1583
1584 function drawSeriesPoints(series) {
1585 function plotPoints(data, radius, fillStyle, offset, circumference, axisx, axisy) {
1586 for (var i = 0; i < data.length; i++) {
1587 if (data[i] == null || series.dropped[i])
1588 continue;
1589
1590 var x = data[i].x, y = data[i].y;
1591 if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
1592 continue;
1593
1594 ctx.beginPath();
1595 ctx.arc(axisx.p2c(x), axisy.p2c(y) + offset, radius, 0, circumference, true);
1596 if (fillStyle) {
1597 ctx.fillStyle = fillStyle;
1598 ctx.fill();
1599 }
1600 ctx.stroke();
1601 }
1602 }
1603
1604 ctx.save();
1605 ctx.translate(plotOffset.left, plotOffset.top);
1606
1607 var lw = series.lines.lineWidth,
1608 sw = series.shadowSize,
1609 radius = series.points.radius;
1610 if (lw > 0 && sw > 0) {
1611 // draw shadow in two steps
1612 var w = sw / 2;
1613 ctx.lineWidth = w;
1614 ctx.strokeStyle = "rgba(0,0,0,0.1)";
1615 plotPoints(series.data, radius, null, w + w/2, 2 * Math.PI,
1616 series.xaxis, series.yaxis);
1617
1618 ctx.strokeStyle = "rgba(0,0,0,0.2)";
1619 plotPoints(series.data, radius, null, w/2, 2 * Math.PI,
1620 series.xaxis, series.yaxis);
1621 }
1622
1623 ctx.lineWidth = lw;
1624 ctx.strokeStyle = series.color;
1625 plotPoints(series.data, radius,
1626 getFillStyle(series.points, series.color), 0, 2 * Math.PI,
1627 series.xaxis, series.yaxis);
1628 ctx.restore();
1629 }
1630
1631 function drawBar(x, y, barLeft, barRight, offset, fill, axisx, axisy, c) {
1632 var drawLeft = true, drawRight = true,
1633 drawTop = true, drawBottom = false,
1634 left = x + barLeft, right = x + barRight,
1635 bottom = 0, top = y;
1636
1637 // account for negative bars
1638 if (top < bottom) {
1639 top = 0;
1640 bottom = y;
1641 drawBottom = true;
1642 drawTop = false;
1643 }
1644
1645 // clip
1646 if (right < axisx.min || left > axisx.max ||
1647 top < axisy.min || bottom > axisy.max)
1648 return;
1649
1650 if (left < axisx.min) {
1651 left = axisx.min;
1652 drawLeft = false;
1653 }
1654
1655 if (right > axisx.max) {
1656 right = axisx.max;
1657 drawRight = false;
1658 }
1659
1660 if (bottom < axisy.min) {
1661 bottom = axisy.min;
1662 drawBottom = false;
1663 }
1664
1665 if (top > axisy.max) {
1666 top = axisy.max;
1667 drawTop = false;
1668 }
1669
1670 left = axisx.p2c(left);
1671 bottom = axisy.p2c(bottom);
1672 right = axisx.p2c(right);
1673 top = axisy.p2c(top);
1674
1675 // fill the bar
1676 if (fill) {
1677 c.beginPath();
1678 c.moveTo(left, bottom);
1679 c.lineTo(left, top);
1680 c.lineTo(right, top);
1681 c.lineTo(right, bottom);
1682 if(typeof fill === 'function') {
1683 c.fillStyle = fill(bottom, top);
1684 } else if(typeof fill === 'string') {
1685 c.fillStyle = fill;
1686 }
1687 c.fill();
1688 }
1689
1690 // draw outline
1691 if (drawLeft || drawRight || drawTop || drawBottom) {
1692 c.beginPath();
1693
1694 // FIXME: inline moveTo is buggy with excanvas
1695 c.moveTo(left, bottom + offset);
1696 if (drawLeft)
1697 c.lineTo(left, top + offset);
1698 else
1699 c.moveTo(left, top + offset);
1700 if (drawTop)
1701 c.lineTo(right, top + offset);
1702 else
1703 c.moveTo(right, top + offset);
1704 if (drawRight)
1705 c.lineTo(right, bottom + offset);
1706 else
1707 c.moveTo(right, bottom + offset);
1708 if (drawBottom)
1709 c.lineTo(left, bottom + offset);
1710 else
1711 c.moveTo(left, bottom + offset);
1712 c.stroke();
1713 }
1714 }
1715
1716 function drawSeriesBars(series) {
1717 function plotBars(data, barLeft, barRight, offset, fill, axisx, axisy) {
1718
1719 for (var i = 0; i < data.length; i++) {
1720 if (data[i] == null)
1721 continue;
1722 drawBar(data[i].x, data[i].y, barLeft, barRight, offset, fill, axisx, axisy, ctx);
1723 }
1724 }
1725
1726 ctx.save();
1727 ctx.translate(plotOffset.left, plotOffset.top);
1728
1729 // FIXME: figure out a way to add shadows (for instance along the right edge)
1730 ctx.lineWidth = series.bars.lineWidth;
1731 ctx.strokeStyle = series.color;
1732 var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2;
1733 var fill = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;
1734 plotBars(series.data, barLeft, barLeft + series.bars.barWidth, 0, fill, series.xaxis, series.yaxis);
1735 ctx.restore();
1736 }
1737
1738 function getFillStyle(filloptions, seriesColor, bottom, top) {
1739 var fill = filloptions.fill;
1740 if (!fill)
1741 return null;
1742
1743 if (filloptions.fillColor)
1744 return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);
1745
1746 var c = parseColor(seriesColor);
1747 c.a = typeof fill == "number" ? fill : 0.4;
1748 c.normalize();
1749 return c.toString();
1750 }
1751
1752 function insertLegend() {
1753 DOM.getElementsByClassName("legend", "div", target, DOM.removeElement);
1754
1755 if (!options.legend.show)
1756 return;
1757
1758 var fragments = [], rowStarted = false,
1759 lf = options.legend.labelFormatter, s, label;
1760 for (var i = 0; i < series.length; ++i) {
1761 s = series[i];
1762 label = s.label;
1763 if (!label)
1764 continue;
1765
1766 if (i % options.legend.noColumns == 0) {
1767 if (rowStarted)
1768 fragments.push('</tr>');
1769 fragments.push('<tr>');
1770 rowStarted = true;
1771 }
1772
1773 if (lf)
1774 label = lf(label, s);
1775
1776 fragments.push(
1777 '<td class="legendColorBox"><div style="border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px"><div style="width:4px;height:0;border:5px solid ' + s.color + ';overflow:hidden"></div></div></td>' +
1778 '<td class="legendLabel">' + label + '</td>');
1779 }
1780 if (rowStarted)
1781 fragments.push('</tr>');
1782
1783 if (fragments.length == 0)
1784 return;
1785
1786 var table = '<table style="font-size:smaller;color:' + options.grid.color + '">' + fragments.join("") + '</table>';
1787 if (options.legend.container != null)
1788 DOM.get(options.legend.container).innerHTML = table;
1789 else {
1790 var pos = "",
1791 p = options.legend.position,
1792 m = options.legend.margin;
1793 if (m[0] == null)
1794 m = [m, m];
1795 if (p.charAt(0) == "n")
1796 pos += 'top:' + (m[1] + plotOffset.top) + 'px;';
1797 else if (p.charAt(0) == "s")
1798 pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';
1799 if (p.charAt(1) == "e")
1800 pos += 'right:' + (m[0] + plotOffset.right) + 'px;';
1801 else if (p.charAt(1) == "w")
1802 pos += 'left:' + (m[0] + plotOffset.left) + 'px;';
1803 var legend = target.appendChild(DOM.createElementFromMarkup('<div class="legend">' + table.replace('style="', 'style="position:absolute;' + pos +';') + '</div>'));
1804 if (options.legend.backgroundOpacity != 0.0) {
1805 // put in the transparent background
1806 // separately to avoid blended labels and
1807 // label boxes
1808 var c = options.legend.backgroundColor;
1809 if (c == null) {
1810 var tmp;
1811 if (options.grid.backgroundColor && typeof options.grid.backgroundColor == "string")
1812 tmp = options.grid.backgroundColor;
1813 else
1814 tmp = extractColor(legend);
1815 c = parseColor(tmp).adjust(null, null, null, 1).toString();
1816 }
1817 var div = legend.firstChild;
1818 var _el = DOM.insertBefore(
1819 DOM.createElementFromMarkup('<div style="position:absolute;width:' + parseInt(DOM.getStyle(div, 'width'), 10)
1820 + 'px;height:' + parseInt(DOM.getStyle(div, 'height'), 10) + 'px;'
1821 + pos +'background-color:' + c + ';"> </div>'),
1822 legend
1823 );
1824 DOM.setStyle(_el, 'opacity', options.legend.backgroundOpacity);
1825 }
1826 }
1827 }
1828
1829
1830 // interactive features
1831
1832 var lastMousePos = { pageX: null, pageY: null },
1833 selection = {
1834 first: { x: -1, y: -1}, second: { x: -1, y: -1},
1835 show: false, active: false },
1836 crosshair = { pos: { x: -1, y: -1 } },
1837 highlights = [],
1838 clickIsMouseUp = false,
1839 redrawTimeout = null,
1840 hoverTimeout = null;
1841
1842 // Returns the data item the mouse is over, or null if none is found
1843 function findNearbyItem(mouseX, mouseY) {
1844 var maxDistance = options.grid.mouseActiveRadius,
1845 lowestDistance = maxDistance * maxDistance + 1,
1846 item = null, foundPoint = false, j, x, y;
1847
1848 function result(i, j) {
1849 return {
1850 datapoint: series[i].data[j],
1851 dataIndex: j,
1852 series: series[i],
1853 seriesIndex: i
1854 };
1855 }
1856
1857 for (var i = 0; i < series.length; ++i) {
1858 var s = series[i],
1859 axisx = s.xaxis,
1860 axisy = s.yaxis,
1861 mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster
1862 my = axisy.c2p(mouseY),
1863 maxx = maxDistance / axisx.scale,
1864 maxy = maxDistance / axisy.scale;
1865
1866 var data = s.data;
1867
1868 if (s.lines.show || s.points.show) {
1869 for (j = 0; j < data.length; j++ ) {
1870 if (data[j] == null)
1871 continue;
1872
1873 x = data[j].x;
1874 y = data[j].y;
1875
1876 // For points and lines, the cursor must be within a
1877 // certain distance to the data point
1878 if (x - mx > maxx || x - mx < -maxx ||
1879 y - my > maxy || y - my < -maxy)
1880 continue;
1881
1882 // We have to calculate distances in pixels, not in
1883 // data units, because the scales of the axes may be different
1884 var dx = Math.abs(axisx.p2c(x) - mouseX),
1885 dy = Math.abs(axisy.p2c(y) - mouseY),
1886 dist = dx * dx + dy * dy; // no idea in taking sqrt
1887 if (dist < lowestDistance) {
1888 lowestDistance = dist;
1889 item = result(i, j);
1890 }
1891 }
1892 }
1893
1894 if (s.bars.show && !item) { // no other point can be nearby
1895 var barLeft = s.bars.align == "left" ? 0 : -s.bars.barWidth/2,
1896 barRight = barLeft + s.bars.barWidth;
1897
1898 for (j = 0; j < data.length; j++) {
1899 x = data[j].x;
1900 y = data[j].y;
1901 if (x == null)
1902 continue;
1903
1904 // for a bar graph, the cursor must be inside the bar
1905 if ((mx >= x + barLeft && mx <= x + barRight &&
1906 my >= Math.min(0, y) && my <= Math.max(0, y)))
1907 item = result(i, j);
1908 }
1909 }
1910 }
1911
1912 return item;
1913 }
1914
1915 function onMouseMove(e) {
1916 lastMousePos.pageX = E.getPageX(e);
1917 lastMousePos.pageY = E.getPageY(e);
1918
1919 if (options.grid.hoverable)
1920 triggerClickHoverEvent("plothover", lastMousePos);
1921
1922 if (options.crosshair.mode != null) {
1923 if (!selection.active) {
1924 setPositionFromEvent(crosshair.pos, lastMousePos);
1925 triggerRedrawOverlay();
1926 }
1927 else
1928 crosshair.pos.x = -1; // hide the crosshair while selecting
1929 }
1930
1931 if (selection.active) {
1932 updateSelection(lastMousePos);
1933 }
1934 }
1935
1936 function onMouseDown(e) {
1937 var button = e.which || e.button;
1938 if (button != 1) // only accept left-click
1939 return;
1940
1941 // cancel out any text selections
1942 document.body.focus();
1943
1944 // prevent text selection and drag in old-school browsers
1945 if (document.onselectstart !== undefined && workarounds.onselectstart == null) {
1946 workarounds.onselectstart = document.onselectstart;
1947 document.onselectstart = function () { return false; };
1948 }
1949 if (document.ondrag !== undefined && workarounds.ondrag == null) {
1950 workarounds.ondrag = document.ondrag;
1951 document.ondrag = function () { return false; };
1952 }
1953
1954 var mousePos = {pageX: E.getPageX(e), pageY: E.getPageY(e)};
1955 setSelectionPos(selection.first, mousePos);
1956
1957 lastMousePos.pageX = null;
1958 selection.active = true;
1959 E.on(document, "mouseup", onSelectionMouseUp);
1960 }
1961
1962 function onMouseOut(e) {
1963 if (options.crosshair.mode != null && crosshair.pos.x != -1) {
1964 crosshair.pos.x = -1;
1965 triggerRedrawOverlay();
1966 }
1967 }
1968
1969 function onClick(e) {
1970 if (clickIsMouseUp) {
1971 clickIsMouseUp = false;
1972 return;
1973 }
1974
1975 var mousePos = {pageX: E.getPageX(e), pageY: E.getPageY(e)};
1976 triggerClickHoverEvent("plotclick", mousePos);
1977 }
1978
1979 // trigger click or hover event (they send the same parameters
1980 // so we share their code)
1981 function triggerClickHoverEvent(eventname, event) {
1982 var offset = DOM.getXY(eventHolder[0]),
1983 pos = { pageX: event.pageX, pageY: event.pageY },
1984 canvasX = event.pageX - offset[0] - plotOffset.left,
1985 canvasY = event.pageY - offset[1] - plotOffset.top;
1986
1987 for(var axis in axes)
1988 if(axes[axis].used)
1989 pos[axis.replace(/axis$/, '')] = axes[axis].c2p(axis.charAt(0) == 'x' ? canvasX : canvasY);
1990
1991 var item = findNearbyItem(canvasX, canvasY);
1992
1993 if (item) {
1994 // fill in mouse pos for any listeners out there
1995 item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint.x) + offset[0] + plotOffset.left, 10);
1996 item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint.y) + offset[1] + plotOffset.top, 10);
1997 }
1998
1999 if (options.grid.autoHighlight) {
2000 // clear auto-highlights
2001 for (var i = 0; i < highlights.length; ++i) {
2002 var h = highlights[i];
2003 if (h.auto == eventname &&
2004 !(item && h.series == item.series && h.point == item.datapoint))
2005 unhighlight(h.series, h.point);
2006 }
2007
2008 if (item)
2009 highlight(item.series, item.datapoint, eventname);
2010 }
2011
2012 plot.fireEvent(eventname, {pos: pos, item: item });
2013 }
2014
2015 function triggerRedrawOverlay() {
2016 if (!redrawTimeout)
2017 redrawTimeout = setTimeout(redrawOverlay, 30);
2018 }
2019
2020 function redrawOverlay() {
2021 redrawTimeout = null;
2022
2023 // redraw highlights
2024 octx.save();
2025 octx.clearRect(0, 0, canvasWidth, canvasHeight);
2026 octx.translate(plotOffset.left, plotOffset.top);
2027
2028 var hi;
2029 for (var i = 0; i < highlights.length; ++i) {
2030 hi = highlights[i];
2031
2032 if (hi.series.bars.show)
2033 drawBarHighlight(hi.series, hi.point);
2034 else
2035 drawPointHighlight(hi.series, hi.point);
2036 }
2037
2038 // redraw selection
2039 if (selection.show && selectionIsSane()) {
2040 octx.strokeStyle = parseColor(options.selection.color).scale(null, null, null, 0.8).toString();
2041 octx.lineWidth = 1;
2042 ctx.lineJoin = "round";
2043 octx.fillStyle = parseColor(options.selection.color).scale(null, null, null, 0.4).toString();
2044
2045 var x = Math.min(selection.first.x, selection.second.x),
2046 y = Math.min(selection.first.y, selection.second.y),
2047 w = Math.abs(selection.second.x - selection.first.x),
2048 h = Math.abs(selection.second.y - selection.first.y);
2049
2050 octx.fillRect(x, y, w, h);
2051 octx.strokeRect(x, y, w, h);
2052 }
2053
2054 // redraw crosshair
2055 var pos = crosshair.pos, mode = options.crosshair.mode;
2056 if (mode != null && pos.x != -1) {
2057 octx.strokeStyle = parseColor(options.crosshair.color).scale(null, null, null, 0.8).toString();
2058 octx.lineWidth = 1;
2059 ctx.lineJoin = "round";
2060
2061 octx.beginPath();
2062 if (mode.indexOf("x") != -1) {
2063 octx.moveTo(pos.x, 0);
2064 octx.lineTo(pos.x, plotHeight);
2065 }
2066 if (mode.indexOf("y") != -1) {
2067 octx.moveTo(0, pos.y);
2068 octx.lineTo(plotWidth, pos.y);
2069 }
2070 octx.stroke();
2071
2072 }
2073 octx.restore();
2074 }
2075
2076 function highlight(s, point, auto) {
2077 if (typeof s == "number")
2078 s = series[s];
2079
2080 if (typeof point == "number")
2081 point = s.data[point];
2082
2083 var i = indexOfHighlight(s, point);
2084 if (i == -1) {
2085 highlights.push({ series: s, point: point, auto: auto });
2086
2087 triggerRedrawOverlay();
2088 }
2089 else if (!auto)
2090 highlights[i].auto = false;
2091 }
2092
2093 function unhighlight(s, point) {
2094 if (typeof s == "number")
2095 s = series[s];
2096
2097 if (typeof point == "number")
2098 point = s.data[point];
2099
2100 var i = indexOfHighlight(s, point);
2101 if (i != -1) {
2102 highlights.splice(i, 1);
2103
2104 triggerRedrawOverlay();
2105 }
2106 }
2107
2108 function indexOfHighlight(s, p) {
2109 for (var i = 0; i < highlights.length; ++i) {
2110 var h = highlights[i];
2111 if (h.series == s && h.point[0] == p[0]
2112 && h.point[1] == p[1])
2113 return i;
2114 }
2115 return -1;
2116 }
2117
2118 function drawPointHighlight(series, point) {
2119 var x = point.x, y = point.y,
2120 axisx = series.xaxis, axisy = series.yaxis;
2121
2122 if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
2123 return;
2124
2125 var pointRadius = series.points.radius + series.points.lineWidth / 2;
2126 octx.lineWidth = pointRadius;
2127 octx.strokeStyle = parseColor(series.color).scale(1, 1, 1, 0.5).toString();
2128 var radius = 1.5 * pointRadius;
2129 octx.beginPath();
2130 octx.arc(axisx.p2c(x), axisy.p2c(y), radius, 0, 2 * Math.PI, true);
2131 octx.stroke();
2132 }
2133
2134 function drawBarHighlight(series, point) {
2135 octx.lineJoin = "round";
2136 octx.lineWidth = series.bars.lineWidth;
2137 octx.strokeStyle = parseColor(series.color).scale(1, 1, 1, 0.5).toString();
2138 var fillStyle = parseColor(series.color).scale(1, 1, 1, 0.5).toString();
2139 var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2;
2140 drawBar(point.x, point.y, barLeft, barLeft + series.bars.barWidth,
2141 0, function () { return fillStyle; }, series.xaxis, series.yaxis, octx);
2142 }
2143
2144 function setPositionFromEvent(pos, e) {
2145 var offset = DOM.getXY(eventHolder[0]);
2146 pos.x = clamp(0, e.pageX - offset[0] - plotOffset.left, plotWidth);
2147 pos.y = clamp(0, e.pageY - offset[1] - plotOffset.top, plotHeight);
2148 }
2149
2150 function setCrosshair(pos) {
2151 if (pos == null)
2152 crosshair.pos.x = -1;
2153 else {
2154 crosshair.pos.x = clamp(0, pos.x != null ? axes.xaxis.p2c(pos.x) : axes.x2axis.p2c(pos.x2), plotWidth);
2155 crosshair.pos.y = clamp(0, pos.y != null ? axes.yaxis.p2c(pos.y) : axes.y2axis.p2c(pos.y2), plotHeight);
2156 }
2157 triggerRedrawOverlay();
2158 }
2159
2160 function getSelectionForEvent() {
2161 var x1 = Math.min(selection.first.x, selection.second.x),
2162 x2 = Math.max(selection.first.x, selection.second.x),
2163 y1 = Math.max(selection.first.y, selection.second.y),
2164 y2 = Math.min(selection.first.y, selection.second.y);
2165
2166 var r = {};
2167 if (axes.xaxis.used)
2168 r.xaxis = { from: axes.xaxis.c2p(x1), to: axes.xaxis.c2p(x2) };
2169 if (axes.x2axis.used)
2170 r.x2axis = { from: axes.x2axis.c2p(x1), to: axes.x2axis.c2p(x2) };
2171 if (axes.yaxis.used)
2172 r.yaxis = { from: axes.yaxis.c2p(y1), to: axes.yaxis.c2p(y2) };
2173 if (axes.y2axis.used)
2174 r.y2axis = { from: axes.y2axis.c2p(y1), to: axes.y2axis.c2p(y2) };
2175 return r;
2176 }
2177
2178 function triggerSelectedEvent() {
2179 var r = getSelectionForEvent();
2180
2181 plot.fireEvent("plotselected", r);
2182 }
2183
2184 function onSelectionMouseUp(e) {
2185 // revert drag stuff for old-school browsers
2186 if (document.onselectstart !== undefined)
2187 document.onselectstart = workarounds.onselectstart;
2188 if (document.ondrag !== undefined)
2189 document.ondrag = workarounds.ondrag;
2190
2191 // no more draggy-dee-drag
2192 selection.active = false;
2193 var mousePos = {pageX: E.getPageX(e), pageY: E.getPageY(e)};
2194 updateSelection(mousePos);
2195
2196 if (selectionIsSane()) {
2197 triggerSelectedEvent();
2198 clickIsMouseUp = true;
2199 }
2200 else {
2201 // this counts as a clear
2202 plot.fireEvent("plotunselected", {});
2203 }
2204
2205 E.removeListener(document, "mouseup", onSelectionMouseUp);
2206 return false;
2207 }
2208
2209 function setSelectionPos(pos, e) {
2210 setPositionFromEvent(pos, e);
2211
2212 if (options.selection.mode == "y") {
2213 if (pos == selection.first)
2214 pos.x = 0;
2215 else
2216 pos.x = plotWidth;
2217 }
2218
2219 if (options.selection.mode == "x") {
2220 if (pos == selection.first)
2221 pos.y = 0;
2222 else
2223 pos.y = plotHeight;
2224 }
2225 }
2226
2227 function updateSelection(pos) {
2228 if (pos.pageX == null)
2229 return;
2230
2231 setSelectionPos(selection.second, pos);
2232 if (selectionIsSane()) {
2233 selection.show = true;
2234 triggerRedrawOverlay();
2235 }
2236 else
2237 clearSelection(true);
2238 }
2239
2240 function clearSelection(preventEvent) {
2241 if (selection.show) {
2242 selection.show = false;
2243 triggerRedrawOverlay();
2244 if (!preventEvent)
2245 plot.fireEvent("plotunselected", {});
2246 }
2247 }
2248
2249 function setSelection(ranges, preventEvent) {
2250 var range;
2251
2252 if (options.selection.mode == "y") {
2253 selection.first.x = 0;
2254 selection.second.x = plotWidth;
2255 }
2256 else {
2257 range = extractRange(ranges, "x");
2258
2259 selection.first.x = range.axis.p2c(range.from);
2260 selection.second.x = range.axis.p2c(range.to);
2261 }
2262
2263 if (options.selection.mode == "x") {
2264 selection.first.y = 0;
2265 selection.second.y = plotHeight;
2266 }
2267 else {
2268 range = extractRange(ranges, "y");
2269
2270 selection.first.y = range.axis.p2c(range.from);
2271 selection.second.y = range.axis.p2c(range.to);
2272 }
2273
2274 selection.show = true;
2275 triggerRedrawOverlay();
2276 if (!preventEvent)
2277 triggerSelectedEvent();
2278 }
2279
2280 function selectionIsSane() {
2281 var minSize = 5;
2282 return Math.abs(selection.second.x - selection.first.x) >= minSize &&
2283 Math.abs(selection.second.y - selection.first.y) >= minSize;
2284 }
2285
2286 function getColorOrGradient(spec, bottom, top, defaultColor) {
2287 if (typeof spec == "string")
2288 return spec;
2289 else {
2290 // assume this is a gradient spec; IE currently only
2291 // supports a simple vertical gradient properly, so that's
2292 // what we support too
2293 var gradient = ctx.createLinearGradient(0, top, 0, bottom);
2294
2295 for (var i = 0, l = spec.colors.length; i < l; ++i) {
2296 var c = spec.colors[i];
2297 gradient.addColorStop(i / (l - 1), typeof c == "string" ? c : parseColor(defaultColor).scale(c.brightness, c.brightness, c.brightness, c.opacity));
2298 }
2299
2300 return gradient;
2301 }
2302 }
2303 }
2304
2305 L.augment(Plot, YAHOO.util.EventProvider);
2306
2307 YAHOO.widget.Flot = function(target, data, options) {
2308 return new Plot(target, data, options);
2309 };
2310
2311 // round to nearby lower multiple of base
2312 function floorInBase(n, base) {
2313 return base * Math.floor(n / base);
2314 }
2315
2316 function clamp(min, value, max) {
2317 if (value < min)
2318 return min;
2319 else if (value > max)
2320 return max;
2321 else
2322 return value;
2323 }
2324
2325 // color helpers, inspiration from the jquery color animation
2326 // plugin by John Resig
2327 function Color (r, g, b, a) {
2328
2329 var rgba = ['r','g','b','a'];
2330 var x = 4; //rgba.length
2331
2332 while (-1<--x) {
2333 this[rgba[x]] = arguments[x] || ((x==3) ? 1.0 : 0);
2334 }
2335
2336 this.toString = function() {
2337 if (this.a >= 1.0) {
2338 return "rgb("+[this.r,this.g,this.b].join(",")+")";
2339 } else {
2340 return "rgba("+[this.r,this.g,this.b,this.a].join(",")+")";
2341 }
2342 };
2343
2344 this.scale = function(rf, gf, bf, af) {
2345 x = 4; //rgba.length
2346 while (-1<--x) {
2347 if (arguments[x] != null)
2348 this[rgba[x]] *= arguments[x];
2349 }
2350 return this.normalize();
2351 };
2352
2353 this.adjust = function(rd, gd, bd, ad) {
2354 x = 4; //rgba.length
2355 while (-1<--x) {
2356 if (arguments[x] != null)
2357 this[rgba[x]] += arguments[x];
2358 }
2359 return this.normalize();
2360 };
2361
2362 this.clone = function() {
2363 return new Color(this.r, this.b, this.g, this.a);
2364 };
2365
2366 var limit = function(val,minVal,maxVal) {
2367 return Math.max(Math.min(val, maxVal), minVal);
2368 };
2369
2370 this.normalize = function() {
2371 this.r = clamp(0, parseInt(this.r, 10), 255);
2372 this.g = clamp(0, parseInt(this.g, 10), 255);
2373 this.b = clamp(0, parseInt(this.b, 10), 255);
2374 this.a = clamp(0, this.a, 1);
2375 return this;
2376 };
2377
2378 this.normalize();
2379 }
2380
2381 var lookupColors = {
2382 aqua:[0,255,255],
2383 azure:[240,255,255],
2384 beige:[245,245,220],
2385 black:[0,0,0],
2386 blue:[0,0,255],
2387 brown:[165,42,42],
2388 cyan:[0,255,255],
2389 darkblue:[0,0,139],
2390 darkcyan:[0,139,139],
2391 darkgrey:[169,169,169],
2392 darkgreen:[0,100,0],
2393 darkkhaki:[189,183,107],
2394 darkmagenta:[139,0,139],
2395 darkolivegreen:[85,107,47],
2396 darkorange:[255,140,0],
2397 darkorchid:[153,50,204],
2398 darkred:[139,0,0],
2399 darksalmon:[233,150,122],
2400 darkviolet:[148,0,211],
2401 fuchsia:[255,0,255],
2402 gold:[255,215,0],
2403 green:[0,128,0],
2404 indigo:[75,0,130],
2405 khaki:[240,230,140],
2406 lightblue:[173,216,230],
2407 lightcyan:[224,255,255],
2408 lightgreen:[144,238,144],
2409 lightgrey:[211,211,211],
2410 lightpink:[255,182,193],
2411 lightyellow:[255,255,224],
2412 lime:[0,255,0],
2413 magenta:[255,0,255],
2414 maroon:[128,0,0],
2415 navy:[0,0,128],
2416 olive:[128,128,0],
2417 orange:[255,165,0],
2418 pink:[255,192,203],
2419 purple:[128,0,128],
2420 violet:[128,0,128],
2421 red:[255,0,0],
2422 silver:[192,192,192],
2423 white:[255,255,255],
2424 yellow:[255,255,0]
2425 };
2426
2427 function extractColor(element) {
2428 var color, elem = element;
2429 do {
2430 color = DOM.getStyle(elem, 'backgroundColor').toLowerCase();
2431 // keep going until we find an element that has color, or
2432 // we hit the body
2433 if (color != '' && color != 'transparent')
2434 break;
2435 elem = elem.parentNode;
2436 } while (!elem.nodeName == "body");
2437
2438 // catch Safari's way of signalling transparent
2439 if (color == "rgba(0, 0, 0, 0)")
2440 return "transparent";
2441
2442 return color;
2443 }
2444
2445 // parse string, returns Color
2446 function parseColor(str) {
2447 var result;
2448
2449 // Look for rgb(num,num,num)
2450 if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))
2451 return new Color(parseInt(result[1], 10), parseInt(result[2], 10), parseInt(result[3], 10));
2452
2453 // Look for rgba(num,num,num,num)
2454 if (result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
2455 return new Color(parseInt(result[1], 10), parseInt(result[2], 10), parseInt(result[3], 10), parseFloat(result[4]));
2456
2457 // Look for rgb(num%,num%,num%)
2458 if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))
2459 return new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55);
2460
2461 // Look for rgba(num%,num%,num%,num)
2462 if (result = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
2463 return new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55, parseFloat(result[4]));
2464
2465 // Look for #a0b1c2
2466 if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))
2467 return new Color(parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16));
2468
2469 // Look for #fff
2470 if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))
2471 return new Color(parseInt(result[1]+result[1], 16), parseInt(result[2]+result[2], 16), parseInt(result[3]+result[3], 16));
2472
2473 // Otherwise, we're most likely dealing with a named color
2474 var name = L.trim(str).toLowerCase();
2475 if (name == "transparent")
2476 return new Color(255, 255, 255, 0);
2477 else {
2478 result = lookupColors[name];
2479 return new Color(result[0], result[1], result[2]);
2480 }
2481 }
2482
2483 })();
@@ -0,0 +1,88 b''
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 <head>
5 <title>${_('Sign Up to hg-app')}</title>
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <link rel="icon" href="/images/hgicon.png" type="image/png" />
8 <meta name="robots" content="index, nofollow"/>
9
10 <!-- stylesheets -->
11 <link rel="stylesheet" type="text/css" href="/css/reset.css" />
12 <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
13 <link id="color" rel="stylesheet" type="text/css" href="/css/colors/blue.css" />
14
15 <!-- scripts -->
16
17 </head>
18 <body>
19 <div id="register">
20
21 <div class="title">
22 <h5>${_('Sign Up to hg-app')}</h5>
23 <div class="corner tl"></div>
24 <div class="corner tr"></div>
25 </div>
26 <div class="inner">
27 ${h.form(url('register'))}
28 <div class="form">
29 <!-- fields -->
30 <div class="fields">
31 <div class="field">
32 <div class="label">
33 <label for="username">${_('Username')}:</label>
34 </div>
35 <div class="input">
36 ${h.text('username')}
37 </div>
38 </div>
39
40 <div class="field">
41 <div class="label">
42 <label for="password">${_('New Password')}:</label>
43 </div>
44 <div class="input">
45 ${h.password('password')}
46 </div>
47 </div>
48
49 <div class="field">
50 <div class="label">
51 <label for="name">${_('First Name')}:</label>
52 </div>
53 <div class="input">
54 ${h.text('name')}
55 </div>
56 </div>
57
58 <div class="field">
59 <div class="label">
60 <label for="lastname">${_('Last Name')}:</label>
61 </div>
62 <div class="input">
63 ${h.text('lastname')}
64 </div>
65 </div>
66
67 <div class="field">
68 <div class="label">
69 <label for="email">${_('Email')}:</label>
70 </div>
71 <div class="input">
72 ${h.text('email')}
73 </div>
74 </div>
75
76 <div class="buttons">
77 <div class="nohighlight">
78 ${h.submit('sign_up','Sign Up',class_="ui-button ui-widget ui-state-default ui-corner-all")}
79 </div>
80 </div>
81 </div>
82 </div>
83 ${h.end_form()}
84 </div>
85 </div>
86 </body>
87 </html>
88
@@ -24,7 +24,7 b' Hg app, a web based mercurial repository'
24 @author: marcink
24 @author: marcink
25 """
25 """
26
26
27 VERSION = (0, 7, 9, 'beta')
27 VERSION = (0, 8, 0, 'beta')
28
28
29 __version__ = '.'.join((str(each) for each in VERSION[:4]))
29 __version__ = '.'.join((str(each) for each in VERSION[:4]))
30
30
@@ -2,7 +2,7 b''
2 # encoding: utf-8
2 # encoding: utf-8
3 # summary controller for pylons
3 # summary controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5
5 #
6 # This program is free software; you can redistribute it and/or
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; version 2
8 # as published by the Free Software Foundation; version 2
@@ -22,12 +22,18 b' Created on April 18, 2010'
22 summary controller for pylons
22 summary controller for pylons
23 @author: marcink
23 @author: marcink
24 """
24 """
25 from datetime import datetime, timedelta
25 from pylons import tmpl_context as c, request
26 from pylons import tmpl_context as c, request
26 from pylons_app.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
27 from pylons_app.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
27 from pylons_app.lib.base import BaseController, render
28 from pylons_app.lib.base import BaseController, render
29 from pylons_app.lib.helpers import person
30 from pylons_app.lib.utils import OrderedDict
28 from pylons_app.model.hg_model import HgModel
31 from pylons_app.model.hg_model import HgModel
32 from time import mktime
29 from webhelpers.paginate import Page
33 from webhelpers.paginate import Page
34 import calendar
30 import logging
35 import logging
36
31 log = logging.getLogger(__name__)
37 log = logging.getLogger(__name__)
32
38
33 class SummaryController(BaseController):
39 class SummaryController(BaseController):
@@ -56,5 +62,77 b' class SummaryController(BaseController):'
56 c.repo_branches = {}
62 c.repo_branches = {}
57 for name, hash in c.repo_info.branches.items()[:10]:
63 for name, hash in c.repo_info.branches.items()[:10]:
58 c.repo_branches[name] = c.repo_info.get_changeset(hash)
64 c.repo_branches[name] = c.repo_info.get_changeset(hash)
59
65
66 c.commit_data = self.__get_commit_stats(c.repo_info)
67
60 return render('summary/summary.html')
68 return render('summary/summary.html')
69
70
71
72 def __get_commit_stats(self, repo):
73 aggregate = OrderedDict()
74
75
76 #graph range
77 td = datetime.today()
78 y = td.year
79 m = td.month
80 d = td.day
81 c.ts_min = mktime((y, (td - timedelta(days=calendar.mdays[m] - 1)).month, d, 0, 0, 0, 0, 0, 0,))
82 c.ts_max = mktime((y, m, d, 0, 0, 0, 0, 0, 0,))
83
84
85 # #generate this monhts keys
86 # dates_range = OrderedDict()
87 # year_range = range(2010, datetime.today().year + 1)
88 # month_range = range(1, datetime.today().month + 1)
89 #
90 #
91 #
92 # for y in year_range:
93 # for m in month_range:
94 # for d in range(1, calendar.mdays[m] + 1):
95 # k = '%s-%s-%s' % (y, m, d)
96 # timetupple = [int(x) for x in k.split('-')]
97 # timetupple.extend([0 for _ in xrange(6)])
98 # k = mktime(timetupple)
99 # dates_range[k] = 0
100
101 def author_key_cleaner(k):
102 k = person(k)
103 return k
104
105 for cs in repo:
106 k = '%s-%s-%s' % (cs.date.timetuple()[0], cs.date.timetuple()[1],
107 cs.date.timetuple()[2])
108 timetupple = [int(x) for x in k.split('-')]
109 timetupple.extend([0 for _ in xrange(6)])
110 k = mktime(timetupple)
111 if aggregate.has_key(author_key_cleaner(cs.author)):
112 if aggregate[author_key_cleaner(cs.author)].has_key(k):
113 aggregate[author_key_cleaner(cs.author)][k] += 1
114 else:
115 #aggregate[author_key_cleaner(cs.author)].update(dates_range)
116 if k >= c.ts_min and k <= c.ts_max:
117 aggregate[author_key_cleaner(cs.author)][k] = 1
118 else:
119 if k >= c.ts_min and k <= c.ts_max:
120 aggregate[author_key_cleaner(cs.author)] = OrderedDict()
121 #aggregate[author_key_cleaner(cs.author)].update(dates_range)
122 aggregate[author_key_cleaner(cs.author)][k] = 1
123
124 d = ''
125 tmpl0 = u""""%s":%s"""
126 tmpl1 = u"""{label:"%s",data:%s},"""
127 for author in aggregate:
128 d += tmpl0 % (author.decode('utf8'),
129 tmpl1 \
130 % (author.decode('utf8'),
131 [[x, aggregate[author][x]] for x in aggregate[author]]))
132 if d == '':
133 d = '"%s":{label:"%s",data:[[0,0],]}' \
134 % (author_key_cleaner(repo.contact),
135 author_key_cleaner(repo.contact))
136 return d
137
138
@@ -15,7 +15,7 b' class BaseController(WSGIController):'
15
15
16 def __before__(self):
16 def __before__(self):
17 c.hg_app_version = __version__
17 c.hg_app_version = __version__
18 c.repos_prefix = config['hg_app_name']
18 c.hg_app_name = config['hg_app_name']
19 c.repo_name = get_repo_slug(request)
19 c.repo_name = get_repo_slug(request)
20 c.hg_app_user = auth.get_user(session)
20 c.hg_app_user = auth.get_user(session)
21 c.cached_repo_list = _get_repos_cached()
21 c.cached_repo_list = _get_repos_cached()
@@ -26,14 +26,22 b' div.diffblock pre.raw{'
26 color:#000000;
26 color:#000000;
27 }
27 }
28
28
29 .code-difftable{
29 table.code-difftable{
30 border-collapse: collapse;
30 border-collapse: collapse;
31 width: 99%;
31 width: 99%;
32 }
32 }
33 .code-difftable td:target *{
33 table.code-difftable td:target *{
34 background: repeat scroll 0 0 #FFFFBE !important;
34 background: repeat scroll 0 0 #FFFFBE !important;
35 text-decoration: underline;
35 text-decoration: underline;
36 }
36 }
37
38 table.code-difftable td {
39 padding: 0 !important;
40 background: none !important;
41 border:0 !important;
42 }
43
44
37 .code-difftable .context{
45 .code-difftable .context{
38 background:none repeat scroll 0 0 #DDE7EF;
46 background:none repeat scroll 0 0 #DDE7EF;
39 }
47 }
@@ -82,7 +90,6 b' div.diffblock pre.raw{'
82 padding:0;
90 padding:0;
83 }
91 }
84
92
85
86 .code {
93 .code {
87 display: block;
94 display: block;
88 width: 100%;
95 width: 100%;
@@ -22,6 +22,15 b' div.codeblock .code-header .commit{'
22 margin-left:25px;
22 margin-left:25px;
23 font-weight: normal;
23 font-weight: normal;
24 }
24 }
25 div.codeblock .code-body table{
26 width: 0 !important;
27 }
28
29 div.annotatediv{
30 margin-left:2px;
31 margin-right:4px;
32 }
33
25
34
26 .code-highlight {
35 .code-highlight {
27 padding: 0px;
36 padding: 0px;
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -4,18 +4,25 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Administration')}
5 ${_('Administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8 <%def name="breadcrumbs_links()">
9 ${_('Admin dashboard - journal')}
9 </%def>
10 </%def>
11
10 <%def name="page_nav()">
12 <%def name="page_nav()">
11 ${self.menu('admin')}
13 ${self.menu('admin')}
12 ${self.submenu('')}
13 </%def>
14 </%def>
14 <%def name="main()">
15 <%def name="main()">
15 <div>
16 <div class="box">
16 <h2>Welcome ${c.hg_app_user.username}</h2>
17 <!-- box / title -->
17 <div id="user_log">
18 <div class="title">
18 ${c.log_data}
19 ${self.breadcrumbs()}
19 </div>
20 </div>
20 </div>
21 <!-- end box / title -->
22 <div class="table">
23 <div id="user_log">
24 ${c.log_data}
25 </div>
26 </div>
27 </div>
21 </%def> No newline at end of file
28 </%def>
@@ -1,12 +1,12 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 %if c.users_log:
2 %if c.users_log:
3 <table class="table_disp">
3 <table>
4 <tr class="header">
4 <tr>
5 <td>${_('Username')}</td>
5 <th class="left">${_('Username')}</th>
6 <td>${_('Repository')}</td>
6 <th class="left">${_('Repository')}</th>
7 <td>${_('Action')}</td>
7 <th class="left">${_('Action')}</th>
8 <td>${_('Date')}</td>
8 <th class="left">${_('Date')}</th>
9 <td>${_('From IP')}</td>
9 <th class="left">${_('From IP')}</th>
10 </tr>
10 </tr>
11
11
12 %for cnt,l in enumerate(c.users_log):
12 %for cnt,l in enumerate(c.users_log):
@@ -18,22 +18,23 b''
18 <td>${l.user_ip}</td>
18 <td>${l.user_ip}</td>
19 </tr>
19 </tr>
20 %endfor
20 %endfor
21 </table>
21
22
22 </table>
23 <script type="text/javascript">
23 <div>
24 var data_div = 'user_log';
24 <script type="text/javascript">
25 YAHOO.util.Event.onDOMReady(function(){
25 var data_div = 'user_log';
26 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
26 YAHOO.util.Event.onDOMReady(function(){
27 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
27 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
28 </script>
28 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
29
29 </script>
30
30 <h2>${c.users_log.pager('$link_previous ~2~ $link_next',
31 <div class="pagination-wh pagination-left">
31 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
32 ${c.users_log.pager('$link_previous ~2~ $link_next',
32 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
33 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
33 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
34 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
34 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
35 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
35 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
36 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
36 </h2>
37 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
37 </div>
38 </div>
38 %else:
39 %else:
39 ${_('No actions yet')}
40 ${_('No actions yet')}
@@ -4,18 +4,25 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Permissions administration')}
5 ${_('Permissions administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8 <%def name="breadcrumbs_links()">
9 /
9 ${h.link_to(_('Admin'),h.url('admin_home'))}
10 ${_('Permissions')}
10 &raquo;
11 ${_('Permissions')}
12
11 </%def>
13 </%def>
12 <%def name="page_nav()">
14 <%def name="page_nav()">
13 ${self.menu('admin')}
15 ${self.menu('admin')}
14 ${self.submenu('permissions')}
15 </%def>
16 </%def>
16 <%def name="main()">
17 <%def name="main()">
17 <div>
18 <div class="box">
18 <h2>${_('Permissions')}</h2>
19 <!-- box / title -->
19
20 <div class="title">
21 ${self.breadcrumbs()}
20 </div>
22 </div>
23 <!-- end box / title -->
24 <div class="table">
25 To implement
26 </div>
27 </div>
21 </%def>
28 </%def>
@@ -4,41 +4,57 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Repositories administration')}
5 ${_('Repositories administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8 <%def name="breadcrumbs_links()">
9 /
9 ${h.link_to(_('Admin'),h.url('admin_home'))}
10 ${_('Repos')}
10 &raquo;
11 ${h.link_to(_('Repositories'),h.url('repos'))}
12 &raquo;
13 ${_('add new')}
11 </%def>
14 </%def>
15
12 <%def name="page_nav()">
16 <%def name="page_nav()">
13 ${self.menu('admin')}
17 ${self.menu('admin')}
14 ${self.submenu('repos')}
15 </%def>
18 </%def>
16 <%def name="main()">
19 <%def name="main()">
17 <div>
20 <div class="box">
18 <h2>${_('Repositories')} - ${_('add new')}</h2>
21 <!-- box / title -->
19 ${h.form(url('repos'))}
22 <div class="title">
20 <table>
23 ${self.breadcrumbs()}
21 <tr>
22 <td>${_('Name')}</td>
23 <td>${h.text('repo_name',c.new_repo)}</td>
24 <td>${self.get_form_error('repo_name')}</td>
25 </tr>
26 <tr>
27 <td>${_('Description')}</td>
28 <td>${h.textarea('description',cols=23,rows=5)}</td>
29 <td>${self.get_form_error('description')}</td>
30 </tr>
31 <tr>
32 <td>${_('Private')}</td>
33 <td>${h.checkbox('private',value="True")}</td>
34 <td>${self.get_form_error('private')}</td>
35 </tr>
36 <tr>
37 <td></td>
38 <td>${h.submit('add','add')}</td>
39 </tr>
40
41 </table>
42 ${h.end_form()}
43 </div>
24 </div>
25 ${h.form(url('repos'))}
26 <div class="form">
27 <!-- fields -->
28 <div class="fields">
29 <div class="field">
30 <div class="label">
31 <label for="repo_name">${_('Name')}:</label>
32 </div>
33 <div class="input">
34 ${h.text('repo_name',c.new_repo)}
35 </div>
36 </div>
37 <div class="field">
38 <div class="label label-textarea">
39 <label for="description">${_('Description')}:</label>
40 </div>
41 <div class="textarea text-area editor">
42 ${h.textarea('description',cols=23,rows=5)}
43 </div>
44 </div>
45 <div class="field">
46 <div class="label label-checkbox">
47 <label for="private">${_('Private')}:</label>
48 </div>
49 <div class="checkboxes">
50 ${h.checkbox('private',value="True")}
51 </div>
52 </div>
53 <div class="buttons">
54 ${h.submit('add','add',class_="ui-button ui-widget ui-state-default ui-corner-all")}
55 </div>
56 </div>
57 </div>
58 ${h.end_form()}
59 </div>
44 </%def>
60 </%def>
@@ -4,245 +4,271 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Repositories administration')}
5 ${_('Repositories administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8 <%def name="breadcrumbs_links()">
9 /
9 ${h.link_to(_('Admin'),h.url('admin_home'))}
10 ${_('Repos')}
10 &raquo;
11 ${h.link_to(_('Repositories'),h.url('repos'))}
12 &raquo;
13 ${_('edit')} "${c.repo_name}"
11 </%def>
14 </%def>
15
12 <%def name="page_nav()">
16 <%def name="page_nav()">
13 ${self.menu('admin')}
17 ${self.menu('admin')}
14 ${self.submenu('repos')}
15 </%def>
18 </%def>
19
16 <%def name="main()">
20 <%def name="main()">
17 <div>
21 <div class="box">
18 <h2>${_('Repositories')} - ${_('edit')} "${c.repo_name}"</h2>
22 <!-- box / title -->
19 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')}
23 <div class="title">
20 <table>
24 ${self.breadcrumbs()}
21 <tr>
25 </div>
22 <td>${_('Name')}</td>
26 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')}
23 <td>${h.text('repo_name',size="28")}</td>
27 <div class="form">
24 <td>${self.get_form_error('repo_name')}</td>
28 <!-- fields -->
25 </tr>
29 <div class="fields">
26 <tr>
30 <div class="field">
27 <td>${_('Description')}</td>
31 <div class="label">
28 <td>${h.textarea('description',cols=32,rows=5)}</td>
32 <label for="repo_name">${_('Name')}:</label>
29 <td>${self.get_form_error('description')}</td>
33 </div>
30 </tr>
34 <div class="input input-medium">
31 <tr>
35 ${h.text('repo_name')}
32 <td>${_('Private')}</td>
36 </div>
33 <td>${h.checkbox('private',value="True")}</td>
37 </div>
34 <td>${self.get_form_error('private')}</td>
38
35 </tr>
39 <div class="field">
36 <tr>
40 <div class="label label-textarea">
37 <td>${_('Owner')}</td>
41 <label for="description">${_('Description')}:</label>
38 <td class='ac'>
42 </div>
39 <div class="perm_ac">
43 <div class="textarea text-area editor">
40 ${h.text('user',class_='yui-ac-input')}
44 ${h.textarea('description',cols=23,rows=5)}
41 <div id="owner_container"></div>
45 </div>
42 </div>
46 </div>
43 </td>
47
44 <td>${self.get_form_error('user')}</td>
48 <div class="field">
45 </tr>
49 <div class="label label-checkbox">
46 <tr>
50 <label for="private">${_('Private')}:</label>
47 <td>${_('Permissions')}</td>
51 </div>
48 <td>
52 <div class="checkboxes">
49 <table>
53 ${h.checkbox('private',value="True")}
50 <tr>
54 </div>
51 <td>${_('none')}</td>
55 </div>
52 <td>${_('read')}</td>
56
53 <td>${_('write')}</td>
57 <div class="field">
54 <td>${_('admin')}</td>
58 <div class="label label-checkbox">
55 <td>${_('user')}</td>
59 <label for="user">${_('Owner')}:</label>
56 </tr>
60 </div>
57
61 <div class="input input-small ac">
58 %for r2p in c.repo_info.repo2perm:
62 <div class="perm_ac">
59 %if r2p.user.username =='default' and c.repo_info.private:
63 ${h.text('user',class_='yui-ac-input')}
60 <tr>
64 <div id="owner_container"></div>
61 <td colspan="4">
65 </div>
62 <span style="font-size: 0.8em">${_('disabled for private repository')}</span></td>
66 </div>
63 <td>${r2p.user.username}</td>
67 </div>
64 </tr>
68
65 %else:
69 <div class="field">
66 <tr id="id${id(r2p.user.username)}">
70 <div class="label">
67 <td>${h.radio('perm_%s' % r2p.user.username,'repository.none')}</td>
71 <label for="input">${_('Permissions')}:</label>
68 <td>${h.radio('perm_%s' % r2p.user.username,'repository.read')}</td>
72 </div>
69 <td>${h.radio('perm_%s' % r2p.user.username,'repository.write')}</td>
73 <div class="input">
70 <td>${h.radio('perm_%s' % r2p.user.username,'repository.admin')}</td>
74 <table id="permissions_manage">
71 <td>${r2p.user.username}</td>
75 <tr>
72 <td>
76 <td>${_('none')}</td>
73 %if r2p.user.username !='default':
77 <td>${_('read')}</td>
74 <span class="delete_icon action_button" onclick="ajaxAction(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
78 <td>${_('write')}</td>
75 <script type="text/javascript">
79 <td>${_('admin')}</td>
76 function ajaxAction(user_id,field_id){
80 <td>${_('user')}</td>
77 var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
81 <td></td>
78 var callback = { success:function(o){
82 </tr>
79 var tr = YAHOO.util.Dom.get(String(field_id));
83
80 tr.parentNode.removeChild(tr);}};
84 %for r2p in c.repo_info.repo2perm:
81 var postData = '_method=delete&user_id='+user_id;
85 %if r2p.user.username =='default' and c.repo_info.private:
82 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
86 <tr>
83 </script>
87 <td colspan="6">
84 </span>
88 <span class="private_repo_msg">
85 %endif
89 ${_('disabled for private repository')}
86 </td>
90 </span>
87 </tr>
91 </td>
88 %endif
92 <td>${r2p.user.username}</td>
89 %endfor
93 </tr>
90 <%
94 %else:
91 if not hasattr(c,'form_errors'):
95 <tr id="id${id(r2p.user.username)}">
92 d = 'display:none;'
96 <td>${h.radio('perm_%s' % r2p.user.username,'repository.none')}</td>
93 else:
97 <td>${h.radio('perm_%s' % r2p.user.username,'repository.read')}</td>
94 d=''
98 <td>${h.radio('perm_%s' % r2p.user.username,'repository.write')}</td>
95 %>
99 <td>${h.radio('perm_%s' % r2p.user.username,'repository.admin')}</td>
100 <td>${r2p.user.username}</td>
101 <td>
102 %if r2p.user.username !='default':
103 <span class="delete_icon action_button" onclick="ajaxAction(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
104 <script type="text/javascript">
105 function ajaxAction(user_id,field_id){
106 var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
107 var callback = { success:function(o){
108 var tr = YAHOO.util.Dom.get(String(field_id));
109 tr.parentNode.removeChild(tr);}};
110 var postData = '_method=delete&user_id='+user_id;
111 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
112 </script>
113 </span>
114 %endif
115 </td>
116 </tr>
117 %endif
118 %endfor
96
119
97 <tr id="add_perm_input" style="${d}">
120 <tr id="add_perm_input" >
98 <td>${h.radio('perm_new_user','repository.none')}</td>
121 <td>${h.radio('perm_new_user','repository.none')}</td>
99 <td>${h.radio('perm_new_user','repository.read')}</td>
122 <td>${h.radio('perm_new_user','repository.read')}</td>
100 <td>${h.radio('perm_new_user','repository.write')}</td>
123 <td>${h.radio('perm_new_user','repository.write')}</td>
101 <td>${h.radio('perm_new_user','repository.admin')}</td>
124 <td>${h.radio('perm_new_user','repository.admin')}</td>
102 <td class='ac'>
125 <td class='ac'>
103 <div class="perm_ac" id="perm_ac">
126 <div class="perm_ac" id="perm_ac">
104 ${h.text('perm_new_user_name',class_='yui-ac-input')}
127 ${h.text('perm_new_user_name',class_='yui-ac-input')}
105 <div id="perm_container"></div>
128 <div id="perm_container"></div>
106 </div>
129 </div>
107 </td>
130 </td>
108 <td>${self.get_form_error('perm_new_user_name')}</td>
131 <td></td>
109 </tr>
132 </tr>
110 <tr>
133 <tr>
111 <td colspan="4">
134 <td colspan="6">
112 <span id="add_perm" class="add_icon" style="cursor: pointer;">
135 <span id="add_perm" class="add_icon" style="cursor: pointer;">
113 ${_('Add another user')}
136 ${_('Add another user')}
114 </span>
137 </span>
115 </td>
138 </td>
116 </tr>
139 </tr>
117 </table>
140 </table>
118 </td>
141 </div>
119
142
120 </tr>
143 <div class="buttons">
121 <tr>
144 ${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
122 <td></td>
145 </div>
123 <td>${h.submit('update','update')}</td>
146 </div>
124 </tr>
147 </div>
125
148 </div>
126 </table>
149 ${h.end_form()}
127 ${h.end_form()}
128 <script type="text/javascript">
150 <script type="text/javascript">
129 YAHOO.util.Event.onDOMReady(function(){
151 YAHOO.util.Event.onDOMReady(function(){
130 var D = YAHOO.util.Dom;
152 var D = YAHOO.util.Dom;
131 YAHOO.util.Event.addListener('add_perm','click',function(){
153 if(!D.hasClass('perm_new_user_name','error')){
132 D.setStyle('add_perm_input','display','');
154 D.setStyle('add_perm_input','display','none');
133 D.setStyle('add_perm','opacity','0.6');
155 }
134 D.setStyle('add_perm','cursor','default');
156 YAHOO.util.Event.addListener('add_perm','click',function(){
135 });
157 D.setStyle('add_perm_input','display','');
158 D.setStyle('add_perm','opacity','0.6');
159 D.setStyle('add_perm','cursor','default');
160 });
136 });
161 });
137 </script>
162 </script>
138 <script type="text/javascript">
163 <script type="text/javascript">
139 YAHOO.example.FnMultipleFields = function(){
164 YAHOO.example.FnMultipleFields = function(){
140 var myContacts = ${c.users_array|n}
165 var myContacts = ${c.users_array|n}
141
166
142 // Define a custom search function for the DataSource
167 // Define a custom search function for the DataSource
143 var matchNames = function(sQuery) {
168 var matchNames = function(sQuery) {
144 // Case insensitive matching
169 // Case insensitive matching
145 var query = sQuery.toLowerCase(),
170 var query = sQuery.toLowerCase(),
146 contact,
171 contact,
147 i=0,
172 i=0,
148 l=myContacts.length,
173 l=myContacts.length,
149 matches = [];
174 matches = [];
150
175
151 // Match against each name of each contact
176 // Match against each name of each contact
152 for(; i<l; i++) {
177 for(; i<l; i++) {
153 contact = myContacts[i];
178 contact = myContacts[i];
154 if((contact.fname.toLowerCase().indexOf(query) > -1) ||
179 if((contact.fname.toLowerCase().indexOf(query) > -1) ||
155 (contact.lname.toLowerCase().indexOf(query) > -1) ||
180 (contact.lname.toLowerCase().indexOf(query) > -1) ||
156 (contact.nname && (contact.nname.toLowerCase().indexOf(query) > -1))) {
181 (contact.nname && (contact.nname.toLowerCase().indexOf(query) > -1))) {
157 matches[matches.length] = contact;
182 matches[matches.length] = contact;
158 }
183 }
159 }
184 }
160
185
161 return matches;
186 return matches;
162 };
187 };
163
188
164 // Use a FunctionDataSource
189 // Use a FunctionDataSource
165 var oDS = new YAHOO.util.FunctionDataSource(matchNames);
190 var oDS = new YAHOO.util.FunctionDataSource(matchNames);
166 oDS.responseSchema = {
191 oDS.responseSchema = {
167 fields: ["id", "fname", "lname", "nname"]
192 fields: ["id", "fname", "lname", "nname"]
168 }
193 }
169
194
170 // Instantiate AutoComplete for perms
195 // Instantiate AutoComplete for perms
171 var oAC_perms = new YAHOO.widget.AutoComplete("perm_new_user_name", "perm_container", oDS);
196 var oAC_perms = new YAHOO.widget.AutoComplete("perm_new_user_name", "perm_container", oDS);
172 oAC_perms.useShadow = false;
197 oAC_perms.useShadow = false;
173 oAC_perms.resultTypeList = false;
198 oAC_perms.resultTypeList = false;
174
199
175 // Instantiate AutoComplete for owner
200 // Instantiate AutoComplete for owner
176 var oAC_owner = new YAHOO.widget.AutoComplete("user", "owner_container", oDS);
201 var oAC_owner = new YAHOO.widget.AutoComplete("user", "owner_container", oDS);
177 oAC_owner.useShadow = false;
202 oAC_owner.useShadow = false;
178 oAC_owner.resultTypeList = false;
203 oAC_owner.resultTypeList = false;
179
204
180
205
181 // Custom formatter to highlight the matching letters
206 // Custom formatter to highlight the matching letters
182 var custom_formatter = function(oResultData, sQuery, sResultMatch) {
207 var custom_formatter = function(oResultData, sQuery, sResultMatch) {
183 var query = sQuery.toLowerCase(),
208 var query = sQuery.toLowerCase(),
184 fname = oResultData.fname,
209 fname = oResultData.fname,
185 lname = oResultData.lname,
210 lname = oResultData.lname,
186 nname = oResultData.nname || "", // Guard against null value
211 nname = oResultData.nname || "", // Guard against null value
187 query = sQuery.toLowerCase(),
212 query = sQuery.toLowerCase(),
188 fnameMatchIndex = fname.toLowerCase().indexOf(query),
213 fnameMatchIndex = fname.toLowerCase().indexOf(query),
189 lnameMatchIndex = lname.toLowerCase().indexOf(query),
214 lnameMatchIndex = lname.toLowerCase().indexOf(query),
190 nnameMatchIndex = nname.toLowerCase().indexOf(query),
215 nnameMatchIndex = nname.toLowerCase().indexOf(query),
191 displayfname, displaylname, displaynname;
216 displayfname, displaylname, displaynname;
192
217
193 if(fnameMatchIndex > -1) {
218 if(fnameMatchIndex > -1) {
194 displayfname = highlightMatch(fname, query, fnameMatchIndex);
219 displayfname = highlightMatch(fname, query, fnameMatchIndex);
195 }
220 }
196 else {
221 else {
197 displayfname = fname;
222 displayfname = fname;
198 }
223 }
199
224
200 if(lnameMatchIndex > -1) {
225 if(lnameMatchIndex > -1) {
201 displaylname = highlightMatch(lname, query, lnameMatchIndex);
226 displaylname = highlightMatch(lname, query, lnameMatchIndex);
202 }
227 }
203 else {
228 else {
204 displaylname = lname;
229 displaylname = lname;
205 }
230 }
206
231
207 if(nnameMatchIndex > -1) {
232 if(nnameMatchIndex > -1) {
208 displaynname = "(" + highlightMatch(nname, query, nnameMatchIndex) + ")";
233 displaynname = "(" + highlightMatch(nname, query, nnameMatchIndex) + ")";
209 }
234 }
210 else {
235 else {
211 displaynname = nname ? "(" + nname + ")" : "";
236 displaynname = nname ? "(" + nname + ")" : "";
212 }
237 }
213
238
214 return displayfname + " " + displaylname + " " + displaynname;
239 return displayfname + " " + displaylname + " " + displaynname;
215
240
216 };
241 };
217 oAC_perms.formatResult = custom_formatter;
242 oAC_perms.formatResult = custom_formatter;
218 oAC_owner.formatResult = custom_formatter;
243 oAC_owner.formatResult = custom_formatter;
219
244
220 // Helper function for the formatter
245 // Helper function for the formatter
221 var highlightMatch = function(full, snippet, matchindex) {
246 var highlightMatch = function(full, snippet, matchindex) {
222 return full.substring(0, matchindex) +
247 return full.substring(0, matchindex) +
223 "<span class='match'>" +
248 "<span class='match'>" +
224 full.substr(matchindex, snippet.length) +
249 full.substr(matchindex, snippet.length) +
225 "</span>" +
250 "</span>" +
226 full.substring(matchindex + snippet.length);
251 full.substring(matchindex + snippet.length);
227 };
252 };
228
253
229 var myHandler = function(sType, aArgs) {
254 var myHandler = function(sType, aArgs) {
230 var myAC = aArgs[0]; // reference back to the AC instance
255 var myAC = aArgs[0]; // reference back to the AC instance
231 var elLI = aArgs[1]; // reference to the selected LI element
256 var elLI = aArgs[1]; // reference to the selected LI element
232 var oData = aArgs[2]; // object literal of selected item's result data
257 var oData = aArgs[2]; // object literal of selected item's result data
233 myAC.getInputEl().value = oData.nname;
258 myAC.getInputEl().value = oData.nname;
234 };
259 };
235
260
236 oAC_perms.itemSelectEvent.subscribe(myHandler);
261 oAC_perms.itemSelectEvent.subscribe(myHandler);
237 oAC_owner.itemSelectEvent.subscribe(myHandler);
262 oAC_owner.itemSelectEvent.subscribe(myHandler);
238
263
239 return {
264 return {
240 oDS: oDS,
265 oDS: oDS,
241 oAC_perms: oAC_perms,
266 oAC_perms: oAC_perms,
242 oAC_owner: oAC_owner,
267 oAC_owner: oAC_owner,
243 };
268 };
244 }();
269 }();
245
270
246 </script>
271 </script>
247 </div>
272
248 </%def>
273 </div>
274 </%def> No newline at end of file
@@ -4,42 +4,52 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Repositories administration')}
5 ${_('Repositories administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8
9 /
9 <%def name="breadcrumbs_links()">
10 ${_('Repos')}
10 ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; ${_('Repositories')}
11 </%def>
11 </%def>
12 <%def name="page_nav()">
12 <%def name="page_nav()">
13 ${self.menu('admin')}
13 ${self.menu('admin')}
14 ${self.submenu('repos')}
15 </%def>
14 </%def>
16 <%def name="main()">
15 <%def name="main()">
17 <div>
16 <div class="box">
18 <h2>${_('Repositories administration')}</h2>
17 <!-- box / title -->
18 <div class="title">
19 ${self.breadcrumbs()}
20 <ul class="links">
21 <li>
22 <span>${h.link_to(u'ADD NEW REPO',h.url('new_repo'),class_="add_icon")}</span>
23 </li>
24 </ul>
25 </div>
26 <!-- end box / title -->
27 <div class="table">
19 <table class="table_disp">
28 <table class="table_disp">
20 <tr class="header">
29 <tr class="header">
21 <td>${_('name')}</td>
30 <th class="left">${_('name')}</th>
22 <td>${_('last revision')}</td>
31 <th class="left">${_('last revision')}</th>
23 <td>${_('action')}</td>
32 <th class="left">${_('action')}</th>
24 </tr>
33 </tr>
25 %for cnt,repo in enumerate(c.repos_list):
34 %for cnt,repo in enumerate(c.repos_list):
26 <tr class="parity${cnt%2}">
35 <tr class="parity${cnt%2}">
27 <td>
36 <td>
28 %if repo['repo'].dbrepo.private:
37 %if repo['repo'].dbrepo.private:
29 <img alt="${_('private')}" src="/images/icons/lock.png">
38 <img alt="${_('private')}" src="/images/icons/lock.png"/>
30 %else:
39 %else:
31 <img alt="${_('public')}" src="/images/icons/lock_open.png">
40 <img alt="${_('public')}" src="/images/icons/lock_open.png"/>
32 %endif
41 %endif
33 ${h.link_to(repo['name'],h.url('edit_repo',repo_name=repo['name']))}</td>
42 ${h.link_to(repo['name'],h.url('edit_repo',repo_name=repo['name']))}</td>
34 <td>r${repo['rev']}:${repo['tip']}</td>
43 <td>r${repo['rev']}:${repo['tip']}</td>
35 <td>
44 <td>
36 ${h.form(url('repo', repo_name=repo['name']),method='delete')}
45 ${h.form(url('repo', repo_name=repo['name']),method='delete')}
37 ${h.submit('remove','delete',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")}
46 ${h.submit('remove','delete',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")}
38 ${h.end_form()}
47 ${h.end_form()}
39 </td>
48 </td>
40 </tr>
49 </tr>
41 %endfor
50 %endfor
42 </table>
51 </table>
43 <span class="add_icon">${h.link_to(u'add repo',h.url('new_repo'))}</span>
44 </div>
52 </div>
53 </div>
54
45 </%def>
55 </%def>
@@ -4,50 +4,81 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Settings administration')}
5 ${_('Settings administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8
9 /
9
10 ${_('Settings')}
10 <%def name="breadcrumbs_links()">
11 ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; ${_('Settings')}
11 </%def>
12 </%def>
13
12 <%def name="page_nav()">
14 <%def name="page_nav()">
13 ${self.menu('admin')}
15 ${self.menu('admin')}
14 ${self.submenu('settings')}
15 </%def>
16 </%def>
16 <%def name="main()">
17 <div>
18 <h2>${_('Settings administration')}</h2>
19
17
20 ${h.form(url('admin_setting', id='mapping'),method='put')}
18 <%def name="main()">
21 <table class="table_disp">
19 <div class="box">
22 <tr class="header">
20 <!-- box / title -->
23 <td colspan="2">${_('Remap and rescan repositories')}</td>
21 <div class="title">
24 </tr>
22 ${self.breadcrumbs()}
25 <tr align="right">
23 </div>
26 <td><span class="tooltip" tooltip_title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}">
24 <!-- end box / title -->
27 ${_('destroy old data')}</span> ${h.checkbox('destroy',True)}</td>
28 <td>${h.submit('rescan','rescan repositories')}</td>
29 </table>
30 ${h.end_form()}
31 <br/>
32 ${h.form(url('admin_setting', id='global'),method='put')}
33 <table class="table_disp">
34 <tr class="header">
35 <td colspan="3">${_('Global application settings')}</td>
36 </tr>
37 <tr>
38 <td>${_('Application name')}</td>
39 <td>${h.text('app_title',size=30)}${self.get_form_error('app_title')}</td>
40 </tr>
41 <tr>
42 <td>${_('Realm text')}</td>
43 <td>${h.text('app_auth_realm',size=30)}${self.get_form_error('app_auth_realm')}</td>
44 </tr>
45 <tr>
46 <td></td>
47 <td>${h.submit('save','save settings')}</td>
48 </tr>
49 </table>
50 ${h.end_form()}
51
25
52 </div>
26 ${h.form(url('admin_setting', id='mapping'),method='put')}
27 <div class="form">
28 <!-- fields -->
29 <h3>${_('Remap and rescan repositories')}</h3>
30 <div class="fields">
31 <div class="field">
32 <div class="label label-checkbox">
33 <label for="-button">${_('rescan option')}:</label>
34 </div>
35 <div class="checkboxes">
36 <div class="checkbox">
37 ${h.checkbox('destroy',True)}
38 <label for="checkbox-1">
39 <span class="tooltip" tooltip_title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}">
40 ${_('destroy old data')}</span> </label>
41 </div>
42 </div>
43 </div>
44
45 <div class="buttons">
46 ${h.submit('rescan','rescan repositories',class_="ui-button ui-widget ui-state-default ui-corner-all")}</td>
47 </div>
48 </div>
49 </div>
50 ${h.end_form()}
51
52 ${h.form(url('admin_setting', id='global'),method='put')}
53 <div class="form">
54 <!-- fields -->
55 <h3>${_('Global application settings')}</h3>
56 <div class="fields">
57
58 <div class="field">
59 <div class="label">
60 <label for="input-small">${_('Application name')}:</label>
61 </div>
62 <div class="input">
63 ${h.text('app_title',size=30)}
64 </div>
65 </div>
66
67 <div class="field">
68 <div class="label">
69 <label for="input-small">${_('Realm text')}:</label>
70 </div>
71 <div class="input">
72 ${h.text('app_auth_realm',size=30)}
73 </div>
74 </div>
75
76 <div class="buttons">
77 ${h.submit('save','save settings',class_="ui-button ui-widget ui-state-default ui-corner-all")}
78 </div>
79 </div>
80 </div>
81 ${h.end_form()}
82
83 </div>
53 </%def>
84 </%def>
@@ -4,55 +4,88 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('User administration')}
5 ${_('User administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7 <%def name="breadcrumbs_links()">
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8 ${h.link_to(_('Admin'),h.url('admin_home'))}
9 /
9 &raquo;
10 ${_('Users')}
10 ${h.link_to(_('Users'),h.url('users'))}
11 &raquo;
12 ${_('add new user')}
11 </%def>
13 </%def>
14
12 <%def name="page_nav()">
15 <%def name="page_nav()">
13 ${self.menu('admin')}
16 ${self.menu('admin')}
14 ${self.submenu('users')}
15 </%def>
17 </%def>
18
16 <%def name="main()">
19 <%def name="main()">
17 <div>
20 <div class="box">
18 <h2>${_('User')} - ${_('add new')}</h2>
21 <!-- box / title -->
19 ${h.form(url('users'))}
22 <div class="title">
20 <table>
23 ${self.breadcrumbs()}
21 <tr>
22 <td>${_('Username')}</td>
23 <td>${h.text('username')}</td>
24 <td>${self.get_form_error('username')}</td>
25 </tr>
26 <tr>
27 <td>${_('Password')}</td>
28 <td>${h.password('password')}</td>
29 <td>${self.get_form_error('password')}</td>
30 </tr>
31 <tr>
32 <td>${_('Name')}</td>
33 <td>${h.text('name')}</td>
34 <td>${self.get_form_error('name')}</td>
35 </tr>
36 <tr>
37 <td>${_('Lastname')}</td>
38 <td>${h.text('lastname')}</td>
39 <td>${self.get_form_error('lastname')}</td>
40 </tr>
41 <tr>
42 <td>${_('Email')}</td>
43 <td>${h.text('email')}</td>
44 <td>${self.get_form_error('email')}</td>
45 </tr>
46 <tr>
47 <td>${_('Active')}</td>
48 <td>${h.checkbox('active',value=True)}</td>
49 <td>${self.get_form_error('active')}</td>
50 </tr>
51 <tr>
52 <td></td>
53 <td>${h.submit('save','save')}</td>
54 </tr>
55 </table>
56 ${h.end_form()}
57 </div>
24 </div>
25 <!-- end box / title -->
26 ${h.form(url('users'))}
27 <div class="form">
28 <!-- fields -->
29 <div class="fields">
30 <div class="field">
31 <div class="label">
32 <label for="username">${_('Username')}:</label>
33 </div>
34 <div class="input">
35 ${h.text('username')}
36 </div>
37 </div>
38
39 <div class="field">
40 <div class="label">
41 <label for="password">${_('Password')}:</label>
42 </div>
43 <div class="input">
44 ${h.password('password')}
45 </div>
46 </div>
47
48 <div class="field">
49 <div class="label">
50 <label for="name">${_('Name')}:</label>
51 </div>
52 <div class="input">
53 ${h.text('name')}
54 </div>
55 </div>
56
57 <div class="field">
58 <div class="label">
59 <label for="lastname">${_('Lastname')}:</label>
60 </div>
61 <div class="input">
62 ${h.text('lastname')}
63 </div>
64 </div>
65
66 <div class="field">
67 <div class="label">
68 <label for="email">${_('Email')}:</label>
69 </div>
70 <div class="input">
71 ${h.text('email')}
72 </div>
73 </div>
74
75 <div class="field">
76 <div class="label label-checkbox">
77 <label for="active">${_('Active')}:</label>
78 </div>
79 <div class="checkboxes">
80 ${h.checkbox('active',value=True)}
81 </div>
82 </div>
83
84 <div class="buttons">
85 ${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
86 </div>
87 </div>
88 </div>
89 ${h.end_form()}
90 </div>
58 </%def> No newline at end of file
91 </%def>
@@ -4,61 +4,98 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('User administration')}
5 ${_('User administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8 <%def name="breadcrumbs_links()">
9 /
9 ${h.link_to(_('Admin'),h.url('admin_home'))}
10 ${_('Users')}
10 &raquo;
11 ${h.link_to(_('Users'),h.url('users'))}
12 &raquo;
13 ${_('edit')} "${c.user.username}"
11 </%def>
14 </%def>
15
12 <%def name="page_nav()">
16 <%def name="page_nav()">
13 ${self.menu('admin')}
17 ${self.menu('admin')}
14 ${self.submenu('users')}
15 </%def>
18 </%def>
19
16 <%def name="main()">
20 <%def name="main()">
17 <div>
21 <div class="box">
18 <h2>${_('User')} - ${c.user.username}</h2>
22 <!-- box / title -->
19 ${h.form(url('user', id=c.user.user_id),method='put')}
23 <div class="title">
20 <table>
24 ${self.breadcrumbs()}
21 <tr>
22 <td>${_('Username')}</td>
23 <td>${h.text('username')}</td>
24 <td>${self.get_form_error('username')}</td>
25 </tr>
26 <tr>
27 <td>${_('New password')}</td>
28 <td>${h.text('new_password')}</td>
29 <td>${self.get_form_error('new_password')}</td>
30 </tr>
31 <tr>
32 <td>${_('Name')}</td>
33 <td>${h.text('name')}</td>
34 <td>${self.get_form_error('name')}</td>
35 </tr>
36 <tr>
37 <td>${_('Lastname')}</td>
38 <td>${h.text('lastname')}</td>
39 <td>${self.get_form_error('lastname')}</td>
40 </tr>
41 <tr>
42 <td>${_('Email')}</td>
43 <td>${h.text('email')}</td>
44 <td>${self.get_form_error('email')}</td>
45 </tr>
46 <tr>
47 <td>${_('Active')}</td>
48 <td>${h.checkbox('active',value=True)}</td>
49 <td>${self.get_form_error('active')}</td>
50 </tr>
51 <tr>
52 <td>${_('Admin')}</td>
53 <td>${h.checkbox('admin',value=True)}</td>
54 <td>${self.get_form_error('admin')}</td>
55 </tr>
56 <tr>
57 <td></td>
58 <td>${h.submit('save','save')}</td>
59 </tr>
60
61 </table>
62 ${h.end_form()}
63 </div>
25 </div>
26 <!-- end box / title -->
27 ${h.form(url('user', id=c.user.user_id),method='put')}
28 <div class="form">
29 <!-- fields -->
30 <div class="fields">
31 <div class="field">
32 <div class="label">
33 <label for="username">${_('Username')}:</label>
34 </div>
35 <div class="input">
36 ${h.text('username')}
37 </div>
38 </div>
39
40 <div class="field">
41 <div class="label">
42 <label for="new_password">${_('New password')}:</label>
43 </div>
44 <div class="input">
45 ${h.text('new_password')}
46 </div>
47 </div>
48
49 <div class="field">
50 <div class="label">
51 <label for="name">${_('Name')}:</label>
52 </div>
53 <div class="input">
54 ${h.text('name')}
55 </div>
56 </div>
57
58 <div class="field">
59 <div class="label">
60 <label for="lastname">${_('Lastname')}:</label>
61 </div>
62 <div class="input">
63 ${h.password('lastname')}
64 </div>
65 </div>
66
67 <div class="field">
68 <div class="label">
69 <label for="email">${_('Email')}:</label>
70 </div>
71 <div class="input">
72 ${h.text('email')}
73 </div>
74 </div>
75
76 <div class="field">
77 <div class="label label-checkbox">
78 <label for="active">${_('Active')}:</label>
79 </div>
80 <div class="checkboxes">
81 ${h.checkbox('active',value=True)}
82 </div>
83 </div>
84
85 <div class="field">
86 <div class="label label-checkbox">
87 <label for="admin">${_('Admin')}:</label>
88 </div>
89 <div class="checkboxes">
90 ${h.checkbox('admin',value=True)}
91 </div>
92 </div>
93
94 <div class="buttons">
95 ${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
96 </div>
97 </div>
98 </div>
99 ${h.end_form()}
100 </div>
64 </%def> No newline at end of file
101 </%def>
@@ -4,42 +4,55 b''
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Users administration')}
5 ${_('Users administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Admin',h.url('admin_home'))}
8 <%def name="breadcrumbs_links()">
9 /
9 ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; ${_('Users')}
10 ${_('Users')}
11 </%def>
10 </%def>
11
12 <%def name="page_nav()">
12 <%def name="page_nav()">
13 ${self.menu('admin')}
13 ${self.menu('admin')}
14 ${self.submenu('users')}
15 </%def>
14 </%def>
15
16 <%def name="main()">
16 <%def name="main()">
17 <div>
17 <div class="box">
18 <h2>${_('Users administration')}</h2>
18 <!-- box / title -->
19 <div class="title">
20 ${self.breadcrumbs()}
21 <ul class="links">
22 <li>
23 <span>${h.link_to(u'ADD NEW USER',h.url('new_user'),class_="add_icon")}</span>
24 </li>
25
26 </ul>
27 </div>
28 <!-- end box / title -->
29 <div class="table">
19 <table class="table_disp">
30 <table class="table_disp">
20 <tr class="header">
31 <tr class="header">
21 <td>${_('username')}</td>
32 <th class="left">${_('username')}</th>
22 <td>${_('name')}</td>
33 <th class="left">${_('name')}</th>
23 <td>${_('lastname')}</td>
34 <th class="left">${_('lastname')}</th>
24 <td>${_('active')}</td>
35 <th class="left">${_('active')}</th>
25 <td>${_('admin')}</td>
36 <th class="left">${_('admin')}</th>
26 <td>${_('action')}</td>
37 <th class="left">${_('action')}</th>
27 </tr>
38 </tr>
28 %for user in c.users_list:
39 %for cnt,user in enumerate(c.users_list):
29 <tr>
40 %if user.name !='default':
41 <tr class="parity${cnt%2}">
30 <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td>
42 <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td>
31 <td>${user.name}</td>
43 <td>${user.name}</td>
32 <td>${user.lastname}</td>
44 <td>${user.lastname}</td>
33 <td>${user.active}</td>
45 <td>${user.active}</td>
34 <td>${user.admin}</td>
46 <td>${user.admin}</td>
35 <td>
47 <td>
36 ${h.form(url('user', id=user.user_id),method='delete')}
48 ${h.form(url('user', id=user.user_id),method='delete')}
37 ${h.submit('remove','delete',class_="delete_icon action_button")}
49 ${h.submit('remove','delete',class_="delete_icon action_button")}
38 ${h.end_form()}
50 ${h.end_form()}
39 </td>
51 </td>
40 </tr>
52 </tr>
53 %endif
41 %endfor
54 %endfor
42 </table>
55 </table>
43 <span class="add_icon">${h.link_to(u'add user',h.url('new_user'))}</span>
44 </div>
56 </div>
57 </div>
45 </%def>
58 </%def>
@@ -2,97 +2,120 b''
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 <head>
4 <head>
5 <title>${next.title()}</title>
5 <link rel="icon" href="/images/hgicon.png" type="image/png" />
6 <link rel="icon" href="/images/hgicon.png" type="image/png" />
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
6 <meta name="robots" content="index, nofollow"/>
8 <meta name="robots" content="index, nofollow"/>
7 <title>${next.title()}</title>
9 <!-- stylesheets -->
8 ##For future use yui reset for cross browser compatability.
9 ##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" />
10 ${self.css()}
10 ${self.css()}
11 <!-- scripts -->
11 ${self.js()}
12 ${self.js()}
12 </head>
13 </head>
14 <body>
15 <!-- header -->
16 <div id="header">
17 <!-- user -->
18 <ul id="logged-user">
19 <li class="first">
20 ${h.link_to('%s %s (%s)'%(c.hg_app_user.name,c.hg_app_user.lastname,c.hg_app_user.username),h.url('edit_user', id=c.hg_app_user.user_id))}
21 </li>
22 <li class="last highlight">${h.link_to(u'Logout',h.url('logout_home'))}</li>
23 </ul>
24 <!-- end user -->
25 <div id="header-inner">
26 <div id="home">
27 <a href="${h.url('hg_home')}"></a>
28 </div>
29 <!-- logo -->
30 <div id="logo">
31 <h1><a href="${h.url('hg_home')}">${c.hg_app_name}</a></h1>
32 </div>
33 <!-- end logo -->
34 <!-- quick menu -->
35 ${self.page_nav()}
36 <!-- end quick -->
37 <div class="corner tl"></div>
38 <div class="corner tr"></div>
39 </div>
40 </div>
41 <!-- end header -->
42
43 <!-- CONTENT -->
44 <div id="content">
45 <div class="flash_msg">
46 <% messages = h.flash.pop_messages() %>
47 % if messages:
48 <ul id="flash-messages">
49 % for message in messages:
50 <li class="${message.category}_msg">${message}</li>
51 % endfor
52 </ul>
53 % endif
54 </div>
55 <div id="main">
56 ${next.main()}
57 </div>
58 </div>
59 <!-- END CONTENT -->
13
60
14 <body class="mainbody">
61 <!-- footer -->
15 <div id="container">
62 <div id="footer">
16 <div class="page-header">
63 <p>Hg App ${c.hg_app_version} &copy; 2010 by Marcin Kuzminski</p>
17 <h1 class="breadcrumbs">${next.breadcrumbs()}</h1>
64 <script type="text/javascript">${h.tooltip.activate()}</script>
18 ${self.page_nav()}
65 </div>
19 <div class="flash_msg">
66 <!-- end footer -->
20 <% messages = h.flash.pop_messages() %>
67 </body>
21 % if messages:
22 <ul id="flash-messages">
23 % for message in messages:
24 <li class="${message.category}_msg">${message}</li>
25 % endfor
26 </ul>
27 % endif
28 </div>
29 <div id="main">
30 ${next.main()}
31 <script type="text/javascript">${h.tooltip.activate()}</script>
32 </div>
33 <div class="page-footer">
34 Hg App ${c.hg_app_version} &copy; 2010 by Marcin Kuzminski
35 </div>
36
68
37 <div id="powered-by">
38 <p>
39 <a href="http://mercurial.selenic.com/" title="Mercurial">
40 <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a>
41 </p>
42 </div>
43
44 <div id="corner-top-left"></div>
45 <div id="corner-top-right"></div>
46 <div id="corner-bottom-left"></div>
47 <div id="corner-bottom-right"></div>
48
49 </div>
50 </body>
51 </html>
69 </html>
52
70
53 ### MAKO DEFS ###
71 ### MAKO DEFS ###
54
55 <%def name="page_nav()">
72 <%def name="page_nav()">
56 ${self.menu()}
73 ${self.menu()}
57 ${self.submenu()}
58 </%def>
74 </%def>
59
75
60 <%def name="menu(current)">
76 <%def name="menu(current=None)">
61 <%
77 <%
62 def is_current(selected):
78 def is_current(selected):
63 if selected == current:
79 if selected == current:
64 return "class='current'"
80 return "class='current'"
65 %>
81 %>
66 %if current not in ['home','admin']:
82 %if current not in ['home','admin']:
67 ##regular menu
83 <script type="text/javascript">
68 <script type="text/javascript">
84 YAHOO.util.Event.onDOMReady(function(){
69 YAHOO.util.Event.onDOMReady(function(){
85 YAHOO.util.Event.addListener('repo_switcher','click',function(){
70 YAHOO.util.Event.addListener('repo_switcher','click',function(){
86 if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
71 if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
87 YAHOO.util.Dom.setStyle('switch_repos','display','none');
72 YAHOO.util.Dom.setStyle('switch_repos','display','none');
88 YAHOO.util.Dom.setStyle('repo_switcher','background','');
73 YAHOO.util.Dom.setStyle('repo_switcher','background','');
89 YAHOO.util.Dom.removeClass('repo_switcher','selected');
74 YAHOO.util.Dom.removeClass('repo_switcher','selected');
90 YAHOO.util.Dom.get('repo_switcher').removeAttribute('style');
75 YAHOO.util.Dom.get('repo_switcher').removeAttribute('style');
91 }
76 }
92 else{
77 else{
93 YAHOO.util.Dom.setStyle('switch_repos','display','');
78 YAHOO.util.Dom.setStyle('switch_repos','display','');
94 //YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
79 YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
95 //YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5');
80 YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5');
96 YAHOO.util.Dom.addClass('repo_switcher','selected');
81 YAHOO.util.Dom.addClass('repo_switcher','selected');
97 }
82 }
98 });
83 });
99 YAHOO.util.Event.addListener('repos_list','change',function(e){
84 YAHOO.util.Event.addListener('repos_list','change',function(e){
100 var wa = YAHOO.util.Dom.get('repos_list').value;
85 var wa = YAHOO.util.Dom.get('repos_list').value;
101
86
102 var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
87 var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
103 window.location = url;
88 window.location = url;
104 })
89 })
105 });
90 });
106 </script>
91 </script>
107
92 <ul class="page-nav">
108 ##REGULAR MENU
109 <ul id="quick">
110 <!-- repo switcher -->
93 <li>
111 <li>
94 <a id="repo_switcher" title="${_('Switch repository')}" href="#">&darr;</a>
112 <a id="repo_switcher" title="${_('Switch repository')}" href="#">
95 <div id="switch_repos" style="display:none;position: absolute;height: 25px">
113 <span class="icon">
114 <img src="/images/icons/database.png" alt="${_('Products')}" />
115 </span>
116 <span>&darr;</span>
117 </a>
118 <div id="switch_repos" style="display:none;position: absolute;height: 25px;z-index: 1">
96 <select id="repos_list" size="=10" style="min-width: 150px">
119 <select id="repos_list" size="=10" style="min-width: 150px">
97 %for repo in sorted(x.name.lower() for x in c.cached_repo_list.values()):
120 %for repo in sorted(x.name.lower() for x in c.cached_repo_list.values()):
98 <option value="${repo}">${repo}</option>
121 <option value="${repo}">${repo}</option>
@@ -100,65 +123,120 b' def is_current(selected):'
100 </select>
123 </select>
101 </div>
124 </div>
102 </li>
125 </li>
103 <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
126
104 <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
127 <li ${is_current('summary')}>
105 <li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
128 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
106 <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
129 <span class="icon">
107 <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
130 <img src="/images/icons/clipboard_16.png" alt="${_('Summary')}" />
108 <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
131 </span>
132 <span>${_('Summary')}</span>
133 </a>
134 </li>
135 <li ${is_current('shortlog')}>
136 <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}">
137 <span class="icon">
138 <img src="/images/icons/application_double.png" alt="${_('Shortlog')}" />
139 </span>
140 <span>${_('Shortlog')}</span>
141 </a>
142 </li>
143 <li ${is_current('changelog')}>
144 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
145 <span class="icon">
146 <img src="/images/icons/time.png" alt="${_('Changelog')}" />
147 </span>
148 <span>${_('Changelog')}</span>
149 </a>
150 </li>
151 <li ${is_current('branches')}>
152 <a title="${_('Branches')}" href="${h.url('branches_home',repo_name=c.repo_name)}">
153 <span class="icon">
154 <img src="/images/icons/arrow_branch.png" alt="${_('Branches')}" />
155 </span>
156 <span>${_('Branches')}</span>
157 </a>
158 </li>
159 <li ${is_current('tags')}>
160 <a title="${_('Tags')}" href="${h.url('tags_home',repo_name=c.repo_name)}">
161 <span class="icon">
162 <img src="/images/icons/tag_blue.png" alt="${_('Tags')}" />
163 </span>
164 <span>${_('Tags')}</span>
165 </a>
166 </li>
167 <li ${is_current('files')}>
168 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
169 <span class="icon">
170 <img src="/images/icons/file.png" alt="${_('Files')}" />
171 </span>
172 <span>${_('Files')}</span>
173 </a>
174 </li>
109 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
175 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
110 <li ${is_current('settings')}>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name))}</li>
176 <li ${is_current('settings')}>
177 <a title="${_('Settings')}" href="${h.url('repo_settings_home',repo_name=c.repo_name)}">
178 <span class="icon">
179 <img src="/images/icons/cog_edit.png" alt="${_('Settings')}" />
180 </span>
181 <span>${_('Settings')}</span>
182 </a>
183 </li>
111 %endif
184 %endif
112 </ul>
185 </ul>
113 %else:
186 %else:
114 ##Root menu
187 ##ROOT MENU
115 <ul class="page-nav">
188 <ul id="quick">
116 <li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li>
189 <li>
190 <a title="${_('Home')}" href="${h.url('hg_home')}">
191 <span class="icon">
192 <img src="/images/icons/home_16.png" alt="${_('Home')}" />
193 </span>
194 <span>${_('Home')}</span>
195 </a>
196 </li>
197
117 %if h.HasPermissionAll('hg.admin')('access admin main page'):
198 %if h.HasPermissionAll('hg.admin')('access admin main page'):
118 <li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li>
199 <li ${is_current('admin')}>
200 <a title="${_('Admin')}" href="${h.url('admin_home')}">
201 <span class="icon">
202 <img src="/images/icons/cog_edit.png" alt="${_('Admin')}" />
203 </span>
204 <span>${_('Admin')}</span>
205 </a>
206 <ul>
207 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
208 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
209 ##<li>${h.link_to(_('permissions'),h.url('permissions'),class_='permissions')}</li>
210 <li>${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
211 </ul>
212 </li>
119 %endif
213 %endif
120 <li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li>
214
121 </ul>
215 </ul>
122 %endif
216 %endif
123 </div>
124 </%def>
125 <%def name="submenu(current=None)">
126 <%
127 def is_current(selected):
128 if selected == current:
129 return "class='current_submenu'"
130 %>
131 %if current != None:
132 <div>
133 <ul class="submenu">
134 <li ${is_current('repos')}>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
135 <li ${is_current('users')}>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
136 ##commented<li ${is_current('permissions')}>${h.link_to(_('permissions'),h.url('permissions'),class_='permissions')}</li>
137 <li ${is_current('settings')}>${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
138 </ul>
139 </div>
140 %endif
141 </%def>
217 </%def>
142
218
143
219
144 <%def name="css()">
220 <%def name="css()">
145 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
221 <link rel="stylesheet" type="text/css" href="/css/reset.css" />
222 <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
223 <link rel="stylesheet" type="text/css" href="/css/style_full.css" />
224 <link id="color" rel="stylesheet" type="text/css" href="/css/colors/blue.css" />
225 <link rel="stylesheet" type="text/css" href="/css/pygments.css" />
226 <link rel="stylesheet" type="text/css" href="/css/diff.css" />
146 </%def>
227 </%def>
147
228
148 <%def name="js()">
229 <%def name="js()">
149 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
230 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
231 <!--[if IE]><script language="javascript" type="text/javascript" src="/js/excanvas.min.js"></script><![endif]-->
150 <script type="text/javascript" src="/js/yui/container/container-min.js"></script>
232 <script type="text/javascript" src="/js/yui/container/container-min.js"></script>
151 <script type="text/javascript" src="/js/yui/datasource/datasource-min.js"></script>
233 <script type="text/javascript" src="/js/yui/datasource/datasource-min.js"></script>
152 <script type="text/javascript" src="/js/yui/autocomplete/autocomplete-min.js"></script>
234 <script type="text/javascript" src="/js/yui/autocomplete/autocomplete-min.js"></script>
235 <script type="text/javascript" src="/js/yui.flot.js"></script>
153 </%def>
236 </%def>
154
237
155 <!-- DEFINITION OF FORM ERROR FETCHER -->
238 <%def name="breadcrumbs()">
156 <%def name="get_form_error(element)">
239 <div class="breadcrumbs">
157 %if hasattr(c,'form_errors') and type(c.form_errors) == dict:
240 ${self.breadcrumbs_links()}
158 %if c.form_errors.get(element,False):
241 </div>
159 <span class="error-message">
160 ${c.form_errors.get(element,'')}
161 </span>
162 %endif
163 %endif
164 </%def> No newline at end of file
242 </%def>
@@ -1,18 +1,31 b''
1 ## -*- coding: utf-8 -*-
1 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
2 <%def name="title()">
4 <%def name="title()">
3 ${_('Branches')}
5 ${_('Administration')}
4 </%def>
6 </%def>
5 <%def name="breadcrumbs()">
7
8 <%def name="breadcrumbs_links()">
6 ${h.link_to(u'Home',h.url('/'))}
9 ${h.link_to(u'Home',h.url('/'))}
7 /
10 &raquo;
8 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
9 /
12 &raquo;
10 ${_('branches')}
13 ${_('branches')}
11 </%def>
14 </%def>
15
12 <%def name="page_nav()">
16 <%def name="page_nav()">
13 ${self.menu('branches')}
17 ${self.menu('branches')}
14 </%def>
18 </%def>
19
15 <%def name="main()">
20 <%def name="main()">
16 <h2 class="no-link no-border">${_('Branches')}</h2>
21 <div class="box">
17 <%include file='branches_data.html'/>
22 <!-- box / title -->
18 </%def> No newline at end of file
23 <div class="title">
24 ${self.breadcrumbs()}
25 </div>
26 <!-- end box / title -->
27 <div class="table">
28 <%include file='branches_data.html'/>
29 </div>
30 </div>
31 </%def> No newline at end of file
@@ -1,11 +1,11 b''
1 % if c.repo_branches:
1 % if c.repo_branches:
2 <table class="table_disp">
2 <table class="table_disp">
3 <tr class="header">
3 <tr>
4 <td>${_('date')}</td>
4 <th class="left">${_('date')}</th>
5 <td>${_('revision')}</td>
5 <th class="left">${_('revision')}</th>
6 <td>${_('name')}</td>
6 <th class="left">${_('name')}</th>
7 <td>${_('links')}</td>
7 <th class="left">${_('links')}</th>
8 </tr>
8 </tr>
9 %for cnt,branch in enumerate(c.repo_branches.items()):
9 %for cnt,branch in enumerate(c.repo_branches.items()):
10 <tr class="parity${cnt%2}">
10 <tr class="parity${cnt%2}">
11 <td>${h.age(branch[1]._ctx.date())}</td>
11 <td>${h.age(branch[1]._ctx.date())}</td>
@@ -3,106 +3,107 b''
3 <%def name="title()">
3 <%def name="title()">
4 ${_('Changelog - %s') % c.repo_name}
4 ${_('Changelog - %s') % c.repo_name}
5 </%def>
5 </%def>
6 <%def name="breadcrumbs()">
6
7 <%def name="breadcrumbs_links()">
7 ${h.link_to(u'Home',h.url('/'))}
8 ${h.link_to(u'Home',h.url('/'))}
8 /
9 &raquo;
9 ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))}
10 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
10 /
11 &raquo;
11 ${_('changelog')}
12 ${_('Changelog')} - ${_('showing ')} ${c.size if c.size <= c.total_cs else c.total_cs} ${_('out of')} ${c.total_cs} ${_('revisions')}
12 </%def>
13 </%def>
14
13 <%def name="page_nav()">
15 <%def name="page_nav()">
14 ${self.menu('changelog')}
16 ${self.menu('changelog')}
15 </%def>
17 </%def>
16
18
17 <%def name="main()">
19 <%def name="main()">
18
20 <div class="box">
19 <h2 class="no-link no-border">${_('Changelog')} - ${_('showing ')}
21 <!-- box / title -->
20 ${c.size if c.size <= c.total_cs else c.total_cs}
22 <div class="title">
21 ${_('out of')} ${c.total_cs} ${_('revisions')}
23 ${self.breadcrumbs()}
22 </h2>
24 </div>
23 <noscript>${_('The revision graph only works with JavaScript-enabled browsers.')}</noscript>
25 <div class="table">
24 % if c.pagination:
26 % if c.pagination:
25
27 <div id="graph">
26 <div id="graph">
28 <div id="graph_nodes">
27 <div id="graph_nodes">
29 <canvas id="graph_canvas"></canvas>
28 <canvas id="graph_canvas"></canvas>
29 </div>
30 <div id="graph_content">
31 <div class="container_header">
32 ${h.form(h.url.current(),method='get')}
33 <div>
34 <span>${_('Show')}: </span>
35 <span>${h.text('size',size=2,value=c.size)}</span>
36 <span>${_('revisions')}</span>
37 ${h.submit('set',_('set'))}
38 </div>
39 ${h.end_form()}
40 </div>
41 %for cnt,cs in enumerate(c.pagination):
42 <div id="chg_${cnt+1}" class="container">
43 <div class="left">
44 <div class="date">${_('commit')} ${cs.revision}: ${cs.raw_id}@${cs.date}</div>
45 <span class="logtags">
46 <span class="branchtag">${cs.branch}</span>
47 %for tag in cs.tags:
48 <span class="tagtag">${tag}</span>
49 %endfor
50 </span>
51 <div class="author">${cs.author}</div>
52 <div class="message">
53 ${h.link_to(h.wrap_paragraphs(cs.message),
54 h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
55 </div>
30 </div>
56 </div>
31 <div id="graph_content">
57 <div class="right">
32 <div class="container_header">
58 <div class="changes">
33
59 <span class="removed" title="${_('removed')}">${len(cs.removed)}</span>
34 ${h.form(h.url.current(),method='get')}
60 <span class="changed" title="${_('changed')}">${len(cs.changed)}</span>
35 <div class="info_box">
61 <span class="added" title="${_('added')}">${len(cs.added)}</span>
36 <span>${_('Show')}:</span>
62 </div>
37 ${h.text('size',size=1,value=c.size)}
63 %if len(cs.parents)>1:
38 <span>${_('revisions')}</span>
64 <div class="merge">
39 ${h.submit('set',_('set'))}
65 ${_('merge')}<img alt="merge" src="/images/icons/arrow_join.png"/>
40 </div>
66 </div>
41 ${h.end_form()}
67 %endif
42
68 %for p_cs in reversed(cs.parents):
43 </div>
69 <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.raw_id,
44 %for cnt,cs in enumerate(c.pagination):
70 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}
45 <div id="chg_${cnt+1}" class="container">
46 <div class="left">
47 <div class="date">${_('commit')} ${cs.revision}: ${cs.raw_id}@${cs.date}</div>
48 <span class="logtags">
49 <span class="branchtag">${cs.branch}</span>
50 %for tag in cs.tags:
51 <span class="tagtag">${tag}</span>
52 %endfor
53 </span>
54 <div class="author">${cs.author}</div>
55 <div class="message">
56 ${h.link_to(h.wrap_paragraphs(cs.message),
57 h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
71 </div>
58 </div>
72 %endfor
59 </div>
73 </div>
60 <div class="right">
74 </div>
61 <div class="changes">
75
62 <span class="removed" title="${_('removed')}">${len(cs.removed)}</span>
76 %endfor
63 <span class="changed" title="${_('changed')}">${len(cs.changed)}</span>
77 </div>
64 <span class="added" title="${_('added')}">${len(cs.added)}</span>
78 </div>
65 </div>
79 <script type="text/javascript" src="/js/graph.js"></script>
66 %if len(cs.parents)>1:
80
67 <div class="merge">
81 <script type="text/javascript">
68 ${_('merge')}<img alt="merge" src="/images/icons/arrow_join.png"/>
82 YAHOO.util.Event.onDOMReady(function(){
69 </div>
83 function set_canvas() {
70 %endif
84 var c = document.getElementById('graph_nodes');
71 %for p_cs in reversed(cs.parents):
85 var t = document.getElementById('graph_content');
72 <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.raw_id,
86 canvas = document.getElementById('graph_canvas');
73 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}
87 var div_h = t.clientHeight;
74 </div>
88 c.style.height=div_h+'px';
75 %endfor
89 canvas.setAttribute('height',div_h);
76 </div>
90 canvas.setAttribute('width',160);
77 </div>
91 };
78
92
79 %endfor
93 set_canvas();
80 <div class="pagination-wh pagination-left">
94
81 ${c.pagination.pager('$link_previous ~2~ $link_next')}
95 var jsdata = ${c.jsdata|n};
82 </div>
96 var r = new BranchRenderer();
83 </div>
97 r.render(jsdata);
84 </div>
98
85
99 });
86 <script type="text/javascript" src="/js/graph.js"></script>
100 </script>
87 <script type="text/javascript">
101
88 YAHOO.util.Event.onDOMReady(function(){
102 <div>
89 function set_canvas() {
103 <h2>${c.pagination.pager('$link_previous ~2~ $link_next')}</h2>
90 var c = document.getElementById('graph_nodes');
104 </div>
91 var t = document.getElementById('graph_content');
105 %else:
92 canvas = document.getElementById('graph_canvas');
106 ${_('There are no changes yet')}
93 var div_h = t.clientHeight;
107 %endif
94 c.style.height=div_h+'px';
108 </%def> No newline at end of file
95 canvas.setAttribute('height',div_h);
96 canvas.setAttribute('width',160);
97 };
98 set_canvas();
99 var jsdata = ${c.jsdata|n};
100 var r = new BranchRenderer();
101 r.render(jsdata);
102 });
103 </script>
104 %else:
105 ${_('There are no changes yet')}
106 %endif
107 </div>
108 </div>
109 </%def> No newline at end of file
@@ -3,23 +3,26 b''
3 <%def name="title()">
3 <%def name="title()">
4 ${_('Changeset')}
4 ${_('Changeset')}
5 </%def>
5 </%def>
6 <%def name="breadcrumbs()">
6
7 <%def name="breadcrumbs_links()">
7 ${h.link_to(u'Home',h.url('/'))}
8 ${h.link_to(u'Home',h.url('/'))}
8 /
9 &raquo;
9 ${h.link_to(c.repo_name,h.url('changeset_home',repo_name=c.repo_name))}
10 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
10 /
11 &raquo;
11 ${_('changeset')}
12 ${_('Changeset')} - r${c.changeset.revision}:${c.changeset.raw_id}
12 </%def>
13 </%def>
14
13 <%def name="page_nav()">
15 <%def name="page_nav()">
14 ${self.menu('changelog')}
16 ${self.menu('changelog')}
15 </%def>
17 </%def>
16 <%def name="css()">
18
17 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
18 <link rel="stylesheet" href="/css/diff.css" type="text/css" />
19 </%def>
20 <%def name="main()">
19 <%def name="main()">
21 <h2 class="no-link no-border">${_('Changeset')} - r${c.changeset.revision}:${c.changeset.raw_id}</h2>
20 <div class="box">
22
21 <!-- box / title -->
22 <div class="title">
23 ${self.breadcrumbs()}
24 </div>
25 <div class="table">
23 <div id="changeset_content">
26 <div id="changeset_content">
24 <div class="container">
27 <div class="container">
25 <div class="left">
28 <div class="left">
@@ -84,6 +87,8 b''
84 </div>
87 </div>
85 </div>
88 </div>
86 %endif
89 %endif
87 %endfor
90 %endfor
88
91 </div>
89 </%def> No newline at end of file
92 </div>
93
94 </%def> No newline at end of file
@@ -1,46 +1,53 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 <head>
4 <head>
5 <link rel="icon" href="/images/hgicon.png" type="image/png" />
5 <title>Error - ${c.error_message}</title>
6 <title>Error - ${c.error_message}</title>
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
7 %if c.redirect_time:
8
8 <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
9 %if c.redirect_time:
9 %endif
10 <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
10 <link rel="icon" href="/images/hgicon.png" type="image/png" />
11 %endif
11 <meta name="robots" content="index, nofollow"/>
12
12
13 <!-- stylesheets -->
14 <link rel="stylesheet" type="text/css" href="/css/reset.css" />
15 <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
16 <link id="color" rel="stylesheet" type="text/css" href="/css/colors/blue.css" />
17 <style type="text/css">
18 #main_div{
19 border: 0px solid #000;
20 width: 500px;
21 margin: auto;
22 text-align: center;
23 margin-top: 200px;
24 font-size: 1.8em;
25 }
26 .error_message{
27 text-align: center;
28 color:red;
29 font-size: 1.8em;
30 }
31 </style>
13
32
14 <style type="text/css">
33 </head>
15
34 <body>
16 body {
35
17 font-family: sans-serif;
36 <div id="login">
18 }
37 <div class="table">
19 #main_div{
38 <div id="main_div">
20 border: 0px solid #000;
39 <h1 class="error_message">${c.error_message}</h1>
21 width: 500px;
40
22 margin: auto;
41 <p>${c.error_explanation}</p>
23 text-align: center;
42 %if c.redirect_time:
24 margin-top: 200px;
43 <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
25 }
44 %endif
26 .error_message{
45
27 text-align: center;
46 </div>
28 color:red;
47 </div>
29 }
48 <!-- end login -->
30 </style>
49 </div>
31 </head>
50 </body>
32
51
33 <body>
34 <div id="main_div">
35 <h1 class="error_message">${c.error_message}</h1>
36
37 <p>${c.error_explanation}</p>
38 %if c.redirect_time:
39 <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
40 %endif
41
42 </div>
43 </body>
44 </html>
52 </html>
45
53
46
@@ -3,41 +3,47 b''
3 <%def name="title()">
3 <%def name="title()">
4 ${_('Repository managment')}
4 ${_('Repository managment')}
5 </%def>
5 </%def>
6 <%def name="breadcrumbs()">
6 <%def name="breadcrumbs_links()">
7 ${h.link_to(u'Home',h.url('/'))}
7 ${h.link_to(u'Home',h.url('/'))}
8 /
8 &raquo;
9 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
9 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
10 /
10 &raquo;
11 ${_('files')}
11 ${'%s: %s %s %s' % (_('File diff'),c.diff2,'&rarr;',c.diff1)|n}
12 </%def>
12 </%def>
13
13 <%def name="page_nav()">
14 <%def name="page_nav()">
14 ${self.menu('files')}
15 ${self.menu('files')}
15 </%def>
16 </%def>
16 <%def name="css()">
17 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
18 <link rel="stylesheet" href="/css/diff.css" type="text/css" />
19 </%def>
20 <%def name="main()">
17 <%def name="main()">
21 <h2 class="no-link no-border">${'%s: %s %s %s' % (_('File diff'),c.diff2,'&rarr;',c.diff1)|n}</h2>
18 <div class="box">
22 <div id="body" class="diffblock">
19 <!-- box / title -->
23 <div class="code-header">
20 <div class="title">
24 <div>
21 ${self.breadcrumbs()}
25 <span>${h.link_to(c.f_path,h.url('files_home',repo_name=c.repo_name,
22 </div>
26 revision=c.diff2.split(':')[1],f_path=c.f_path))}</span>
23 <div class="table">
27 &raquo; <span style="font-size:77%">${h.link_to(_('diff'),
24 <div id="body" class="diffblock">
28 h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='diff'))}</span>
25 <div class="code-header">
29 &raquo; <span style="font-size:77%">${h.link_to(_('raw diff'),
26 <div>
30 h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='raw'))}</span>
27 <span>${h.link_to(c.f_path,h.url('files_home',repo_name=c.repo_name,
31 &raquo; <span style="font-size:77%">${h.link_to(_('download diff'),
28 revision=c.diff2.split(':')[1],f_path=c.f_path))}</span>
32 h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='download'))}</span>
29 &raquo; <span style="font-size:77%">${h.link_to(_('diff'),
33 </div>
30 h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='diff'))}</span>
34 </div>
31 &raquo; <span style="font-size:77%">${h.link_to(_('raw diff'),
35 <div class="code-body">
32 h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='raw'))}</span>
36 %if c.no_changes:
33 &raquo; <span style="font-size:77%">${h.link_to(_('download diff'),
37 ${_('No changes')}
34 h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='download'))}</span>
38 %else:
35 </div>
39 ${c.cur_diff|n}
36 </div>
40 %endif
37 <div class="code-body">
41 </div>
38 %if c.no_changes:
42 </div>
39 ${_('No changes')}
43 </%def> No newline at end of file
40 %else:
41 ${c.cur_diff|n}
42 %endif
43 </div>
44 </div>
45 </div>
46 </div>
47 </%def>
48
49 No newline at end of file
@@ -1,38 +1,48 b''
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2
3 <%def name="title()">
3 <%def name="title()">
4 ${_('Repository managment')}
5 </%def>
6 <%def name="breadcrumbs()">
7 ${h.link_to(u'Home',h.url('/'))}
8 /
9 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
10 /
11 ${_('files')}
4 ${_('files')}
12 </%def>
5 </%def>
6
7 <%def name="breadcrumbs_links()">
8 ${h.link_to(u'Home',h.url('/'))}
9 &raquo;
10 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
11 &raquo;
12 ${_('files')}
13 %if c.files_list:
14 @ R${c.rev_nr}:${c.cur_rev}
15 %endif
16 </%def>
17
13 <%def name="page_nav()">
18 <%def name="page_nav()">
14 ${self.menu('files')}
19 ${self.menu('files')}
15 </%def>
20 </%def>
16 <%def name="css()">
21
17 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
18 <link rel="stylesheet" href="/css/pygments.css" type="text/css" />
19 </%def>
20 <%def name="main()">
22 <%def name="main()">
21 <h2 class="no-link no-border">${_('Files')}</h2>
23 <div class="box">
22 <div id="files_data">
24 <!-- box / title -->
23 %if c.files_list:
25 <div class="title">
24 <h2>${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.files_list.path)}</h2>
26 ${self.breadcrumbs()}
25 %if c.files_list.is_dir():
27 </div>
26 <%include file='files_browser.html'/>
28 <div class="table">
29 <div id="files_data">
30 %if c.files_list:
31 <h2>${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.files_list.path)}</h2>
32 %if c.files_list.is_dir():
33 <%include file='files_browser.html'/>
34 %else:
35 <%include file='files_source.html'/>
36 %endif
27 %else:
37 %else:
28 <%include file='files_source.html'/>
38 <h2>
29 %endif
39 <a href="#" onClick="javascript:parent.history.back();" target="main">${_('Go back')}</a>
30 %else:
40 ${_('No files at given path')}: "${c.f_path or "/"}"
31 <h2>
41 </h2>
32 <a href="#" onClick="javascript:parent.history.back();" target="main">${_('Go back')}</a>
42 %endif
33 ${_('No files at given path')}: "${c.f_path or "/"}"
43
34 </h2>
44 </div>
35 %endif
45 </div>
36
46 </div>
37 </div>
47
38 </%def> No newline at end of file
48 </%def>
@@ -3,44 +3,49 b''
3 <%def name="title()">
3 <%def name="title()">
4 ${_('File annotate')}
4 ${_('File annotate')}
5 </%def>
5 </%def>
6 <%def name="breadcrumbs()">
6
7 <%def name="breadcrumbs_links()">
7 ${h.link_to(u'Home',h.url('/'))}
8 ${h.link_to(u'Home',h.url('/'))}
8 /
9 &raquo;
9 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
10 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
10 /
11 &raquo;
11 ${_('files')}
12 ${_('annotate')}
12 </%def>
13 </%def>
14
13 <%def name="page_nav()">
15 <%def name="page_nav()">
14 ${self.menu('files')}
16 ${self.menu('files')}
15 </%def>
17 </%def>
16 <%def name="css()">
17 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
18 <link rel="stylesheet" href="/css/pygments.css" type="text/css" />
19 </%def>
20 <%def name="main()">
18 <%def name="main()">
21 <h2 class="no-link no-border">${_('Annotate')}</h2>
19 <div class="box">
22 <div id="files_data">
20 <!-- box / title -->
23 <h2>${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.file.path)}</h2>
21 <div class="title">
24 <dl class="overview">
22 ${self.breadcrumbs()}
25 <dt>${_('Revision')}</dt>
23 </div>
26 <dd>r${c.file.last_changeset.revision}:${c.file.last_changeset._short}</dd>
24 <div class="table">
27 <dt>${_('Size')}</dt>
25 <div id="files_data">
28 <dd>${h.format_byte_size(c.file.size,binary=True)}</dd>
26 <h2>${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.file.path)}</h2>
29 <dt>${_('Options')}</dt>
27 <dl class="overview">
30 <dd>${h.link_to(_('show source'),
28 <dt>${_('Revision')}</dt>
31 h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
29 <dd>r${c.file.last_changeset.revision}:${c.file.last_changeset._short}</dd>
32 / ${h.link_to(_('download as raw'),
30 <dt>${_('Size')}</dt>
33 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
31 <dd>${h.format_byte_size(c.file.size,binary=True)}</dd>
34 </dd>
32 <dt>${_('Options')}</dt>
35 </dl>
33 <dd>${h.link_to(_('show source'),
36 <div id="body" class="codeblock">
34 h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
37 <div class="code-header">
35 / ${h.link_to(_('download as raw'),
38 <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${c.file.last_changeset._short}</div>
36 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
39 <div class="commit" style="font-size:70%">"${c.file_msg}"</div>
37 </dd>
38 </dl>
39 <div id="body" class="codeblock">
40 <div class="code-header">
41 <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${c.file.last_changeset._short}</div>
42 <div class="commit" style="font-size:70%">"${c.file_msg}"</div>
43 </div>
44 <div class="code-body">
45 ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")}
46 </div>
40 </div>
47 </div>
41 <div class="code-body">
48 </div>
42 ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")}
49 </div>
43 </div>
50 </div>
44 </div>
51 </%def> No newline at end of file
45 </div>
46 </%def> No newline at end of file
@@ -8,9 +8,13 b''
8 <div id="body" class="browserblock">
8 <div id="body" class="browserblock">
9 <div class="browser-header">
9 <div class="browser-header">
10 ${h.form(h.url.current())}
10 ${h.form(h.url.current())}
11 <span>${_('view')}@rev <a style="font-size: 1.3em" href="${c.url_prev}">&laquo;</a>${h.text('at_rev',value=c.rev_nr,size='5')}<a style="font-size: 1.3em" href="${c.url_next}">&raquo;</a></span>
11 <div class="info_box">
12 ${c.cur_rev}
12 <span >${_('view')}@rev</span>
13 ${h.submit('view','view')}
13 <a href="${c.url_prev}">&laquo;</a>
14 ${h.text('at_rev',value=c.rev_nr,size=3)}
15 <a href="${c.url_next}">&raquo;</a>
16 ${h.submit('view','view')}
17 </div>
14 ${h.end_form()}
18 ${h.end_form()}
15 </div>
19 </div>
16 <div class="browser-body">
20 <div class="browser-body">
@@ -1,5 +1,5 b''
1 <dl class="overview">
1 <dl>
2 <dt>${_('Revision')}</dt>
2 <dt>${_('Last revision')}</dt>
3 <dd>r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</dd>
3 <dd>r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</dd>
4 <dt>${_('Size')}</dt>
4 <dt>${_('Size')}</dt>
5 <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd>
5 <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd>
@@ -14,11 +14,12 b''
14 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='GET')}
14 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='GET')}
15 ${h.hidden('diff2',c.files_list.last_changeset._short)}
15 ${h.hidden('diff2',c.files_list.last_changeset._short)}
16 ${h.select('diff1','',c.file_history)}
16 ${h.select('diff1','',c.file_history)}
17 ${h.submit('diff','diff')}
17 ${h.submit('diff','diff',class_="ui-button ui-widget ui-state-default ui-corner-all")}
18 ${h.end_form()}
18 ${h.end_form()}
19 </dd>
19 </dd>
20
20 </dl>
21 </dl>
21
22
22 <div id="body" class="codeblock">
23 <div id="body" class="codeblock">
23 <div class="code-header">
24 <div class="code-header">
24 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</div>
25 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</div>
@@ -1,10 +1,10 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="base/base.html"/>
2 <%inherit file="base/base.html"/>
3 <%def name="title()">
3 <%def name="title()">
4 ${c.repos_prefix}
4 ${c.hg_app_name}
5 </%def>
5 </%def>
6 <%def name="breadcrumbs()">
6 <%def name="breadcrumbs()">
7 ${c.repos_prefix}
7 ${c.hg_app_name}
8 </%def>
8 </%def>
9 <%def name="page_nav()">
9 <%def name="page_nav()">
10 ${self.menu('home')}
10 ${self.menu('home')}
@@ -17,46 +17,61 b''
17 %else:
17 %else:
18 <span style="font-weight: bold">${name}</span>
18 <span style="font-weight: bold">${name}</span>
19 %endif
19 %endif
20 <a style="color:#FFF" href="?sort=${name_slug}">&darr;</a>
20 <a href="?sort=${name_slug}">&darr;</a>
21 <a style="color:#FFF" href="?sort=-${name_slug}">&uarr;</a>
21 <a href="?sort=-${name_slug}">&uarr;</a>
22 </%def>
22 </%def>
23 <table class="table_disp">
23
24 <tr class="header">
24
25 <td>${get_sort(_('Name'))}</td>
25
26 <td>${get_sort(_('Description'))}</td>
26 <div class="box">
27 <td>${get_sort(_('Last change'))}</td>
27 <!-- box / title -->
28 <td>${get_sort(_('Tip'))}</td>
28 <div class="title">
29 <td>${get_sort(_('Contact'))}</td>
29 <h5>${_('Dashboard')}</h5>
30 <td>${_('RSS')}</td>
30 </div>
31 <td>${_('Atom')}</td>
31 <!-- end box / title -->
32 </tr>
32 <div class="table">
33 %for cnt,repo in enumerate(c.repos_list):
33 <table>
34 %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(repo['name'],'main page check'):
34 <thead>
35
35 <tr>
36 <tr class="parity${cnt%2}">
36 <th class="left">${get_sort(_('Name'))}</th>
37 <td>
37 <th class="left">${get_sort(_('Description'))}</th>
38 %if repo['repo'].dbrepo.private:
38 <th class="left">${get_sort(_('Last change'))}</th>
39 <img alt="${_('private')}" src="/images/icons/lock.png">
39 <th class="left">${get_sort(_('Tip'))}</th>
40 %else:
40 <th class="left">${get_sort(_('Contact'))}</th>
41 <img alt="${_('public')}" src="/images/icons/lock_open.png">
41 <th class="left">${_('RSS')}</th>
42 %endif
42 <th class="left">${_('Atom')}</th>
43 ${h.link_to(repo['name'],
43 </tr>
44 h.url('summary_home',repo_name=repo['name']))}</td>
44 </thead>
45 <td title="${repo['description']}">${h.truncate(repo['description'],60)}</td>
45 <tbody>
46 <td>${h.age(repo['last_change'])}</td>
46 %for cnt,repo in enumerate(c.repos_list):
47 <td>${h.link_to_if(repo['rev']>=0,'r%s:%s' % (repo['rev'],repo['tip']),
47 %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(repo['name'],'main page check'):
48 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
48 <tr class="parity${cnt%2}">
49 class_="tooltip",
49 <td>
50 tooltip_title=h.tooltip(repo['last_msg']))}</td>
50 %if repo['repo'].dbrepo.private:
51 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
51 <img alt="${_('private')}" src="/images/icons/lock.png"/>
52 <td>
52 %else:
53 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_logo" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
53 <img alt="${_('public')}" src="/images/icons/lock_open.png"/>
54 </td>
54 %endif
55 <td>
55 ${h.link_to(repo['name'],
56 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_logo" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
56 h.url('summary_home',repo_name=repo['name']))}</td>
57 </td>
57 <td title="${repo['description']}">${h.truncate(repo['description'],60)}</td>
58 </tr>
58 <td>${h.age(repo['last_change'])}</td>
59 %endif
59 <td>${h.link_to_if(repo['rev']>=0,'r%s:%s' % (repo['rev'],repo['tip']),
60 %endfor
60 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
61 </table>
61 class_="tooltip",
62 tooltip_title=h.tooltip(repo['last_msg']))}</td>
63 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
64 <td>
65 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
66 </td>
67 <td>
68 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
69 </td>
70 </tr>
71 %endif
72 %endfor
73 </tbody>
74 </table>
75 </div>
76 </div>
62 </%def>
77 </%def>
@@ -1,38 +1,76 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="base/base.html"/>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <%def name="title()">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 ${c.repos_prefix}
4 <head>
5 </%def>
5 <title>${_('Sign In to hg-app')}</title>
6 <%def name="breadcrumbs()">
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 ${c.repos_prefix}
7 <link rel="icon" href="/images/hgicon.png" type="image/png" />
8 </%def>
8 <meta name="robots" content="index, nofollow"/>
9 <%def name="page_nav()">
9
10 &nbsp;
10 <!-- stylesheets -->
11 </div>
11 <link rel="stylesheet" type="text/css" href="/css/reset.css" />
12 </%def>
12 <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
13 <%def name="main()">
13 <link id="color" rel="stylesheet" type="text/css" href="/css/colors/blue.css" />
14 <div>
14
15 <br />
15 <!-- scripts -->
16 <h2>${_('Login to hg app')}</h2>
16
17 ${h.form(h.url.current())}
17 </head>
18 <table>
18 <body>
19 <tr>
19 <div id="login">
20 <td>${_('Username')}</td>
20 <!-- login -->
21 <td>${h.text('username')}</td>
21 <div class="title">
22 <td>${self.get_form_error('username')}</td>
22 <h5>${_('Sign In to hg-app')}</h5>
23 </tr>
23 <div class="corner tl"></div>
24 <tr>
24 <div class="corner tr"></div>
25 <td>${_('Password')}</td>
25 </div>
26 <td>${h.password('password')}</td>
26 <div class="inner">
27 <td>${self.get_form_error('password')}</td>
27 ${h.form(h.url.current())}
28 </tr>
28 <div class="form">
29 <tr>
29 <!-- fields -->
30 <td></td>
30
31 <td>${h.submit('login','login')}</td>
31 <div class="fields">
32 </tr>
32 <div class="field">
33 </table>
33 <div class="label">
34 ${h.end_form()}
34 <label for="username">${_('Username')}:</label>
35 </div>
36 <div class="input">
37 ${h.text('username',class_='focus',size=40)}
38 </div>
39
40 </div>
41 <div class="field">
42 <div class="label">
43 <label for="password">${_('Password')}:</label>
44 </div>
45 <div class="input">
46 ${h.password('password',class_='focus',size=40)}
47 </div>
48
49 </div>
50 ##<div class="field">
51 ## <div class="checkbox">
52 ## <input type="checkbox" id="remember" name="remember" />
53 ## <label for="remember">Remember me</label>
54 ## </div>
55 ##</div>
56 <div class="buttons">
57 ${h.submit('sign_in','Sign In',class_="ui-button ui-widget ui-state-default ui-corner-all")}
58 </div>
59 </div>
60 <!-- end fields -->
61 <!-- links -->
62 <div class="links">
63 ${h.link_to(_('Forgot your password ?'),h.url('#'))}
64 /
65 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
66 </div>
67
68 <!-- end links -->
69 </div>
70 ${h.end_form()}
71 </div>
72 <!-- end login -->
35 </div>
73 </div>
36 </%def>
74 </body>
75 </html>
37
76
38
@@ -2,239 +2,256 b''
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Repository settings')}
5 ${_('Repositories administration')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8 ${h.link_to(u'Home',h.url('/'))}
8 <%def name="breadcrumbs_links()">
9 /
9 ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))}
10 ${h.link_to(c.repo_name,h.url('shortlog_home',repo_name=c.repo_name))}
10 &raquo;
11 /
11 ${_('Settings')}
12 ${_('settings')}
12
13 </%def>
13 </%def>
14 <%def name="page_nav()">
14 <%def name="page_nav()">
15 ${self.menu('settings')}
15 ${self.menu('settings')}
16 </%def>
16 </%def>
17 <%def name="main()">
17 <%def name="main()">
18 <h2 class="no-link no-border">${_('Settings')}</h2>
18 <div class="box">
19 <div>
19 <!-- box / title -->
20 ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')}
20 <div class="title">
21 <table>
21 ${self.breadcrumbs()}
22 <tr>
22 </div>
23 <td>${_('Name')}</td>
23 ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')}
24 <td>${h.text('repo_name',size="28")}</td>
24 <div class="form">
25 <td>${self.get_form_error('repo_name')}</td>
25 <!-- fields -->
26 </tr>
26 <div class="fields">
27 <tr>
27 <div class="field">
28 <td>${_('Description')}</td>
28 <div class="label">
29 <td>${h.textarea('description',cols=32,rows=5)}</td>
29 <label for="input-medium">${_('Name')}:</label>
30 <td>${self.get_form_error('description')}</td>
30 </div>
31 </tr>
31 <div class="input">
32 <tr>
32 ${h.text('repo_name')}
33 <td>${_('Private')}</td>
33 </div>
34 <td>${h.checkbox('private',value="True")}</td>
34 </div>
35 <td>${self.get_form_error('private')}</td>
35
36 </tr>
36 <div class="field">
37 <tr>
37 <div class="label label-textarea">
38 <td>${_('Permissions')}</td>
38 <label for="input-small">${_('Description')}:</label>
39 <td>
39 </div>
40 <table>
40 <div class="textarea text-area editor">
41 <tr>
41 ${h.textarea('description',cols=23,rows=5)}
42 <td>${_('none')}</td>
42 </div>
43 <td>${_('read')}</td>
43 </div>
44 <td>${_('write')}</td>
44
45 <td>${_('admin')}</td>
45 <div class="field">
46 <td>${_('user')}</td>
46 <div class="label label-checkbox">
47 </tr>
47 <label for="input-small">${_('Private')}:</label>
48
48 </div>
49 %for r2p in c.repo_info.repo2perm:
49 <div class="checkboxes">
50 %if r2p.user.username =='default' and c.repo_info.private:
50 ${h.checkbox('private',value="True")}
51 <tr>
51 </div>
52 <td colspan="4">
52 </div>
53 <span style="font-size: 0.8em">${_('disabled for private repository')}</span></td>
53
54 <td>${r2p.user.username}</td>
54 <div class="field">
55 </tr>
55 <div class="label">
56 %else:
56 <label for="input-small">${_('Permissions')}:</label>
57 <tr id=${id(r2p.user.username)}>
57 </div>
58 <td>${h.radio('perm_%s' % r2p.user.username,'repository.none')}</td>
58 <div class="input">
59 <td>${h.radio('perm_%s' % r2p.user.username,'repository.read')}</td>
59 <table id="permissions_manage">
60 <td>${h.radio('perm_%s' % r2p.user.username,'repository.write')}</td>
60 <tr>
61 <td>${h.radio('perm_%s' % r2p.user.username,'repository.admin')}</td>
61 <td>${_('none')}</td>
62 <td>${r2p.user.username}</td>
62 <td>${_('read')}</td>
63 <td>
63 <td>${_('write')}</td>
64 %if r2p.user.username !='default':
64 <td>${_('admin')}</td>
65 <span class="delete_icon action_button" onclick="ajaxAction(${r2p.user.user_id},${id(r2p.user.username)})">
65 <td>${_('user')}</td>
66 <script type="text/javascript">
66 <td></td>
67 function ajaxAction(user_id,field_id){
67 </tr>
68 var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
68
69 var callback = { success:function(o){
69 %for r2p in c.repo_info.repo2perm:
70 YAHOO.util.Dom.get(String(field_id)).innerHTML = '<td colspan="6"></td>';
70 %if r2p.user.username =='default' and c.repo_info.private:
71 }};
71 <tr>
72 var postData = '_method=delete&user_id='+user_id;
72 <td colspan="6">
73 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
73 <span class="private_repo_msg">
74 };
74 ${_('disabled for private repository')}
75 </script>
75 </span>
76 </span>
76 </td>
77 %endif
77 <td>${r2p.user.username}</td>
78 </td>
78 </tr>
79 </tr>
79 %else:
80 %endif
80 <tr id="id${id(r2p.user.username)}">
81 %endfor
81 <td>${h.radio('perm_%s' % r2p.user.username,'repository.none')}</td>
82 <%
82 <td>${h.radio('perm_%s' % r2p.user.username,'repository.read')}</td>
83 if not hasattr(c,'form_errors'):
83 <td>${h.radio('perm_%s' % r2p.user.username,'repository.write')}</td>
84 d = 'display:none;'
84 <td>${h.radio('perm_%s' % r2p.user.username,'repository.admin')}</td>
85 else:
85 <td>${r2p.user.username}</td>
86 d=''
86 <td>
87 %>
87 %if r2p.user.username !='default':
88 <span class="delete_icon action_button" onclick="ajaxAction(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
89 <script type="text/javascript">
90 function ajaxAction(user_id,field_id){
91 var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
92 var callback = { success:function(o){
93 var tr = YAHOO.util.Dom.get(String(field_id));
94 tr.parentNode.removeChild(tr);}};
95 var postData = '_method=delete&user_id='+user_id;
96 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
97 </script>
98 </span>
99 %endif
100 </td>
101 </tr>
102 %endif
103 %endfor
88
104
89 <tr id="add_perm_input" style="${d}">
105
90 <td>${h.radio('perm_new_user','repository.none')}</td>
106 <tr id="add_perm_input">
91 <td>${h.radio('perm_new_user','repository.read')}</td>
107 <td>${h.radio('perm_new_user','repository.none')}</td>
92 <td>${h.radio('perm_new_user','repository.write')}</td>
108 <td>${h.radio('perm_new_user','repository.read')}</td>
93 <td>${h.radio('perm_new_user','repository.admin')}</td>
109 <td>${h.radio('perm_new_user','repository.write')}</td>
94 <td class='ac'>
110 <td>${h.radio('perm_new_user','repository.admin')}</td>
95 <div id="perm_ac">
111 <td class='ac'>
96 ${h.text('perm_new_user_name',class_='yui-ac-input')}
112 <div class="perm_ac" id="perm_ac">
97 <div id="perm_container"></div>
113 ${h.text('perm_new_user_name',class_='yui-ac-input')}
98 </div>
114 <div id="perm_container"></div>
99 </td>
115 </div>
100 <td>${self.get_form_error('perm_new_user_name')}</td>
116 </td>
101 </tr>
117 <td></td>
102 <tr>
118 </tr>
103 <td colspan="4">
119 <tr>
104 <span id="add_perm" class="add_icon" style="cursor: pointer;">
120 <td colspan="6">
105 ${_('Add another user')}
121 <span id="add_perm" class="add_icon" style="cursor: pointer;">
106 </span>
122 ${_('Add another user')}
107 </td>
123 </span>
108 </tr>
124 </td>
109 </table>
125 </tr>
110 </td>
126 </table>
111
127 </div>
112 </tr>
128
113 <tr>
129 <div class="buttons">
114 <td></td>
130 ${h.submit('update','update',class_="ui-button ui-widget ui-state-default ui-corner-all")}
115 <td>${h.submit('update','update')}</td>
131 </div>
116 </tr>
132 </div>
117
133 </div>
118 </table>
134 ${h.end_form()}
119 ${h.end_form()}
120 <script type="text/javascript">
135 <script type="text/javascript">
121 YAHOO.util.Event.onDOMReady(function(){
136 YAHOO.util.Event.onDOMReady(function(){
122 var D = YAHOO.util.Dom;
137 var D = YAHOO.util.Dom;
123 YAHOO.util.Event.addListener('add_perm','click',function(){
138 YAHOO.util.Event.addListener('add_perm','click',function(){
124 D.setStyle('add_perm_input','display','');
139 D.setStyle('add_perm_input','display','');
125 D.setStyle('add_perm','opacity','0.6');
140 D.setStyle('add_perm','opacity','0.6');
126 D.setStyle('add_perm','cursor','default');
141 D.setStyle('add_perm','cursor','default');
127 });
142 });
128 });
143 });
129 </script>
144 </script>
130 <script type="text/javascript">
145 <script type="text/javascript">
131 YAHOO.example.FnMultipleFields = function(){
146 YAHOO.example.FnMultipleFields = function(){
132 var myContacts = ${c.users_array|n}
147 var myContacts = ${c.users_array|n}
133
148
134 // Define a custom search function for the DataSource
149 // Define a custom search function for the DataSource
135 var matchNames = function(sQuery) {
150 var matchNames = function(sQuery) {
136 // Case insensitive matching
151 // Case insensitive matching
137 var query = sQuery.toLowerCase(),
152 var query = sQuery.toLowerCase(),
138 contact,
153 contact,
139 i=0,
154 i=0,
140 l=myContacts.length,
155 l=myContacts.length,
141 matches = [];
156 matches = [];
142
157
143 // Match against each name of each contact
158 // Match against each name of each contact
144 for(; i<l; i++) {
159 for(; i<l; i++) {
145 contact = myContacts[i];
160 contact = myContacts[i];
146 if((contact.fname.toLowerCase().indexOf(query) > -1) ||
161 if((contact.fname.toLowerCase().indexOf(query) > -1) ||
147 (contact.lname.toLowerCase().indexOf(query) > -1) ||
162 (contact.lname.toLowerCase().indexOf(query) > -1) ||
148 (contact.nname && (contact.nname.toLowerCase().indexOf(query) > -1))) {
163 (contact.nname && (contact.nname.toLowerCase().indexOf(query) > -1))) {
149 matches[matches.length] = contact;
164 matches[matches.length] = contact;
150 }
165 }
151 }
166 }
152
167
153 return matches;
168 return matches;
154 };
169 };
155
170
156 // Use a FunctionDataSource
171 // Use a FunctionDataSource
157 var oDS = new YAHOO.util.FunctionDataSource(matchNames);
172 var oDS = new YAHOO.util.FunctionDataSource(matchNames);
158 oDS.responseSchema = {
173 oDS.responseSchema = {
159 fields: ["id", "fname", "lname", "nname"]
174 fields: ["id", "fname", "lname", "nname"]
160 }
175 }
161
176
162 // Instantiate AutoComplete for perms
177 // Instantiate AutoComplete for perms
163 var oAC_perms = new YAHOO.widget.AutoComplete("perm_new_user_name", "perm_container", oDS);
178 var oAC_perms = new YAHOO.widget.AutoComplete("perm_new_user_name", "perm_container", oDS);
164 oAC_perms.useShadow = false;
179 oAC_perms.useShadow = false;
165 oAC_perms.resultTypeList = false;
180 oAC_perms.resultTypeList = false;
166
181
167 // Instantiate AutoComplete for owner
182 // Instantiate AutoComplete for owner
168 var oAC_owner = new YAHOO.widget.AutoComplete("user", "owner_container", oDS);
183 var oAC_owner = new YAHOO.widget.AutoComplete("user", "owner_container", oDS);
169 oAC_owner.useShadow = false;
184 oAC_owner.useShadow = false;
170 oAC_owner.resultTypeList = false;
185 oAC_owner.resultTypeList = false;
171
186
172
187
173 // Custom formatter to highlight the matching letters
188 // Custom formatter to highlight the matching letters
174 var custom_formatter = function(oResultData, sQuery, sResultMatch) {
189 var custom_formatter = function(oResultData, sQuery, sResultMatch) {
175 var query = sQuery.toLowerCase(),
190 var query = sQuery.toLowerCase(),
176 fname = oResultData.fname,
191 fname = oResultData.fname,
177 lname = oResultData.lname,
192 lname = oResultData.lname,
178 nname = oResultData.nname || "", // Guard against null value
193 nname = oResultData.nname || "", // Guard against null value
179 query = sQuery.toLowerCase(),
194 query = sQuery.toLowerCase(),
180 fnameMatchIndex = fname.toLowerCase().indexOf(query),
195 fnameMatchIndex = fname.toLowerCase().indexOf(query),
181 lnameMatchIndex = lname.toLowerCase().indexOf(query),
196 lnameMatchIndex = lname.toLowerCase().indexOf(query),
182 nnameMatchIndex = nname.toLowerCase().indexOf(query),
197 nnameMatchIndex = nname.toLowerCase().indexOf(query),
183 displayfname, displaylname, displaynname;
198 displayfname, displaylname, displaynname;
184
199
185 if(fnameMatchIndex > -1) {
200 if(fnameMatchIndex > -1) {
186 displayfname = highlightMatch(fname, query, fnameMatchIndex);
201 displayfname = highlightMatch(fname, query, fnameMatchIndex);
187 }
202 }
188 else {
203 else {
189 displayfname = fname;
204 displayfname = fname;
190 }
205 }
191
206
192 if(lnameMatchIndex > -1) {
207 if(lnameMatchIndex > -1) {
193 displaylname = highlightMatch(lname, query, lnameMatchIndex);
208 displaylname = highlightMatch(lname, query, lnameMatchIndex);
194 }
209 }
195 else {
210 else {
196 displaylname = lname;
211 displaylname = lname;
197 }
212 }
198
213
199 if(nnameMatchIndex > -1) {
214 if(nnameMatchIndex > -1) {
200 displaynname = "(" + highlightMatch(nname, query, nnameMatchIndex) + ")";
215 displaynname = "(" + highlightMatch(nname, query, nnameMatchIndex) + ")";
201 }
216 }
202 else {
217 else {
203 displaynname = nname ? "(" + nname + ")" : "";
218 displaynname = nname ? "(" + nname + ")" : "";
204 }
219 }
205
220
206 return displayfname + " " + displaylname + " " + displaynname;
221 return displayfname + " " + displaylname + " " + displaynname;
207
222
208 };
223 };
209 oAC_perms.formatResult = custom_formatter;
224 oAC_perms.formatResult = custom_formatter;
210 oAC_owner.formatResult = custom_formatter;
225 oAC_owner.formatResult = custom_formatter;
211
226
212 // Helper function for the formatter
227 // Helper function for the formatter
213 var highlightMatch = function(full, snippet, matchindex) {
228 var highlightMatch = function(full, snippet, matchindex) {
214 return full.substring(0, matchindex) +
229 return full.substring(0, matchindex) +
215 "<span class='match'>" +
230 "<span class='match'>" +
216 full.substr(matchindex, snippet.length) +
231 full.substr(matchindex, snippet.length) +
217 "</span>" +
232 "</span>" +
218 full.substring(matchindex + snippet.length);
233 full.substring(matchindex + snippet.length);
219 };
234 };
220
235
221 var myHandler = function(sType, aArgs) {
236 var myHandler = function(sType, aArgs) {
222 var myAC = aArgs[0]; // reference back to the AC instance
237 var myAC = aArgs[0]; // reference back to the AC instance
223 var elLI = aArgs[1]; // reference to the selected LI element
238 var elLI = aArgs[1]; // reference to the selected LI element
224 var oData = aArgs[2]; // object literal of selected item's result data
239 var oData = aArgs[2]; // object literal of selected item's result data
225 myAC.getInputEl().value = oData.nname;
240 myAC.getInputEl().value = oData.nname;
226 };
241 };
227
242
228 oAC_perms.itemSelectEvent.subscribe(myHandler);
243 oAC_perms.itemSelectEvent.subscribe(myHandler);
229 oAC_owner.itemSelectEvent.subscribe(myHandler);
244 //oAC_owner.itemSelectEvent.subscribe(myHandler);
230
245
231 return {
246 return {
232 oDS: oDS,
247 oDS: oDS,
233 oAC_perms: oAC_perms,
248 oAC_perms: oAC_perms,
234 oAC_owner: oAC_owner,
249 oAC_owner: oAC_owner,
235 };
250 };
236 }();
251 }();
237
252
238 </script>
253 </script>
239 </div>
254 </div>
240 </%def>
255 </%def>
256
257
@@ -2,23 +2,32 b''
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Repository managment')}
5 ${_('Shortlog')}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs()">
7
8
9 <%def name="breadcrumbs_links()">
8 ${h.link_to(u'Home',h.url('/'))}
10 ${h.link_to(u'Home',h.url('/'))}
9 /
11 &raquo;
10 ${h.link_to(c.repo_name,h.url('shortlog_home',repo_name=c.repo_name))}
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
11 /
13 &raquo;
12 ${_('shortlog')}
14 ${_('shortlog')}
13 </%def>
15 </%def>
16
14 <%def name="page_nav()">
17 <%def name="page_nav()">
15 ${self.menu('shortlog')}
18 ${self.menu('shortlog')}
16 </%def>
19 </%def>
17 <%def name="main()">
20 <%def name="main()">
18
21 <div class="box">
19 <h2 class="no-link no-border">${_('Shortlog')}</h2>
22 <!-- box / title -->
20
23 <div class="title">
21 <div id="shortlog_data">
24 ${self.breadcrumbs()}
22 ${c.shortlog_data}
25 </div>
23 </div>
26 <!-- end box / title -->
24 </%def> No newline at end of file
27 <div class="table">
28 <div id="shortlog_data">
29 ${c.shortlog_data}
30 </div>
31 </div>
32 </div>
33 </%def> No newline at end of file
@@ -1,15 +1,14 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 % if c.repo_changesets:
2 % if c.repo_changesets:
3
3 <table>
4 <table class="table_disp">
4 <tr>
5 <tr class="header">
5 <th class="left">${_('date')}</th>
6 <td>${_('date')}</td>
6 <th class="left">${_('author')}</th>
7 <td>${_('author')}</td>
7 <th class="left">${_('revision')}</th>
8 <td>${_('revision')}</td>
8 <th class="left">${_('commit message')}</th>
9 <td>${_('commit message')}</td>
9 <th class="left">${_('branch')}</th>
10 <td>${_('branch')}</td>
10 <th class="left">${_('tags')}</th>
11 <td>${_('tags')}</td>
11 <th class="left">${_('links')}</th>
12 <td>${_('links')}</td>
13
12
14 </tr>
13 </tr>
15 %for cnt,cs in enumerate(c.repo_changesets):
14 %for cnt,cs in enumerate(c.repo_changesets):
@@ -43,22 +42,22 b''
43 %endfor
42 %endfor
44
43
45 </table>
44 </table>
46 <div>
45
47 <script type="text/javascript">
46 <script type="text/javascript">
48 var data_div = 'shortlog_data';
47 var data_div = 'shortlog_data';
49 YAHOO.util.Event.onDOMReady(function(){
48 YAHOO.util.Event.onDOMReady(function(){
50 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
49 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
51 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
50 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
52 </script>
51 </script>
53 <h2>
52
54 ${c.repo_changesets.pager('$link_previous ~2~ $link_next',
53 <div class="pagination-wh pagination-left">
55 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
54 ${c.repo_changesets.pager('$link_previous ~2~ $link_next',
56 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
55 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
57 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
56 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
58 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
57 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
59 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
58 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
60 </h2>
59 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
61 </div>
60 </div>
62 %else:
61 %else:
63 ${_('There are no commits yet')}
62 ${_('There are no commits yet')}
64 %endif No newline at end of file
63 %endif
@@ -1,71 +1,270 b''
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2 <%def name="title()">
3 <%def name="title()">
3 ${_('Repository managment')}
4 ${_('Mercurial Repository Overview')}
4 </%def>
5 </%def>
5 <%def name="breadcrumbs()">
6
7
8
9 <%def name="breadcrumbs_links()">
6 ${h.link_to(u'Home',h.url('/'))}
10 ${h.link_to(u'Home',h.url('/'))}
7 /
11 &raquo;
8 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
9 /
13 &raquo;
10 ${_('summary')}
14 ${_('summary')}
11 </%def>
15 </%def>
16
12 <%def name="page_nav()">
17 <%def name="page_nav()">
13 ${self.menu('summary')}
18 ${self.menu('summary')}
14 </%def>
19 </%def>
15
20
16 <%def name="js()">
21 <%def name="main()">
17 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
18 <script type="text/javascript">
22 <script type="text/javascript">
19 var E = YAHOO.util.Event;
23 var E = YAHOO.util.Event;
20 var D = YAHOO.util.Dom;
24 var D = YAHOO.util.Dom;
21
25
22 E.onDOMReady(function(e){
26 E.onDOMReady(function(e){
23 id = 'clone_url';
27 id = 'clone_url';
24 E.addListener(id,'click',function(e){
28 E.addListener(id,'click',function(e){
25 D.get('clone_url').select();
29 D.get('clone_url').select();
26 })
30 })
27 })
31 })
28 </script>
32 </script>
29 </%def>
33 <div class="box box-left">
34 <!-- box / title -->
35 <div class="title">
36 ${self.breadcrumbs()}
37 </div>
38 <!-- end box / title -->
39 <div class="form">
40 <div class="fields">
41
42 <div class="field">
43 <div class="label">
44 <label>${_('Name')}:</label>
45 </div>
46 <div class="input-short">
47 ${c.repo_info.name}
48 </div>
49 </div>
50
51
52 <div class="field">
53 <div class="label">
54 <label>${_('Description')}:</label>
55 </div>
56 <div class="input-short">
57 ${c.repo_info.description}
58 </div>
59 </div>
60
61
62 <div class="field">
63 <div class="label">
64 <label>${_('Contact')}:</label>
65 </div>
66 <div class="input-short">
67 ${c.repo_info.contact}
68 </div>
69 </div>
70
71 <div class="field">
72 <div class="label">
73 <label>${_('Last change')}:</label>
74 </div>
75 <div class="input-short">
76 ${h.age(c.repo_info.last_change)} - ${h.rfc822date(c.repo_info.last_change)}
77 </div>
78 </div>
79
80 <div class="field">
81 <div class="label">
82 <label>${_('Clone url')}:</label>
83 </div>
84 <div class="input-short">
85 <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/>
86 </div>
87 </div>
88
89 <div class="field">
90 <div class="label">
91 <label>${_('Download')}:</label>
92 </div>
93 <div class="input-short">
94 %for cnt,archive in enumerate(c.repo_info._get_archives()):
95 %if cnt >=1:
96 |
97 %endif
98 ${h.link_to(c.repo_info.name+'.'+archive['type'],
99 h.url('files_archive_home',repo_name=c.repo_info.name,
100 revision='tip',fileformat=archive['extension']),class_="archive_icon")}
101 %endfor
102 </div>
103 </div>
104
105 <div class="field">
106 <div class="label">
107 <label>${_('Feeds')}:</label>
108 </div>
109 <div class="input-short">
110 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo_info.name),class_='rss_icon')}
111 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo_info.name),class_='atom_icon')}
112 </div>
113 </div>
114 </div>
115 </div>
116 </div>
117
118 <div class="box box-right">
119 <!-- box / title -->
120 <div class="title">
121 <h5>${_('Last month commit activity')}</h5>
122 </div>
123
124 <div class="table">
125 <div id="commit_history" style="width:600px;height:370px;float:left"></div>
126 <div id="legend_data">
127 <div id="legend_container"></div>
128 <div id="legend_choices">
129 <table id="legend_choices_tables" style="font-size:smaller;color:#545454">
130
131 </table>
132 </div>
133 </div>
134 <script type="text/javascript">
135
136 (function () {
137 var datasets = {${c.commit_data|n}};
138 var i = 0;
139 var choiceContainer = YAHOO.util.Dom.get("legend_choices");
140 var choiceContainerTable = YAHOO.util.Dom.get("legend_choices_tables");
141 for(var key in datasets) {
142 datasets[key].color = i;
143 i++;
144 choiceContainerTable.innerHTML += '<tr>'+
145 '<td>'+
146 '<input type="checkbox" name="' + key +'" checked="checked" />'+datasets[key].label+
147 '</td>'+
148 '</tr>';
149 };
150
30
151
31 <%def name="main()">
152 function plotAccordingToChoices() {
32 <h2 class="no-link no-border">${_('Mercurial Repository Overview')}</h2>
153 var data = [];
33 <dl class="overview">
154
34 <dt>${_('name')}</dt>
155 var inputs = choiceContainer.getElementsByTagName("input");
35 <dd>${c.repo_info.name}</dd>
156 for(var i=0; i<inputs.length; i++) {
36 <dt>${_('description')}</dt>
157 if(!inputs[i].checked)
37 <dd>${c.repo_info.description}</dd>
158 continue;
38 <dt>${_('contact')}</dt>
159
39 <dd>${c.repo_info.contact}</dd>
160 var key = inputs[i].name;
40 <dt>${_('last change')}</dt>
161 if (key && datasets[key])
41 <dd>${h.age(c.repo_info.last_change)} - ${h.rfc822date(c.repo_info.last_change)}</dd>
162 data.push(datasets[key]);
42 <dt>${_('clone url')}</dt>
163 };
43 <dd><input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/></dd>
164
44 <dt>${_('download')}</dt>
165 if (data.length > 0){
45 <dd>
166 var plot = YAHOO.widget.Flot("commit_history", data,
46 %for cnt,archive in enumerate(c.repo_info._get_archives()):
167 { bars: { show: true, align:'left' },
47 %if cnt >=1:
168 points: { show: true, radius:0,fill:true },
48 |
169 legend:{show:true, container:"legend_container"},
49 %endif
170 selection: { mode: "xy" },
50 ${h.link_to(c.repo_info.name+'.'+archive['type'],
171 yaxis:{tickSize:[1]},
51 h.url('files_archive_home',repo_name=c.repo_info.name,
172 xaxis: { mode: "time", timeformat: "%d",tickSize:[1, "day"],min:${c.ts_min},max:${c.ts_max} },
52 revision='tip',fileformat=archive['extension']),class_="archive_logo")}
173 grid: { hoverable: true, clickable: true,autoHighlight:true },
53 %endfor
174 });
54 </dd>
175
55 <dt>${_('feeds')}</dt>
176 function showTooltip(x, y, contents) {
56 <dd>
177 var div=document.getElementById('tooltip');
57 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo_info.name),class_='rss_logo')}
178 if(!div) {
58 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo_info.name),class_='atom_logo')}
179 div = document.createElement('div');
59 </dd>
180 div.id="tooltip";
60 </dl>
181 div.style.position="absolute";
182 div.style.border='1px solid #fdd';
183 div.style.padding='2px';
184 div.style.backgroundColor='#fee';
185 document.body.appendChild(div);
186 }
187 YAHOO.util.Dom.setStyle(div, 'opacity', 0);
188 div.innerHTML = contents;
189 div.style.top=(y + 5) + "px";
190 div.style.left=(x + 5) + "px";
191
192 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
193 anim.animate();
194 }
61
195
62 <h2>${h.link_to(_('Last ten changes'),h.url('changelog_home',repo_name=c.repo_name))}</h2>
196 var previousPoint = null;
63 <%include file='../shortlog/shortlog_data.html'/>
197 plot.subscribe("plothover", function (o) {
198 var pos = o.pos;
199 var item = o.item;
200
201 //YAHOO.util.Dom.get("x").innerHTML = pos.x.toFixed(2);
202 //YAHOO.util.Dom.get("y").innerHTML = pos.y.toFixed(2);
203 if (item) {
204 if (previousPoint != item.datapoint) {
205 previousPoint = item.datapoint;
206
207 var tooltip = YAHOO.util.Dom.get("tooltip");
208 if(tooltip) {
209 tooltip.parentNode.removeChild(tooltip);
210 }
211 var x = item.datapoint.x.toFixed(2);
212 var y = item.datapoint.y.toFixed(2);
213
214 if (!item.series.label){
215 item.series.label = 'commits';
216 }
217 var d = new Date(x*1000);
218 var fd = d.getFullYear()+'-'+(d.getMonth()+1)+'-'+d.getDate();
219 var nr_commits = parseInt(y);
220 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd + ": " + nr_commits+" commits");
221 }
222 }
223 else {
224 var tooltip = YAHOO.util.Dom.get("tooltip");
225
226 if(tooltip) {
227 tooltip.parentNode.removeChild(tooltip);
228 }
229 previousPoint = null;
230 }
231 });
64
232
65 <h2>${h.link_to(_('Last ten tags'),h.url('tags_home',repo_name=c.repo_name))}</h2>
233 }
66 <%include file='../tags/tags_data.html'/>
234 }
67
235
68 <h2>${h.link_to(_('Last ten branches'),h.url('branches_home',repo_name=c.repo_name))}</h2>
236 YAHOO.util.Event.on(choiceContainer.getElementsByTagName("input"), "click", plotAccordingToChoices);
69 <%include file='../branches/branches_data.html'/>
237
238 plotAccordingToChoices();
239 })();
240 </script>
241
242 </div>
243 </div>
244
245 <div class="box">
246 <div class="title">
247 <div class="breadcrumbs">${h.link_to(_('Last ten changes'),h.url('changelog_home',repo_name=c.repo_name))}</div>
248 </div>
249 <div class="table">
250 <%include file='../shortlog/shortlog_data.html'/>
251 </div>
252 </div>
253 <div class="box">
254 <div class="title">
255 <div class="breadcrumbs">${h.link_to(_('Last ten tags'),h.url('tags_home',repo_name=c.repo_name))}</div>
256 </div>
257 <div class="table">
258 <%include file='../tags/tags_data.html'/>
259 </div>
260 </div>
261 <div class="box">
262 <div class="title">
263 <div class="breadcrumbs">${h.link_to(_('Last ten branches'),h.url('branches_home',repo_name=c.repo_name))}</div>
264 </div>
265 <div class="table">
266 <%include file='../branches/branches_data.html'/>
267 </div>
268 </div>
70
269
71 </%def> No newline at end of file
270 </%def>
@@ -1,20 +1,31 b''
1 ## -*- coding: utf-8 -*-
1 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
2 <%def name="title()">
4 <%def name="title()">
3 ${_('Tags')}
5 ${_('Administration')}
4 </%def>
6 </%def>
5 <%def name="breadcrumbs()">
7
8
9 <%def name="breadcrumbs_links()">
6 ${h.link_to(u'Home',h.url('/'))}
10 ${h.link_to(u'Home',h.url('/'))}
7 /
11 &raquo;
8 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
9 /
13 &raquo;
10 ${_('tags')}
14 ${_('tags')}
11 </%def>
15 </%def>
16
12 <%def name="page_nav()">
17 <%def name="page_nav()">
13 ${self.menu('tags')}
18 ${self.menu('tags')}
14 </%def>
19 </%def>
15 <%def name="main()">
20 <%def name="main()">
16
21 <div class="box">
17 <h2 class="no-link no-border">${_('Tags')}</h2>
22 <!-- box / title -->
18 <%include file='tags_data.html'/>
23 <div class="title">
19
24 ${self.breadcrumbs()}
20 </%def> No newline at end of file
25 </div>
26 <!-- end box / title -->
27 <div class="table">
28 <%include file='tags_data.html'/>
29 </div>
30 </div>
31 </%def> No newline at end of file
@@ -1,10 +1,10 b''
1 %if c.repo_tags:
1 %if c.repo_tags:
2 <table class="table_disp">
2 <table>
3 <tr class="header">
3 <tr>
4 <td>${_('date')}</td>
4 <th class="left">${_('date')}</th>
5 <td>${_('revision')}</td>
5 <th class="left">${_('revision')}</th>
6 <td>${_('name')}</td>
6 <th class="left">${_('name')}</th>
7 <td>${_('links')}</td>
7 <th class="left">${_('links')}</th>
8 </tr>
8 </tr>
9 %for cnt,tag in enumerate(c.repo_tags.items()):
9 %for cnt,tag in enumerate(c.repo_tags.items()):
10 <tr class="parity${cnt%2}">
10 <tr class="parity${cnt%2}">
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (952 lines changed) Show them Hide them
General Comments 0
You need to be logged in to leave comments. Login now