From 258ab29435d4a02ab5ded6c19de597fdf847ef80 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Fri, 2 Dec 2016 10:13:04 -0600 Subject: [PATCH] Add content_class for limited width --- app/assets/javascripts/issue.js | 6 ------ app/assets/javascripts/merge_request.js | 6 ------ app/assets/stylesheets/pages/issuable.scss | 1 + app/views/projects/issues/show.html.haml | 1 + app/views/projects/merge_requests/_show.html.haml | 1 + 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/issue.js b/app/assets/javascripts/issue.js index 56a2b6a5295..8540b199aba 100644 --- a/app/assets/javascripts/issue.js +++ b/app/assets/javascripts/issue.js @@ -11,7 +11,6 @@ function Issue() { this.submitNoteForm = bind(this.submitNoteForm, this); // Prevent duplicate event bindings - this.limitContainerWidth(); this.disableTaskList(); if ($('a.btn-close').length) { this.initTaskList(); @@ -22,11 +21,6 @@ this.initCanCreateBranch(); } - Issue.prototype.limitContainerWidth = function() { - var $wrapper = $('.content-wrapper .container-fluid'); - $wrapper.addClass('limit-container-width') - }; - Issue.prototype.initTaskList = function() { $('.detail-page-description .js-task-list-container').taskList('enable'); return $(document).on('tasklist:changed', '.detail-page-description .js-task-list-container', this.updateTaskList); diff --git a/app/assets/javascripts/merge_request.js b/app/assets/javascripts/merge_request.js index b3a1ec39c13..88c3636be6c 100644 --- a/app/assets/javascripts/merge_request.js +++ b/app/assets/javascripts/merge_request.js @@ -14,7 +14,6 @@ // Options: // action - String, current controller action // - this.limitContainerWidth(); this.opts = opts != null ? opts : {}; this.submitNoteForm = bind(this.submitNoteForm, this); this.$el = $('.merge-request'); @@ -32,11 +31,6 @@ } } - MergeRequest.prototype.limitContainerWidth = function() { - var $wrapper = $('.content-wrapper .container-fluid'); - $wrapper.addClass('limit-container-width') - }; - // Local jQuery finder MergeRequest.prototype.$ = function(selector) { return this.$el.find(selector); diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 6c35496b846..2357dd2fe6f 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -11,6 +11,7 @@ } } } + .issuable-details { section { .issuable-discussion { diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index bd629b5c519..981bf640a6b 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -1,3 +1,4 @@ +- @content_class = "limit-container-width" - page_title "#{@issue.title} (#{@issue.to_reference})", "Issues" - page_description @issue.description - page_card_attributes @issue.card_attributes diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 896f10104fa..0db5548d36e 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -1,3 +1,4 @@ +- @content_class = "limit-container-width" - page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests" - page_description @merge_request.description - page_card_attributes @merge_request.card_attributes