Merge pull request #7801 from cirosantilli/dry-zen-view
Factor zen mode.
This commit is contained in:
commit
8fd0d74bd8
5 changed files with 22 additions and 19 deletions
9
app/assets/stylesheets/generic/issuable.scss
Normal file
9
app/assets/stylesheets/generic/issuable.scss
Normal file
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Styles that apply to both issues and merge requests.
|
||||
*/
|
||||
|
||||
.issue-form, .merge-request-form {
|
||||
.description {
|
||||
height: 20em;
|
||||
}
|
||||
}
|
|
@ -7,12 +7,8 @@
|
|||
.form-group.issuable-description
|
||||
= f.label :description, 'Description', class: 'control-label'
|
||||
.col-sm-10
|
||||
.zennable
|
||||
%input#zen-toggle-comment{ tabindex: '-1', type: 'checkbox' }
|
||||
.zen-backdrop
|
||||
= f.text_area :description, rows: 14, class: 'form-control js-gfm-input markdown-area', placeholder: 'Leave a comment'
|
||||
%label{ for: 'zen-toggle-comment', class: 'expand' } Edit in fullscreen
|
||||
%label{ for: 'zen-toggle-comment', class: 'collapse' }
|
||||
= render 'projects/zen', f: f, attr: :description,
|
||||
classes: 'description form-control'
|
||||
.col-sm-12.hint
|
||||
.pull-left
|
||||
Parsed with
|
||||
|
|
7
app/views/projects/_zen.html.haml
Normal file
7
app/views/projects/_zen.html.haml
Normal file
|
@ -0,0 +1,7 @@
|
|||
.zennable
|
||||
%input#zen-toggle-comment{ tabindex: '-1', type: 'checkbox' }
|
||||
.zen-backdrop
|
||||
- classes << ' js-gfm-input markdown-area'
|
||||
= f.text_area attr, class: classes, placeholder: 'Leave a comment'
|
||||
%label{ for: 'zen-toggle-comment', class: 'expand' } Edit in fullscreen
|
||||
%label{ for: 'zen-toggle-comment', class: 'collapse' }
|
|
@ -21,12 +21,8 @@
|
|||
.form-group
|
||||
.light
|
||||
= f.label :description, "Description"
|
||||
.zennable
|
||||
%input#zen-toggle-comment{ tabindex: '-1', type: 'checkbox' }
|
||||
.zen-backdrop
|
||||
= f.text_area :description, class: 'form-control js-gfm-input markdown-area', rows: 10, placeholder: 'Leave a comment'
|
||||
%label{ for: 'zen-toggle-comment', class: 'expand' } Edit in fullscreen
|
||||
%label{ for: 'zen-toggle-comment', class: 'collapse' }
|
||||
= render 'projects/zen', f: f, attr: :description,
|
||||
classes: 'description form-control'
|
||||
.clearfix.hint
|
||||
.pull-left Description is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}.
|
||||
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }.
|
||||
|
|
|
@ -14,13 +14,8 @@
|
|||
Preview
|
||||
%div
|
||||
.note-write-holder
|
||||
.zennable
|
||||
%input#zen-toggle-comment{ tabindex: '-1', type: 'checkbox' }
|
||||
.zen-backdrop
|
||||
= f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input markdown-area', placeholder: 'Leave a comment'
|
||||
%label{ for: 'zen-toggle-comment', class: 'expand' } Edit in fullscreen
|
||||
%label{ for: 'zen-toggle-comment', class: 'collapse' }
|
||||
|
||||
= render 'projects/zen', f: f, attr: :note,
|
||||
classes: 'note_text js-note-text'
|
||||
.light.clearfix
|
||||
.pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }}
|
||||
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }.
|
||||
|
|
Loading…
Reference in a new issue