summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/issue.js6
-rw-r--r--app/assets/javascripts/merge_request.js6
-rw-r--r--app/assets/stylesheets/framework/layout.scss4
-rw-r--r--app/assets/stylesheets/framework/variables.scss3
-rw-r--r--app/assets/stylesheets/pages/issuable.scss13
5 files changed, 32 insertions, 0 deletions
diff --git a/app/assets/javascripts/issue.js b/app/assets/javascripts/issue.js
index 8540b199aba..56a2b6a5295 100644
--- a/app/assets/javascripts/issue.js
+++ b/app/assets/javascripts/issue.js
@@ -11,6 +11,7 @@
function Issue() {
this.submitNoteForm = bind(this.submitNoteForm, this);
// Prevent duplicate event bindings
+ this.limitContainerWidth();
this.disableTaskList();
if ($('a.btn-close').length) {
this.initTaskList();
@@ -21,6 +22,11 @@
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 88c3636be6c..b3a1ec39c13 100644
--- a/app/assets/javascripts/merge_request.js
+++ b/app/assets/javascripts/merge_request.js
@@ -14,6 +14,7 @@
// Options:
// action - String, current controller action
//
+ this.limitContainerWidth();
this.opts = opts != null ? opts : {};
this.submitNoteForm = bind(this.submitNoteForm, this);
this.$el = $('.merge-request');
@@ -31,6 +32,11 @@
}
}
+ 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/framework/layout.scss b/app/assets/stylesheets/framework/layout.scss
index dfaf2f7f1d3..66711aa1804 100644
--- a/app/assets/stylesheets/framework/layout.scss
+++ b/app/assets/stylesheets/framework/layout.scss
@@ -26,6 +26,10 @@ body {
.container-limited {
max-width: $fixed-layout-width;
+
+ &.limit-container-width {
+ max-width: $limited-layout-width;
+ }
}
diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss
index 18716813c48..55d97b9219c 100644
--- a/app/assets/stylesheets/framework/variables.scss
+++ b/app/assets/stylesheets/framework/variables.scss
@@ -166,6 +166,9 @@ $row-hover-border: #b2d7ff;
$progress-color: #c0392b;
$header-height: 50px;
$fixed-layout-width: 1280px;
+$limited-layout-width: 958px;
+$line-length-width: 700px;
+$gl-avatar-size: 40px;
$error-exclamation-point: #e62958;
$border-radius-default: 2px;
$btn-transparent-color: #8f8f8f;
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index 90587b9425b..6c35496b846 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -1,3 +1,16 @@
+.container-limited.limit-container-width {
+ .issue-details {
+ .description,
+ .note-body {
+ p,
+ ul,
+ ol,
+ .code {
+ max-width: $line-length-width;
+ }
+ }
+ }
+}
.issuable-details {
section {
.issuable-discussion {