Commit 8d74123d61e83c29b5449773e1c471d2e2aa126f

Authored by Nihad Abbasov
2 parents f476c42d 76294699

Merge branch 'master' into features/feeds

Showing 56 changed files with 1033 additions and 749 deletions   Show diff stats
.rbenv-version 0 → 100644
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +1.9.2-p290
  1 +v 1.2.0
  2 + - new design
  3 + - user dashboard
  4 + - markdown support for comments
  5 + - encoding issues
  6 + - wall like twitter timeline
  7 +
1 v 1.1.0 8 v 1.1.0
2 - project dashboard 9 - project dashboard
3 - wall redesigned 10 - wall redesigned
@@ -37,7 +37,6 @@ end @@ -37,7 +37,6 @@ end
37 37
38 group :development, :test do 38 group :development, :test do
39 gem 'rspec-rails' 39 gem 'rspec-rails'
40 - gem "shoulda", "~> 3.0.0.beta2"  
41 gem 'capybara' 40 gem 'capybara'
42 gem 'autotest' 41 gem 'autotest'
43 gem 'autotest-rails' 42 gem 'autotest-rails'
@@ -51,4 +50,5 @@ end @@ -51,4 +50,5 @@ end
51 group :test do 50 group :test do
52 gem 'turn', :require => false 51 gem 'turn', :require => false
53 gem 'simplecov', :require => false 52 gem 'simplecov', :require => false
  53 + gem "shoulda", "~> 3.0.0.beta2"
54 end 54 end
1 -1.1.0 1 +1.2.0
app/assets/javascripts/application.js
@@ -10,6 +10,8 @@ @@ -10,6 +10,8 @@
10 //= require jquery.ui.selectmenu 10 //= require jquery.ui.selectmenu
11 //= require jquery.tagify 11 //= require jquery.tagify
12 //= require jquery.cookie 12 //= require jquery.cookie
  13 +//= require raphael
  14 +//= require branch-graph
13 //= require_tree . 15 //= require_tree .
14 16
15 $(function(){ 17 $(function(){
@@ -19,8 +21,20 @@ $(function(){ @@ -19,8 +21,20 @@ $(function(){
19 21
20 $('select#branch').selectmenu({style:'popup', width:200}); 22 $('select#branch').selectmenu({style:'popup', width:200});
21 $('select#tag').selectmenu({style:'popup', width:200}); 23 $('select#tag').selectmenu({style:'popup', width:200});
  24 +
  25 + $(".account-box").mouseenter(showMenu);
  26 + $(".account-box").mouseleave(resetMenu);
  27 +
22 }); 28 });
23 29
24 function updatePage(data){ 30 function updatePage(data){
25 $.ajax({type: "GET", url: location.href, data: data, dataType: "script"}); 31 $.ajax({type: "GET", url: location.href, data: data, dataType: "script"});
26 } 32 }
  33 +
  34 +function showMenu() {
  35 + $(this).toggleClass('hover');
  36 +}
  37 +
  38 +function resetMenu() {
  39 + $(this).removeClass("hover");
  40 +}
app/assets/stylesheets/application.css
@@ -8,3 +8,34 @@ @@ -8,3 +8,34 @@
8 *= require_self 8 *= require_self
9 *= require_tree . 9 *= require_tree .
10 */ 10 */
  11 +
  12 +/** COLORS **/
  13 +.cgray { color:gray; }
  14 +.cred { color:#D12F19; }
  15 +.cgreen { color:#44aa22; }
  16 +
  17 +/** COMMON STYLES **/
  18 +.left {
  19 + float:left;
  20 +}
  21 +.right {
  22 + float:right;
  23 +}
  24 +.width-50p{
  25 + width:50%;
  26 +}
  27 +.width-49p{
  28 + width:49%;
  29 +}
  30 +.width-30p{
  31 + width:30%;
  32 +}
  33 +.width-65p{
  34 + width:65%;
  35 +}
  36 +.append-bottom-10 {
  37 + margin-bottom:10px;
  38 +}
  39 +.prepend-top-10 {
  40 + margin-top:10px;
  41 +}
app/assets/stylesheets/commits.css.scss 0 → 100644
@@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
  1 +/** Commit diff view **/
  2 +.diff_file {
  3 + border:1px solid #CCC;
  4 + margin-bottom:1em;
  5 +
  6 + .diff_file_header {
  7 + padding:5px 5px;
  8 + border-bottom:1px solid #CCC;
  9 + background: #eee;
  10 + }
  11 + .diff_file_content {
  12 + overflow:auto;
  13 + overflow-y:hidden;
  14 + background:#fff;
  15 + color:#333;
  16 + font-size: 12px;
  17 + font-family: 'Courier New', 'andale mono','lucida console',monospace;
  18 + }
  19 + .diff_file_content_image {
  20 + background:#eee;
  21 + text-align:center;
  22 + img {
  23 + padding:100px;
  24 + max-width:300px;
  25 + }
  26 + }
  27 +}
  28 +
  29 +.diff_file_content{
  30 + .old_line, .new_line {
  31 + background:#ECECEC;
  32 + color:#777;
  33 + width:30px;
  34 + float:left;
  35 + padding: 0px 5px;
  36 + border-right: 1px solid #ccc;
  37 + }
  38 +}
  39 +
  40 +pre.commit_message {
  41 + white-space: pre-wrap;
  42 +}
app/assets/stylesheets/dashboard.css.scss
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -// Place all the styles related to the Dashboard controller here.  
2 -// They will automatically be included in application.css.  
3 -// You can use Sass (SCSS) here: http://sass-lang.com/  
app/assets/stylesheets/issues.css.scss
1 -// Place all the styles related to the Issues controller here.  
2 -// They will automatically be included in application.css.  
3 -// You can use Sass (SCSS) here: http://sass-lang.com/ 1 +.issue-number {
  2 + float: left;
  3 + border-radius: 5px;
  4 + text-shadow: none;
  5 + background: rgba(0, 0, 0, 0.12);
  6 + text-align: center;
  7 + padding: 14px 8px;
  8 + width: 40px;
  9 + margin-right: 10px;
  10 + color: #444;
  11 +}
  12 +
  13 +.issues_filter {
  14 + margin-top:10px;
  15 + .left {
  16 + margin-right:15px;
  17 + }
  18 +}
  19 +
  20 +.top_panel_issues{
  21 + #issue_search_form {
  22 + margin:5px 0;
  23 + input {
  24 + border:1px solid #D3D3D3;
  25 + padding: 3px;
  26 + height: 28px;
  27 + width: 300px;
  28 + -webkit-appearance:none;
  29 + box-sizing: border-box;
  30 + -moz-box-sizing: border-box;
  31 +
  32 + &:focus {
  33 + border-color:#c2e1ef;
  34 + }
  35 + }
  36 + }
  37 +}
  38 +
  39 +/** ISSUES LIST **/
  40 +.issue .action-links {
  41 + display:none;
  42 + a {
  43 + margin-left:10px;
  44 + }
  45 +}
  46 +.issue:hover .action-links { display:block; }
  47 +
  48 +
app/assets/stylesheets/notes.css.scss 0 → 100644
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
  1 +/** Notes **/
  2 +
  3 +#notes-list {
  4 + display:block;
  5 + list-style:none;
  6 + margin:0px;
  7 + padding:0px;
  8 +}
  9 +
  10 +.issue_notes {
  11 + .note_content {
  12 + float:left;
  13 + width:400px;
  14 + }
  15 +}
  16 +
  17 +
  18 +/* Note textare */
  19 +#note_note {
  20 + height:100px;
  21 + width:97%;
  22 + font-size:14px;
  23 +}
  24 +
  25 +#new_note {
  26 + #note_note {
  27 + height:25px;
  28 + }
  29 + .attach_holder {
  30 + display:none;
  31 + }
  32 +}
  33 +
  34 +#notes-list .note .delete-note { display:none; }
  35 +#notes-list .note:hover .delete-note { display:block; }
  36 +
  37 +body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
  38 +body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
  39 +body.project-page #notes-list .note img{float: left; margin-right: 10px;}
  40 +body.project-page #notes-list .note span.note-title{display: block;}
  41 +body.project-page #notes-list .note span.note-title{margin-bottom: 10px}
  42 +body.project-page #notes-list .note span.note-author{color: #999; font-weight: normal; font-style: italic;}
  43 +body.project-page #notes-list .note span.note-author strong{font-weight: bold; font-style: normal;}
  44 +
app/assets/stylesheets/profile.css.scss
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -// Place all the styles related to the Profile controller here.  
2 -// They will automatically be included in application.css.  
3 -// You can use Sass (SCSS) here: http://sass-lang.com/  
app/assets/stylesheets/projects.css.scss
1 -// Place all the styles related to the Projects controller here.  
2 -// They will automatically be included in application.css.  
3 -// You can use Sass (SCSS) here: http://sass-lang.com/  
4 - 1 +/** MIXINS **/
5 @mixin round-borders-bottom($radius) { 2 @mixin round-borders-bottom($radius) {
6 border-top: 1px solid #eaeaea; 3 border-top: 1px solid #eaeaea;
7 -  
8 -moz-border-radius-bottomright: $radius; 4 -moz-border-radius-bottomright: $radius;
9 -moz-border-radius-bottomleft: $radius; 5 -moz-border-radius-bottomleft: $radius;
10 -  
11 border-bottom-right-radius: $radius; 6 border-bottom-right-radius: $radius;
12 border-bottom-left-radius: $radius; 7 border-bottom-left-radius: $radius;
13 -  
14 -webkit-border-bottom-left-radius: $radius; 8 -webkit-border-bottom-left-radius: $radius;
15 -webkit-border-bottom-right-radius: $radius; 9 -webkit-border-bottom-right-radius: $radius;
16 } 10 }
17 11
18 @mixin round-borders-top($radius) { 12 @mixin round-borders-top($radius) {
19 border-top: 1px solid #eaeaea; 13 border-top: 1px solid #eaeaea;
20 -  
21 -moz-border-radius-topright: $radius; 14 -moz-border-radius-topright: $radius;
22 -moz-border-radius-topleft: $radius; 15 -moz-border-radius-topleft: $radius;
23 -  
24 border-top-right-radius: $radius; 16 border-top-right-radius: $radius;
25 border-top-left-radius: $radius; 17 border-top-left-radius: $radius;
26 -  
27 -webkit-border-top-left-radius: $radius; 18 -webkit-border-top-left-radius: $radius;
28 -webkit-border-top-right-radius: $radius; 19 -webkit-border-top-right-radius: $radius;
29 } 20 }
@@ -35,46 +26,7 @@ @@ -35,46 +26,7 @@
35 border-radius: $radius; 26 border-radius: $radius;
36 } 27 }
37 28
38 -@mixin hover-color {  
39 - background: #fff !important;  
40 - background: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#FFF6BF)) !important;  
41 - background: -moz-linear-gradient(top,#fff,#FFF6BF) !important;  
42 - background: transparent 9 !important;  
43 -}  
44 -  
45 -.diff_file {  
46 - border:1px solid #CCC;  
47 - margin-bottom:1em;  
48 -  
49 - .diff_file_header {  
50 - padding:5px 5px;  
51 - border-bottom:1px solid #CCC;  
52 - background: #eee;  
53 - }  
54 - .diff_file_content {  
55 - overflow:auto;  
56 - overflow-y:hidden;  
57 - background:#fff;  
58 - color:#333;  
59 - font-size: 12px;  
60 - font-family: 'Courier New', 'andale mono','lucida console',monospace;  
61 - }  
62 - .diff_file_content_image {  
63 - background:#eee;  
64 - text-align:center;  
65 - img {  
66 - padding:100px;  
67 - max-width:300px;  
68 - }  
69 - }  
70 -}  
71 -  
72 -#logo {  
73 - &:hover {  
74 - background:none;  
75 - }  
76 -}  
77 - 29 +/** File stat **/
78 .file_stats { 30 .file_stats {
79 margin-bottom:10px; 31 margin-bottom:10px;
80 @include round-borders-all(4px); 32 @include round-borders-all(4px);
@@ -99,85 +51,16 @@ @@ -99,85 +51,16 @@
99 @include round-borders-all(4px); 51 @include round-borders-all(4px);
100 padding: 4px 0px; 52 padding: 4px 0px;
101 } 53 }
  54 +
102 table.round-borders { 55 table.round-borders {
103 float:left; 56 float:left;
104 } 57 }
105 58
106 -@mixin panel-color {  
107 - background: #111 !important;  
108 - background: -webkit-gradient(linear,left top,left bottom,from(#333),to(#111)) !important;  
109 - background: -moz-linear-gradient(top,#333,#111) !important;  
110 - background: transparent 9 !important;  
111 -}  
112 -  
113 -#header-panel {  
114 - @include panel-color;  
115 - height:40px;  
116 - position:fixed;  
117 - z-index:999;  
118 - top:0px;  
119 - width:100%;  
120 - margin-bottom:10px;  
121 - overflow:hidden;  
122 - .button{  
123 - color:#bbb;  
124 - border:none;  
125 - margin:0px;  
126 - height:25px;  
127 - background:transparent;  
128 - padding:10px 20px 5px 20px;  
129 - &:hover{  
130 - color:white;  
131 - }  
132 -  
133 - &.current {  
134 - border-bottom: 3px solid #EAEAEA !important;  
135 - padding: 10px 20px 0;  
136 - color: #eaeaea;  
137 - }  
138 - }  
139 - .search-holder {  
140 - float:left;  
141 - width:290px;  
142 - input {  
143 - @include round-borders-all(4px);  
144 - width:290px;  
145 - border-color:#888;  
146 - padding:5px;  
147 - background:#666;  
148 - color:#222;  
149 - &:focus {  
150 - background:#fff;  
151 - color:#000;  
152 - }  
153 - }  
154 - }  
155 -}  
156 -  
157 -#content-container{  
158 - min-height:250px;  
159 - background: #fff;  
160 - @include round-borders-bottom(8px);  
161 - borders:2px solid #eaeaea;  
162 - border-top: none;  
163 - padding:20px;  
164 -}  
165 -  
166 a { 59 a {
167 color: #111; 60 color: #111;
168 } 61 }
169 62
170 -.diff_file_content{  
171 - .old_line, .new_line {  
172 - background:#ECECEC;  
173 - color:#777;  
174 - width:30px;  
175 - float:left;  
176 - padding: 0px 5px;  
177 - border-right: 1px solid #ccc;  
178 - }  
179 -}  
180 - 63 +/** FILE CONTENT VIEW **/
181 .view_file_content{ 64 .view_file_content{
182 .old_line, .new_line { 65 .old_line, .new_line {
183 background:#ECECEC; 66 background:#ECECEC;
@@ -216,10 +99,34 @@ a { @@ -216,10 +99,34 @@ a {
216 } 99 }
217 } 100 }
218 101
219 -.back_small.button{ 102 +td.code {
  103 + width: 100%;
  104 + .highlight {
  105 + margin-left: 55px;
  106 + overflow:auto;
  107 + overflow-y:hidden;
  108 + }
  109 +}
  110 +.highlight pre {
  111 + white-space: pre;
  112 + word-wrap:normal;
  113 +}
220 114
  115 +.highlighttable tr:hover {
  116 + background:white;
  117 +}
  118 +table.highlighttable pre{
  119 + line-height:16px !important;
  120 + font-size:12px !important;
221 } 121 }
222 122
  123 +
  124 +table.highlighttable .linenodiv pre {
  125 + text-align: right;
  126 + padding-right: 4px;
  127 +}
  128 +
  129 +/** PROJECTS **/
223 input.ssh_project_url { 130 input.ssh_project_url {
224 padding:5px; 131 padding:5px;
225 margin:0px; 132 margin:0px;
@@ -243,38 +150,7 @@ input.ssh_project_url { @@ -243,38 +150,7 @@ input.ssh_project_url {
243 clear: both; 150 clear: both;
244 } 151 }
245 152
246 -.top_project_menu {  
247 - a {  
248 - border-right: 1px solid #FFFFFF;  
249 - box-shadow: -1px 0 #DDDDDD inset;  
250 - color: #666;  
251 - display: block;  
252 - font-size: 16px;  
253 - text-decoration: none;  
254 - line-height: 20px;  
255 - padding: 11px 26px 12px 24px;  
256 - text-shadow: 0 1px 0 #FFFFFF;  
257 - float:left;  
258 -  
259 - &.current {  
260 - background-color: #FFFFFF;  
261 - color: #222222;  
262 - }  
263 - }  
264 -}  
265 -  
266 -.top_bar {  
267 - margin-top:50px;  
268 - background-color: #F4F4F4;  
269 - @include round-borders-top(8px);  
270 - box-shadow: 0 1px #FFFFFF inset, 0 -1px #DDDDDD inset;  
271 - height: 43px;  
272 - overflow: hidden;  
273 - width:990px;  
274 -}  
275 -  
276 /** FORM INPUTS **/ 153 /** FORM INPUTS **/
277 -  
278 .user_new, 154 .user_new,
279 .new_key, 155 .new_key,
280 .new_issue, 156 .new_issue,
@@ -296,7 +172,6 @@ input.ssh_project_url { @@ -296,7 +172,6 @@ input.ssh_project_url {
296 } 172 }
297 173
298 .input_button { 174 .input_button {
299 - //@include round-borders-all(4px);  
300 padding:8px; 175 padding:8px;
301 font-size:14px; 176 font-size:14px;
302 cursor:pointer; 177 cursor:pointer;
@@ -307,36 +182,11 @@ input.ssh_project_url { @@ -307,36 +182,11 @@ input.ssh_project_url {
307 border-width: 1px; 182 border-width: 1px;
308 } 183 }
309 184
310 -  
311 -.top_menu_count {  
312 - background: none repeat scroll 0 0 white;  
313 - color: #333;  
314 - border-color: #4BB8D2;  
315 - padding: 2px;  
316 - font-size:10px;  
317 - border-top:none;  
318 - text-align:center;  
319 - float:right;  
320 - width:25px;  
321 -  
322 -  
323 -}  
324 -  
325 -#logo {  
326 - color: #EAEAEA;  
327 - font-family: monospace;  
328 - font-size: 26px;  
329 - padding: 4px;  
330 - text-decoration: none;  
331 - text-shadow: #555 1px 1px;  
332 -}  
333 -  
334 /** FLASH **/ 185 /** FLASH **/
335 -  
336 #flash_container { 186 #flash_container {
337 height:40px; 187 height:40px;
338 position:fixed; 188 position:fixed;
339 - z-index:1009; 189 + z-index:1209;
340 top:0px; 190 top:0px;
341 width:100%; 191 width:100%;
342 margin-bottom:10px; 192 margin-bottom:10px;
@@ -354,7 +204,6 @@ input.ssh_project_url { @@ -354,7 +204,6 @@ input.ssh_project_url {
354 } 204 }
355 205
356 /** Buttons **/ 206 /** Buttons **/
357 -  
358 .lbutton, 207 .lbutton,
359 .lite_button { 208 .lite_button {
360 display:block; 209 display:block;
@@ -386,89 +235,87 @@ input.ssh_project_url { @@ -386,89 +235,87 @@ input.ssh_project_url {
386 } 235 }
387 } 236 }
388 237
389 -/** Notes **/  
390 238
391 -#notes-list {  
392 - display:block;  
393 - list-style:none;  
394 - margin:0px;  
395 - padding:0px; 239 +#user_projects_limit{
  240 + width: 60px;
396 } 241 }
397 242
398 -.notes_count {  
399 - background: none repeat scroll 0 0 #FFF6BF;  
400 - border-color: #FFD324;  
401 - color: #514721;  
402 - border: 2px solid #DDDDDD;  
403 - margin-bottom: 1em;  
404 - margin-top: 3px;  
405 - padding: 2px 5px;  
406 - position: relative;  
407 - right: 6px;  
408 - top: 6px; 243 +.handle:hover{
  244 + cursor: move;
409 } 245 }
410 246
411 -.issue_notes {  
412 - .note_content {  
413 - float:left;  
414 - width:400px; 247 +.project-refs-form {
  248 + span {
  249 + background: none !important;
  250 + position:static !important;
  251 + width:auto !important;
  252 + height: auto !important;
415 } 253 }
416 } 254 }
417 255
418 -#user_projects_limit{  
419 - width: 60px; 256 +.project-refs-select {
  257 + width:200px;
420 } 258 }
421 259
422 -.project_thumb {  
423 - margin:20px 0;  
424 - width: 250px;  
425 - float:left;  
426 - padding:20px;  
427 - text-align:center;  
428 - p, h4 {  
429 - text-align:left;  
430 - }  
431 - .lbutton {  
432 - float:left; 260 +.filter .left { margin-right:15px; }
  261 +
  262 +body.project-page table .commit {
  263 + a.tree-commit-link {
  264 + color:gray;
  265 + &:hover {
  266 + text-decoration:underline;
  267 + }
433 } 268 }
434 } 269 }
435 270
436 -.handle:hover{  
437 - cursor: move;  
438 -}  
439 -  
440 -.handle{  
441 - width: 12px;  
442 - height: 12px;  
443 - padding: 10px; 271 +/** NEW PROJECT **/
  272 +.new-project-hodler {
  273 + .icon span { background-position: -31px -70px; }
  274 + td { border-bottom: 1px solid #DEE2E3; }
444 } 275 }
445 276
446 -  
447 -/* Note textare */  
448 -#note_note {  
449 - height:100px;  
450 - width:97%;  
451 - font-size:14px; 277 +/** Feed entry **/
  278 +.commit,
  279 +.snippet,
  280 +.message {
  281 + .title {
  282 + color:#666;
  283 + a { color:#666 !important; }
  284 + p { margin-top:0px; }
  285 + }
  286 + .author { color: #999 }
452 } 287 }
453 288
454 -#new_note {  
455 - #note_note {  
456 - height:25px;  
457 - }  
458 - .attach_holder {  
459 - display:none; 289 +/** JQuery UI **/
  290 +.ui-autocomplete { @include round-borders-all(5px); }
  291 +.ui-menu-item { cursor: pointer }
  292 +.ui-selectmenu{
  293 + @include round-borders-all(4px);
  294 + margin-right:10px;
  295 + font-size:1.5em;
  296 + height:auto;
  297 + font-weight:bold;
  298 + .ui-selectmenu-status {
  299 + padding:3px 10px;
460 } 300 }
461 } 301 }
462 -  
463 -.field_with_errors {  
464 - input[type="text"],  
465 - input[type="password"],  
466 - textarea  
467 - {  
468 - background: none repeat scroll 0 0 #FFBBBB 302 +
  303 +/** Snippets **/
  304 +.new_snippet textarea,
  305 +.edit_snippet textarea {
  306 + height:300px;
  307 + padding: 8px;
  308 + width: 95%;
  309 +}
  310 +.snippet .action-links {
  311 + display:none;
  312 + a {
  313 + margin-left:10px;
469 } 314 }
470 } 315 }
  316 +.snippet:hover .action-links { display:block; }
471 317
  318 +/** ISSUES TAGS **/
472 .tag { 319 .tag {
473 @include round-borders-all(4px); 320 @include round-borders-all(4px);
474 padding:2px 4px; 321 padding:2px 4px;
@@ -497,187 +344,38 @@ input.ssh_project_url { @@ -497,187 +344,38 @@ input.ssh_project_url {
497 background: #2c5c66; 344 background: #2c5c66;
498 color:white; 345 color:white;
499 } 346 }
500 -}  
501 -  
502 -#issues-table .issue {  
503 - &.critical {  
504 - td {  
505 - //background: #D12F19;  
506 - //color:#fff;  
507 - }  
508 - }  
509 -}  
510 -  
511 -.top_panel_issues{  
512 - #issue_search_form {  
513 - margin:5px 0;  
514 - input {  
515 - border:1px solid #D3D3D3;  
516 - padding: 3px;  
517 - height: 28px;  
518 - width: 300px;  
519 - -webkit-appearance:none;  
520 - box-sizing: border-box;  
521 - -moz-box-sizing: border-box;  
522 -  
523 - &:focus {  
524 - border-color:#c2e1ef;  
525 - }  
526 - }  
527 - }  
528 -}  
529 -  
530 -.left {  
531 - float:left;  
532 -}  
533 -.right {  
534 - float:right;  
535 -}  
536 -  
537 -.width-50p{  
538 - width:50%;  
539 -}  
540 -.width-49p{  
541 - width:49%;  
542 -}  
543 -.width-30p{  
544 - width:30%;  
545 -}  
546 -.width-65p{  
547 - width:65%;  
548 -}  
549 -pre.commit_message {  
550 - white-space: pre-wrap;  
551 -}  
552 -  
553 -#container {  
554 - min-height:100%;  
555 -}  
556 -.ui-selectmenu{  
557 - @include round-borders-all(4px);  
558 - margin-right:10px;  
559 - font-size:1.5em;  
560 - height:auto;  
561 - font-weight:bold;  
562 - .ui-selectmenu-status {  
563 - padding:3px 10px;  
564 - }  
565 -}  
566 -  
567 -td.code {  
568 - width: 100%;  
569 - .highlight {  
570 - margin-left: 55px;  
571 - overflow:auto;  
572 - overflow-y:hidden;  
573 - }  
574 -}  
575 -.highlight pre {  
576 - white-space: pre;  
577 - word-wrap:normal;  
578 -}  
579 -  
580 -.highlighttable tr:hover {  
581 - background:white;  
582 -}  
583 -table.highlighttable pre{  
584 - line-height:16px !important;  
585 - font-size:12px !important;  
586 -}  
587 -  
588 -.project-refs-form {  
589 - span {  
590 - background: none !important;  
591 - position:static !important;  
592 - width:auto !important;  
593 - height: auto !important;  
594 - }  
595 -}  
596 -  
597 -.project-refs-select {  
598 - width:200px;  
599 -}  
600 -  
601 -.issues_filter {  
602 - margin-top:10px;  
603 - .left {  
604 - margin-right:15px; 347 + &.note {
  348 + background: #2c5c66;
  349 + color:white;
605 } 350 }
606 -}  
607 -.filter .left { margin-right:15px; }  
608 -  
609 -  
610 -.cgray { color:gray; }  
611 -.cred { color:#D12F19; }  
612 -.cgreen { color:#44aa22; }  
613 -  
614 -body.project-page table .commit {  
615 - a.tree-commit-link {  
616 - color:gray;  
617 - &:hover {  
618 - text-decoration:underline;  
619 - } 351 + &.issue {
  352 + background: #D12F19;
  353 + color:white;
620 } 354 }
621 -}  
622 -  
623 -#notes-list .note .delete-note { display:none; }  
624 -#notes-list .note:hover .delete-note { display:block; }  
625 -  
626 -#issues-table-holder .issue .action-links {  
627 - display:none;  
628 - a {  
629 - margin-left:10px; 355 + &.commit {
  356 + background: #44aacc;
  357 + color:white;
630 } 358 }
631 } 359 }
632 -  
633 -.issue-number {  
634 - float: left;  
635 - border-radius: 5px;  
636 - text-shadow: none;  
637 - background: rgba(0, 0, 0, 0.12);  
638 - text-align: center;  
639 - padding: 14px 8px;  
640 - width: 40px;  
641 - margin-right: 10px;  
642 - color: #444;  
643 -}  
644 360
645 -#issues-table-holder .issue:hover .action-links { display:block; }  
646 -  
647 -body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}  
648 -body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}  
649 -body.project-page #notes-list .note img{float: left; margin-right: 10px;}  
650 -body.project-page #notes-list .note span.note-title{display: block;}  
651 -body.project-page #notes-list .note span.note-title{margin-bottom: 10px}  
652 -body.project-page #notes-list .note span.note-author{color: #999; font-weight: normal; font-style: italic;}  
653 -body.project-page #notes-list .note span.note-author strong{font-weight: bold; font-style: normal;}  
654 -  
655 -  
656 -/** NEW PROJECT **/  
657 -.new-project-hodler {  
658 - .icon span {  
659 - background-position: -31px -70px;  
660 - }  
661 - td {  
662 - border-bottom: 1px solid #DEE2E3;  
663 - } 361 +#holder {
  362 + border: solid 1px #999;
  363 + cursor: move;
  364 + height: 70%;
  365 + overflow: hidden;
664 } 366 }
665 367
666 -//.message .note-title p { margin-bottom:0px; }  
667 -  
668 -.commit,  
669 -.message {  
670 - .title {  
671 - color:#666;  
672 - a {  
673 - color:#666 !important;  
674 - }  
675 - p {  
676 - margin-top:0px;  
677 - }  
678 - }  
679 -  
680 - .author {  
681 - color: #999  
682 - }  
683 -} 368 +/* Project Dashboard Page */
  369 +html, body { height: 100%; }
  370 +
  371 +body.dashboard.project-page .news-feed h2{float: left;}
  372 +body.dashboard.project-page .news-feed .project-updates {margin-bottom: 20px; display: block; width: 100%;}
  373 +body.dashboard.project-page .news-feed .project-updates .data{ padding: 0}
  374 +body.dashboard.project-page .news-feed .project-updates a.project-update {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
  375 +body.dashboard.project-page .news-feed .project-updates a.project-update:last-child{border-bottom: 0}
  376 +body.dashboard.project-page .news-feed .project-updates a.project-update img{float: left; margin-right: 10px;}
  377 +body.dashboard.project-page .news-feed .project-updates a.project-update span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;}
  378 +body.dashboard.project-page .news-feed .project-updates a.project-update span.update-title{margin-bottom: 10px}
  379 +body.dashboard.project-page .news-feed .project-updates a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;}
  380 +body.dashboard.project-page .news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;}
  381 +/* eo Dashboard Page */
app/assets/stylesheets/snippets.css.scss
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -// Place all the styles related to the Snippets controller here.  
2 -// They will automatically be included in application.css.  
3 -// You can use Sass (SCSS) here: http://sass-lang.com/  
app/assets/stylesheets/style.scss 100755 → 100644
@@ -101,7 +101,7 @@ input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: @@ -101,7 +101,7 @@ input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding:
101 /* eo Forms */ 101 /* eo Forms */
102 102
103 /* Tables */ 103 /* Tables */
104 -table {width:100%; border: 1px solid #DEE2E3} 104 +table {width:100%; border: 1px solid #DEE2E3; margin-bottom: 20px}
105 table thead{ 105 table thead{
106 -webkit-border-top-left-radius: 5px; 106 -webkit-border-top-left-radius: 5px;
107 -webkit-border-top-right-radius: 5px; 107 -webkit-border-top-right-radius: 5px;
@@ -144,7 +144,8 @@ table tr:hover, .listed_items tr.odd:hover{background-color:#FFFFCF} @@ -144,7 +144,8 @@ table tr:hover, .listed_items tr.odd:hover{background-color:#FFFFCF}
144 background-image: -o-linear-gradient(#f7f7f7 7.6%, #d5d5d5); 144 background-image: -o-linear-gradient(#f7f7f7 7.6%, #d5d5d5);
145 } 145 }
146 146
147 -.button{ 147 +a.button, input.button {
  148 + font-weight: bold;
148 padding: 10px 20px; 149 padding: 10px 20px;
149 text-align: center; 150 text-align: center;
150 display: inline-block; 151 display: inline-block;
@@ -159,6 +160,8 @@ table tr:hover, .listed_items tr.odd:hover{background-color:#FFFFCF} @@ -159,6 +160,8 @@ table tr:hover, .listed_items tr.odd:hover{background-color:#FFFFCF}
159 background-image: -o-linear-gradient(#dbf5f6 79.4%, #c5eef0); 160 background-image: -o-linear-gradient(#dbf5f6 79.4%, #c5eef0);
160 } 161 }
161 162
  163 +input.button{margin-bottom: 1.5em}
  164 +
162 .button:hover {color: rgba(0,0,0,.8)} 165 .button:hover {color: rgba(0,0,0,.8)}
163 166
164 .button.green {margin-right: 0; } 167 .button.green {margin-right: 0; }
@@ -301,14 +304,30 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%} @@ -301,14 +304,30 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%}
301 304
302 /* eo Icons*/ 305 /* eo Icons*/
303 306
  307 +/* Errors */
  308 +#error_explanation{background: #ffe5eb; padding: 20px; margin-bottom: 20px; border-radius: 5px}
  309 +#error_explanation h2{margin: 0; margin-bottom: 20px; color: red}
  310 +#error_explanation ul li{margin-bottom: 10px}
  311 +#error_explanation ul li:last-child{margin-bottom: 0}
  312 +.field_with_errors {
  313 + input[type="text"],
  314 + input[type="password"],
  315 + textarea
  316 + {
  317 + border: 1px solid #FFBBBB;
  318 + background: #fff4f6;
  319 + }
  320 +}
  321 +/* eo Errors */
  322 +
304 /* General */ 323 /* General */
305 -#container{background-color: white; overflow: hidden;} 324 +#container{background-color: white; overflow: hidden; }
306 body.collapsed #container{margin: auto; width: 980px; border: 1px solid rgba(0,0,0,.22); border-top: 0; box-shadow: 0 0 0px 4px rgba(0,0,0,.04)} 325 body.collapsed #container{margin: auto; width: 980px; border: 1px solid rgba(0,0,0,.22); border-top: 0; box-shadow: 0 0 0px 4px rgba(0,0,0,.04)}
307 326
308 327
309 328
310 /* Header */ 329 /* Header */
311 -header{background: #474D57 url('bg-header.png') repeat-x bottom; z-index: 10000; height: 44px; padding: 10px 2% 6px 2%} 330 +header{background: #474D57 url('bg-header.png') repeat-x bottom; z-index: 10000; height: 44px; padding: 10px 2% 6px 2%; position: relative}
312 header a{color: white; text-shadow: 0 -1px 0 black} 331 header a{color: white; text-shadow: 0 -1px 0 black}
313 header a:hover{color: #f1f1f1} 332 header a:hover{color: #f1f1f1}
314 header h1{ 333 header h1{
@@ -370,40 +389,14 @@ header nav a.admin{ @@ -370,40 +389,14 @@ header nav a.admin{
370 } 389 }
371 390
372 391
373 -header .search{ display: inline-block; float: right; margin-right: 10px} 392 +header .search{ display: inline-block; float: right; margin-right: 46px}
374 393
375 header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} 394 header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;}
376 395
377 header nav a.dashboard span{background: url('images.png') no-repeat -161px 0;} 396 header nav a.dashboard span{background: url('images.png') no-repeat -161px 0;}
378 header nav a.admin span{background: url('images.png') no-repeat -184px 0;} 397 header nav a.admin span{background: url('images.png') no-repeat -184px 0;}
379 header nav a.project span{background: url('images.png') no-repeat -209px -1px; top: 7px} 398 header nav a.project span{background: url('images.png') no-repeat -209px -1px; top: 7px}
380 -/*  
381 -  
382 -header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 14px;}  
383 399
384 -header nav a.dashboard.current span{ background-position: -163px -22px; }  
385 -header nav a.admin.current span{ background-position: -186px -22px;}  
386 -header nav a.project.current span{ background-position: -211px -23px;}  
387 -  
388 -header nav a.project span{background: url('images.png') no-repeat -209px -1px; top: 15px}  
389 -  
390 -  
391 -header nav a span.current{top: 18px}  
392 -  
393 -  
394 -header nav {margin-left: 180px; display: inline-block; float: left;}  
395 -header nav a{float: left; background: #31363e; padding: 16px 20px 20px 34px; margin-right: 10px;  
396 - -webkit-border-top-left-radius: 5px;  
397 - -webkit-border-top-right-radius: 5px;  
398 - -moz-border-radius-topleft: 5px;  
399 - -moz-border-radius-topright: 5px;  
400 - border-top-left-radius: 5px;  
401 - border-top-right-radius: 5px;  
402 - position: relative;  
403 -}  
404 -  
405 -header nav a.current{background: white; color: #333; text-shadow: none;}  
406 -*/  
407 400
408 header .login-top{float: right; width: 180px; 401 header .login-top{float: right; width: 180px;
409 background-image: -webkit-gradient(linear, 0 0, 0 62, color-stop(0.032, #464c56), to(#363c45)); 402 background-image: -webkit-gradient(linear, 0 0, 0 62, color-stop(0.032, #464c56), to(#363c45));
@@ -426,10 +419,11 @@ header{margin-bottom: 0; clear: both; } @@ -426,10 +419,11 @@ header{margin-bottom: 0; clear: both; }
426 .page-title a.grey-button{float: right;} 419 .page-title a.grey-button{float: right;}
427 .right{float: right;} 420 .right{float: right;}
428 421
  422 +
429 /* Account box */ 423 /* Account box */
430 -header .account-box{position: relative;z-index: 10000; top: -3px; width: 38px; height: 38px; font-size: 11px; float: right; display: block; cursor: pointer; }  
431 -header .account-box img{ border-radius: 4px; width: 38px; height: 38px; display: block; box-shadow: 0 1px 2px black}  
432 -header .account-box:after{ 424 +header .account-box{position: absolute; right: 0; top: 8px; z-index: 10000; width: 128px; font-size: 11px; float: right; display: block; cursor: pointer;}
  425 +header .account-box img{ border-radius: 4px; right: 20px; position: absolute; width: 38px; height: 38px; display: block; box-shadow: 0 1px 2px black}
  426 +header .account-box img:after{
433 content: " "; 427 content: " ";
434 display: block; 428 display: block;
435 position: absolute; 429 position: absolute;
@@ -449,11 +443,38 @@ float: right; @@ -449,11 +443,38 @@ float: right;
449 background-origin: border-box; 443 background-origin: border-box;
450 } 444 }
451 445
452 -.account-box:hover > .account-links, .account-box:hover > .arrow-up{display: block;}  
453 -header .account-links{background: white; display: none; border-radius: 5px; width: 100px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); }  
454 -header .account-links a{color: #666; padding: 6px 10px; display: block; text-shadow: none; border-bottom: 1px solid #eee}  
455 -header .account-links a:hover{background-color: #f1f1f1; text-shadow: none; color: #333} 446 +.account-box.hover{height: 138px;}
456 447
  448 +.account-box:hover > .account-links{display: block;}
  449 +header .account-links{background: white; display: none; border-radius: 5px; width: 100px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); position:relative;}
  450 +header .account-links:before {
  451 + content: ".";
  452 + width:0;
  453 + height:0;
  454 + position:absolute;
  455 + border:5px solid transparent;
  456 + border-color:rgba(255,255,255,0);
  457 + border-bottom-color:#fafafa;
  458 + text-indent:-9999px;
  459 + top:-10px;
  460 + line-height:0;
  461 + right:10px;
  462 + z-index:10;
  463 +}
  464 +
  465 +
  466 +/* Inspired by http://maxvoltar.com/temp/nowplaying/ */
  467 +header .account-links{background: white; display: none; z-index: 100000; border-radius: 5px; width: 100px; position: absolute; right: 20px; top: 46px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); }
  468 +header .account-links a{color: #666; padding: 6px 10px; display: block; text-shadow: none; border-bottom: 1px solid #eee}
  469 +header .account-links a:hover{
  470 + background: #3aacec;
  471 + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#39acec), to(#279ada), color-stop(.05, #4cbefe));
  472 + background: -moz-linear-gradient(top, #39acec, #4cbefe 5%, #279ada);
  473 + background: linear-gradient(top, #39acec, #4cbefe 5%, #279ada);
  474 + color: #fff;
  475 + text-shadow: #1488c8 0 -1px 0;
  476 +}
  477 +.account-box.hover .arrow-up{top: 41px; right: 6px; position: absolute}
457 header .account-links a:first-child{ 478 header .account-links a:first-child{
458 -webkit-border-top-left-radius: 5px; 479 -webkit-border-top-left-radius: 5px;
459 -webkit-border-top-right-radius: 5px; 480 -webkit-border-top-right-radius: 5px;
@@ -473,18 +494,15 @@ header .account-links a:last-child{ @@ -473,18 +494,15 @@ header .account-links a:last-child{
473 border-bottom: 0; 494 border-bottom: 0;
474 } 495 }
475 496
476 -header a.arrow-up{  
477 - display: none;  
478 - width: 0;  
479 - height: 0;  
480 - float: right;  
481 - margin-right: 26px;  
482 - margin-bottom: 0;  
483 - border-left: 5px solid transparent;  
484 - border-right: 5px solid transparent;  
485 -  
486 - border-bottom: 5px solid white; 497 +#no_ssh_key_defined {
  498 + border:1px solid #ee8801;
  499 + margin:20px;
  500 + padding:20px;
  501 + background:#ffe3f0;
  502 + h2{margin:0;}
  503 + p {margin:10px 0 0;}
487 } 504 }
  505 +
488 /* eo Account Box */ 506 /* eo Account Box */
489 input.search-input{float: left; text-shadow: none; width: 116px; background-image: url('icon-search.png') ; background-repeat: no-repeat; background-position: 10px; border-radius: 100px; border: 1px solid rgba(0,0,0,.7); box-shadow: 0 1px 0 rgba(255,255,255,.2), 0 2px 2px rgba(0,0,0,.4) inset ; background-color: #D2D5DA; background-color: rgba(255,255,255,.5); padding: 5px; padding-left: 26px; margin-top: 4px; margin-right: 10px } 507 input.search-input{float: left; text-shadow: none; width: 116px; background-image: url('icon-search.png') ; background-repeat: no-repeat; background-position: 10px; border-radius: 100px; border: 1px solid rgba(0,0,0,.7); box-shadow: 0 1px 0 rgba(255,255,255,.2), 0 2px 2px rgba(0,0,0,.4) inset ; background-color: #D2D5DA; background-color: rgba(255,255,255,.5); padding: 5px; padding-left: 26px; margin-top: 4px; margin-right: 10px }
490 input.search-input:focus{ background-color: white; width: 216px;} 508 input.search-input:focus{ background-color: white; width: 216px;}
@@ -506,9 +524,9 @@ body.dashboard-page header{margin-bottom: 0} @@ -506,9 +524,9 @@ body.dashboard-page header{margin-bottom: 0}
506 body.dashboard-page .news-feed{padding-left: 1em; margin-right: 450px; margin-left: 1%} 524 body.dashboard-page .news-feed{padding-left: 1em; margin-right: 450px; margin-left: 1%}
507 body.dashboard-page .dashboard-content{ position: relative; float: left; width: 100%; height: 100%; } 525 body.dashboard-page .dashboard-content{ position: relative; float: left; width: 100%; height: 100%; }
508 body.dashboard-page .news-feed h2{float: left;} 526 body.dashboard-page .news-feed h2{float: left;}
509 -body.dashboard-page aside{ width: 420px; float: right; right: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; border-left: 1px solid #ccc } 527 +body.dashboard-page aside{ min-height: 700px; width: 420px; float: right; background-color: #f7f7f7; border-left: 1px solid #ccc }
510 body.dashboard-page aside h4{margin: 0; border-bottom: 1px solid #ccc; padding: 10px 10px; font-size: 11px; font-weight: bold; text-transform: uppercase;} 528 body.dashboard-page aside h4{margin: 0; border-bottom: 1px solid #ccc; padding: 10px 10px; font-size: 11px; font-weight: bold; text-transform: uppercase;}
511 -body.dashboard-page aside h4 a.button-small{float: right; text-transform: none; border-radius: 4px; margin-right: 4%; margin-top: -4px; display: block;} 529 +body.dashboard-page aside h4 a.button-small{float: right; text-transform: none; border-radius: 4px; margin-right: 2%; margin-top: -4px; display: block;}
512 body.dashboard-page aside .project-list {list-style: none; margin: 0; padding: 0;} 530 body.dashboard-page aside .project-list {list-style: none; margin: 0; padding: 0;}
513 body.dashboard-page aside .project-list li a {background: white; color: #{$blue_link}; display: block; border-bottom: 1px solid #eee; padding: 14px 6% 14px 14px;} 531 body.dashboard-page aside .project-list li a {background: white; color: #{$blue_link}; display: block; border-bottom: 1px solid #eee; padding: 14px 6% 14px 14px;}
514 body.dashboard-page aside .project-list li a:hover {background: #f1f1f1} 532 body.dashboard-page aside .project-list li a:hover {background: #f1f1f1}
@@ -548,8 +566,16 @@ body.project-page h2.icon .project-name i.arrow{float: right; @@ -548,8 +566,16 @@ body.project-page h2.icon .project-name i.arrow{float: right;
548 body.project-page h2.icon span{ background-position: -78px -68px; } 566 body.project-page h2.icon span{ background-position: -78px -68px; }
549 body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; } 567 body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; }
550 body.project-page .page-title{margin-bottom: 0} 568 body.project-page .page-title{margin-bottom: 0}
551 -body.project-page .project-sidebar {width: 220px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; border-left: 1px solid #ccc; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; }  
552 -body.project-page .project-sidebar input.text.git-url{ font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 14px 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px;} 569 +body.project-page .project-sidebar {width: 220px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; }
  570 +
  571 +body.project-page input.text.git-url,
  572 +body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 14px 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px;}
  573 +body.projects-page input.text.git-url {margin:10px 0 0 }
  574 +.git_url_wrapper { margin-right:50px }
  575 +
  576 +.projects_selector:hover > .project-box{ -moz-box-shadow:0px 0px 10px rgba(0, 0, 0, .1); -webkit-box-shadow:0px 0px 10px rgba(0, 0, 0, .1); box-shadow:0px 0px 10px rgba(0, 0, 0, .1); }
  577 +
  578 +
553 body.project-page .project-sidebar aside{width: 219px} 579 body.project-page .project-sidebar aside{width: 219px}
554 body.project-page .project-sidebar aside a{display: block; position: relative; background: white; padding: 15px 10px; border-bottom: 1px solid #eee} 580 body.project-page .project-sidebar aside a{display: block; position: relative; background: white; padding: 15px 10px; border-bottom: 1px solid #eee}
555 body.project-page .project-sidebar aside a:first-child{ 581 body.project-page .project-sidebar aside a:first-child{
@@ -565,13 +591,18 @@ body.project-page .project-sidebar aside a:first-child{ @@ -565,13 +591,18 @@ body.project-page .project-sidebar aside a:first-child{
565 body.project-page .project-sidebar aside a:hover{background-color: #eee;} 591 body.project-page .project-sidebar aside a:hover{background-color: #eee;}
566 body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px} 592 body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px}
567 body.project-page .project-sidebar aside a.current{background-color: #79c3e0; color: white; text-shadow: none; border-color: transparent} 593 body.project-page .project-sidebar aside a.current{background-color: #79c3e0; color: white; text-shadow: none; border-color: transparent}
568 -body.project-page .project-content{ padding: 20px; display: block; margin-left: 250px } 594 +body.project-page .project-content{ padding: 20px; display: block; margin-left: 250px; min-height: 400px}
569 body.project-page .project-content h2{ margin-top: 6px} 595 body.project-page .project-content h2{ margin-top: 6px}
570 body.project-page .project-content .button.right{margin-left: 20px} 596 body.project-page .project-content .button.right{margin-left: 20px}
571 body.project-page table .commit a{color: #{$blue_link}} 597 body.project-page table .commit a{color: #{$blue_link}}
572 body.project-page table th, body.project-page table td{ border-bottom: 1px solid #DEE2E3;} 598 body.project-page table th, body.project-page table td{ border-bottom: 1px solid #DEE2E3;}
573 body.project-page .fixed{position: fixed; } 599 body.project-page .fixed{position: fixed; }
574 600
  601 +/* New project Page */
  602 +.new-project-page .container{width: 600px; background-color: rgba(0,0,0,.02); margin: auto; border: 1px solid #eee; padding: 0 20px; margin: 30px auto 60px auto; border-radius: 5px}
  603 +.new-project-page .container table{background: white}
  604 +/* eo New Project Page */
  605 +
575 /* Commit Page */ 606 /* Commit Page */
576 body.project-page.commits-page .commit-info{float: right;} 607 body.project-page.commits-page .commit-info{float: right;}
577 body.project-page.commits-page .commit-info data{ 608 body.project-page.commits-page .commit-info data{
@@ -670,3 +701,13 @@ body.projects-page .browse-code{margin-right: 10px} @@ -670,3 +701,13 @@ body.projects-page .browse-code{margin-right: 10px}
670 p, h2, h3 { orphans: 3; widows: 3; } 701 p, h2, h3 { orphans: 3; widows: 3; }
671 h2, h3 { page-break-after: avoid; } 702 h2, h3 { page-break-after: avoid; }
672 } 703 }
  704 +
  705 +/**
  706 + * author:DZ
  707 + * date: Nov 09
  708 + * fix different fonts for firefox & webkit
  709 + */
  710 +body, button, input, select, textarea {
  711 + font-family: "Helvetica", sans-serif;
  712 +}
  713 +
app/controllers/application_controller.rb
1 class ApplicationController < ActionController::Base 1 class ApplicationController < ActionController::Base
2 before_filter :authenticate_user! 2 before_filter :authenticate_user!
3 - before_filter :view_style  
4 -  
5 protect_from_forgery 3 protect_from_forgery
6 -  
7 helper_method :abilities, :can? 4 helper_method :abilities, :can?
8 5
9 rescue_from Gitosis::AccessDenied do |exception| 6 rescue_from Gitosis::AccessDenied do |exception|
@@ -64,7 +61,7 @@ class ApplicationController &lt; ActionController::Base @@ -64,7 +61,7 @@ class ApplicationController &lt; ActionController::Base
64 else 61 else
65 @branch = params[:branch].blank? ? nil : params[:branch] 62 @branch = params[:branch].blank? ? nil : params[:branch]
66 @tag = params[:tag].blank? ? nil : params[:tag] 63 @tag = params[:tag].blank? ? nil : params[:tag]
67 - @ref = @branch || @tag || "master" 64 + @ref = @branch || @tag || Repository.default_ref
68 end 65 end
69 end 66 end
70 67
@@ -76,20 +73,6 @@ class ApplicationController &lt; ActionController::Base @@ -76,20 +73,6 @@ class ApplicationController &lt; ActionController::Base
76 redirect_to @project unless @project.repo_exists? 73 redirect_to @project unless @project.repo_exists?
77 end 74 end
78 75
79 - def view_style  
80 - if params[:view_style] == "collapsed"  
81 - cookies[:view_style] = "collapsed"  
82 - elsif params[:view_style] == "fluid"  
83 - cookies[:view_style] = ""  
84 - end  
85 -  
86 - @view_mode = if cookies[:view_style] == "collapsed"  
87 - :fixed  
88 - else  
89 - :fluid  
90 - end  
91 - end  
92 -  
93 def respond_with_notes 76 def respond_with_notes
94 if params[:last_id] && params[:first_id] 77 if params[:last_id] && params[:first_id]
95 @notes = @notes.where("id >= ?", params[:first_id]) 78 @notes = @notes.where("id >= ?", params[:first_id])
app/controllers/commits_controller.rb
@@ -8,18 +8,18 @@ class CommitsController &lt; ApplicationController @@ -8,18 +8,18 @@ class CommitsController &lt; ApplicationController
8 before_filter :add_project_abilities 8 before_filter :add_project_abilities
9 before_filter :authorize_read_project! 9 before_filter :authorize_read_project!
10 before_filter :require_non_empty_project 10 before_filter :require_non_empty_project
  11 + before_filter :load_refs, :only => :index # load @branch, @tag & @ref
11 12
12 - def index  
13 - load_refs # load @branch, @tag & @ref  
14 13
  14 + def index
15 @repo = project.repo 15 @repo = project.repo
16 limit, offset = (params[:limit] || 20), (params[:offset] || 0) 16 limit, offset = (params[:limit] || 20), (params[:offset] || 0)
17 17
18 - if params[:path]  
19 - @commits = @repo.log(@ref, params[:path], :max_count => limit, :skip => offset)  
20 - else  
21 - @commits = @repo.commits(@ref, limit, offset)  
22 - end 18 + @commits = if params[:path]
  19 + @repo.log(@ref, params[:path], :max_count => limit, :skip => offset)
  20 + else
  21 + @repo.commits(@ref, limit, offset)
  22 + end
23 23
24 respond_to do |format| 24 respond_to do |format|
25 format.html # index.html.erb 25 format.html # index.html.erb
@@ -30,8 +30,8 @@ class CommitsController &lt; ApplicationController @@ -30,8 +30,8 @@ class CommitsController &lt; ApplicationController
30 30
31 def show 31 def show
32 @commit = project.repo.commits(params[:id]).first 32 @commit = project.repo.commits(params[:id]).first
33 - @notes = project.notes.where(:noteable_id => @commit.id, :noteable_type => "Commit").order("created_at DESC").limit(20)  
34 - @note = @project.notes.new(:noteable_id => @commit.id, :noteable_type => "Commit") 33 + @notes = project.commit_notes(@commit).fresh.limit(20)
  34 + @note = @project.build_commit_note(@commit)
35 35
36 respond_to do |format| 36 respond_to do |format|
37 format.html 37 format.html
app/controllers/projects_controller.rb
  1 +require File.join(Rails.root, 'lib', 'graph_commit')
  2 +
1 class ProjectsController < ApplicationController 3 class ProjectsController < ApplicationController
2 before_filter :project, :except => [:index, :new, :create] 4 before_filter :project, :except => [:index, :new, :create]
3 layout :determine_layout 5 layout :determine_layout
@@ -6,8 +8,8 @@ class ProjectsController &lt; ApplicationController @@ -6,8 +8,8 @@ class ProjectsController &lt; ApplicationController
6 before_filter :add_project_abilities 8 before_filter :add_project_abilities
7 before_filter :authorize_read_project!, :except => [:index, :new, :create] 9 before_filter :authorize_read_project!, :except => [:index, :new, :create]
8 before_filter :authorize_admin_project!, :only => [:edit, :update, :destroy] 10 before_filter :authorize_admin_project!, :only => [:edit, :update, :destroy]
9 -  
10 before_filter :require_non_empty_project, :only => [:blob, :tree] 11 before_filter :require_non_empty_project, :only => [:blob, :tree]
  12 + before_filter :load_refs, :only => :tree # load @branch, @tag & @ref
11 13
12 def index 14 def index
13 source = current_user.projects 15 source = current_user.projects
@@ -64,21 +66,8 @@ class ProjectsController &lt; ApplicationController @@ -64,21 +66,8 @@ class ProjectsController &lt; ApplicationController
64 66
65 def show 67 def show
66 return render "projects/empty" unless @project.repo_exists? 68 return render "projects/empty" unless @project.repo_exists?
67 - @date = case params[:view]  
68 - when "week" then Date.today - 7.days  
69 - when "day" then Date.today  
70 - else nil  
71 - end  
72 -  
73 - if @date  
74 - @date = @date.at_beginning_of_day  
75 -  
76 - @commits = @project.commits_since(@date)  
77 - @messages = project.notes.since(@date).order("created_at DESC")  
78 - else  
79 - @commits = @project.fresh_commits  
80 - @messages = project.notes.fresh.limit(10)  
81 - end 69 + limit = (params[:limit] || 40).to_i
  70 + @activities = @project.updates(limit)
82 end 71 end
83 72
84 # 73 #
@@ -101,15 +90,13 @@ class ProjectsController &lt; ApplicationController @@ -101,15 +90,13 @@ class ProjectsController &lt; ApplicationController
101 # 90 #
102 91
103 def tree 92 def tree
104 - load_refs # load @branch, @tag & @ref  
105 -  
106 @repo = project.repo 93 @repo = project.repo
107 94
108 - if params[:commit_id]  
109 - @commit = @repo.commits(params[:commit_id]).first  
110 - else  
111 - @commit = @repo.commits(@ref || "master").first  
112 - end 95 + @commit = if params[:commit_id]
  96 + @repo.commits(params[:commit_id]).first
  97 + else
  98 + @repo.commits(@ref).first
  99 + end
113 100
114 @tree = @commit.tree 101 @tree = @commit.tree
115 @tree = @tree / params[:path] if params[:path] 102 @tree = @tree / params[:path] if params[:path]
@@ -127,6 +114,34 @@ class ProjectsController &lt; ApplicationController @@ -127,6 +114,34 @@ class ProjectsController &lt; ApplicationController
127 return render_404 114 return render_404
128 end 115 end
129 116
  117 + def graph
  118 + @repo = project.repo
  119 + commits = Grit::Commit.find_all(@repo, nil, {:max_count => 650})
  120 + ref_cache = {}
  121 + commits.collect! do |commit|
  122 + add_refs(commit, ref_cache)
  123 + GraphCommit.new(commit)
  124 + end
  125 +
  126 + days = GraphCommit.index_commits(commits)
  127 + @days_json = days.compact.collect{|d| [d.day, d.strftime("%b")] }.to_json
  128 + @commits_json = commits.collect do |c|
  129 + h = {}
  130 + h[:parents] = c.parents.collect do |p|
  131 + [p.id,0,0]
  132 + end
  133 + h[:author] = c.author.name.force_encoding("UTF-8")
  134 + h[:time] = c.time
  135 + h[:space] = c.space
  136 + h[:refs] = c.refs.collect{|r|r.name}.join(" ") unless c.refs.nil?
  137 + h[:id] = c.sha
  138 + h[:date] = c.date
  139 + h[:message] = c.message.force_encoding("UTF-8")
  140 + h[:login] = c.author.email
  141 + h
  142 + end.to_json
  143 + end
  144 +
130 def blob 145 def blob
131 @repo = project.repo 146 @repo = project.repo
132 @commit = project.commit(params[:commit_id]) 147 @commit = project.commit(params[:commit_id])
@@ -151,6 +166,17 @@ class ProjectsController &lt; ApplicationController @@ -151,6 +166,17 @@ class ProjectsController &lt; ApplicationController
151 166
152 protected 167 protected
153 168
  169 + def add_refs(commit, ref_cache)
  170 + if ref_cache.empty?
  171 + @repo.refs.each do |ref|
  172 + ref_cache[ref.commit.id] ||= []
  173 + ref_cache[ref.commit.id] << ref
  174 + end
  175 + end
  176 + commit.refs = ref_cache[commit.id] if ref_cache.include? commit.id
  177 + commit.refs ||= []
  178 + end
  179 +
154 def project 180 def project
155 @project ||= Project.find_by_code(params[:id]) 181 @project ||= Project.find_by_code(params[:id])
156 end 182 end
app/helpers/application_helper.rb
1 require 'digest/md5' 1 require 'digest/md5'
2 module ApplicationHelper 2 module ApplicationHelper
  3 +
3 def gravatar_icon(user_email) 4 def gravatar_icon(user_email)
4 - "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user_email)}?s=40&d=identicon" 5 + gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
  6 + "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email)}?s=40&d=identicon"
5 end 7 end
6 8
7 def fixed_mode? 9 def fixed_mode?
8 - @view_mode == :fixed 10 + true
9 end 11 end
10 12
11 def body_class(default_class = nil) 13 def body_class(default_class = nil)
@@ -13,7 +15,7 @@ module ApplicationHelper @@ -13,7 +15,7 @@ module ApplicationHelper
13 default_class : 15 default_class :
14 content_for(:body_class) 16 content_for(:body_class)
15 17
16 - [main, cookies[:view_style]].join(" ") 18 + [main, "collapsed"].join(" ")
17 end 19 end
18 20
19 def commit_name(project, commit) 21 def commit_name(project, commit)
app/helpers/dashboard_helper.rb
1 module DashboardHelper 1 module DashboardHelper
2 def dashboard_feed_path(project, object) 2 def dashboard_feed_path(project, object)
3 case object.class.name.to_s 3 case object.class.name.to_s
4 - when "Issue" then project_issues_path(project, project.issues.find(object.id)) 4 + when "Issue" then project_issue_path(project, project.issues.find(object.id))
5 when "Grit::Commit" then project_commit_path(project, project.repo.commits(object.id).first) 5 when "Grit::Commit" then project_commit_path(project, project.repo.commits(object.id).first)
6 when "Note" 6 when "Note"
7 then 7 then
@@ -19,12 +19,15 @@ module DashboardHelper @@ -19,12 +19,15 @@ module DashboardHelper
19 end 19 end
20 20
21 def dashboard_feed_title(object) 21 def dashboard_feed_title(object)
22 - title = case object.class.name.to_s 22 + klass = object.class.to_s.split("::").last
  23 +
  24 + title = case klass
23 when "Note" then markdown(object.note) 25 when "Note" then markdown(object.note)
24 when "Issue" then object.title 26 when "Issue" then object.title
25 - when "Grit::Commit" then object.safe_message 27 + when "Commit" then object.safe_message
26 else return "Project Wall" 28 else return "Project Wall"
27 end 29 end
28 - "[#{object.class.name}] #{truncate(sanitize(title, :tags => []), :length => 60)} " 30 +
  31 + "[#{klass}] #{truncate(sanitize(title, :tags => []), :length => 60)} "
29 end 32 end
30 end 33 end
app/helpers/issues_helper.rb
1 module IssuesHelper 1 module IssuesHelper
2 - def sort_class  
3 - if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0")  
4 - "handle"  
5 - end  
6 - end  
7 -  
8 - def project_issues_filter_path project, params = {}  
9 - params[:f] ||= cookies['issue_filter']  
10 - project_issues_path project, params  
11 - end 2 + def sort_class
  3 + if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0")
  4 + "handle"
  5 + end
  6 + end
  7 +
  8 + def project_issues_filter_path project, params = {}
  9 + params[:f] ||= cookies['issue_filter']
  10 + project_issues_path project, params
  11 + end
12 end 12 end
app/helpers/tags_helper.rb
1 module TagsHelper 1 module TagsHelper
2 - def tag_path tag  
3 - "/tags/#{tag}"  
4 - end 2 + def tag_path tag
  3 + "/tags/#{tag}"
  4 + end
5 5
6 - def tag_list project  
7 - html = ''  
8 - project.tag_list.each do |tag|  
9 - html += link_to tag, tag_path(tag)  
10 - end  
11 -  
12 - html.html_safe  
13 - end 6 + def tag_list project
  7 + html = ''
  8 + project.tag_list.each do |tag|
  9 + html += link_to tag, tag_path(tag)
  10 + end
14 11
  12 + html.html_safe
  13 + end
15 end 14 end
app/models/issue.rb
@@ -54,5 +54,6 @@ end @@ -54,5 +54,6 @@ end
54 # updated_at :datetime 54 # updated_at :datetime
55 # closed :boolean default(FALSE), not null 55 # closed :boolean default(FALSE), not null
56 # position :integer default(0) 56 # position :integer default(0)
  57 +# critical :boolean default(FALSE), not null
57 # 58 #
58 59
app/models/note.rb
@@ -38,7 +38,7 @@ end @@ -38,7 +38,7 @@ end
38 # Table name: notes 38 # Table name: notes
39 # 39 #
40 # id :integer not null, primary key 40 # id :integer not null, primary key
41 -# note :string(255) 41 +# note :text
42 # noteable_id :string(255) 42 # noteable_id :string(255)
43 # noteable_type :string(255) 43 # noteable_type :string(255)
44 # author_id :integer 44 # author_id :integer
app/models/project.rb
@@ -46,6 +46,25 @@ class Project &lt; ActiveRecord::Base @@ -46,6 +46,25 @@ class Project &lt; ActiveRecord::Base
46 46
47 scope :public_only, where(:private_flag => false) 47 scope :public_only, where(:private_flag => false)
48 48
  49 + def repository
  50 + @repository ||= Repository.new(self)
  51 + end
  52 +
  53 + delegate :repo,
  54 + :url_to_repo,
  55 + :path_to_repo,
  56 + :update_gitosis_project,
  57 + :destroy_gitosis_project,
  58 + :tags,
  59 + :repo_exists?,
  60 + :commit,
  61 + :commits,
  62 + :tree,
  63 + :heads,
  64 + :commits_since,
  65 + :fresh_commits,
  66 + :to => :repository, :prefix => nil
  67 +
49 def to_param 68 def to_param
50 code 69 code
51 end 70 end
@@ -59,16 +78,12 @@ class Project &lt; ActiveRecord::Base @@ -59,16 +78,12 @@ class Project &lt; ActiveRecord::Base
59 notes.where(:noteable_type => ["", nil]) 78 notes.where(:noteable_type => ["", nil])
60 end 79 end
61 80
62 - def update_gitosis_project  
63 - Gitosis.new.configure do |c|  
64 - c.update_project(path, gitosis_writers)  
65 - end 81 + def build_commit_note(commit)
  82 + notes.new(:noteable_id => commit.id, :noteable_type => "Commit")
66 end 83 end
67 84
68 - def destroy_gitosis_project  
69 - Gitosis.new.configure do |c|  
70 - c.destroy_project(self)  
71 - end 85 + def commit_notes(commit)
  86 + notes.where(:noteable_id => commit.id, :noteable_type => "Commit")
72 end 87 end
73 88
74 def add_access(user, *access) 89 def add_access(user, *access)
@@ -106,26 +121,6 @@ class Project &lt; ActiveRecord::Base @@ -106,26 +121,6 @@ class Project &lt; ActiveRecord::Base
106 private_flag 121 private_flag
107 end 122 end
108 123
109 - def url_to_repo  
110 - "#{GITOSIS["git_user"]}@#{GITOSIS["host"]}:#{path}.git"  
111 - end  
112 -  
113 - def path_to_repo  
114 - GITOSIS["base_path"] + path + ".git"  
115 - end  
116 -  
117 - def repo  
118 - @repo ||= Grit::Repo.new(path_to_repo)  
119 - end  
120 -  
121 - def tags  
122 - repo.tags.map(&:name).sort.reverse  
123 - end  
124 -  
125 - def repo_exists?  
126 - repo rescue false  
127 - end  
128 -  
129 def last_activity 124 def last_activity
130 updates(1).first 125 updates(1).first
131 rescue 126 rescue
@@ -146,48 +141,6 @@ class Project &lt; ActiveRecord::Base @@ -146,48 +141,6 @@ class Project &lt; ActiveRecord::Base
146 end[0...n] 141 end[0...n]
147 end 142 end
148 143
149 - def commit(commit_id = nil)  
150 - if commit_id  
151 - repo.commits(commit_id).first  
152 - else  
153 - repo.commits.first  
154 - end  
155 - end  
156 -  
157 - def heads  
158 - @heads ||= repo.heads  
159 - end  
160 -  
161 - def fresh_commits(n = 10)  
162 - commits = heads.map do |h|  
163 - repo.commits(h.name, n)  
164 - end.flatten.uniq { |c| c.id }  
165 -  
166 - commits.sort! do |x, y|  
167 - y.committed_date <=> x.committed_date  
168 - end  
169 -  
170 - commits[0...n]  
171 - end  
172 -  
173 - def commits_since(date)  
174 - commits = heads.map do |h|  
175 - repo.log(h.name, nil, :since => date)  
176 - end.flatten.uniq { |c| c.id }  
177 -  
178 - commits.sort! do |x, y|  
179 - y.committed_date <=> x.committed_date  
180 - end  
181 -  
182 - commits  
183 - end  
184 -  
185 - def tree(fcommit, path = nil)  
186 - fcommit = commit if fcommit == :head  
187 - tree = fcommit.tree  
188 - path ? (tree / path) : tree  
189 - end  
190 -  
191 def check_limit 144 def check_limit
192 unless owner.can_create_project? 145 unless owner.can_create_project?
193 errors[:base] << ("Your own projects limit is #{owner.projects_limit}! Please contact administrator to increase it") 146 errors[:base] << ("Your own projects limit is #{owner.projects_limit}! Please contact administrator to increase it")
app/models/repository.rb 0 → 100644
@@ -0,0 +1,97 @@ @@ -0,0 +1,97 @@
  1 +class Repository
  2 + attr_accessor :project
  3 +
  4 + def self.default_ref
  5 + "master"
  6 + end
  7 +
  8 + def initialize(project)
  9 + @project = project
  10 + end
  11 +
  12 + def path
  13 + @path ||= project.path
  14 + end
  15 +
  16 + def project_id
  17 + project.id
  18 + end
  19 +
  20 + def repo
  21 + @repo ||= Grit::Repo.new(project.path_to_repo)
  22 + end
  23 +
  24 + def url_to_repo
  25 + if !GITOSIS["port"] or GITOSIS["port"] == 22
  26 + "#{GITOSIS["git_user"]}@#{GITOSIS["host"]}:#{path}.git"
  27 + else
  28 + "ssh://#{GITOSIS["git_user"]}@#{GITOSIS["host"]}:#{GITOSIS["port"]}/#{path}.git"
  29 + end
  30 + end
  31 +
  32 + def path_to_repo
  33 + GITOSIS["base_path"] + path + ".git"
  34 + end
  35 +
  36 + def update_gitosis_project
  37 + Gitosis.new.configure do |c|
  38 + c.update_project(path, project.gitosis_writers)
  39 + end
  40 + end
  41 +
  42 + def destroy_gitosis_project
  43 + Gitosis.new.configure do |c|
  44 + c.destroy_project(@project)
  45 + end
  46 + end
  47 +
  48 + def repo_exists?
  49 + repo rescue false
  50 + end
  51 +
  52 + def tags
  53 + repo.tags.map(&:name).sort.reverse
  54 + end
  55 +
  56 + def heads
  57 + @heads ||= repo.heads
  58 + end
  59 +
  60 + def tree(fcommit, path = nil)
  61 + fcommit = commit if fcommit == :head
  62 + tree = fcommit.tree
  63 + path ? (tree / path) : tree
  64 + end
  65 +
  66 + def commit(commit_id = nil)
  67 + if commit_id
  68 + repo.commits(commit_id).first
  69 + else
  70 + repo.commits.first
  71 + end
  72 + end
  73 +
  74 + def fresh_commits(n = 10)
  75 + commits = heads.map do |h|
  76 + repo.commits(h.name, n).each { |c| c.head = h }
  77 + end.flatten.uniq { |c| c.id }
  78 +
  79 + commits.sort! do |x, y|
  80 + y.committed_date <=> x.committed_date
  81 + end
  82 +
  83 + commits[0...n]
  84 + end
  85 +
  86 + def commits_since(date)
  87 + commits = heads.map do |h|
  88 + repo.log(h.name, nil, :since => date).each { |c| c.head = h }
  89 + end.flatten.uniq { |c| c.id }
  90 +
  91 + commits.sort! do |x, y|
  92 + y.committed_date <=> x.committed_date
  93 + end
  94 +
  95 + commits
  96 + end
  97 +end
app/models/user.rb
@@ -16,6 +16,10 @@ class User &lt; ActiveRecord::Base @@ -16,6 +16,10 @@ class User &lt; ActiveRecord::Base
16 :foreign_key => :author_id, 16 :foreign_key => :author_id,
17 :dependent => :destroy 17 :dependent => :destroy
18 18
  19 + has_many :notes,
  20 + :foreign_key => :author_id,
  21 + :dependent => :destroy
  22 +
19 has_many :assigned_issues, 23 has_many :assigned_issues,
20 :class_name => "Issue", 24 :class_name => "Issue",
21 :foreign_key => :assignee_id, 25 :foreign_key => :assignee_id,
app/views/dashboard/index.html.haml
@@ -27,12 +27,13 @@ @@ -27,12 +27,13 @@
27 %a.project-update{:href => dashboard_feed_path(project, update)} 27 %a.project-update{:href => dashboard_feed_path(project, update)}
28 = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 28 = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
29 %span.update-title 29 %span.update-title
  30 + - if update.kind_of?(Grit::Commit)
  31 + %span.right.tag.commit= update.head.name
30 = dashboard_feed_title(update) 32 = dashboard_feed_title(update)
31 %span.update-author 33 %span.update-author
32 %strong= update.author_name 34 %strong= update.author_name
33 authored 35 authored
34 = time_ago_in_words(update.created_at) 36 = time_ago_in_words(update.created_at)
35 ago 37 ago
36 - %br  
37 / #news-feed 38 / #news-feed
38 / #dashboard-content 39 / #dashboard-content
app/views/layouts/_head_panel.html.erb
@@ -8,15 +8,11 @@ @@ -8,15 +8,11 @@
8 <%= image_tag gravatar_icon(current_user.email) %> 8 <%= image_tag gravatar_icon(current_user.email) %>
9 <% end %> 9 <% end %>
10 10
11 - <a href="#" class="arrow-up"></a>  
12 -  
13 <div class="account-links"> 11 <div class="account-links">
14 <%= link_to profile_path, :class => "username" do %> 12 <%= link_to profile_path, :class => "username" do %>
15 <%#= current_user.name %> 13 <%#= current_user.name %>
16 - Your profile 14 + My profile
17 <% end %> 15 <% end %>
18 - <%= link_to "Fluid layout", url_for( :view_style => 'fluid' ) if cookies[:view_style] == "collapsed"%>  
19 - <%= link_to "Fixed layout", url_for( :view_style => 'collapsed' ) unless cookies[:view_style] == "collapsed"%>  
20 <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %> 16 <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
21 </div> 17 </div>
22 </div><!-- .account-box --> 18 </div><!-- .account-box -->
@@ -50,3 +46,11 @@ @@ -50,3 +46,11 @@
50 }); 46 });
51 <% end %> 47 <% end %>
52 <% end %> 48 <% end %>
  49 +
  50 +<% if current_user.keys.all.empty? %>
  51 + <div id="no_ssh_key_defined">
  52 + <h2>ATTENTION!</h2>
  53 + <p>No SSH Key is defined. You won't be able to use any Git command!
  54 + <p>Click <%=link_to( 'here', keys_path ) %> to add one!
  55 + </div>
  56 +<% end %>
app/views/layouts/project.html.haml
@@ -20,11 +20,13 @@ @@ -20,11 +20,13 @@
20 .project-container 20 .project-container
21 .project-sidebar 21 .project-sidebar
22 .fixed 22 .fixed
23 - %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"} 23 + .git_url_wrapper
  24 + %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
24 %aside 25 %aside
25 - = link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil 26 + = link_to "Activities", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
26 = link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil 27 = link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
27 = link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil 28 = link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
  29 + = link_to "Network graph", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil
28 = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do 30 = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
29 Team 31 Team
30 - if @project.users_projects.count > 0 32 - if @project.users_projects.count > 0
app/views/notes/_form.html.haml
@@ -28,4 +28,4 @@ @@ -28,4 +28,4 @@
28 28
29 .clear 29 .clear
30 %br 30 %br
31 - = f.submit 'Add note', :class => "lbutton vm", :id => "submit_note" 31 + = f.submit 'Add note', :class => "button", :id => "submit_note"
app/views/projects/_feed.html.haml 0 → 100644
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +%a.project-update{:href => dashboard_feed_path(project, update)}
  2 + = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
  3 + %span.update-title
  4 + = dashboard_feed_title(update)
  5 + %span.update-author
  6 + %strong= update.author_name
  7 + authored
  8 + = time_ago_in_words(update.created_at)
  9 + ago
  10 + .right
  11 + - klass = update.class.to_s.split("::").last.downcase
  12 + %span.tag{ :class => klass }= klass
  13 + - if update.kind_of?(Grit::Commit)
  14 + %span.tag.commit= update.head.name
  15 +
app/views/projects/_recent_commits.html.haml
@@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
1 -%table  
2 - %thead  
3 - %th  
4 - Commits  
5 - .filter.right  
6 - = form_tag project_path(@project), :method => :get, :class => "right" do  
7 - .left  
8 - = radio_button_tag :view, "recent", (params[:view] || "recent") == "recent", :onclick => "this.form.submit()", :id => "recent_view"  
9 - = label_tag "recent_view","Recent"  
10 - .left  
11 - = radio_button_tag :view, "day", params[:view] == "day", :onclick => "this.form.submit()", :id => "day_view"  
12 - = label_tag "day_view","Today"  
13 - .left  
14 - = radio_button_tag :view, "week", params[:view] == "week", :onclick => "this.form.submit()", :id => "week_view"  
15 - = label_tag "week_view","Week"  
16 - - @commits.each do |commit|  
17 - %tr  
18 - %td  
19 - %div.commit  
20 - - if commit.author.email  
21 - = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"  
22 - - else  
23 - = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"  
24 - .title  
25 - %p= link_to truncate(commit.safe_message, :length => fixed_mode? ? 40 : 100), project_commit_path(@project, :id => commit.id)  
26 -  
27 - %span  
28 - %span.author  
29 - %strong= commit.author.name.force_encoding("UTF-8")  
30 - %cite.cgray  
31 - = time_ago_in_words(commit.committed_date)  
32 - ago  
app/views/projects/_recent_messages.html.haml
@@ -1,27 +0,0 @@ @@ -1,27 +0,0 @@
1 -- @messages.group_by{ |x| [x.noteable_id, x.noteable_type]}.each do |item, notes|  
2 - - id, type = item[0], item[1]  
3 - - parent = load_note_parent(id, type, @project)  
4 - - next unless parent  
5 -  
6 - %table  
7 - %thead  
8 - %th  
9 - %div{ :class => "recent_message_parent"}  
10 - = link_to(truncate(dashboard_feed_title(parent), :length => fixed_mode? ? 40 : 100 ), dashboard_feed_path(@project, parent))  
11 - - notes.sort {|x,y| y.updated_at <=> x.updated_at }.each do |note|  
12 - %tr  
13 - %td  
14 - %div.message  
15 - = image_tag gravatar_icon(note.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"  
16 - %div.title  
17 - = link_to markdown(truncate(note.note, :length => fixed_mode? ? 40 : 100)), dashboard_feed_path(@project, parent) + "#note_#{note.id}"  
18 - - if note.attachment.url  
19 - %br  
20 - Attachment:  
21 - = link_to note.attachment_identifier, note.attachment.url  
22 - %div.author  
23 - %strong= note.author_name  
24 - %cite.cgray  
25 - = time_ago_in_words(note.updated_at)  
26 - ago  
27 - %br  
app/views/projects/_tile.html.haml
1 - @projects.in_groups_of(3, false) do |projects| 1 - @projects.in_groups_of(3, false) do |projects|
2 - projects.each_with_index do |project, i| 2 - projects.each_with_index do |project, i|
3 - %div.grid_1 3 + %div.grid_1.projects_selector
4 %div{ :class => "project-box ui-box ui-box-big" } 4 %div{ :class => "project-box ui-box ui-box-big" }
5 = link_to project_path(project) do 5 = link_to project_path(project) do
6 - %h3= project.name 6 + %h3= truncate(project.name, :length => 20)
7 .data 7 .data
8 - %p.title.repository 8 + %p.title.repository.git_url_wrapper
9 %span Repository: 9 %span Repository:
10 - = project.url_to_repo 10 + %input{ :value => project.url_to_repo, :class => ['git-url', 'one_click_select', 'text', 'project_list_url'], :readonly => 'readonly' }
11 %p.title.activity 11 %p.title.activity
12 %span Last Activity: 12 %span Last Activity:
13 - last_note = project.notes.last 13 - last_note = project.notes.last
app/views/projects/_tree_item.html.haml
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 = time_ago_in_words(content_commit.committed_date) 12 = time_ago_in_words(content_commit.committed_date)
13 ago 13 ago
14 %td.commit 14 %td.commit
15 - = link_to truncate(content_commit.safe_message, :length => fixed_mode? ? 40 : 80), project_commit_path(@project, content_commit), :class => "tree-commit-link" 15 + = link_to truncate(content_commit.safe_message, :length => 40), project_commit_path(@project, content_commit), :class => "tree-commit-link"
16 - tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name) 16 - tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name)
17 - if tm 17 - if tm
18 = link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) 18 = link_to "[#{tm.user_name}]", project_team_member_path(@project, tm)
app/views/projects/empty.html.erb
@@ -28,7 +28,7 @@ eos @@ -28,7 +28,7 @@ eos
28 <h2>Existing Git Repo?</h2> 28 <h2>Existing Git Repo?</h2>
29 <% exist_repo_setup_str = <<eos 29 <% exist_repo_setup_str = <<eos
30 cd existing_git_repo 30 cd existing_git_repo
31 -git remote add origin #{@project.url_to_repo} 31 +git remote add origin #{@project.url_to_repo}
32 git push -u origin master 32 git push -u origin master
33 eos 33 eos
34 %> 34 %>
app/views/projects/graph.html.haml 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +#holder.graph
  2 +
  3 +:javascript
  4 + var chunk1={commits:#{@commits_json}};
  5 + var days=#{@days_json};
  6 + initGraph();
  7 + $(function(){
  8 + branchGraph($("#holder")[0]);
  9 + });
app/views/projects/new.html.haml
1 -.new-project-hodler  
2 - .container_4  
3 - %h2.icon  
4 - %span  
5 - New Project 1 +- content_for(:body_class, "new-project-page")
  2 +- content_for(:page_title) do
  3 + .new-project-hodler
  4 + .container
  5 + %h2.icon
  6 + %span
  7 + New Project
6 8
7 - %div.clear  
8 - = render 'form' 9 + %div.clear
  10 + = render 'form'
app/views/projects/show.html.haml
1 -.left.width-49p  
2 - =render "projects/recent_commits" 1 +- content_for(:body_class, "project-page dashboard")
3 2
4 -.right.width-49p  
5 - =render "projects/recent_messages" 3 +#news-feed.news-feed
  4 + %h2.icon
  5 + %span>
  6 + Activities
  7 + .project-box.project-updates.ui-box.ui-box-small.ui-box-big
  8 + - @activities.each do |update|
  9 + = render "projects/feed", :update => update, :project => @project
6 10
7 :javascript 11 :javascript
8 function updateDashboard(){ 12 function updateDashboard(){
app/views/snippets/_form.html.haml
@@ -19,7 +19,8 @@ @@ -19,7 +19,8 @@
19 %td{:colspan => 2} 19 %td{:colspan => 2}
20 = f.label :content, "Code" 20 = f.label :content, "Code"
21 %br 21 %br
22 - = f.text_area :content, :style => "height:240px;width:932px;" 22 + %br
  23 + = f.text_area :content
23 24
24 .actions.prepend-top 25 .actions.prepend-top
25 - = f.submit 'Save', :class => "lbutton vm" 26 + = f.submit 'Save', :class => "button"
app/views/snippets/_snippet.html.haml
@@ -2,11 +2,17 @@ @@ -2,11 +2,17 @@
2 %tr{ :id => dom_id(snippet), :class => "snippet", :url => project_snippet_path(@project, snippet) } 2 %tr{ :id => dom_id(snippet), :class => "snippet", :url => project_snippet_path(@project, snippet) }
3 %td 3 %td
4 = image_tag gravatar_icon(snippet.author.email), :class => "left", :width => 40, :style => "padding:0 5px;" 4 = image_tag gravatar_icon(snippet.author.email), :class => "left", :width => 40, :style => "padding:0 5px;"
5 - = truncate snippet.author.name, :lenght => 20  
6 - %td= html_escape snippet.title  
7 - %td= html_escape snippet.file_name  
8 - %td  
9 - - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user  
10 - = link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "lbutton positive"  
11 - - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user  
12 - = link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{snippet.id}" 5 + %span
  6 + %strong= html_escape snippet.title
  7 + %br
  8 + %br
  9 + %div.author
  10 + %strong= truncate snippet.author.name, :lenght => 20
  11 + %cite.cgray
  12 + = time_ago_in_words(snippet.updated_at)
  13 + ago
  14 + .right.action-links
  15 + - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
  16 + = link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "cgray"
  17 + - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
  18 + = link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-snippet negative", :id => "destroy_snippet_#{snippet.id}"
app/views/snippets/index.html.haml
1 %div 1 %div
2 - if can? current_user, :write_snippet, @project 2 - if can? current_user, :write_snippet, @project
3 - .left= link_to 'New Snippet', new_project_snippet_path(@project), :class => "lbutton vm" 3 + = link_to 'New Snippet', new_project_snippet_path(@project), :class => "button append-bottom-10"
4 4
5 %table.round-borders#snippets-table 5 %table.round-borders#snippets-table
6 - %tr  
7 - %th Author  
8 - %th Title  
9 - %th File name  
10 - %th 6 + %thead
  7 + %th
11 = render @snippets.fresh 8 = render @snippets.fresh
12 :javascript 9 :javascript
13 $('.delete-snippet').live('ajax:success', function() { 10 $('.delete-snippet').live('ajax:success', function() {
config/gitosis.yml
@@ -2,3 +2,4 @@ admin_uri: git@localhost:gitosis-admin.git @@ -2,3 +2,4 @@ admin_uri: git@localhost:gitosis-admin.git
2 base_path: /home/git/repositories/ 2 base_path: /home/git/repositories/
3 host: localhost 3 host: localhost
4 git_user: git 4 git_user: git
  5 +# port: 22
config/routes.rb
@@ -34,6 +34,7 @@ Gitlab::Application.routes.draw do @@ -34,6 +34,7 @@ Gitlab::Application.routes.draw do
34 get "blob" 34 get "blob"
35 get "team" 35 get "team"
36 get "wall" 36 get "wall"
  37 + get "graph"
37 38
38 # tree viewer 39 # tree viewer
39 get "tree/:commit_id" => "projects#tree" 40 get "tree/:commit_id" => "projects#tree"
lib/assets/javascripts/branch-graph.js 0 → 100644
@@ -0,0 +1,178 @@ @@ -0,0 +1,178 @@
  1 +var commits = {},
  2 + comms = {},
  3 + pixelsX = [],
  4 + pixelsY = [],
  5 + mmax = Math.max,
  6 + mtime = 0,
  7 + mspace = 0,
  8 + parents = {},
  9 + ii = 0,
  10 + colors = ["#000"];
  11 +
  12 +function initGraph(){
  13 + commits = chunk1.commits;
  14 + ii = commits.length;
  15 + for (var i = 0; i < ii; i++) {
  16 + for (var j = 0, jj = commits[i].parents.length; j < jj; j++) {
  17 + parents[commits[i].parents[j][0]] = true;
  18 + }
  19 + mtime = Math.max(mtime, commits[i].time);
  20 + mspace = Math.max(mspace, commits[i].space);
  21 + }
  22 + mtime = mtime + 4;
  23 + mspace = mspace + 10;
  24 + for (i = 0; i < ii; i++) {
  25 + if (commits[i].id in parents) {
  26 + commits[i].isParent = true;
  27 + }
  28 + comms[commits[i].id] = commits[i];
  29 + }
  30 + for (var k = 0; k < mspace; k++) {
  31 + colors.push(Raphael.getColor());
  32 + }
  33 +}
  34 +
  35 +function branchGraph(holder) {
  36 + var ch = mspace * 20 + 20, cw = mtime * 20 + 20,
  37 + r = Raphael("holder", cw, ch),
  38 + top = r.set();
  39 + var cuday = 0, cumonth = "";
  40 + r.rect(0, 0, days.length * 20 + 20, 20).attr({fill: "#474D57"});
  41 + r.rect(0, 20, days.length * 20 + 20, 20).attr({fill: "#f7f7f7"});
  42 +
  43 + for (mm = 0; mm < days.length; mm++) {
  44 + if(days[mm] != null){
  45 + if(cuday != days[mm][0]){
  46 + r.text(10 + mm * 20, 30, days[mm][0]).attr({font: "12px Fontin-Sans, Arial", fill: "#444"});
  47 + cuday = days[mm][0]
  48 + }
  49 + if(cumonth != days[mm][1]){
  50 + r.text(10 + mm * 20, 10, days[mm][1]).attr({font: "12px Fontin-Sans, Arial", fill: "#444"});
  51 + cumonth = days[mm][1]
  52 + }
  53 +
  54 + }
  55 + }
  56 + for (i = 0; i < ii; i++) {
  57 + var x = 10 + 20 * commits[i].time,
  58 + y = 70 + 20 * commits[i].space;
  59 + r.circle(x, y, 3).attr({fill: colors[commits[i].space], stroke: "none"});
  60 + if (commits[i].refs != null && commits[i].refs != "") {
  61 + var longrefs = commits[i].refs
  62 + var shortrefs = commits[i].refs;
  63 + if (shortrefs.length > 15){
  64 + shortrefs = shortrefs.substr(0,13) + "...";
  65 + }
  66 + var t = r.text(x+5, y+5, shortrefs).attr({font: "12px Fontin-Sans, Arial", fill: "#666",
  67 + title: longrefs, cursor: "pointer", rotation: "90"});
  68 +
  69 + var textbox = t.getBBox();
  70 + t.translate(textbox.height/-4,textbox.width/2);
  71 + }
  72 + for (var j = 0, jj = commits[i].parents.length; j < jj; j++) {
  73 + var c = comms[commits[i].parents[j][0]];
  74 + if (c) {
  75 + var cx = 10 + 20 * c.time,
  76 + cy = 70 + 20 * c.space;
  77 + if (c.space == commits[i].space) {
  78 + r.path("M" + (x - 5) + "," + (y + .0001) + "L" + (15 + 20 * c.time) + "," + (y + .0001))
  79 + .attr({stroke: colors[c.space], "stroke-width": 2});
  80 +
  81 + } else if (c.space < commits[i].space) {
  82 + r.path(["M", x - 5, y + .0001, "l-5-2,0,4,5,-2C",x-5,y,x -17, y+2, x -20, y-10,"L", cx,y-10,cx , cy])
  83 + .attr({stroke: colors[commits[i].space], "stroke-width": 2});
  84 + } else {
  85 + r.path(["M", x-5, y, "l-5-2,0,4,5,-2C",x-5,y,x -17, y-2, x -20, y+10,"L", cx,y+10,cx , cy])
  86 + .attr({stroke: colors[commits[i].space], "stroke-width": 2});
  87 + }
  88 + }
  89 + }
  90 + (function (c, x, y) {
  91 + top.push(r.circle(x, y, 10).attr({fill: "#000", opacity: 0, cursor: "pointer"})
  92 + .hover(function () {
  93 + var s = r.text(100, 100,c.author + "\n \n" +c.id + "\n \n" + c.message).attr({fill: "#fff"});
  94 + this.popup = r.popupit(x, y + 5, s, 0);
  95 + top.push(this.popup.insertBefore(this));
  96 + }, function () {
  97 + this.popup && this.popup.remove() && delete this.popup;
  98 + }));
  99 + }(commits[i], x, y));
  100 + }
  101 + top.toFront();
  102 + var hw = holder.offsetWidth,
  103 + hh = holder.offsetHeight,
  104 + v = r.rect(hw - 8, 0, 4, Math.pow(hh, 2) / ch, 2).attr({fill: "#000", opacity: 0}),
  105 + h = r.rect(0, hh - 8, Math.pow(hw, 2) / cw, 4, 2).attr({fill: "#000", opacity: 0}),
  106 + bars = r.set(v, h),
  107 + drag,
  108 + dragger = function (e) {
  109 + if (drag) {
  110 + e = e || window.event;
  111 + holder.scrollLeft = drag.sl - (e.clientX - drag.x);
  112 + holder.scrollTop = drag.st - (e.clientY - drag.y);
  113 + }
  114 + };
  115 + holder.onmousedown = function (e) {
  116 + e = e || window.event;
  117 + drag = {x: e.clientX, y: e.clientY, st: holder.scrollTop, sl: holder.scrollLeft};
  118 + document.onmousemove = dragger;
  119 + bars.animate({opacity: .5}, 300);
  120 + };
  121 + document.onmouseup = function () {
  122 + drag = false;
  123 + document.onmousemove = null;
  124 + bars.animate({opacity: 0}, 300);
  125 + };
  126 + holder.scrollLeft = cw;
  127 +};
  128 +Raphael.fn.popupit = function (x, y, set, dir, size) {
  129 + dir = dir == null ? 2 : dir;
  130 + size = size || 5;
  131 + x = Math.round(x);
  132 + y = Math.round(y);
  133 + var bb = set.getBBox(),
  134 + w = Math.round(bb.width / 2),
  135 + h = Math.round(bb.height / 2),
  136 + dx = [0, w + size * 2, 0, -w - size * 2],
  137 + dy = [-h * 2 - size * 3, -h - size, 0, -h - size],
  138 + p = ["M", x - dx[dir], y - dy[dir], "l", -size, (dir == 2) * -size, -mmax(w - size, 0), 0, "a", size, size, 0, 0, 1, -size, -size,
  139 + "l", 0, -mmax(h - size, 0), (dir == 3) * -size, -size, (dir == 3) * size, -size, 0, -mmax(h - size, 0), "a", size, size, 0, 0, 1, size, -size,
  140 + "l", mmax(w - size, 0), 0, size, !dir * -size, size, !dir * size, mmax(w - size, 0), 0, "a", size, size, 0, 0, 1, size, size,
  141 + "l", 0, mmax(h - size, 0), (dir == 1) * size, size, (dir == 1) * -size, size, 0, mmax(h - size, 0), "a", size, size, 0, 0, 1, -size, size,
  142 + "l", -mmax(w - size, 0), 0, "z"].join(","),
  143 + xy = [{x: x, y: y + size * 2 + h}, {x: x - size * 2 - w, y: y}, {x: x, y: y - size * 2 - h}, {x: x + size * 2 + w, y: y}][dir];
  144 + set.translate(xy.x - w - bb.x, xy.y - h - bb.y);
  145 + return this.set(this.path(p).attr({fill: "#234", stroke: "none"}).insertBefore(set.node ? set : set[0]), set);
  146 +};
  147 +Raphael.fn.popup = function (x, y, text, dir, size) {
  148 + dir = dir == null ? 2 : dir > 3 ? 3 : dir;
  149 + size = size || 5;
  150 + text = text || "$9.99";
  151 + var res = this.set(),
  152 + d = 3;
  153 + res.push(this.path().attr({fill: "#000", stroke: "#000"}));
  154 + res.push(this.text(x, y, text).attr(this.g.txtattr).attr({fill: "#fff", "font-family": "Helvetica, Arial"}));
  155 + res.update = function (X, Y, withAnimation) {
  156 + X = X || x;
  157 + Y = Y || y;
  158 + var bb = this[1].getBBox(),
  159 + w = bb.width / 2,
  160 + h = bb.height / 2,
  161 + dx = [0, w + size * 2, 0, -w - size * 2],
  162 + dy = [-h * 2 - size * 3, -h - size, 0, -h - size],
  163 + p = ["M", X - dx[dir], Y - dy[dir], "l", -size, (dir == 2) * -size, -mmax(w - size, 0), 0, "a", size, size, 0, 0, 1, -size, -size,
  164 + "l", 0, -mmax(h - size, 0), (dir == 3) * -size, -size, (dir == 3) * size, -size, 0, -mmax(h - size, 0), "a", size, size, 0, 0, 1, size, -size,
  165 + "l", mmax(w - size, 0), 0, size, !dir * -size, size, !dir * size, mmax(w - size, 0), 0, "a", size, size, 0, 0, 1, size, size,
  166 + "l", 0, mmax(h - size, 0), (dir == 1) * size, size, (dir == 1) * -size, size, 0, mmax(h - size, 0), "a", size, size, 0, 0, 1, -size, size,
  167 + "l", -mmax(w - size, 0), 0, "z"].join(","),
  168 + xy = [{x: X, y: Y + size * 2 + h}, {x: X - size * 2 - w, y: Y}, {x: X, y: Y - size * 2 - h}, {x: X + size * 2 + w, y: Y}][dir];
  169 + xy.path = p;
  170 + if (withAnimation) {
  171 + this.animate(xy, 500, ">");
  172 + } else {
  173 + this.attr(xy);
  174 + }
  175 + return this;
  176 + };
  177 + return res.update(x, y);
  178 +};
lib/commit_ext.rb
1 module CommitExt 1 module CommitExt
  2 + attr_accessor :head
  3 + attr_accessor :refs
  4 +
2 def safe_message 5 def safe_message
3 message.encode("UTF-8", 6 message.encode("UTF-8",
4 :invalid => :replace, 7 :invalid => :replace,
lib/graph_commit.rb 0 → 100644
@@ -0,0 +1,75 @@ @@ -0,0 +1,75 @@
  1 +require "grit"
  2 +
  3 +class GraphCommit
  4 + attr_accessor :time, :space
  5 + def initialize(commit)
  6 + @_commit = commit
  7 + @time = -1
  8 + @space = 0
  9 + end
  10 +
  11 + def method_missing(m, *args, &block)
  12 + @_commit.send(m, *args, &block)
  13 + end
  14 +
  15 + # Method is adding time and space on the
  16 + # list of commits. As well as returns date list
  17 + # corelated with time set on commits.
  18 + #
  19 + # @param [Array<GraphCommit>] comits to index
  20 + #
  21 + # @return [Array<TimeDate>] list of commit dates corelated with time on commits
  22 + def self.index_commits(commits)
  23 + days, heads = [], []
  24 + map = {}
  25 +
  26 + commits.reverse.each_with_index do |c,i|
  27 + c.time = i
  28 + days[i] = c.committed_date
  29 + map[c.id] = c
  30 + heads += c.refs unless c.refs.nil?
  31 + end
  32 +
  33 + heads.select!{|h| h.is_a? Grit::Head or h.is_a? Grit::Remote}
  34 + # sort heads so the master is top and current branches are closer
  35 + heads.sort! do |a,b|
  36 + if a.name == "master"
  37 + -1
  38 + elsif b.name == "master"
  39 + 1
  40 + else
  41 + b.commit.committed_date <=> a.commit.committed_date
  42 + end
  43 + end
  44 +
  45 + j = 0
  46 + heads.each do |h|
  47 + if map.include? h.commit.id then
  48 + j = mark_chain(j+=1, map[h.commit.id], map)
  49 + end
  50 + end
  51 + days
  52 + end
  53 +
  54 + # Add space mark on commit and its parents
  55 + #
  56 + # @param [Fixnum] space (row on the graph) to be set
  57 + # @param [GraphCommit] the commit object.
  58 + # @param [Hash<String,GraphCommit>] map of commits
  59 + #
  60 + # @return [Fixnum] max space used.
  61 + def self.mark_chain(mark, commit, map)
  62 + commit.space = mark if commit.space == 0
  63 + m1 = mark - 1
  64 + marks = commit.parents.collect do |p|
  65 + if map.include? p.id and map[p.id].space == 0 then
  66 + mark_chain(m1 += 1, map[p.id],map)
  67 + else
  68 + m1 + 1
  69 + end
  70 + end
  71 + marks << mark
  72 + marks.compact.max
  73 + end
  74 +
  75 +end
spec/helpers/application_helper_spec.rb 0 → 100644
@@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
  1 +require 'spec_helper'
  2 +
  3 +describe ApplicationHelper do
  4 + context ".gravatar_icon" do
  5 + context "over http" do
  6 + it "returns the correct URL to www.gravatar.com" do
  7 + expected = "http://www.gravatar.com/avatar/f7daa65b2aa96290bb47c4d68d11fe6a?s=40&d=identicon"
  8 +
  9 + # Pretend we're running over HTTP
  10 + helper.stub(:request) do
  11 + request = double('request')
  12 + request.stub(:ssl?) { false }
  13 + request
  14 + end
  15 +
  16 + helper.gravatar_icon("admin@local.host").should == expected
  17 + end
  18 + end
  19 +
  20 + context "over https" do
  21 + it "returns the correct URL to secure.gravatar.com" do
  22 + expected = "https://secure.gravatar.com/avatar/f7daa65b2aa96290bb47c4d68d11fe6a?s=40&d=identicon"
  23 +
  24 + # Pretend we're running over HTTPS
  25 + helper.stub(:request) do
  26 + request = double('request')
  27 + request.stub(:ssl?) { true }
  28 + request
  29 + end
  30 +
  31 + helper.gravatar_icon("admin@local.host").should == expected
  32 + end
  33 + end
  34 + end
  35 +end
spec/models/issue_spec.rb
@@ -39,5 +39,6 @@ end @@ -39,5 +39,6 @@ end
39 # updated_at :datetime 39 # updated_at :datetime
40 # closed :boolean default(FALSE), not null 40 # closed :boolean default(FALSE), not null
41 # position :integer default(0) 41 # position :integer default(0)
  42 +# critical :boolean default(FALSE), not null
42 # 43 #
43 44
spec/models/note_spec.rb
@@ -66,7 +66,7 @@ end @@ -66,7 +66,7 @@ end
66 # Table name: notes 66 # Table name: notes
67 # 67 #
68 # id :integer not null, primary key 68 # id :integer not null, primary key
69 -# note :string(255) 69 +# note :text
70 # noteable_id :string(255) 70 # noteable_id :string(255)
71 # noteable_type :string(255) 71 # noteable_type :string(255)
72 # author_id :integer 72 # author_id :integer
spec/models/user_spec.rb
@@ -18,6 +18,21 @@ describe User do @@ -18,6 +18,21 @@ describe User do
18 user = User.new(:email => "test@mail.com") 18 user = User.new(:email => "test@mail.com")
19 user.identifier.should == "test_mail.com" 19 user.identifier.should == "test_mail.com"
20 end 20 end
  21 +
  22 + describe "dependent" do
  23 + before do
  24 + @user = Factory :user
  25 + @note = Factory :note,
  26 + :author => @user,
  27 + :project => Factory(:project)
  28 + end
  29 +
  30 + it "should destroy all notes with user" do
  31 + Note.find_by_id(@note.id).should_not be_nil
  32 + @user.destroy
  33 + Note.find_by_id(@note.id).should be_nil
  34 + end
  35 + end
21 end 36 end
22 # == Schema Information 37 # == Schema Information
23 # 38 #
spec/requests/dashboard_spec.rb
@@ -22,6 +22,7 @@ describe &quot;Dashboard&quot; do @@ -22,6 +22,7 @@ describe &quot;Dashboard&quot; do
22 22
23 it "should have news feed" do 23 it "should have news feed" do
24 within "#news-feed" do 24 within "#news-feed" do
  25 + page.should have_content("master")
25 page.should have_content(@project.commit.author.name) 26 page.should have_content(@project.commit.author.name)
26 page.should have_content(@project.commit.safe_message) 27 page.should have_content(@project.commit.safe_message)
27 end 28 end
spec/requests/projects_spec.rb
@@ -72,10 +72,13 @@ describe &quot;Projects&quot; do @@ -72,10 +72,13 @@ describe &quot;Projects&quot; do
72 current_path.should == project_path(@project) 72 current_path.should == project_path(@project)
73 end 73 end
74 74
75 - it "should beahave like dashboard" do  
76 - page.should have_content("History") 75 + it "should beahave like activities page" do
  76 + within ".project-update" do
  77 + page.should have_content("master")
  78 + page.should have_content(@project.commit.author.name)
  79 + page.should have_content(@project.commit.safe_message)
  80 + end
77 end 81 end
78 -  
79 end 82 end
80 83
81 describe "GET /projects/team" do 84 describe "GET /projects/team" do
spec/requests/top_panel_spec.rb
@@ -7,8 +7,9 @@ describe &quot;Top Panel&quot;, :js =&gt; true do @@ -7,8 +7,9 @@ describe &quot;Top Panel&quot;, :js =&gt; true do
7 before do 7 before do
8 visit projects_path 8 visit projects_path
9 fill_in "search", :with => "Ke" 9 fill_in "search", :with => "Ke"
10 - sleep(2)  
11 - find(:xpath, "//ul[contains(@class,'ui-autocomplete')]/li/a[.=\"Keys\"]").click 10 + within ".ui-autocomplete" do
  11 + find(:xpath, "//a[.=\"Keys\"]").click
  12 + end
12 end 13 end
13 14
14 it "should be on projects page" do 15 it "should be on projects page" do
@@ -23,8 +24,9 @@ describe &quot;Top Panel&quot;, :js =&gt; true do @@ -23,8 +24,9 @@ describe &quot;Top Panel&quot;, :js =&gt; true do
23 visit project_path(@project) 24 visit project_path(@project)
24 25
25 fill_in "search", :with => "Commi" 26 fill_in "search", :with => "Commi"
26 - sleep(2)  
27 - find(:xpath, "//ul[contains(@class,'ui-autocomplete')]/li/a[.=\"#{@project.code} / Commits\"]").click 27 + within ".ui-autocomplete" do
  28 + find(:xpath, "//a[.=\"#{@project.code} / Commits\"]").click
  29 + end
28 end 30 end
29 31
30 it "should be on projects page" do 32 it "should be on projects page" do
vendor/assets/javascripts/raphael.js 0 → 100644
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
  1 +/*
  2 + * Raphael 1.5.2 - JavaScript Vector Library
  3 + *
  4 + * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
  5 + * Licensed under the MIT (http://raphaeljs.com/license.html) license.
  6 + */
  7 +(function(){function cC(a,b,c,d,e,f){function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(B(f)<b)return e;j=(3*i*e+2*h)*e+g;if(B(j)<1e-6)break;e=e-f/j}c=0,d=1,e=a;if(e<c)return c;if(e>d)return d;while(c<d){f=m(e);if(B(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cB(b){return function(c,d,e,f){var g={back:b};a.is(e,"function")?f=e:g.rot=e,c&&c.constructor==bN&&(c=c.attrs.path),c&&(g.along=c);return this.animate(g,d,f)}}function cp(){return this.x+q+this.y}function bm(a,b,c){function d(){var g=Array[e].slice.call(arguments,0),h=g[v]("►"),i=d.cache=d.cache||{},j=d.count=d.count||[];if(i[f](h))return c?c(i[h]):i[h];j[w]>=1e3&&delete i[j.shift()],j[L](h),i[h]=a[m](b,g);return c?c(i[h]):i[h]}return d}function bh(){var a=[],b=0;for(;b<32;b++)a[b]=(~~(y.random()*16))[H](16);a[12]=4,a[16]=(a[16]&3|8)[H](16);return"r-"+a[v]("")}function a(){if(a.is(arguments[0],G)){var b=arguments[0],d=bV[m](a,b.splice(0,3+a.is(b[0],E))),e=d.set();for(var g=0,h=b[w];g<h;g++){var i=b[g]||{};c[f](i.type)&&e[L](d[i.type]().attr(i))}return e}return bV[m](a,arguments)}a.version="1.5.2";var b=/[, ]+/,c={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},d=/\{(\d+)\}/g,e="prototype",f="hasOwnProperty",g=document,h=window,i={was:Object[e][f].call(h,"Raphael"),is:h.Raphael},j=function(){this.customAttributes={}},k,l="appendChild",m="apply",n="concat",o="createTouch"in g,p="",q=" ",r=String,s="split",t="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[s](q),u={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},v="join",w="length",x=r[e].toLowerCase,y=Math,z=y.max,A=y.min,B=y.abs,C=y.pow,D=y.PI,E="number",F="string",G="array",H="toString",I="fill",J=Object[e][H],K={},L="push",M=/^url\(['"]?([^\)]+?)['"]?\)$/i,N=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,O={NaN:1,Infinity:1,"-Infinity":1},P=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Q=y.round,R="setAttribute",S=parseFloat,T=parseInt,U=" progid:DXImageTransform.Microsoft",V=r[e].toUpperCase,W={blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},X={along:"along",blur:E,"clip-rect":"csv",cx:E,cy:E,fill:"colour","fill-opacity":E,"font-size":E,height:E,opacity:E,path:"path",r:E,rotation:"csv",rx:E,ry:E,scale:"csv",stroke:"colour","stroke-opacity":E,"stroke-width":E,translation:"csv",width:E,x:E,y:E},Y="replace",Z=/^(from|to|\d+%?)$/,$=/\s*,\s*/,_={hs:1,rg:1},ba=/,?([achlmqrstvxz]),?/gi,bb=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,bc=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,bd=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,be=function(a,b){return a.key-b.key};a.type=h.SVGAngle||g.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var bf=g.createElement("div"),bg;bf.innerHTML='<v:shape adj="1"/>',bg=bf.firstChild,bg.style.behavior="url(#default#VML)";if(!bg||typeof bg.adj!="object")return a.type=null;bf=null}a.svg=!(a.vml=a.type=="VML"),j[e]=a[e],k=j[e],a._id=0,a._oid=0,a.fn={},a.is=function(a,b){b=x.call(b);if(b=="finite")return!O[f](+a);return b=="null"&&a===null||b==typeof a||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||J.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return((h<0)*180+y.atan(-i/-h)*180/D+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*D/180},a.deg=function(a){return a*180/D%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,G)){var e=b.length;while(e--)if(B(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(f<d)return c-f;if(f>b-d)return c-f+b}return c},a.setWindow=function(a){h=a,g=h.document};var bi=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),d=e.body}catch(f){d=createPopup().document.body}var h=d.createTextRange();bi=bm(function(a){try{d.style.color=r(a)[Y](c,p);var b=h.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b[H](16)).slice(-6)}catch(e){return"none"}})}else{var i=g.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",g.body[l](i),bi=bm(function(a){i.style.color=a;return g.defaultView.getComputedStyle(i,p).getPropertyValue("color")})}return bi(b)},bj=function(){return"hsb("+[this.h,this.s,this.b]+")"},bk=function(){return"hsl("+[this.h,this.s,this.l]+")"},bl=function(){return this.hex};a.hsb2rgb=function(b,c,d,e){a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b&&(d=b.b,c=b.s,b=b.h,e=b.o);return a.hsl2rgb(b,c,d/2,e)},a.hsl2rgb=function(b,c,d,e){a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b&&(d=b.l,c=b.s,b=b.h);if(b>1||c>1||d>1)b/=360,c/=100,d/=100;var f={},g=["r","g","b"],h,i,j,k,l,m;if(!c)f={r:d,g:d,b:d};else{d<.5?h=d*(1+c):h=d+c-d*c,i=2*d-h;for(var n=0;n<3;n++)j=b+1/3*-(n-1),j<0&&j++,j>1&&j--,j*6<1?f[g[n]]=i+(h-i)*6*j:j*2<1?f[g[n]]=h:j*3<2?f[g[n]]=i+(h-i)*(2/3-j)*6:f[g[n]]=i}f.r*=255,f.g*=255,f.b*=255,f.hex="#"+(16777216|f.b|f.g<<8|f.r<<16).toString(16).slice(1),a.is(e,"finite")&&(f.opacity=e),f.toString=bl;return f},a.rgb2hsb=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,F)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;var f=z(b,c,d),g=A(b,c,d),h,i,j=f;if(g==f)return{h:0,s:0,b:f,toString:bj};var k=f-g;i=k/f,b==f?h=(c-d)/k:c==f?h=2+(d-b)/k:h=4+(b-c)/k,h/=6,h<0&&h++,h>1&&h--;return{h:h,s:i,b:j,toString:bj}},a.rgb2hsl=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,F)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;var f=z(b,c,d),g=A(b,c,d),h,i,j=(f+g)/2,k;if(g==f)k={h:0,s:0,l:j};else{var l=f-g;i=j<.5?l/(f+g):l/(2-f-g),b==f?h=(c-d)/l:c==f?h=2+(d-b)/l:h=4+(b-c)/l,h/=6,h<0&&h++,h>1&&h--,k={h:h,s:i,l:j}}k.toString=bk;return k},a._path2string=function(){return this.join(",")[Y](ba,"$1")},a.getRGB=bm(function(b){if(!b||!!((b=r(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none"};!_[f](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bi(b));var c,d,e,g,h,i,j,k=b.match(N);if(k){k[2]&&(g=T(k[2].substring(5),16),e=T(k[2].substring(3,5),16),d=T(k[2].substring(1,3),16)),k[3]&&(g=T((i=k[3].charAt(3))+i,16),e=T((i=k[3].charAt(2))+i,16),d=T((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4][s]($),d=S(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=S(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=S(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=S(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5][s]($),d=S(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=S(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=S(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=S(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,g,h)}if(k[6]){j=k[6][s]($),d=S(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=S(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=S(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=S(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,g,h)}k={r:d,g:e,b:g},k.hex="#"+(16777216|g|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1}},a),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=bm(function(b){if(!b)return null;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},d=[];a.is(b,G)&&a.is(b[0],G)&&(d=bo(b)),d[w]||r(b)[Y](bb,function(a,b,e){var f=[],g=x.call(b);e[Y](bc,function(a,b){b&&f[L](+b)}),g=="m"&&f[w]>2&&(d[L]([b][n](f.splice(0,2))),g="l",b=b=="m"?"l":"L");while(f[w]>=c[g]){d[L]([b][n](f.splice(0,c[g])));if(!c[g])break}}),d[H]=a._path2string;return d}),a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=C(j,3)*a+C(j,2)*3*i*c+j*3*i*i*e+C(i,3)*g,l=C(j,3)*b+C(j,2)*3*i*d+j*3*i*i*f+C(i,3)*h,m=a+2*i*(c-a)+i*i*(e-2*c+a),n=b+2*i*(d-b)+i*i*(f-2*d+b),o=c+2*i*(e-c)+i*i*(g-2*e+c),p=d+2*i*(f-d)+i*i*(h-2*f+d),q=(1-i)*a+i*c,r=(1-i)*b+i*d,s=(1-i)*e+i*g,t=(1-i)*f+i*h,u=90-y.atan((m-o)/(n-p))*180/D;(m>o||n<p)&&(u+=180);return{x:k,y:l,m:{x:m,y:n},n:{x:o,y:p},start:{x:q,y:r},end:{x:s,y:t},alpha:u}};var bn=bm(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=bw(a);var b=0,c=0,d=[],e=[],f;for(var g=0,h=a[w];g<h;g++){f=a[g];if(f[0]=="M")b=f[1],c=f[2],d[L](b),e[L](c);else{var i=bv(b,c,f[1],f[2],f[3],f[4],f[5],f[6]);d=d[n](i.min.x,i.max.x),e=e[n](i.min.y,i.max.y),b=f[5],c=f[6]}}var j=A[m](0,d),k=A[m](0,e);return{x:j,y:k,width:z[m](0,d)-j,height:z[m](0,e)-k}}),bo=function(b){var c=[];if(!a.is(b,G)||!a.is(b&&b[0],G))b=a.parsePathString(b);for(var d=0,e=b[w];d<e;d++){c[d]=[];for(var f=0,g=b[d][w];f<g;f++)c[d][f]=b[d][f]}c[H]=a._path2string;return c},bp=bm(function(b){if(!a.is(b,G)||!a.is(b&&b[0],G))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;b[0][0]=="M"&&(d=b[0][1],e=b[0][2],f=d,g=e,h++,c[L](["M",d,e]));for(var i=h,j=b[w];i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=x.call(l[0])){k[0]=x.call(l[0]);switch(k[0]){case"a":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]-d).toFixed(3),k[7]=+(l[7]-e).toFixed(3);break;case"v":k[1]=+(l[1]-e).toFixed(3);break;case"m":f=l[1],g=l[2];default:for(var m=1,n=l[w];m<n;m++)k[m]=+(l[m]-(m%2?d:e)).toFixed(3)}}else{k=c[i]=[],l[0]=="m"&&(f=l[1]+d,g=l[2]+e);for(var o=0,p=l[w];o<p;o++)c[i][o]=l[o]}var q=c[i][w];switch(c[i][0]){case"z":d=f,e=g;break;case"h":d+=+c[i][q-1];break;case"v":e+=+c[i][q-1];break;default:d+=+c[i][q-2],e+=+c[i][q-1]}}c[H]=a._path2string;return c},0,bo),bq=bm(function(b){if(!a.is(b,G)||!a.is(b&&b[0],G))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;b[0][0]=="M"&&(d=+b[0][1],e=+b[0][2],f=d,g=e,h++,c[0]=["M",d,e]);for(var i=h,j=b[w];i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=V.call(l[0])){k[0]=V.call(l[0]);switch(k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+d),k[7]=+(l[7]+e);break;case"V":k[1]=+l[1]+e;break;case"H":k[1]=+l[1]+d;break;case"M":f=+l[1]+d,g=+l[2]+e;default:for(var m=1,n=l[w];m<n;m++)k[m]=+l[m]+(m%2?d:e)}}else for(var o=0,p=l[w];o<p;o++)c[i][o]=l[o];switch(k[0]){case"Z":d=f,e=g;break;case"H":d=k[1];break;case"V":e=k[1];break;case"M":f=c[i][c[i][w]-2],g=c[i][c[i][w]-1];default:d=c[i][c[i][w]-2],e=c[i][c[i][w]-1]}}c[H]=a._path2string;return c},null,bo),br=function(a,b,c,d){return[a,b,c,d,c,d]},bs=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},bt=function(a,b,c,d,e,f,g,h,i,j){var k=D*120/180,l=D/180*(+e||0),m=[],o,p=bm(function(a,b,c){var d=a*y.cos(c)-b*y.sin(c),e=a*y.sin(c)+b*y.cos(c);return{x:d,y:e}});if(!j){o=p(a,b,-l),a=o.x,b=o.y,o=p(h,i,-l),h=o.x,i=o.y;var q=y.cos(D/180*e),r=y.sin(D/180*e),t=(a-h)/2,u=(b-i)/2,x=t*t/(c*c)+u*u/(d*d);x>1&&(x=y.sqrt(x),c=x*c,d=x*d);var z=c*c,A=d*d,C=(f==g?-1:1)*y.sqrt(B((z*A-z*u*u-A*t*t)/(z*u*u+A*t*t))),E=C*c*u/d+(a+h)/2,F=C*-d*t/c+(b+i)/2,G=y.asin(((b-F)/d).toFixed(9)),H=y.asin(((i-F)/d).toFixed(9));G=a<E?D-G:G,H=h<E?D-H:H,G<0&&(G=D*2+G),H<0&&(H=D*2+H),g&&G>H&&(G=G-D*2),!g&&H>G&&(H=H-D*2)}else G=j[0],H=j[1],E=j[2],F=j[3];var I=H-G;if(B(I)>k){var J=H,K=h,L=i;H=G+k*(g&&H>G?1:-1),h=E+c*y.cos(H),i=F+d*y.sin(H),m=bt(h,i,c,d,e,0,g,K,L,[H,J,E,F])}I=H-G;var M=y.cos(G),N=y.sin(G),O=y.cos(H),P=y.sin(H),Q=y.tan(I/4),R=4/3*c*Q,S=4/3*d*Q,T=[a,b],U=[a+R*N,b-S*M],V=[h+R*P,i-S*O],W=[h,i];U[0]=2*T[0]-U[0],U[1]=2*T[1]-U[1];if(j)return[U,V,W][n](m);m=[U,V,W][n](m)[v]()[s](",");var X=[];for(var Y=0,Z=m[w];Y<Z;Y++)X[Y]=Y%2?p(m[Y-1],m[Y],l).y:p(m[Y],m[Y+1],l).x;return X},bu=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:C(j,3)*a+C(j,2)*3*i*c+j*3*i*i*e+C(i,3)*g,y:C(j,3)*b+C(j,2)*3*i*d+j*3*i*i*f+C(i,3)*h}},bv=bm(function(a,b,c,d,e,f,g,h){var i=e-2*c+a-(g-2*e+c),j=2*(c-a)-2*(e-c),k=a-c,l=(-j+y.sqrt(j*j-4*i*k))/2/i,n=(-j-y.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;B(l)>"1e12"&&(l=.5),B(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bu(a,b,c,d,e,f,g,h,l),p[L](q.x),o[L](q.y)),n>0&&n<1&&(q=bu(a,b,c,d,e,f,g,h,n),p[L](q.x),o[L](q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,l=(-j+y.sqrt(j*j-4*i*k))/2/i,n=(-j-y.sqrt(j*j-4*i*k))/2/i,B(l)>"1e12"&&(l=.5),B(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bu(a,b,c,d,e,f,g,h,l),p[L](q.x),o[L](q.y)),n>0&&n<1&&(q=bu(a,b,c,d,e,f,g,h,n),p[L](q.x),o[L](q.y));return{min:{x:A[m](0,p),y:A[m](0,o)},max:{x:z[m](0,p),y:z[m](0,o)}}}),bw=bm(function(a,b){var c=bq(a),d=b&&bq(b),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][n](bt[m](0,[b.x,b.y][n](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][n](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][n](bs(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][n](bs(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](br(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](br(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](br(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](br(b.x,b.y,b.X,b.Y))}return a},h=function(a,b){if(a[b][w]>7){a[b].shift();var e=a[b];while(e[w])a.splice(b++,0,["C"][n](e.splice(0,6)));a.splice(b,1),k=z(c[w],d&&d[w]||0)}},i=function(a,b,e,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),e.bx=0,e.by=0,e.x=a[g][1],e.y=a[g][2],k=z(c[w],d&&d[w]||0))};for(var j=0,k=z(c[w],d&&d[w]||0);j<k;j++){c[j]=g(c[j],e),h(c,j),d&&(d[j]=g(d[j],f)),d&&h(d,j),i(c,d,e,f,j),i(d,c,f,e,j);var l=c[j],o=d&&d[j],p=l[w],q=d&&o[w];e.x=l[p-2],e.y=l[p-1],e.bx=S(l[p-4])||e.x,e.by=S(l[p-3])||e.y,f.bx=d&&(S(o[q-4])||f.x),f.by=d&&(S(o[q-3])||f.y),f.x=d&&o[q-2],f.y=d&&o[q-1]}return d?[c,d]:c},null,bo),bx=bm(function(b){var c=[];for(var d=0,e=b[w];d<e;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);f.color=a.getRGB(g[1]);if(f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c[L](f)}for(d=1,e=c[w]-1;d<e;d++)if(!c[d].offset){var h=S(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=S(i);var k=(i-h)/(j-d+1);for(;d<j;d++)h+=k,c[d].offset=h+"%"}return c}),by=function(b,c,d,e){var f;if(!a.is(b,F)&&!a.is(b,"object"))return{container:1,x:b,y:c,width:d,height:e};f=a.is(b,F)?g.getElementById(b):b;if(f.tagName)return c==null?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d}},bz=function(a,b){var c=this;for(var d in b)if(b[f](d)&&!(d in a))switch(typeof b[d]){case"function":(function(b){a[d]=a===c?b:function(){return b[m](c,arguments)}})(b[d]);break;case"object":a[d]=a[d]||{},bz.call(this,a[d],b[d]);break;default:a[d]=b[d]}},bA=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)},bB=function(a,b){b.top!==a&&(bA(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},bC=function(a,b){b.bottom!==a&&(bA(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},bD=function(a,b,c){bA(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bE=function(a,b,c){bA(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bF=function(a){return function(){throw new Error("Raphaël: you are calling to method “"+a+"” of removed object")}};a.pathToRelative=bp;if(a.svg){k.svgns="http://www.w3.org/2000/svg",k.xlink="http://www.w3.org/1999/xlink",Q=function(a){return+a+(~~a===a)*.5};var bG=function(a,b){if(!b){a=g.createElementNS(k.svgns,a),a.style.webkitTapHighlightColor="rgba(0,0,0,0)";return a}for(var c in b)b[f](c)&&a[R](c,r(b[c]))};a[H]=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var bH=function(a,b){var c=bG("path");b.canvas&&b.canvas[l](c);var d=new bN(c,b);d.type="path",bK(d,{fill:"none",stroke:"#000",path:a});return d},bI=function(a,b,c){var d="linear",e=.5,f=.5,h=a.style;b=r(b)[Y](bd,function(a,b,c){d="radial";if(b&&c){e=S(b),f=S(c);var g=(f>.5)*2-1;C(e-.5,2)+C(f-.5,2)>.25&&(f=y.sqrt(.25-C(e-.5,2))*g+.5)&&f!=.5&&(f=f.toFixed(5)-1e-5*g)}return p}),b=b[s](/\s*\-\s*/);if(d=="linear"){var i=b.shift();i=-S(i);if(isNaN(i))return null;var j=[0,0,y.cos(i*D/180),y.sin(i*D/180)],k=1/(z(B(j[2]),B(j[3]))||1);j[2]*=k,j[3]*=k,j[2]<0&&(j[0]=-j[2],j[2]=0),j[3]<0&&(j[1]=-j[3],j[3]=0)}var m=bx(b);if(!m)return null;var n=a.getAttribute(I);n=n.match(/^url\(#(.*)\)$/),n&&c.defs.removeChild(g.getElementById(n[1]));var o=bG(d+"Gradient");o.id=bh(),bG(o,d=="radial"?{fx:e,fy:f}:{x1:j[0],y1:j[1],x2:j[2],y2:j[3]}),c.defs[l](o);for(var q=0,t=m[w];q<t;q++){var u=bG("stop");bG(u,{offset:m[q].offset?m[q].offset:q?"100%":"0%","stop-color":m[q].color||"#fff"}),o[l](u)}bG(a,{fill:"url(#"+o.id+")",opacity:1,"fill-opacity":1}),h.fill=p,h.opacity=1,h.fillOpacity=1;return 1},bJ=function(b){var c=b.getBBox();bG(b.pattern,{patternTransform:a.format("translate({0},{1})",c.x,c.y)})},bK=function(c,d){var e={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},h=c.node,i=c.attrs,j=c.rotate(),k=function(a,b){b=e[x.call(b)];if(b){var c=a.attrs["stroke-width"]||"1",f=({round:c,square:c,butt:0})[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],i=b[w];while(i--)g[i]=b[i]*c+(i%2?1:-1)*f;bG(h,{"stroke-dasharray":g[v](",")})}};d[f]("rotation")&&(j=d.rotation);var m=r(j)[s](b);m.length-1?(m[1]=+m[1],m[2]=+m[2]):m=null,S(j)&&c.rotate(0,!0);for(var n in d)if(d[f](n)){if(!W[f](n))continue;var o=d[n];i[n]=o;switch(n){case"blur":c.blur(o);break;case"rotation":c.rotate(o,!0);break;case"href":case"title":case"target":var t=h.parentNode;if(x.call(t.tagName)!="a"){var u=bG("a");t.insertBefore(u,h),u[l](h),t=u}n=="target"&&o=="blank"?t.setAttributeNS(c.paper.xlink,"show","new"):t.setAttributeNS(c.paper.xlink,n,o);break;case"cursor":h.style.cursor=o;break;case"clip-rect":var y=r(o)[s](b);if(y[w]==4){c.clip&&c.clip.parentNode.parentNode.removeChild(c.clip.parentNode);var z=bG("clipPath"),A=bG("rect");z.id=bh(),bG(A,{x:y[0],y:y[1],width:y[2],height:y[3]}),z[l](A),c.paper.defs[l](z),bG(h,{"clip-path":"url(#"+z.id+")"}),c.clip=A}if(!o){var B=g.getElementById(h.getAttribute("clip-path")[Y](/(^url\(#|\)$)/g,p));B&&B.parentNode.removeChild(B),bG(h,{"clip-path":p}),delete c.clip}break;case"path":c.type=="path"&&bG(h,{d:o?i.path=bq(o):"M0,0"});break;case"width":h[R](n,o);if(i.fx)n="x",o=i.x;else break;case"x":i.fx&&(o=-i.x-(i.width||0));case"rx":if(n=="rx"&&c.type=="rect")break;case"cx":m&&(n=="x"||n=="cx")&&(m[1]+=o-i[n]),h[R](n,o),c.pattern&&bJ(c);break;case"height":h[R](n,o);if(i.fy)n="y",o=i.y;else break;case"y":i.fy&&(o=-i.y-(i.height||0));case"ry":if(n=="ry"&&c.type=="rect")break;case"cy":m&&(n=="y"||n=="cy")&&(m[2]+=o-i[n]),h[R](n,o),c.pattern&&bJ(c);break;case"r":c.type=="rect"?bG(h,{rx:o,ry:o}):h[R](n,o);break;case"src":c.type=="image"&&h.setAttributeNS(c.paper.xlink,"href",o);break;case"stroke-width":h.style.strokeWidth=o,h[R](n,o),i["stroke-dasharray"]&&k(c,i["stroke-dasharray"]);break;case"stroke-dasharray":k(c,o);break;case"translation":var C=r(o)[s](b);C[0]=+C[0]||0,C[1]=+C[1]||0,m&&(m[1]+=C[0],m[2]+=C[1]),cA.call(c,C[0],C[1]);break;case"scale":C=r(o)[s](b),c.scale(+C[0]||1,+C[1]||+C[0]||1,isNaN(S(C[2]))?null:+C[2],isNaN(S(C[3]))?null:+C[3]);break;case I:var D=r(o).match(M);if(D){z=bG("pattern");var E=bG("image");z.id=bh(),bG(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),bG(E,{x:0,y:0}),E.setAttributeNS(c.paper.xlink,"href",D[1]),z[l](E);var F=g.createElement("img");F.style.cssText="position:absolute;left:-9999em;top-9999em",F.onload=function(){bG(z,{width:this.offsetWidth,height:this.offsetHeight}),bG(E,{width:this.offsetWidth,height:this.offsetHeight}),g.body.removeChild(this),c.paper.safari()},g.body[l](F),F.src=D[1],c.paper.defs[l](z),h.style.fill="url(#"+z.id+")",bG(h,{fill:"url(#"+z.id+")"}),c.pattern=z,c.pattern&&bJ(c);break}var G=a.getRGB(o);if(!G.error)delete d.gradient,delete i.gradient,!a.is(i.opacity,"undefined")&&a.is(d.opacity,"undefined")&&bG(h,{opacity:i.opacity}),!a.is(i["fill-opacity"],"undefined")&&a.is(d["fill-opacity"],"undefined")&&bG(h,{"fill-opacity":i["fill-opacity"]});else if((({circle:1,ellipse:1})[f](c.type)||r(o).charAt()!="r")&&bI(h,o,c.paper)){i.gradient=o,i.fill="none";break}G[f]("opacity")&&bG(h,{"fill-opacity":G.opacity>1?G.opacity/100:G.opacity});case"stroke":G=a.getRGB(o),h[R](n,G.hex),n=="stroke"&&G[f]("opacity")&&bG(h,{"stroke-opacity":G.opacity>1?G.opacity/100:G.opacity});break;case"gradient":(({circle:1,ellipse:1})[f](c.type)||r(o).charAt()!="r")&&bI(h,o,c.paper);break;case"opacity":i.gradient&&!i[f]("stroke-opacity")&&bG(h,{"stroke-opacity":o>1?o/100:o});case"fill-opacity":if(i.gradient){var H=g.getElementById(h.getAttribute(I)[Y](/^url\(#|\)$/g,p));if(H){var J=H.getElementsByTagName("stop");J[J[w]-1][R]("stop-opacity",o)}break};default:n=="font-size"&&(o=T(o,10)+"px");var K=n[Y](/(\-.)/g,function(a){return V.call(a.substring(1))});h.style[K]=o,h[R](n,o)}}bM(c,d),m?c.rotate(m.join(q)):S(j)&&c.rotate(j,!0)},bL=1.2,bM=function(b,c){if(b.type=="text"&&!!(c[f]("text")||c[f]("font")||c[f]("font-size")||c[f]("x")||c[f]("y"))){var d=b.attrs,e=b.node,h=e.firstChild?T(g.defaultView.getComputedStyle(e.firstChild,p).getPropertyValue("font-size"),10):10;if(c[f]("text")){d.text=c.text;while(e.firstChild)e.removeChild(e.firstChild);var i=r(c.text)[s]("\n");for(var j=0,k=i[w];j<k;j++)if(i[j]){var m=bG("tspan");j&&bG(m,{dy:h*bL,x:d.x}),m[l](g.createTextNode(i[j])),e[l](m)}}else{i=e.getElementsByTagName("tspan");for(j=0,k=i[w];j<k;j++)j&&bG(i[j],{dy:h*bL,x:d.x})}bG(e,{y:d.y});var n=b.getBBox(),o=d.y-(n.y+n.height/2);o&&a.is(o,"finite")&&bG(e,{y:d.y+o})}},bN=function(b,c){var d=0,e=0;this[0]=b,this.id=a._oid++,this.node=b,b.raphael=this,this.paper=c,this.attrs=this.attrs||{},this.transformations=[],this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},bO=bN[e];bN[e].rotate=function(c,d,e){if(this.removed)return this;if(c==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][v](q);return this._.rt.deg}var f=this.getBBox();c=r(c)[s](b),c[w]-1&&(d=S(c[1]),e=S(c[2])),c=S(c[0]),d!=null&&d!==!1?this._.rt.deg=c:this._.rt.deg+=c,e==null&&(d=null),this._.rt.cx=d,this._.rt.cy=e,d=d==null?f.x+f.width/2:d,e=e==null?f.y+f.height/2:e,this._.rt.deg?(this.transformations[0]=a.format("rotate({0} {1} {2})",this._.rt.deg,d,e),this.clip&&bG(this.clip,{transform:a.format("rotate({0} {1} {2})",-this._.rt.deg,d,e)})):(this.transformations[0]=p,this.clip&&bG(this.clip,{transform:p})),bG(this.node,{transform:this.transformations[v](q)});return this},bN[e].hide=function(){!this.removed&&(this.node.style.display="none");return this},bN[e].show=function(){!this.removed&&(this.node.style.display="");return this},bN[e].remove=function(){if(!this.removed){bA(this,this.paper),this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=!0}},bN[e].getBBox=function(){if(this.removed)return this;if(this.type=="path")return bn(this.attrs.path);if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}if(this.type=="text"){b={x:b.x,y:Infinity,width:0,height:0};for(var d=0,e=this.node.getNumberOfChars();d<e;d++){var f=this.node.getExtentOfChar(d);f.y<b.y&&(b.y=f.y),f.y+f.height-b.y>b.height&&(b.height=f.y+f.height-b.y),f.x+f.width-b.x>b.width&&(b.width=f.x+f.width-b.x)}}a&&this.hide();return b},bN[e].attr=function(b,c){if(this.removed)return this;if(b==null){var d={};for(var e in this.attrs)this.attrs[f](e)&&(d[e]=this.attrs[e]);this._.rt.deg&&(d.rotation=this.rotate()),(this._.sx!=1||this._.sy!=1)&&(d.scale=this.scale()),d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient;return d}if(c==null&&a.is(b,F)){if(b=="translation")return cA.call(this);if(b=="rotation")return this.rotate();if(b=="scale")return this.scale();if(b==I&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[b]}if(c==null&&a.is(b,G)){var g={};for(var h=0,i=b.length;h<i;h++)g[b[h]]=this.attr(b[h]);return g}if(c!=null){var j={};j[b]=c}else b!=null&&a.is(b,"object")&&(j=b);for(var k in this.paper.customAttributes)if(this.paper.customAttributes[f](k)&&j[f](k)&&a.is(this.paper.customAttributes[k],"function")){var l=this.paper.customAttributes[k].apply(this,[][n](j[k]));this.attrs[k]=j[k];for(var m in l)l[f](m)&&(j[m]=l[m])}bK(this,j);return this},bN[e].toFront=function(){if(this.removed)return this;this.node.parentNode[l](this.node);var a=this.paper;a.top!=this&&bB(this,a);return this},bN[e].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),bC(this,this.paper);var a=this.paper}return this},bN[e].insertAfter=function(a){if(this.removed)return this;var b=a.node||a[a.length-1].node;b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode[l](this.node),bD(this,a,this.paper);return this},bN[e].insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;b.parentNode.insertBefore(this.node,b),bE(this,a,this.paper);return this},bN[e].blur=function(a){var b=this;if(+a!==0){var c=bG("filter"),d=bG("feGaussianBlur");b.attrs.blur=a,c.id=bh(),bG(d,{stdDeviation:+a||1.5}),c.appendChild(d),b.paper.defs.appendChild(c),b._blur=c,bG(b.node,{filter:"url(#"+c.id+")"})}else b._blur&&(b._blur.parentNode.removeChild(b._blur),delete b._blur,delete b.attrs.blur),b.node.removeAttribute("filter")};var bP=function(a,b,c,d){var e=bG("circle");a.canvas&&a.canvas[l](e);var f=new bN(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",bG(e,f.attrs);return f},bQ=function(a,b,c,d,e,f){var g=bG("rect");a.canvas&&a.canvas[l](g);var h=new bN(g,a);h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",bG(g,h.attrs);return h},bR=function(a,b,c,d,e){var f=bG("ellipse");a.canvas&&a.canvas[l](f);var g=new bN(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",bG(f,g.attrs);return g},bS=function(a,b,c,d,e,f){var g=bG("image");bG(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(a.xlink,"href",b),a.canvas&&a.canvas[l](g);var h=new bN(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image";return h},bT=function(a,b,c,d){var e=bG("text");bG(e,{x:b,y:c,"text-anchor":"middle"}),a.canvas&&a.canvas[l](e);var f=new bN(e,a);f.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:W.font,stroke:"none",fill:"#000"},f.type="text",bK(f,f.attrs);return f},bU=function(a,b){this.width=a||this.width,this.height=b||this.height,this.canvas[R]("width",this.width),this.canvas[R]("height",this.height);return this},bV=function(){var b=by[m](0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,h=b.height;if(!c)throw new Error("SVG container not found.");var i=bG("svg");d=d||0,e=e||0,f=f||512,h=h||342,bG(i,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:f,height:h}),c==1?(i.style.cssText="position:absolute;left:"+d+"px;top:"+e+"px",g.body[l](i)):c.firstChild?c.insertBefore(i,c.firstChild):c[l](i),c=new j,c.width=f,c.height=h,c.canvas=i,bz.call(c,c,a.fn),c.clear();return c};k.clear=function(){var a=this.canvas;while(a.firstChild)a.removeChild(a.firstChild);this.bottom=this.top=null,(this.desc=bG("desc"))[l](g.createTextNode("Created with Raphaël")),a[l](this.desc),a[l](this.defs=bG("defs"))},k.remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bF(a)}}if(a.vml){var bW={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bX=/([clmz]),?([^clmz]*)/gi,bY=/ progid:\S+Blur\([^\)]+\)/g,bZ=/-?[^,\s-]+/g,b$=1e3+q+1e3,b_=10,ca={path:1,rect:1},cb=function(a){var b=/[ahqstv]/ig,c=bq;r(a).match(b)&&(c=bw),b=/[clmz]/g;if(c==bq&&!r(a).match(b)){var d=r(a)[Y](bX,function(a,b,c){var d=[],e=x.call(b)=="m",f=bW[b];c[Y](bZ,function(a){e&&d[w]==2&&(f+=d+bW[b=="m"?"l":"L"],d=[]),d[L](Q(a*b_))});return f+d});return d}var e=c(a),f,g;d=[];for(var h=0,i=e[w];h<i;h++){f=e[h],g=x.call(e[h][0]),g=="z"&&(g="x");for(var j=1,k=f[w];j<k;j++)g+=Q(f[j]*b_)+(j!=k-1?",":p);d[L](g)}return d[v](q)};a[H]=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version},bH=function(a,b){var c=cd("group");c.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px",c.coordsize=b.coordsize,c.coordorigin=b.coordorigin;var d=cd("shape"),e=d.style;e.width=b.width+"px",e.height=b.height+"px",d.coordsize=b$,d.coordorigin=b.coordorigin,c[l](d);var f=new bN(d,c,b),g={fill:"none",stroke:"#000"};a&&(g.path=a),f.type="path",f.path=[],f.Path=p,bK(f,g),b.canvas[l](c);var h=cd("skew");h.on=!0,d.appendChild(h),f.skew=h;return f},bK=function(c,d){c.attrs=c.attrs||{};var e=c.node,h=c.attrs,i=e.style,j,k=(d.x!=h.x||d.y!=h.y||d.width!=h.width||d.height!=h.height||d.r!=h.r)&&c.type=="rect",m=c;for(var n in d)d[f](n)&&(h[n]=d[n]);k&&(h.path=cc(h.x,h.y,h.width,h.height,h.r),c.X=h.x,c.Y=h.y,c.W=h.width,c.H=h.height),d.href&&(e.href=d.href),d.title&&(e.title=d.title),d.target&&(e.target=d.target),d.cursor&&(i.cursor=d.cursor),"blur"in d&&c.blur(d.blur);if(d.path&&c.type=="path"||k)e.path=cb(h.path);d.rotation!=null&&c.rotate(d.rotation,!0),d.translation&&(j=r(d.translation)[s](b),cA.call(c,j[0],j[1]),c._.rt.cx!=null&&(c._.rt.cx+=+j[0],c._.rt.cy+=+j[1],c.setBox(c.attrs,j[0],j[1]))),d.scale&&(j=r(d.scale)[s](b),c.scale(+j[0]||1,+j[1]||+j[0]||1,+j[2]||null,+j[3]||null));if("clip-rect"in d){var o=r(d["clip-rect"])[s](b);if(o[w]==4){o[2]=+o[2]+ +o[0],o[3]=+o[3]+ +o[1];var q=e.clipRect||g.createElement("div"),t=q.style,u=e.parentNode;t.clip=a.format("rect({1}px {2}px {3}px {0}px)",o),e.clipRect||(t.position="absolute",t.top=0,t.left=0,t.width=c.paper.width+"px",t.height=c.paper.height+"px",u.parentNode.insertBefore(q,u),q[l](u),e.clipRect=q)}d["clip-rect"]||e.clipRect&&(e.clipRect.style.clip=p)}c.type=="image"&&d.src&&(e.src=d.src),c.type=="image"&&d.opacity&&(e.filterOpacity=U+".Alpha(opacity="+d.opacity*100+")",i.filter=(e.filterMatrix||p)+(e.filterOpacity||p)),d.font&&(i.font=d.font),d["font-family"]&&(i.fontFamily='"'+d["font-family"][s](",")[0][Y](/^['"]+|['"]+$/g,p)+'"'),d["font-size"]&&(i.fontSize=d["font-size"]),d["font-weight"]&&(i.fontWeight=d["font-weight"]),d["font-style"]&&(i.fontStyle=d["font-style"]);if(d.opacity!=null||d["stroke-width"]!=null||d.fill!=null||d.stroke!=null||d["stroke-width"]!=null||d["stroke-opacity"]!=null||d["fill-opacity"]!=null||d["stroke-dasharray"]!=null||d["stroke-miterlimit"]!=null||d["stroke-linejoin"]!=null||d["stroke-linecap"]!=null){e=c.shape||e;var v=e.getElementsByTagName(I)&&e.getElementsByTagName(I)[0],x=!1;!v&&(x=v=cd(I));if("fill-opacity"in d||"opacity"in d){var y=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+a.getRGB(d.fill).o+1||2)-1);y=A(z(y,0),1),v.opacity=y}d.fill&&(v.on=!0);if(v.on==null||d.fill=="none")v.on=!1;if(v.on&&d.fill){var B=d.fill.match(M);B?(v.src=B[1],v.type="tile"):(v.color=a.getRGB(d.fill).hex,v.src=p,v.type="solid",a.getRGB(d.fill).error&&(m.type in{circle:1,ellipse:1}||r(d.fill).charAt()!="r")&&bI(m,d.fill)&&(h.fill="none",h.gradient=d.fill))}x&&e[l](v);var C=e.getElementsByTagName("stroke")&&e.getElementsByTagName("stroke")[0],D=!1;!C&&(D=C=cd("stroke"));if(d.stroke&&d.stroke!="none"||d["stroke-width"]||d["stroke-opacity"]!=null||d["stroke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])C.on=!0;(d.stroke=="none"||C.on==null||d.stroke==0||d["stroke-width"]==0)&&(C.on=!1);var E=a.getRGB(d.stroke);C.on&&d.stroke&&(C.color=E.hex),y=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+E.o+1||2)-1);var F=(S(d["stroke-width"])||1)*.75;y=A(z(y,0),1),d["stroke-width"]==null&&(F=h["stroke-width"]),d["stroke-width"]&&(C.weight=F),F&&F<1&&(y*=F)&&(C.weight=1),C.opacity=y,d["stroke-linejoin"]&&(C.joinstyle=d["stroke-linejoin"]||"miter"),C.miterlimit=d["stroke-miterlimit"]||8,d["stroke-linecap"]&&(C.endcap=d["stroke-linecap"]=="butt"?"flat":d["stroke-linecap"]=="square"?"square":"round");if(d["stroke-dasharray"]){var G={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};C.dashstyle=G[f](d["stroke-dasharray"])?G[d["stroke-dasharray"]]:p}D&&e[l](C)}if(m.type=="text"){i=m.paper.span.style,h.font&&(i.font=h.font),h["font-family"]&&(i.fontFamily=h["font-family"]),h["font-size"]&&(i.fontSize=h["font-size"]),h["font-weight"]&&(i.fontWeight=h["font-weight"]),h["font-style"]&&(i.fontStyle=h["font-style"]),m.node.string&&(m.paper.span.innerHTML=r(m.node.string)[Y](/</g,"&#60;")[Y](/&/g,"&#38;")[Y](/\n/g,"<br>")),m.W=h.w=m.paper.span.offsetWidth,m.H=h.h=m.paper.span.offsetHeight,m.X=h.x,m.Y=h.y+Q(m.H/2);switch(h["text-anchor"]){case"start":m.node.style["v-text-align"]="left",m.bbx=Q(m.W/2);break;case"end":m.node.style["v-text-align"]="right",m.bbx=-Q(m.W/2);break;default:m.node.style["v-text-align"]="center"}}},bI=function(a,b){a.attrs=a.attrs||{};var c=a.attrs,d,e="linear",f=".5 .5";a.attrs.gradient=b,b=r(b)[Y](bd,function(a,b,c){e="radial",b&&c&&(b=S(b),c=S(c),C(b-.5,2)+C(c-.5,2)>.25&&(c=y.sqrt(.25-C(b-.5,2))*((c>.5)*2-1)+.5),f=b+q+c);return p}),b=b[s](/\s*\-\s*/);if(e=="linear"){var g=b.shift();g=-S(g);if(isNaN(g))return null}var h=bx(b);if(!h)return null;a=a.shape||a.node,d=a.getElementsByTagName(I)[0]||cd(I),!d.parentNode&&a.appendChild(d);if(h[w]){d.on=!0,d.method="none",d.color=h[0].color,d.color2=h[h[w]-1].color;var i=[];for(var j=0,k=h[w];j<k;j++)h[j].offset&&i[L](h[j].offset+q+h[j].color);d.colors&&(d.colors.value=i[w]?i[v]():"0% "+d.color),e=="radial"?(d.type="gradientradial",d.focus="100%",d.focussize=f,d.focusposition=f):(d.type="gradient",d.angle=(270-g)%360)}return 1},bN=function(b,c,d){var e=0,f=0,g=0,h=1;this[0]=b,this.id=a._oid++,this.node=b,b.raphael=this,this.X=0,this.Y=0,this.attrs={},this.Group=c,this.paper=d,this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1},!d.bottom&&(d.bottom=this),this.prev=d.top,d.top&&(d.top.next=this),d.top=this,this.next=null},bO=bN[e],bO.rotate=function(a,c,d){if(this.removed)return this;if(a==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][v](q);return this._.rt.deg}a=r(a)[s](b),a[w]-1&&(c=S(a[1]),d=S(a[2])),a=S(a[0]),c!=null?this._.rt.deg=a:this._.rt.deg+=a,d==null&&(c=null),this._.rt.cx=c,this._.rt.cy=d,this.setBox(this.attrs,c,d),this.Group.style.rotation=this._.rt.deg;return this},bO.setBox=function(a,b,c){if(this.removed)return this;var d=this.Group.style,e=this.shape&&this.shape.style||this.node.style;a=a||{};for(var g in a)a[f](g)&&(this.attrs[g]=a[g]);b=b||this._.rt.cx,c=c||this._.rt.cy;var h=this.attrs,i,j,k,l;switch(this.type){case"circle":i=h.cx-h.r,j=h.cy-h.r,k=l=h.r*2;break;case"ellipse":i=h.cx-h.rx,j=h.cy-h.ry,k=h.rx*2,l=h.ry*2;break;case"image":i=+h.x,j=+h.y,k=h.width||0,l=h.height||0;break;case"text":this.textpath.v=["m",Q(h.x),", ",Q(h.y-2),"l",Q(h.x)+1,", ",Q(h.y-2)][v](p),i=h.x-Q(this.W/2),j=h.y-this.H/2,k=this.W,l=this.H;break;case"rect":case"path":if(!this.attrs.path)i=0,j=0,k=this.paper.width,l=this.paper.height;else{var m=bn(this.attrs.path);i=m.x,j=m.y,k=m.width,l=m.height}break;default:i=0,j=0,k=this.paper.width,l=this.paper.height}b=b==null?i+k/2:b,c=c==null?j+l/2:c;var n=b-this.paper.width/2,o=c-this.paper.height/2,q;d.left!=(q=n+"px")&&(d.left=q),d.top!=(q=o+"px")&&(d.top=q),this.X=ca[f](this.type)?-n:i,this.Y=ca[f](this.type)?-o:j,this.W=k,this.H=l,ca[f](this.type)?(e.left!=(q=-n*b_+"px")&&(e.left=q),e.top!=(q=-o*b_+"px")&&(e.top=q)):this.type=="text"?(e.left!=(q=-n+"px")&&(e.left=q),e.top!=(q=-o+"px")&&(e.top=q)):(d.width!=(q=this.paper.width+"px")&&(d.width=q),d.height!=(q=this.paper.height+"px")&&(d.height=q),e.left!=(q=i-n+"px")&&(e.left=q),e.top!=(q=j-o+"px")&&(e.top=q),e.width!=(q=k+"px")&&(e.width=q),e.height!=(q=l+"px")&&(e.height=q))},bO.hide=function(){!this.removed&&(this.Group.style.display="none");return this},bO.show=function(){!this.removed&&(this.Group.style.display="block");return this},bO.getBBox=function(){if(this.removed)return this;if(ca[f](this.type))return bn(this.attrs.path);return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}},bO.remove=function(){if(!this.removed){bA(this,this.paper),this.node.parentNode.removeChild(this.node),this.Group.parentNode.removeChild(this.Group),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)delete this[a];this.removed=!0}},bO.attr=function(b,c){if(this.removed)return this;if(b==null){var d={};for(var e in this.attrs)this.attrs[f](e)&&(d[e]=this.attrs[e]);this._.rt.deg&&(d.rotation=this.rotate()),(this._.sx!=1||this._.sy!=1)&&(d.scale=this.scale()),d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient;return d}if(c==null&&a.is(b,"string")){if(b=="translation")return cA.call(this);if(b=="rotation")return this.rotate();if(b=="scale")return this.scale();if(b==I&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[b]}if(this.attrs&&c==null&&a.is(b,G)){var g,h={};for(e=0,g=b[w];e<g;e++)h[b[e]]=this.attr(b[e]);return h}var i;c!=null&&(i={},i[b]=c),c==null&&a.is(b,"object")&&(i=b);if(i){for(var j in this.paper.customAttributes)if(this.paper.customAttributes[f](j)&&i[f](j)&&a.is(this.paper.customAttributes[j],"function")){var k=this.paper.customAttributes[j].apply(this,[][n](i[j]));this.attrs[j]=i[j];for(var l in k)k[f](l)&&(i[l]=k[l])}i.text&&this.type=="text"&&(this.node.string=i.text),bK(this,i),i.gradient&&(({circle:1,ellipse:1})[f](this.type)||r(i.gradient).charAt()!="r")&&bI(this,i.gradient),(!ca[f](this.type)||this._.rt.deg)&&this.setBox(this.attrs)}return this},bO.toFront=function(){!this.removed&&this.Group.parentNode[l](this.Group),this.paper.top!=this&&bB(this,this.paper);return this},bO.toBack=function(){if(this.removed)return this;this.Group.parentNode.firstChild!=this.Group&&(this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild),bC(this,this.paper));return this},bO.insertAfter=function(a){if(this.removed)return this;a.constructor==cD&&(a=a[a.length-1]),a.Group.nextSibling?a.Group.parentNode.insertBefore(this.Group,a.Group.nextSibling):a.Group.parentNode[l](this.Group),bD(this,a,this.paper);return this},bO.insertBefore=function(a){if(this.removed)return this;a.constructor==cD&&(a=a[0]),a.Group.parentNode.insertBefore(this.Group,a.Group),bE(this,a,this.paper);return this},bO.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(bY,p),+b!==0?(this.attrs.blur=b,c.filter=d+q+U+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",Q(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur)},bP=function(a,b,c,d){var e=cd("group"),f=cd("oval"),g=f.style;e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",e.coordsize=b$,e.coordorigin=a.coordorigin,e[l](f);var h=new bN(f,e,a);h.type="circle",bK(h,{stroke:"#000",fill:"none"}),h.attrs.cx=b,h.attrs.cy=c,h.attrs.r=d,h.setBox({x:b-d,y:c-d,width:d*2,height:d*2}),a.canvas[l](e);return h};function cc(b,c,d,e,f){return f?a.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",b+f,c,d-f*2,f,-f,e-f*2,f*2-d,f*2-e):a.format("M{0},{1}l{2},0,0,{3},{4},0z",b,c,d,e,-d)}bQ=function(a,b,c,d,e,f){var g=cc(b,c,d,e,f),h=a.path(g),i=h.attrs;h.X=i.x=b,h.Y=i.y=c,h.W=i.width=d,h.H=i.height=e,i.r=f,i.path=g,h.type="rect";return h},bR=function(a,b,c,d,e){var f=cd("group"),g=cd("oval"),h=g.style;f.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",f.coordsize=b$,f.coordorigin=a.coordorigin,f[l](g);var i=new bN(g,f,a);i.type="ellipse",bK(i,{stroke:"#000"}),i.attrs.cx=b,i.attrs.cy=c,i.attrs.rx=d,i.attrs.ry=e,i.setBox({x:b-d,y:c-e,width:d*2,height:e*2}),a.canvas[l](f);return i},bS=function(a,b,c,d,e,f){var g=cd("group"),h=cd("image");g.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",g.coordsize=b$,g.coordorigin=a.coordorigin,h.src=b,g[l](h);var i=new bN(h,g,a);i.type="image",i.attrs.src=b,i.attrs.x=c,i.attrs.y=d,i.attrs.w=e,i.attrs.h=f,i.setBox({x:c,y:d,width:e,height:f}),a.canvas[l](g);var j=cd("skew");j.on=!0,h.appendChild(j),i.skew=j;return i},bT=function(b,c,d,e){var f=cd("group"),g=cd("shape"),h=g.style,i=cd("path"),j=i.style,k=cd("textpath");f.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px",f.coordsize=b$,f.coordorigin=b.coordorigin,i.v=a.format("m{0},{1}l{2},{1}",Q(c*10),Q(d*10),Q(c*10)+1),i.textpathok=!0,h.width=b.width,h.height=b.height,k.string=r(e),k.on=!0,g[l](k),g[l](i),f[l](g);var m=new bN(k,f,b);m.shape=g,m.textpath=i,m.type="text",m.attrs.text=e,m.attrs.x=c,m.attrs.y=d,m.attrs.w=1,m.attrs.h=1,bK(m,{font:W.font,stroke:"none",fill:"#000"}),m.setBox(),b.canvas[l](f);return m},bU=function(a,b){var c=this.canvas.style;a==+a&&(a+="px"),b==+b&&(b+="px"),c.width=a,c.height=b,c.clip="rect(0 "+a+" "+b+" 0)";return this};var cd;g.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!g.namespaces.rvml&&g.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),cd=function(a){return g.createElement("<rvml:"+a+' class="rvml">')}}catch(ce){cd=function(a){return g.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}bV=function(){var b=by[m](0,arguments),c=b.container,d=b.height,e,f=b.width,h=b.x,i=b.y;if(!c)throw new Error("VML container not found.");var k=new j,n=k.canvas=g.createElement("div"),o=n.style;h=h||0,i=i||0,f=f||512,d=d||342,f==+f&&(f+="px"),d==+d&&(d+="px"),k.width=1e3,k.height=1e3,k.coordsize=b_*1e3+q+b_*1e3,k.coordorigin="0 0",k.span=g.createElement("span"),k.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",n[l](k.span),o.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(g.body[l](n),o.left=h+"px",o.top=i+"px",o.position="absolute"):c.firstChild?c.insertBefore(n,c.firstChild):c[l](n),bz.call(k,k,a.fn);return k},k.clear=function(){this.canvas.innerHTML=p,this.span=g.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas[l](this.span),this.bottom=this.top=null},k.remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bF(a);return!0}}var cf=navigator.userAgent.match(/Version\/(.*?)\s/);navigator.vendor=="Apple Computer, Inc."&&(cf&&cf[1]<4||navigator.platform.slice(0,2)=="iP")?k.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});h.setTimeout(function(){a.remove()})}:k.safari=function(){};var cg=function(){this.returnValue=!1},ch=function(){return this.originalEvent.preventDefault()},ci=function(){this.cancelBubble=!0},cj=function(){return this.originalEvent.stopPropagation()},ck=function(){if(g.addEventListener)return function(a,b,c,d){var e=o&&u[b]?u[b]:b,g=function(e){if(o&&u[f](b))for(var g=0,h=e.targetTouches&&e.targetTouches.length;g<h;g++)if(e.targetTouches[g].target==a){var i=e;e=e.targetTouches[g],e.originalEvent=i,e.preventDefault=ch,e.stopPropagation=cj;break}return c.call(d,e)};a.addEventListener(e,g,!1);return function(){a.removeEventListener(e,g,!1);return!0}};if(g.attachEvent)return function(a,b,c,d){var e=function(a){a=a||h.event,a.preventDefault=a.preventDefault||cg,a.stopPropagation=a.stopPropagation||ci;return c.call(d,a)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return!0};return f}}(),cl=[],cm=function(a){var b=a.clientX,c=a.clientY,d=g.documentElement.scrollTop||g.body.scrollTop,e=g.documentElement.scrollLeft||g.body.scrollLeft,f,h=cl.length;while(h--){f=cl[h];if(o){var i=a.touches.length,j;while(i--){j=a.touches[i];if(j.identifier==f.el._drag.id){b=j.clientX,c=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}}else a.preventDefault();b+=e,c+=d,f.move&&f.move.call(f.move_scope||f.el,b-f.el._drag.x,c-f.el._drag.y,b,c,a)}},cn=function(b){a.unmousemove(cm).unmouseup(cn);var c=cl.length,d;while(c--)d=cl[c],d.el._drag={},d.end&&d.end.call(d.end_scope||d.start_scope||d.move_scope||d.el,b);cl=[]};for(var co=t[w];co--;)(function(b){a[b]=bN[e][b]=function(c,d){a.is(c,"function")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:ck(this.shape||this.node||g,b,c,d||this)}));return this},a["un"+b]=bN[e]["un"+b]=function(a){var c=this.events,d=c[w];while(d--)if(c[d].name==b&&c[d].f==a){c[d].unbind(),c.splice(d,1),!c.length&&delete this.events;return this}return this}})(t[co]);bO.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},bO.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)},bO.drag=function(b,c,d,e,f,h){this._drag={},this.mousedown(function(i){(i.originalEvent||i).preventDefault();var j=g.documentElement.scrollTop||g.body.scrollTop,k=g.documentElement.scrollLeft||g.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,c&&c.call(f||e||this,i.clientX+k,i.clientY+j,i),!cl.length&&a.mousemove(cm).mouseup(cn),cl.push({el:this,move:b,end:d,move_scope:e,start_scope:f,end_scope:h})});return this},bO.undrag=function(b,c,d){var e=cl.length;while(e--)cl[e].el==this&&cl[e].move==b&&cl[e].end==d&&cl.splice(e++,1);!cl.length&&a.unmousemove(cm).unmouseup(cn)},k.circle=function(a,b,c){return bP(this,a||0,b||0,c||0)},k.rect=function(a,b,c,d,e){return bQ(this,a||0,b||0,c||0,d||0,e||0)},k.ellipse=function(a,b,c,d){return bR(this,a||0,b||0,c||0,d||0)},k.path=function(b){b&&!a.is(b,F)&&!a.is(b[0],G)&&(b+=p);return bH(a.format[m](a,arguments),this)},k.image=function(a,b,c,d,e){return bS(this,a||"about:blank",b||0,c||0,d||0,e||0)},k.text=function(a,b,c){return bT(this,a||0,b||0,r(c))},k.set=function(a){arguments[w]>1&&(a=Array[e].splice.call(arguments,0,arguments[w]));return new cD(a)},k.setSize=bU,k.top=k.bottom=null,k.raphael=a,bO.resetScale=function(){if(this.removed)return this;this._.sx=1,this._.sy=1,this.attrs.scale="1 1"},bO.scale=function(a,b,c,d){if(this.removed)return this;if(a==null&&b==null)return{x:this._.sx,y:this._.sy,toString:cp};b=b||a,!+b&&(b=a);var e,f,g,h,i=this.attrs;if(a!=0){var j=this.getBBox(),k=j.x+j.width/2,l=j.y+j.height/2,m=B(a/this._.sx),o=B(b/this._.sy);c=+c||c==0?c:k,d=+d||d==0?d:l;var r=this._.sx>0,s=this._.sy>0,t=~~(a/B(a)),u=~~(b/B(b)),x=m*t,y=o*u,z=this.node.style,A=c+B(k-c)*x*(k>c==r?1:-1),C=d+B(l-d)*y*(l>d==s?1:-1),D=a*t>b*u?o:m;switch(this.type){case"rect":case"image":var E=i.width*m,F=i.height*o;this.attr({height:F,r:i.r*D,width:E,x:A-E/2,y:C-F/2});break;case"circle":case"ellipse":this.attr({rx:i.rx*m,ry:i.ry*o,r:i.r*D,cx:A,cy:C});break;case"text":this.attr({x:A,y:C});break;case"path":var G=bp(i.path),H=!0,I=r?x:m,J=s?y:o;for(var K=0,L=G[w];K<L;K++){var M=G[K],N=V.call(M[0]);if(N=="M"&&H)continue;H=!1;if(N=="A")M[G[K][w]-2]*=I,M[G[K][w]-1]*=J,M[1]*=m,M[2]*=o,M[5]=+(t+u?!!+M[5]:!+M[5]);else if(N=="H")for(var O=1,P=M[w];O<P;O++)M[O]*=I;else if(N=="V")for(O=1,P=M[w];O<P;O++)M[O]*=J;else for(O=1,P=M[w];O<P;O++)M[O]*=O%2?I:J}var Q=bn(G);e=A-Q.x-Q.width/2,f=C-Q.y-Q.height/2,G[0][1]+=e,G[0][2]+=f,this.attr({path:G})}this.type in{text:1,image:1}&&(t!=1||u!=1)?this.transformations?(this.transformations[2]="scale("[n](t,",",u,")"),this.node[R]("transform",this.transformations[v](q)),e=t==-1?-i.x-(E||0):i.x,f=u==-1?-i.y-(F||0):i.y,this.attr({x:e,y:f}),i.fx=t-1,i.fy=u-1):(this.node.filterMatrix=U+".Matrix(M11="[n](t,", M12=0, M21=0, M22=",u,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')"),z.filter=(this.node.filterMatrix||p)+(this.node.filterOpacity||p)):this.transformations?(this.transformations[2]=p,this.node[R]("transform",this.transformations[v](q)),i.fx=0,i.fy=0):(this.node.filterMatrix=p,z.filter=(this.node.filterMatrix||p)+(this.node.filterOpacity||p)),i.scale=[a,b,c,d][v](q),this._.sx=a,this._.sy=b}return this},bO.clone=function(){if(this.removed)return null;var a=this.attr();delete a.scale,delete a.translation;return this.paper[this.type]().attr(a)};var cq={},cr=function(b,c,d,e,f,g,h,i,j){var k=0,l=100,m=[b,c,d,e,f,g,h,i].join(),n=cq[m],o,p;!n&&(cq[m]=n={data:[]}),n.timer&&clearTimeout(n.timer),n.timer=setTimeout(function(){delete cq[m]},2e3);if(j!=null){var q=cr(b,c,d,e,f,g,h,i);l=~~q*10}for(var r=0;r<l+1;r++){n.data[j]>r?p=n.data[r*l]:(p=a.findDotsAtSegment(b,c,d,e,f,g,h,i,r/l),n.data[r]=p),r&&(k+=C(C(o.x-p.x,2)+C(o.y-p.y,2),.5));if(j!=null&&k>=j)return p;o=p}if(j==null)return k},cs=function(b,c){return function(d,e,f){d=bw(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;o<p;o++){i=d[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=cr(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cr(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C",m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M",m.x,m.y+"C",m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]][v](),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cr(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},ct=cs(1),cu=cs(),cv=cs(0,1);bO.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return ct(this.attrs.path)}},bO.getPointAtLength=function(a){if(this.type=="path")return cu(this.attrs.path,a)},bO.getSubpath=function(a,b){if(this.type=="path"){if(B(this.getTotalLength()-b)<"1e-6")return cv(this.attrs.path,a).end;var c=cv(this.attrs.path,b,1);return a?cv(c,a).end:c}},a.easing_formulas={linear:function(a){return a},"<":function(a){return C(a,3)},">":function(a){return C(a-1,3)+1},"<>":function(a){a=a*2;if(a<1)return C(a,3)/2;a-=2;return(C(a,3)+2)/2},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==0||a==1)return a;var b=.3,c=b/4;return C(2,-10*a)*y.sin((a-c)*2*D/b)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};var cw=[],cx=function(){var b=+(new Date);for(var c=0;c<cw[w];c++){var d=cw[c];if(d.stop||d.el.removed)continue;var e=b-d.start,g=d.ms,h=d.easing,i=d.from,j=d.diff,k=d.to,l=d.t,m=d.el,n={},o;if(e<g){var r=h(e/g);for(var s in i)if(i[f](s)){switch(X[s]){case"along":o=r*g*j[s],k.back&&(o=k.len-o);var t=cu(k[s],o);m.translate(j.sx-j.x||0,j.sy-j.y||0),j.x=t.x,j.y=t.y,m.translate(t.x-j.sx,t.y-j.sy),k.rot&&m.rotate(j.r+t.alpha,t.x,t.y);break;case E:o=+i[s]+r*g*j[s];break;case"colour":o="rgb("+[cz(Q(i[s].r+r*g*j[s].r)),cz(Q(i[s].g+r*g*j[s].g)),cz(Q(i[s].b+r*g*j[s].b))][v](",")+")";break;case"path":o=[];for(var u=0,x=i[s][w];u<x;u++){o[u]=[i[s][u][0]];for(var y=1,z=i[s][u][w];y<z;y++)o[u][y]=+i[s][u][y]+r*g*j[s][u][y];o[u]=o[u][v](q)}o=o[v](q);break;case"csv":switch(s){case"translation":var A=r*g*j[s][0]-l.x,B=r*g*j[s][1]-l.y;l.x+=A,l.y+=B,o=A+q+B;break;case"rotation":o=+i[s][0]+r*g*j[s][0],i[s][1]&&(o+=","+i[s][1]+","+i[s][2]);break;case"scale":o=[+i[s][0]+r*g*j[s][0],+i[s][1]+r*g*j[s][1],2 in k[s]?k[s][2]:p,3 in k[s]?k[s][3]:p][v](q);break;case"clip-rect":o=[],u=4;while(u--)o[u]=+i[s][u]+r*g*j[s][u]}break;default:var C=[].concat(i[s]);o=[],u=m.paper.customAttributes[s].length;while(u--)o[u]=+C[u]+r*g*j[s][u]}n[s]=o}m.attr(n),m._run&&m._run.call(m)}else k.along&&(t=cu(k.along,k.len*!k.back),m.translate(j.sx-(j.x||0)+t.x-j.sx,j.sy-(j.y||0)+t.y-j.sy),k.rot&&m.rotate(j.r+t.alpha,t.x,t.y)),(l.x||l.y)&&m.translate(-l.x,-l.y),k.scale&&(k.scale+=p),m.attr(k),cw.splice(c--,1)}a.svg&&m&&m.paper&&m.paper.safari(),cw[w]&&setTimeout(cx)},cy=function(b,c,d,e,f){var g=d-e;c.timeouts.push(setTimeout(function(){a.is(f,"function")&&f.call(c),c.animate(b,g,b.easing)},e))},cz=function(a){return z(A(a,255),0)},cA=function(a,b){if(a==null)return{x:this._.tx,y:this._.ty,toString:cp};this._.tx+=+a,this._.ty+=+b;switch(this.type){case"circle":case"ellipse":this.attr({cx:+a+this.attrs.cx,cy:+b+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+a+this.attrs.x,y:+b+this.attrs.y});break;case"path":var c=bp(this.attrs.path);c[0][1]+=+a,c[0][2]+=+b,this.attr({path:c})}return this};bO.animateWith=function(a,b,c,d,e){for(var f=0,g=cw.length;f<g;f++)cw[f].el.id==a.id&&(b.start=cw[f].start);return this.animate(b,c,d,e)},bO.animateAlong=cB(),bO.animateAlongBack=cB(1),bO.onAnimation=function(a){this._run=a||0;return this},bO.animate=function(c,d,e,g){var h=this;h.timeouts=h.timeouts||[];if(a.is(e,"function")||!e)g=e||null;if(h.removed){g&&g.call(h);return h}var i={},j={},k=!1,l={};for(var m in c)if(c[f](m))if(X[f](m)||h.paper.customAttributes[f](m)){k=!0,i[m]=h.attr(m),i[m]==null&&(i[m]=W[m]),j[m]=c[m];switch(X[m]){case"along":var n=ct(c[m]),o=cu(c[m],n*!!c.back),p=h.getBBox();l[m]=n/d,l.tx=p.x,l.ty=p.y,l.sx=o.x,l.sy=o.y,j.rot=c.rot,j.back=c.back,j.len=n,c.rot&&(l.r=S(h.rotate())||0);break;case E:l[m]=(j[m]-i[m])/d;break;case"colour":i[m]=a.getRGB(i[m]);var q=a.getRGB(j[m]);l[m]={r:(q.r-i[m].r)/d,g:(q.g-i[m].g)/d,b:(q.b-i[m].b)/d};break;case"path":var t=bw(i[m],j[m]);i[m]=t[0];var u=t[1];l[m]=[];for(var v=0,x=i[m][w];v<x;v++){l[m][v]=[0];for(var y=1,z=i[m][v][w];y<z;y++)l[m][v][y]=(u[v][y]-i[m][v][y])/d}break;case"csv":var A=r(c[m])[s](b),B=r(i[m])[s](b);switch(m){case"translation":i[m]=[0,0],l[m]=[A[0]/d,A[1]/d];break;case"rotation":i[m]=B[1]==A[1]&&B[2]==A[2]?B:[0,A[1],A[2]],l[m]=[(A[0]-i[m][0])/d,0,0];break;case"scale":c[m]=A,i[m]=r(i[m])[s](b),l[m]=[(A[0]-i[m][0])/d,(A[1]-i[m][1])/d,0,0];break;case"clip-rect":i[m]=r(i[m])[s](b),l[m]=[],v=4;while(v--)l[m][v]=(A[v]-i[m][v])/d}j[m]=A;break;default:A=[].concat(c[m]),B=[].concat(i[m]),l[m]=[],v=h.paper.customAttributes[m][w];while(v--)l[m][v]=((A[v]||0)-(B[v]||0))/d}}if(!k){var C=[],D;for(var F in c)c[f](F)&&Z.test(F)&&(m={value:c[F]},F=="from"&&(F=0),F=="to"&&(F=100),m.key=T(F,10),C.push(m));C.sort(be),C[0].key&&C.unshift({key:0,value:h.attrs});for(v=0,x=C[w];v<x;v++)cy(C[v].value,h,d/100*C[v].key,d/100*(C[v-1]&&C[v-1].key||0),C[v-1]&&C[v-1].value.callback);D=C[C[w]-1].value.callback,D&&h.timeouts.push(setTimeout(function(){D.call(h)},d))}else{var G=a.easing_formulas[e];if(!G){G=r(e).match(P);if(G&&G[w]==5){var H=G;G=function(a){return cC(a,+H[1],+H[2],+H[3],+H[4],d)}}else G=function(a){return a}}cw.push({start:c.start||+(new Date),ms:d,easing:G,from:i,diff:l,to:j,el:h,t:{x:0,y:0}}),a.is(g,"function")&&(h._ac=setTimeout(function(){g.call(h)},d)),cw[w]==1&&setTimeout(cx)}return this},bO.stop=function(){for(var a=0;a<cw.length;a++)cw[a].el.id==this.id&&cw.splice(a--,1);for(a=0,ii=this.timeouts&&this.timeouts.length;a<ii;a++)clearTimeout(this.timeouts[a]);this.timeouts=[],clearTimeout(this._ac),delete this._ac;return this},bO.translate=function(a,b){return this.attr({translation:a+" "+b})},bO[H]=function(){return"Raphaël’s object"},a.ae=cw;var cD=function(a){this.items=[],this[w]=0,this.type="set";if(a)for(var b=0,c=a[w];b<c;b++)a[b]&&(a[b].constructor==bN||a[b].constructor==cD)&&(this[this.items[w]]=this.items[this.items[w]]=a[b],this[w]++)};cD[e][L]=function(){var a,b;for(var c=0,d=arguments[w];c<d;c++)a=arguments[c],a&&(a.constructor==bN||a.constructor==cD)&&(b=this.items[w],this[b]=this.items[b]=a,this[w]++);return this},cD[e].pop=function(){delete this[this[w]--];return this.items.pop()};for(var cE in bO)bO[f](cE)&&(cD[e][cE]=function(a){return function(){for(var b=0,c=this.items[w];b<c;b++)this.items[b][a][m](this.items[b],arguments);return this}}(cE));cD[e].attr=function(b,c){if(b&&a.is(b,G)&&a.is(b[0],"object"))for(var d=0,e=b[w];d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items[w];f<g;f++)this.items[f].attr(b,c);return this},cD[e].animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items[w],g=f,h,i=this,j;e&&(j=function(){!--f&&e.call(i)}),d=a.is(d,F)?d:j,h=this.items[--g].animate(b,c,d,j);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,b,c,d,j);return this},cD[e].insertAfter=function(a){var b=this.items[w];while(b--)this.items[b].insertAfter(a);return this},cD[e].getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items[w];e--;){var f=this.items[e].getBBox();a[L](f.x),b[L](f.y),c[L](f.x+f.width),d[L](f.y+f.height)}a=A[m](0,a),b=A[m](0,b);return{x:a,y:b,width:z[m](0,c)-a,height:z[m](0,d)-b}},cD[e].clone=function(a){a=new cD;for(var b=0,c=this.items[w];b<c;b++)a[L](this.items[b].clone());return a},a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[f](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c][L](b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=T(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[f](e)){var g=a.glyphs[e];b.glyphs[e]={w:g.w,k:{},d:g.d&&"M"+g.d[Y](/[mlcxtrv]/g,function(a){return({l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"})[a]||"M"})+"z"};if(g.k)for(var h in g.k)g[f](h)&&(b.glyphs[e].k[h]=g.k[h])}}return a},k.getFont=function(b,c,d,e){e=e||"normal",d=d||"normal",c=+c||({normal:400,bold:700,lighter:300,bolder:800})[c]||400;if(!!a.fonts){var g=a.fonts[b];if(!g){var h=new RegExp("(^|\\s)"+b[Y](/[^\w\d\s+!~.:_-]/g,p)+"(\\s|$)","i");for(var i in a.fonts)if(a.fonts[f](i)&&h.test(i)){g=a.fonts[i];break}}var j;if(g)for(var k=0,l=g[w];k<l;k++){j=g[k];if(j.face["font-weight"]==c&&(j.face["font-style"]==d||!j.face["font-style"])&&j.face["font-stretch"]==e)break}return j}},k.print=function(c,d,e,f,g,h,i){h=h||"middle",i=z(A(i||0,1),-1);var j=this.set(),k=r(e)[s](p),l=0,m=p,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var o=f.face.bbox.split(b),q=+o[0],t=+o[1]+(h=="baseline"?o[3]-o[1]+ +f.face.descent:(o[3]-o[1])/2);for(var u=0,v=k[w];u<v;u++){var x=u&&f.glyphs[k[u-1]]||{},y=f.glyphs[k[u]];l+=u?(x.w||f.w)+(x.k&&x.k[k[u]]||0)+f.w*i:0,y&&y.d&&j[L](this.path(y.d).attr({fill:"#000",stroke:"none",translation:[l,0]}))}j.scale(n,n,q,t).translate(c-q,d-t)}return j},a.format=function(b,c){var e=a.is(c,G)?[0][n](c):arguments;b&&a.is(b,F)&&e[w]-1&&(b=b[Y](d,function(a,b){return e[++b]==null?p:e[b]}));return b||p},a.ninja=function(){i.was?h.Raphael=i.is:delete Raphael;return a},a.el=bO,a.st=cD[e],i.was?h.Raphael=a:Raphael=a})()
vendor/assets/stylesheets/jquery-ui/jquery-ui.css
@@ -382,15 +382,13 @@ @@ -382,15 +382,13 @@
382 padding:.2em .4em; 382 padding:.2em .4em;
383 line-height:1.5; 383 line-height:1.5;
384 zoom:1; 384 zoom:1;
  385 + font-weight: normal;
385 } 386 }
386 .ui-menu .ui-menu-item a.ui-state-hover, 387 .ui-menu .ui-menu-item a.ui-state-hover,
387 .ui-menu .ui-menu-item a.ui-state-active { 388 .ui-menu .ui-menu-item a.ui-state-active {
388 font-weight: normal; 389 font-weight: normal;
389 margin: -1px; 390 margin: -1px;
390 - background: #fff !important;  
391 - background: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#FFF6BF)) !important;  
392 - background: -moz-linear-gradient(top,#fff,#FFF6BF) !important;  
393 - background: transparent 9 !important; 391 + background: #eee;
394 border-radius:0px; 392 border-radius:0px;
395 border-color:white; 393 border-color:white;
396 border-bottom: 1px solid #E2EAEE; 394 border-bottom: 1px solid #E2EAEE;