Commit 36e88b960a32d4f291a32be988488414a44f7d29

Authored by randx
1 parent d143680c

CSS refactoring

app/assets/stylesheets/common.scss
@@ -401,16 +401,6 @@ p.time { @@ -401,16 +401,6 @@ p.time {
401 } 401 }
402 } 402 }
403 403
404 -.mr_source_commit ,  
405 -.mr_target_commit {  
406 - .commit {  
407 - list-style:none;  
408 - margin-top:10px;  
409 - &:hover {  
410 - background:none;  
411 - }  
412 - }  
413 -}  
414 404
415 .prettyprint { 405 .prettyprint {
416 background-color: #fefbf3; 406 background-color: #fefbf3;
@@ -446,51 +436,6 @@ p.time { @@ -446,51 +436,6 @@ p.time {
446 } 436 }
447 } 437 }
448 438
449 -/**  
450 - * UI box element  
451 - * contains top, middle, bottom blocks  
452 - *  
453 - */  
454 -.main_box {  
455 - @extend .borders;  
456 - @extend .prepend-top-20;  
457 - @extend .append-bottom-20;  
458 - border-width:1px;  
459 -  
460 - img { max-width: 100%; }  
461 -  
462 - pre {  
463 - code {  
464 - background: none !important;  
465 - }  
466 - }  
467 -  
468 - .top_box_content,  
469 - .middle_box_content,  
470 - .bottom_box_content {  
471 - padding:15px;  
472 -  
473 - pre {  
474 - background: none !important;  
475 - margin:0;  
476 - border:none;  
477 - padding:0;  
478 - }  
479 - }  
480 -  
481 - .middle_box_content {  
482 - border-radius:0;  
483 - border:none;  
484 - font-size:12px;  
485 - background-color:#f5f5f5;  
486 - border:none;  
487 - border-top:1px solid #eee;  
488 - }  
489 -  
490 - .bottom_box_content {  
491 - border-top:1px solid #eee;  
492 - }  
493 -}  
494 439
495 .highlight_word { 440 .highlight_word {
496 background:#EEDC94; 441 background:#EEDC94;
@@ -551,40 +496,6 @@ p.time { @@ -551,40 +496,6 @@ p.time {
551 } 496 }
552 } 497 }
553 498
554 -.new_note {  
555 - .input-file {  
556 - font: 500px monospace;  
557 - opacity:0;  
558 - filter: alpha(opacity=0);  
559 - position: absolute;  
560 - z-index: 1;  
561 - top:0;  
562 - right:0;  
563 - padding:0;  
564 - margin: 0;  
565 - }  
566 -  
567 - .file_upload {  
568 - position: absolute;  
569 - right:14px;  
570 - top:7px;  
571 - }  
572 -  
573 - div.attachments {  
574 - position:relative;  
575 - width: 350px;  
576 - height: 36px;  
577 - overflow:hidden;  
578 - margin:0 0 5px !important;  
579 - }  
580 - .file_name {  
581 - line-height:30px;  
582 - width:240px;  
583 - height:28px;  
584 - overflow:hidden;  
585 - }  
586 -}  
587 -  
588 // Fix issue with notes & lists creating a bunch of bottom borders. 499 // Fix issue with notes & lists creating a bunch of bottom borders.
589 li.note { 500 li.note {
590 img { max-width:100% } 501 img { max-width:100% }
@@ -665,70 +576,7 @@ li.note { @@ -665,70 +576,7 @@ li.note {
665 } 576 }
666 } 577 }
667 578
668 -.automerge_widget {  
669 -  
670 - &.can_be_merged {  
671 - background: #DFF0D8;  
672 - }  
673 -  
674 -  
675 - form {  
676 - margin-bottom:0;  
677 - .clearfix {  
678 - margin-bottom:0;  
679 - }  
680 - }  
681 -  
682 - .accept_group {  
683 - float:left;  
684 - border: 1px solid #ADA;  
685 - padding: 2px;  
686 - @include border-radius(5px);  
687 - border-radius: 5px;  
688 - background: #CEB;  
689 -  
690 - .accept_merge_request {  
691 - float:left;  
692 - }  
693 - .remove_branch_holder {  
694 - margin-left:20px;  
695 - margin-right:10px;  
696 - float:left;  
697 - }  
698 - label {  
699 - color:#444;  
700 - }  
701 - }  
702 -  
703 -  
704 - .how_to_merge_link {  
705 - @extend .primary;  
706 - }  
707 -}  
708 -  
709 -.graph_holder {  
710 - border: 1px solid #aaa;  
711 - padding:1px;  
712 -  
713 -  
714 - h4 {  
715 - padding:0 10px;  
716 - border-bottom: 1px solid #bbb;  
717 - background:#eee;  
718 - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));  
719 - background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);  
720 - background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);  
721 - background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);  
722 - }  
723 -  
724 - .graph {  
725 - background: #f1f1f1;  
726 - cursor: move;  
727 - height: 70%;  
728 - overflow: hidden;  
729 - }  
730 579
731 -}  
732 580
733 /* CHZN reset few styles */ 581 /* CHZN reset few styles */
734 .chzn-container-single .chzn-single { 582 .chzn-container-single .chzn-single {
@@ -752,3 +600,4 @@ li.note { @@ -752,3 +600,4 @@ li.note {
752 @include border-radius(4px); 600 @include border-radius(4px);
753 min-height:42px; 601 min-height:42px;
754 } 602 }
  603 +
app/assets/stylesheets/gitlab_bootstrap.scss
@@ -532,3 +532,50 @@ ul.breadcrumb { @@ -532,3 +532,50 @@ ul.breadcrumb {
532 padding:20px; 532 padding:20px;
533 color:#777; 533 color:#777;
534 } 534 }
  535 +
  536 +/**
  537 + * UI box element
  538 + * contains top, middle, bottom blocks
  539 + *
  540 + */
  541 +.main_box {
  542 + @extend .borders;
  543 + @extend .prepend-top-20;
  544 + @extend .append-bottom-20;
  545 + border-width:1px;
  546 +
  547 + img { max-width: 100%; }
  548 +
  549 + pre {
  550 + code {
  551 + background: none !important;
  552 + }
  553 + }
  554 +
  555 + .top_box_content,
  556 + .middle_box_content,
  557 + .bottom_box_content {
  558 + padding:15px;
  559 +
  560 + pre {
  561 + background: none !important;
  562 + margin:0;
  563 + border:none;
  564 + padding:0;
  565 + }
  566 + }
  567 +
  568 + .middle_box_content {
  569 + border-radius:0;
  570 + border:none;
  571 + font-size:12px;
  572 + background-color:#f5f5f5;
  573 + border:none;
  574 + border-top:1px solid #eee;
  575 + }
  576 +
  577 + .bottom_box_content {
  578 + border-top:1px solid #eee;
  579 + }
  580 +}
  581 +
app/assets/stylesheets/main.scss
@@ -117,20 +117,15 @@ $hover: #FDF5D9; @@ -117,20 +117,15 @@ $hover: #FDF5D9;
117 */ 117 */
118 @import "common.scss"; 118 @import "common.scss";
119 119
120 -/**  
121 - * Styles related to displaying commits  
122 - */  
123 -@import "sections/commits.scss";  
124 120
125 /** 121 /**
126 - * Styles related to displaying issues 122 + * Styles related to specific part of app
127 */ 123 */
  124 +@import "sections/commits.scss";
128 @import "sections/issues.scss"; 125 @import "sections/issues.scss";
129 -  
130 -/**  
131 - * Styles related to projects  
132 - */  
133 @import "sections/projects.scss"; 126 @import "sections/projects.scss";
  127 +@import "sections/merge_requests.scss";
  128 +@import "sections/graph.scss";
134 129
135 /** 130 /**
136 * This scss file redefine chozen selectbox styles for 131 * This scss file redefine chozen selectbox styles for
app/assets/stylesheets/notes.scss
@@ -120,3 +120,37 @@ td .line_note_link { @@ -120,3 +120,37 @@ td .line_note_link {
120 opacity: 1.0; 120 opacity: 1.0;
121 filter: alpha(opacity=100); 121 filter: alpha(opacity=100);
122 } 122 }
  123 +
  124 +.new_note {
  125 + .input-file {
  126 + font: 500px monospace;
  127 + opacity:0;
  128 + filter: alpha(opacity=0);
  129 + position: absolute;
  130 + z-index: 1;
  131 + top:0;
  132 + right:0;
  133 + padding:0;
  134 + margin: 0;
  135 + }
  136 +
  137 + .file_upload {
  138 + position: absolute;
  139 + right:14px;
  140 + top:7px;
  141 + }
  142 +
  143 + div.attachments {
  144 + position:relative;
  145 + width: 350px;
  146 + height: 36px;
  147 + overflow:hidden;
  148 + margin:0 0 5px !important;
  149 + }
  150 + .file_name {
  151 + line-height:30px;
  152 + width:240px;
  153 + height:28px;
  154 + overflow:hidden;
  155 + }
  156 +}
app/assets/stylesheets/sections/commits.scss
@@ -166,3 +166,18 @@ @@ -166,3 +166,18 @@
166 .commit-author, .commit-committer{display: block;color: #999; font-weight: normal; font-style: italic;} 166 .commit-author, .commit-committer{display: block;color: #999; font-weight: normal; font-style: italic;}
167 .commit-author strong, .commit-committer strong{font-weight: bold; font-style: normal;} 167 .commit-author strong, .commit-committer strong{font-weight: bold; font-style: normal;}
168 168
  169 +
  170 +/** COMMIT ROW **/
  171 +.commit {
  172 + @extend .wll;
  173 +
  174 + .browse_code_link_holder {
  175 + @extend .span2;
  176 + float:right;
  177 + }
  178 +
  179 + .committed_ago {
  180 + float:right;
  181 + @extend .cgray;
  182 + }
  183 +}
app/assets/stylesheets/sections/graph.scss 0 → 100644
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
  1 +.graph_holder {
  2 + border: 1px solid #aaa;
  3 + padding:1px;
  4 +
  5 +
  6 + h4 {
  7 + padding:0 10px;
  8 + border-bottom: 1px solid #bbb;
  9 + background:#eee;
  10 + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));
  11 + background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);
  12 + background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
  13 + background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
  14 + }
  15 +
  16 + .graph {
  17 + background: #f1f1f1;
  18 + cursor: move;
  19 + height: 70%;
  20 + overflow: hidden;
  21 + }
  22 +}
  23 +
