From 442b7f92dd3fdf909304fd062461167f6a142aeb Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 25 Dec 2014 23:29:04 +0500 Subject: [PATCH] [#369] pull request page: small fixes --- .../pull_requests/pull_request_controller.js.coffee | 4 ++-- app/assets/stylesheets/custom_bootstrap.css.sass | 4 ++++ app/assets/stylesheets/views/diff.css.sass | 6 +++++- app/helpers/diff_helper.rb | 4 +++- app/views/projects/pull_requests/_pull_diff.html.slim | 1 - app/views/projects/pull_requests/show.html.slim | 8 ++++---- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/angular-new/pull_requests/pull_request_controller.js.coffee b/app/assets/javascripts/angular-new/pull_requests/pull_request_controller.js.coffee index 634274937..97772a8e4 100644 --- a/app/assets/javascripts/angular-new/pull_requests/pull_request_controller.js.coffee +++ b/app/assets/javascripts/angular-new/pull_requests/pull_request_controller.js.coffee @@ -15,8 +15,8 @@ PullRequestController = (dataservice, $http, ApiPullRequest, ApiProject, DateTim vm.can_delete_branch = false activity = $('#pull-activity') - diff = $('#diff.tab-pane > .content') - commits = $('#commits.tab-pane > .content') + diff = $('#diff.tab-pane .content') + commits = $('#commits.tab-pane .content') vm.active_tab = null diff --git a/app/assets/stylesheets/custom_bootstrap.css.sass b/app/assets/stylesheets/custom_bootstrap.css.sass index 52d7b3d23..fbaa4c25a 100644 --- a/app/assets/stylesheets/custom_bootstrap.css.sass +++ b/app/assets/stylesheets/custom_bootstrap.css.sass @@ -87,6 +87,10 @@ footer .boffset_auto margin-bottom: auto +.lroffset-15 + margin-left: 15px + margin-right: 15px + .lpadding-5 padding-left: 5px diff --git a/app/assets/stylesheets/views/diff.css.sass b/app/assets/stylesheets/views/diff.css.sass index 48a648262..c31905165 100644 --- a/app/assets/stylesheets/views/diff.css.sass +++ b/app/assets/stylesheets/views/diff.css.sass @@ -1,5 +1,9 @@ -table.table.diff.inline +.table-responsive.overflow-auto border: 1px solid #DDD + overflow-x: auto + +table.table.diff.inline + //border: 1px solid #DDD tr.changes pre diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index 6ebae448e..ddc538112 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -36,12 +36,14 @@ module DiffHelper end prepare(args.merge({filepath: filepath, comments: comments, in_discussion: in_discussion})) - res = '' + res = '
' + res << '
' res << '' res << renderer(diff_display.data) #diff_display.render(Git::Diff::InlineCallback.new comments, path) res << tr_line_comments(comments) if in_discussion res << '' res << '
' + res << '' res.html_safe end diff --git a/app/views/projects/pull_requests/_pull_diff.html.slim b/app/views/projects/pull_requests/_pull_diff.html.slim index 19f7b3051..b348c8052 100644 --- a/app/views/projects/pull_requests/_pull_diff.html.slim +++ b/app/views/projects/pull_requests/_pull_diff.html.slim @@ -8,4 +8,3 @@ .clearfix -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) - p= "comments count is #{@comments.count}" \ No newline at end of file diff --git a/app/views/projects/pull_requests/show.html.slim b/app/views/projects/pull_requests/show.html.slim index 6bac9f1c1..54143de40 100644 --- a/app/views/projects/pull_requests/show.html.slim +++ b/app/views/projects/pull_requests/show.html.slim @@ -4,8 +4,8 @@ == render "projects/comments/markdown_help" if current_user div ng-controller = 'PullRequestController as pullCtrl' ng-cloak = true - .row - .col-md-10.col-md-offset-1 + .row.lroffset-15 + .col-lg-12 h3.bpadding10 - PullRequest::STATUSES.each do |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' #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' #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' div ng-non-bindable = true