[#369] pull request page: small fixes

This commit is contained in:
Alexander Machehin 2014-12-25 23:29:04 +05:00
parent 2ebb00cee2
commit 442b7f92dd
6 changed files with 18 additions and 9 deletions

View File

@ -15,8 +15,8 @@ PullRequestController = (dataservice, $http, ApiPullRequest, ApiProject, DateTim
vm.can_delete_branch = false vm.can_delete_branch = false
activity = $('#pull-activity') activity = $('#pull-activity')
diff = $('#diff.tab-pane > .content') diff = $('#diff.tab-pane .content')
commits = $('#commits.tab-pane > .content') commits = $('#commits.tab-pane .content')
vm.active_tab = null vm.active_tab = null

View File

@ -87,6 +87,10 @@ footer
.boffset_auto .boffset_auto
margin-bottom: auto margin-bottom: auto
.lroffset-15
margin-left: 15px
margin-right: 15px
.lpadding-5 .lpadding-5
padding-left: 5px padding-left: 5px

View File

@ -1,5 +1,9 @@
table.table.diff.inline .table-responsive.overflow-auto
border: 1px solid #DDD border: 1px solid #DDD
overflow-x: auto
table.table.diff.inline
//border: 1px solid #DDD
tr.changes tr.changes
pre pre

View File

@ -36,12 +36,14 @@ module DiffHelper
end end
prepare(args.merge({filepath: filepath, comments: comments, in_discussion: in_discussion})) prepare(args.merge({filepath: filepath, comments: comments, in_discussion: in_discussion}))
res = '<table class="table diff inline table-responsive" cellspacing="0" cellpadding="0">' res = '<div class="table-responsive overflow-auto">'
res << '<table class="table diff inline table-borderless" cellspacing="0" cellpadding="0">'
res << '<tbody>' res << '<tbody>'
res << renderer(diff_display.data) #diff_display.render(Git::Diff::InlineCallback.new comments, path) res << renderer(diff_display.data) #diff_display.render(Git::Diff::InlineCallback.new comments, path)
res << tr_line_comments(comments) if in_discussion res << tr_line_comments(comments) if in_discussion
res << '</tbody>' res << '</tbody>'
res << '</table>' res << '</table>'
res << '</div>'
res.html_safe res.html_safe
end end

View File

@ -8,4 +8,3 @@
.clearfix .clearfix
-if pull_diff.diff.present? && !(@pull.repo.tree(commit_id) / pull_diff.b_path).binary? -if pull_diff.diff.present? && !(@pull.repo.tree(commit_id) / pull_diff.b_path).binary?
.diff_data== render_diff(pull_diff, diff_counter: pull_diff_counter, comments: @comments) .diff_data== render_diff(pull_diff, diff_counter: pull_diff_counter, comments: @comments)
p= "comments count is #{@comments.count}"

View File

@ -4,8 +4,8 @@
== render "projects/comments/markdown_help" if current_user == render "projects/comments/markdown_help" if current_user
div ng-controller = 'PullRequestController as pullCtrl' ng-cloak = true div ng-controller = 'PullRequestController as pullCtrl' ng-cloak = true
.row .row.lroffset-15
.col-md-10.col-md-offset-1 .col-lg-12
h3.bpadding10 h3.bpadding10
- PullRequest::STATUSES.each do |status| - PullRequest::STATUSES.each do |status|
= pull_status_label status, 'ng-show' => "pullCtrl.pull.status == '#{status}'" = pull_status_label status, 'ng-show' => "pullCtrl.pull.status == '#{status}'"
@ -30,11 +30,11 @@ div ng-controller = 'PullRequestController as pullCtrl' ng-cloak = true
.pull_status.offset20== render 'status' .pull_status.offset20== render 'status'
#diff.tab-pane #diff.tab-pane
.content ng-hide = 'pullCtrl.processing' .offset20.content ng-hide = 'pullCtrl.processing'
i.fa.fa-spinner.fa-spin.fa-lg.offset20 ng-show = 'pullCtrl.processing' i.fa.fa-spinner.fa-spin.fa-lg.offset20 ng-show = 'pullCtrl.processing'
#commits.tab-pane #commits.tab-pane
.content ng-hide = 'pullCtrl.processing' .offset20.content ng-hide = 'pullCtrl.processing'
i.fa.fa-spinner.fa-spin.fa-lg.offset20 ng-show = 'pullCtrl.processing' i.fa.fa-spinner.fa-spin.fa-lg.offset20 ng-show = 'pullCtrl.processing'
div ng-non-bindable = true div ng-non-bindable = true