diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-11-16 22:18:01 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-01-04 23:37:54 +0300 |
commit | 2193ccec3d0cee689f7c62e4959a80589793af71 (patch) | |
tree | 558d070ca29786995b1018757eaca2851f0ed562 /app | |
parent | 18165f97858f0ea12668bec9045998dee5212ecf (diff) | |
download | gitlab-ce-2193ccec3d0cee689f7c62e4959a80589793af71.tar.gz |
Fix warning styling for responsive design.
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/lib/utils/common_utils.js | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/note_form.scss | 16 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/notes.scss | 17 | ||||
-rw-r--r-- | app/views/projects/notes/_edit_form.html.haml | 4 |
4 files changed, 20 insertions, 21 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index 06f85897f1a..7e8d97e27db 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -133,12 +133,12 @@ var rect = el.getBoundingClientRect(); var height = Math.max(document.documentElement.clientHeight, window.innerHeight); return !(rect.bottom - 110 < 0 || rect.top - height >= 0); // -110 for sticky GitLab navigation header - } + }; gl.utils.animateToElement = function($el) { return $('body, html').animate({ scrollTop: $el.offset().top - 110 }, 200); - } + }; }).call(this); diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss index e54e12be82f..1ef757147a2 100644 --- a/app/assets/stylesheets/pages/note_form.scss +++ b/app/assets/stylesheets/pages/note_form.scss @@ -27,6 +27,7 @@ .new-note, .note-edit-form { .note-form-actions { + position: relative; margin-top: $gl-padding; } @@ -265,3 +266,18 @@ } } } + +.note-edit-warning.settings-message { + display: none; + padding: 5px 10px; + position: absolute; + left: 127px; + top: 2px; + + @media (max-width: $screen-xs-max) { + position: relative; + top: 0; + left: 0; + margin-bottom: 10px; + } +} diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 4eb81473e2b..3d111f6bfcb 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -586,23 +586,6 @@ ul.notes { } } -// Merge request notes in diffs -.diff-file { - - // Diff is side by side - .notes_content.parallel .note-header .note-headline-light { - display: block; - position: relative; - } - - // Diff is inline - .notes_content .note-header .note-headline-light { - display: inline-block; - position: relative; - } -} - - .note-edit-warning.settings-message { display: none; position: relative; diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml index 8b09eae38f0..26ec4848c31 100644 --- a/app/views/projects/notes/_edit_form.html.haml +++ b/app/views/projects/notes/_edit_form.html.haml @@ -8,8 +8,8 @@ = render 'projects/notes/hints' .note-form-actions.clearfix - = submit_tag 'Save Comment', class: 'btn btn-nr btn-save js-comment-button' - %span.settings-message.note-edit-warning.js-edit-warning + .settings-message.note-edit-warning.js-edit-warning Finish editing this message first! + = submit_tag 'Save Comment', class: 'btn btn-nr btn-save js-comment-button' %button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' } Cancel |