app/assets/stylesheets/sections/merge_requests.scss 0 → 100644
@@ -0,0 +1,74 @@ @@ -0,0 +1,74 @@
  1 +/**
  2 + * MR form
  3 + *
  4 + */
  5 +
  6 +.mr_branch_box {
  7 + @extend .ui-box;
  8 + margin-bottom:20px;
  9 +
  10 + .body {
  11 + background:#f1f1f1;
  12 + }
  13 +
  14 + .commit {
  15 + margin:0;
  16 + padding:0;
  17 + padding: 5px;
  18 + margin-bottom: 5px;
  19 +
  20 + .committed_ago {
  21 + display:none;
  22 + }
  23 + .browse_code_link_holder {
  24 + display:none;
  25 + }
  26 + list-style:none;
  27 + &:hover {
  28 + background:none;
  29 + }
  30 + }
  31 +}
  32 +
  33 +/**
  34 + * MR -> show: Automerge widget
  35 + *
  36 + */
  37 +.automerge_widget {
  38 + &.can_be_merged {
  39 + background: #DFF0D8;
  40 + }
  41 +
  42 + form {
  43 + margin-bottom:0;
  44 + .clearfix {
  45 + margin-bottom:0;
  46 + }
  47 + }
  48 +
  49 + .accept_group {
  50 + float:left;
  51 + border: 1px solid #ADA;
  52 + padding: 2px;
  53 + @include border-radius(5px);
  54 + border-radius: 5px;
  55 + background: #CEB;
  56 +
  57 + .accept_merge_request {
  58 + float:left;
  59 + }
  60 + .remove_branch_holder {
  61 + margin-left:20px;
  62 + margin-right:10px;
  63 + float:left;
  64 + }
  65 + label {
  66 + color:#444;
  67 + }
  68 + }
  69 +
  70 +
  71 + .how_to_merge_link {
  72 + @extend .primary;
  73 + }
  74 +}
