Commit e4bd6442 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

merge request js/css rewrite

parent fb72b3c6
[Dolphin]
ShowPreview=true
Timestamp=2011,10,28,13,16,25
Timestamp=2011,12,12,23,25,14
Version=2
var MergeRequest = {
diff_loaded: false,
commits_loaded: false,
init:
function() {
$(".merge-tabs a").live("click", function() {
$(".merge-tabs a").removeClass("active");
$(this).addClass("active");
});
$(".merge-tabs a.merge-commits-tab").live("click", function() {
if(MergeRequest.commits_loaded) {
$(".merge-request-commits").show();
} else {
MergeRequest.loadCommits();
}
});
},
loadCommits:
function() {
$(".dashboard-loader").show();
$.ajax({
type: "GET",
url: location.href + "/commits",
complete: function(){
MergeRequest.commits_loaded = true;
$(".dashboard-loader").hide()},
dataType: "script"});
},
loadDiff:
function() {
}
}
......@@ -438,42 +438,6 @@ body.project-page table.no-borders td{
border:none;
}
#gitlab-tabs {
.ui-tabs-nav {
border-bottom: 1px solid #DEDFE1;
li {
background: none;
border:none;
font-size: 16px;
margin: 0;
padding: 0;
a {
margin: 0;
padding: 10px 16px;
width:150px;
}
&.ui-tabs-selected {
background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8));
background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8);
background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8);
background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8);
font-weight: bold;
border:1px solid #DEDFE1;
border-bottom: 1px solid #DEDFE1;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
}
}
}
.ajax-tab-loading {
padding:40px;
display:none;
......@@ -587,3 +551,25 @@ h4.middle-panel {
margin-right:30px;
display:none;
}
ul.merge-tabs {
margin: 0;
border: 1px solid #ccc;
padding: 10px;
font-size: 11px;
font-weight: bold; text-transform: uppercase;
background: #F7F7F7;
margin-bottom:20px;
a {
margin-right:5px;
@include round-borders-all(4px);
border: 1px solid #ddd;
background:none;
padding: 4px 10px;
&.active {
background: #eaeaea;
}
}
}
......@@ -40,20 +40,24 @@
%br
%br
#gitlab-tabs
%ul
%li= link_to "Notes", "#merge-notes"
%li= link_to "Commits", commits_project_merge_request_path(@project, @merge_request)
%li= link_to "Diff", diffs_project_merge_request_path(@project, @merge_request)
%ul.merge-tabs
= link_to "Notes", "#", :class => "merge-notes-tab"
= link_to "Commits","#", "data-url" => commits_project_merge_request_path(@project, @merge_request), :class => "merge-commits-tab"
= link_to "Diff", diffs_project_merge_request_path(@project, @merge_request), :class => "merge-diffs-tab"
%img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"}
#merge-notes
.merge-request-notes
.issue_notes= render "notes/notes"
.loading{ :style => "display:none;"}
%center= image_tag "ajax-loader.gif"
.clear
.merge-request-commits
.merge-request-diffs
:javascript
$(function(){
$("#gitlab-tabs").tabs();
MergeRequest.init();
})
/*
* jQuery UI CSS Framework 1.8.16
* jQuery UI CSS Framework 1.8.16 Patched for GitLab HQ
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
......
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