Commit ee10a1cc authored by tauriedavis's avatar tauriedavis

20916 Shorten line length of issues and mrs

parent 4f365066
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
function Issue() { function Issue() {
this.submitNoteForm = bind(this.submitNoteForm, this); this.submitNoteForm = bind(this.submitNoteForm, this);
// Prevent duplicate event bindings // Prevent duplicate event bindings
this.limitContainerWidth();
this.disableTaskList(); this.disableTaskList();
if ($('a.btn-close').length) { if ($('a.btn-close').length) {
this.initTaskList(); this.initTaskList();
...@@ -21,6 +22,11 @@ ...@@ -21,6 +22,11 @@
this.initCanCreateBranch(); this.initCanCreateBranch();
} }
Issue.prototype.limitContainerWidth = function() {
var $wrapper = $('.content-wrapper .container-fluid');
$wrapper.addClass('limit-container-width')
};
Issue.prototype.initTaskList = function() { Issue.prototype.initTaskList = function() {
$('.detail-page-description .js-task-list-container').taskList('enable'); $('.detail-page-description .js-task-list-container').taskList('enable');
return $(document).on('tasklist:changed', '.detail-page-description .js-task-list-container', this.updateTaskList); return $(document).on('tasklist:changed', '.detail-page-description .js-task-list-container', this.updateTaskList);
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
// Options: // Options:
// action - String, current controller action // action - String, current controller action
// //
this.limitContainerWidth();
this.opts = opts != null ? opts : {}; this.opts = opts != null ? opts : {};
this.submitNoteForm = bind(this.submitNoteForm, this); this.submitNoteForm = bind(this.submitNoteForm, this);
this.$el = $('.merge-request'); this.$el = $('.merge-request');
...@@ -31,6 +32,11 @@ ...@@ -31,6 +32,11 @@
} }
} }
MergeRequest.prototype.limitContainerWidth = function() {
var $wrapper = $('.content-wrapper .container-fluid');
$wrapper.addClass('limit-container-width')
};
// Local jQuery finder // Local jQuery finder
MergeRequest.prototype.$ = function(selector) { MergeRequest.prototype.$ = function(selector) {
return this.$el.find(selector); return this.$el.find(selector);
......
...@@ -26,6 +26,10 @@ body { ...@@ -26,6 +26,10 @@ body {
.container-limited { .container-limited {
max-width: $fixed-layout-width; max-width: $fixed-layout-width;
&.limit-container-width {
max-width: $limited-layout-width;
}
} }
......
...@@ -166,6 +166,9 @@ $row-hover-border: #b2d7ff; ...@@ -166,6 +166,9 @@ $row-hover-border: #b2d7ff;
$progress-color: #c0392b; $progress-color: #c0392b;
$header-height: 50px; $header-height: 50px;
$fixed-layout-width: 1280px; $fixed-layout-width: 1280px;
$limited-layout-width: 958px;
$line-length-width: 700px;
$gl-avatar-size: 40px;
$error-exclamation-point: #e62958; $error-exclamation-point: #e62958;
$border-radius-default: 2px; $border-radius-default: 2px;
$btn-transparent-color: #8f8f8f; $btn-transparent-color: #8f8f8f;
......
.container-limited.limit-container-width {
.issue-details {
.description,
.note-body {
p,
ul,
ol,
.code {
max-width: $line-length-width;
}
}
}
}
.issuable-details { .issuable-details {
section { section {
.issuable-discussion { .issuable-discussion {
......
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