app/views/commits/_commit.html.haml
1 -%li.wll.commit  
2 - .right.span2 1 +%li.commit
  2 + .browse_code_link_holder
3 %p 3 %p
4 %strong= link_to "Browse Code »", tree_project_ref_path(@project, commit.id), :class => "right" 4 %strong= link_to "Browse Code »", tree_project_ref_path(@project, commit.id), :class => "right"
5 = link_to project_commit_path(@project, :id => commit.id) do 5 = link_to project_commit_path(@project, :id => commit.id) do
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16 10 = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16
11 %span.row_title= truncate(commit.safe_message, :length => 50) 11 %span.row_title= truncate(commit.safe_message, :length => 50)
12 12
13 - %span.right.cgray 13 + %span.committed_ago
14 = time_ago_in_words(commit.committed_date) 14 = time_ago_in_words(commit.committed_date)
15 ago 15 ago
16   16  
app/views/merge_requests/_form.html.haml
@@ -5,33 +5,30 @@ @@ -5,33 +5,30 @@
5 - @merge_request.errors.full_messages.each do |msg| 5 - @merge_request.errors.full_messages.each do |msg|
6 %li= msg 6 %li= msg
7 7
8 -  
9 -  
10 %h3.padded.cgray 1. Select Branches 8 %h3.padded.cgray 1. Select Branches
  9 +
11 .row 10 .row
12 .span6 11 .span6
13 - .ui-box 12 + .mr_branch_box
14 %h5 From (Head Branch) 13 %h5 From (Head Branch)
15 .body 14 .body
16 .padded 15 .padded
17 = f.label :source_branch, "From", :class => "control-label" 16 = f.label :source_branch, "From", :class => "control-label"
18 .controls 17 .controls
19 = f.select(:source_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px") 18 = f.select(:source_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px")
20 - %hr  
21 - .mr_source_commit  
22 - .clearfix 19 + .bottom_commit
  20 + .mr_source_commit
23 21
24 .span6 22 .span6
25 - .ui-box 23 + .mr_branch_box
26 %h5 To (Base Branch) 24 %h5 To (Base Branch)
27 .body 25 .body
28 .padded 26 .padded
29 = f.label :target_branch, "To", :class => "control-label" 27 = f.label :target_branch, "To", :class => "control-label"
30 .controls 28 .controls
31 = f.select(:target_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px") 29 = f.select(:target_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px")
32 - %hr  
33 - .mr_target_commit  
34 - .clearfix 30 + .bottom_commit
  31 + .mr_target_commit
35 32
36 %h3.padded.cgray 2. Fill info 33 %h3.padded.cgray 2. Fill info
37 .clearfix 34 .clearfix