Commit cd3d50ca authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Changed colors for buttons. Imporved preview area. Added clone panel to empty project

parent 5b88c1e3
...@@ -45,7 +45,9 @@ init: ...@@ -45,7 +45,9 @@ init:
$("#note_note").live("focus", function(){ $("#note_note").live("focus", function(){
$(this).css("height", "80px"); $(this).css("height", "80px");
$('.note_advanced_opts').show(); $('.note_advanced_opts').show();
$(this).closest("form").find(".submit_note").attr("disabled", "disabled"); if($(this).val() == "") {
$(this).closest("form").find(".submit_note").attr("disabled", "disabled").addClass("disabled");
}
}); });
$("#note_attachment").change(function(e){ $("#note_attachment").change(function(e){
......
.btn { .btn {
@include bg-dark-gray-gradient; background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #f7f7f7), to(#d5d5d5));
background-image: -webkit-linear-gradient(#f7f7f7 7.6%, #d5d5d5);
background-image: -moz-linear-gradient(#f7f7f7 7.6%, #d5d5d5);
background-image: -o-linear-gradient(#f7f7f7 7.6%, #d5d5d5);
border-color:#aaa; border-color:#aaa;
&:hover { &:hover {
@include bg-gray-gradient; @include bg-gray-gradient;
...@@ -7,28 +10,42 @@ ...@@ -7,28 +10,42 @@
color:#333; color:#333;
} }
&.btn-primary { &.primary {
background:#2a79A3; background:#2a79A3;
border-color: #2A79A3; border-color: #2A79A3;
background-image: -webkit-linear-gradient(#47A7b7 7.6%, #2585b5);
background-image: -moz-linear-gradient(#47A7b7 7.6%, #2585b5);
background-image: -o-linear-gradient(#47A7b7 7.6%, #2585b5);
color:#fff;
text-shadow: 0 1px 1px #268;
&:hover { &:hover {
background:$blue_link; background:$blue_link;
color:#fff; color:#fff;
} }
}
&.primary { &.disabled {
@extend .btn-primary; color:#fff;
background:#29B;
}
} }
&.success { &.success {
border-color: #4A4;
background-image: -webkit-linear-gradient(#82D482 7.6%, #22B442);
background-image: -moz-linear-gradient(#82D482 7.6%, #22B442);
background-image: -o-linear-gradient(#82D482 7.6%, #22B442);
color: #fff; color: #fff;
text-shadow: 0 0 1px #111; text-shadow: 0 1px 1px #141;
background: #5bb75b;;
font-weight: bold;
&:hover { &:hover {
background-color: #51a351; background: #6C6;
color: #fff; color: #fff;
} }
&.disabled {
color:#fff;
background:#2b2;
}
} }
&.save-btn { &.save-btn {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Notes * Notes
* *
*/ */
#notes-list, #notes-list,
#new_notes_list { #new_notes_list {
display:block; display:block;
list-style:none; list-style:none;
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
padding:0px; padding:0px;
} }
#new_notes_list li:last-child{ #new_notes_list li:last-child{
border-bottom:1px solid #aaa; border-bottom:1px solid #aaa;
} }
...@@ -38,12 +38,16 @@ ...@@ -38,12 +38,16 @@
} }
} }
#preview-note { .preview_note {
margin-bottom: 0; margin: 2px;
border: 1px solid #ddd;
padding: 10px;
min-height: 60px;
background:#f5f5f5;
} }
.note { .note {
padding: 8px 0; padding: 8px 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
overflow: hidden; overflow: hidden;
display: block; display: block;
...@@ -53,16 +57,16 @@ ...@@ -53,16 +57,16 @@
.note-author { color: $style_color;} .note-author { color: $style_color;}
.note-title { margin-left:45px; padding-top: 5px;} .note-title { margin-left:45px; padding-top: 5px;}
.avatar { .avatar {
margin-top:3px; margin-top:3px;
} }
.delete-note { .delete-note {
display:none; display:none;
float:right; float:right;
} }
&:hover { &:hover {
.delete-note { display:block; } .delete-note { display:block; }
} }
} }
...@@ -76,18 +80,18 @@ p.notify_controls span{ ...@@ -76,18 +80,18 @@ p.notify_controls span{
font-weight: 700; font-weight: 700;
} }
tr.line_notes_row { tr.line_notes_row {
border-bottom:1px solid #DDD; border-bottom:1px solid #DDD;
border-left: 7px solid #2A79A3; border-left: 7px solid #2A79A3;
&.reply { &.reply {
background:#eee; background:#eee;
border-left: 7px solid #2A79A3; border-left: 7px solid #2A79A3;
border-top:1px solid #ddd; border-top:1px solid #ddd;
td { td {
padding:7px 10px; padding:7px 10px;
} }
a.line_note_reply_link { a.line_note_reply_link {
@include round-borders-all(4px); @include round-borders-all(4px);
padding: 3px 10px; padding: 3px 10px;
margin-left:5px; margin-left:5px;
...@@ -96,9 +100,9 @@ tr.line_notes_row { ...@@ -96,9 +100,9 @@ tr.line_notes_row {
border-color: #2A79A3; border-color: #2A79A3;
} }
} }
ul { ul {
margin:0; margin:0;
li { li {
padding:0; padding:0;
border:none; border:none;
} }
...@@ -107,26 +111,26 @@ tr.line_notes_row { ...@@ -107,26 +111,26 @@ tr.line_notes_row {
.line_notes_row, .per_line_form { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } .line_notes_row, .per_line_form { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.per_line_form { .per_line_form {
background:#f5f5f5; background:#f5f5f5;
border-top:1px solid #eee; border-top:1px solid #eee;
form { margin: 0; } form { margin: 0; }
td { td {
border-bottom:1px solid #ddd; border-bottom:1px solid #ddd;
} }
.note_actions { .note_actions {
margin:0; margin:0;
padding-top: 10px; padding-top: 10px;
.buttons { .buttons {
float:left; float:left;
width:300px; width:300px;
} }
.options { .options {
.labels { .labels {
float:left; float:left;
padding-left:10px; padding-left:10px;
label { label {
padding: 6px 0; padding: 6px 0;
margin: 0; margin: 0;
width:120px; width:120px;
...@@ -136,7 +140,7 @@ tr.line_notes_row { ...@@ -136,7 +140,7 @@ tr.line_notes_row {
} }
} }
td .line_note_link { td .line_note_link {
position:absolute; position:absolute;
margin-left:-70px; margin-left:-70px;
margin-top:-10px; margin-top:-10px;
...@@ -148,14 +152,14 @@ td .line_note_link { ...@@ -148,14 +152,14 @@ td .line_note_link {
opacity: 0.0; opacity: 0.0;
filter: alpha(opacity=0); filter: alpha(opacity=0);
&:hover { &:hover {
opacity: 1.0; opacity: 1.0;
filter: alpha(opacity=100); filter: alpha(opacity=100);
} }
} }
.diff_file_content tr.line_holder:hover > td { background: $hover !important; } .diff_file_content tr.line_holder:hover > td { background: $hover !important; }
.diff_file_content tr.line_holder:hover > td .line_note_link { .diff_file_content tr.line_holder:hover > td .line_note_link {
opacity: 1.0; opacity: 1.0;
filter: alpha(opacity=100); filter: alpha(opacity=100);
} }
...@@ -173,8 +177,8 @@ td .line_note_link { ...@@ -173,8 +177,8 @@ td .line_note_link {
margin: 0; margin: 0;
} }
.note_advanced_opts { .note_advanced_opts {
h6 { h6 {
line-height: 32px; line-height: 32px;
padding-right: 15px; padding-right: 15px;
} }
...@@ -187,7 +191,7 @@ td .line_note_link { ...@@ -187,7 +191,7 @@ td .line_note_link {
overflow:hidden; overflow:hidden;
margin:0 0 5px !important; margin:0 0 5px !important;
.input_file { .input_file {
.file_upload { .file_upload {
position: absolute; position: absolute;
right:14px; right:14px;
...@@ -200,7 +204,7 @@ td .line_note_link { ...@@ -200,7 +204,7 @@ td .line_note_link {
height:28px; height:28px;
overflow:hidden; overflow:hidden;
} }
.input-file { .input-file {
width: 260px; width: 260px;
height: 41px; height: 41px;
float: right; float: right;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
= "..." = "..."
= text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge" = text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
.actions .actions
= submit_tag "Compare", class: "btn btn-primary" = submit_tag "Compare", class: "btn primary"
- unless @commits.empty? - unless @commits.empty?
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
= f.hidden_field :noteable_id = f.hidden_field :noteable_id
= f.hidden_field :noteable_type = f.hidden_field :noteable_type
= f.text_area :note, size: 255 = f.text_area :note, size: 255
#preview-note.well.hide #preview-note.preview_note.hide
.hint .hint
.right Comments are parsed with #{link_to "Gitlab Flavored Markdown", help_markdown_path, target: '_blank'}. .right Comments are parsed with #{link_to "Gitlab Flavored Markdown", help_markdown_path, target: '_blank'}.
.clearfix .clearfix
.row.note_advanced_opts.hide .row.note_advanced_opts.hide
.span3 .span3
= f.submit 'Add Comment', class: "btn primary submit_note grouped", id: "submit_note" = f.submit 'Add Comment', class: "btn success submit_note grouped", id: "submit_note"
= link_to 'Preview', preview_project_notes_path(@project), class: 'btn grouped', id: 'preview-link' = link_to 'Preview', preview_project_notes_path(@project), class: 'btn grouped', id: 'preview-link'
.span4.notify_opts .span4.notify_opts
%h6.left Notify via email: %h6.left Notify via email:
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
.span5.attachments .span5.attachments
%h6.left Attachment: %h6.left Attachment:
%span.file_name File name... %span.file_name File name...
.input.input_file .input.input_file
%a.file_upload.btn.small Upload File %a.file_upload.btn.small Upload File
= f.file_field :attachment, class: "input-file" = f.file_field :attachment, class: "input-file"
......
.project_clone_panel
.row
.span7
.form-horizontal
.input-prepend.project_clone_holder
= link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo
= link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
.span4.right
.right
- if can? current_user, :download_code, @project
= link_to archive_project_repository_path(@project), class: "btn small grouped" do
%i.icon-download-alt
Download
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
= link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do
Merge Request
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
= link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do
Issue
= render 'shared/no_ssh' = render 'shared/no_ssh'
.project_clone_panel
.row
.span7
.form-horizontal
.input-prepend.project_clone_holder
= link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo
= link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
%div.git-empty %div.git-empty
%h4 Git global setup: %h4 Git global setup:
%pre.dark %pre.dark
...@@ -28,3 +36,16 @@ ...@@ -28,3 +36,16 @@
- if can? current_user, :admin_project, @project - if can? current_user, :admin_project, @project
.prepend-top-20 .prepend-top-20
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right" = link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right"
:javascript
$(function(){
var link_sel = ".project_clone_holder a";
$(link_sel).bind("click", function() {
$(link_sel).removeClass("active");
$(this).addClass("active");
$("#project_clone").val($(this).attr("data-clone"));
})
})
= render "project_head" = render "project_head"
= render 'clone_panel'
.project_clone_panel
.row
.span7
.form-horizontal
.input-prepend.project_clone_holder
= link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo
= link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
.span4.right
.right
- if can? current_user, :download_code, @project
= link_to archive_project_repository_path(@project), class: "btn small grouped" do
%i.icon-download-alt
Download
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
= link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do
Merge Request
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
= link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do
Issue
= render "events/event_last_push", event: @last_push = render "events/event_last_push", event: @last_push
.content_list= render @events .content_list= render @events
:javascript :javascript
$(function(){ $(function(){
var link_sel = ".project_clone_holder a"; var link_sel = ".project_clone_holder a";
$(link_sel).bind("click", function() { $(link_sel).bind("click", function() {
$(link_sel).removeClass("active"); $(link_sel).removeClass("active");
$(this).addClass("active"); $(this).addClass("active");
$("#project_clone").val($(this).attr("data-clone")); $("#project_clone").val($(this).attr("data-clone"));
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%strong Looking for %strong Looking for
.input .input
= text_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge", id: "dashboard_search" = text_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge", id: "dashboard_search"
= submit_tag 'Search', class: "btn btn-primary" = submit_tag 'Search', class: "btn primary"
- if params[:search].present? - if params[:search].present?
%br %br
%h3 %h3
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment