diff options
author | Darby <darbsies@gmail.com> | 2015-07-01 15:49:31 -0700 |
---|---|---|
committer | Darby <darbsies@gmail.com> | 2015-07-01 15:49:31 -0700 |
commit | c611b6f6238ce6ce164f173df551552ffe83f596 (patch) | |
tree | 261b2dcd83060a49e127edb1732d72e3a5a74670 | |
parent | 6288677134d0e6d1f805748bc557091ad4747bd9 (diff) | |
download | gitlab-ce-c611b6f6238ce6ce164f173df551552ffe83f596.tar.gz |
Comment box/Placeholder text redo
-rw-r--r-- | app/helpers/gitlab_markdown_helper.rb | 2 | ||||
-rw-r--r-- | app/views/projects/_zen.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/notes/_edit_form.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/notes/_form.html.haml | 9 | ||||
-rw-r--r-- | spec/helpers/gitlab_markdown_helper_spec.rb | 1 |
5 files changed, 11 insertions, 7 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index a801d3b10aa..f4c7a6494a9 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -118,7 +118,7 @@ module GitlabMarkdownHelper # Returns a random markdown tip for use as a textarea placeholder def random_markdown_tip - "Tip: #{MARKDOWN_TIPS.sample}" + "#{MARKDOWN_TIPS.sample}" end private diff --git a/app/views/projects/_zen.html.haml b/app/views/projects/_zen.html.haml index a4e41eeb363..6a41cdbc907 100644 --- a/app/views/projects/_zen.html.haml +++ b/app/views/projects/_zen.html.haml @@ -2,7 +2,7 @@ %input#zen-toggle-comment.zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } .zen-backdrop - classes << ' js-gfm-input markdown-area' - = f.text_area attr, class: classes, placeholder: random_markdown_tip + = f.text_area attr, class: classes, placeholder: '' = link_to nil, class: 'zen-enter-link', tabindex: '-1' do %i.fa.fa-expand Edit in fullscreen diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml index a663950f031..9c4c5dc0c7f 100644 --- a/app/views/projects/notes/_edit_form.html.haml +++ b/app/views/projects/notes/_edit_form.html.haml @@ -5,8 +5,8 @@ = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field' .comment-hints.clearfix - .pull-left Comments are parsed with #{link_to 'GitLab Flavored Markdown', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }} - .pull-right Attach files by dragging & dropping or #{link_to 'selecting them', '#', class: 'markdown-selector', tabindex: -1 }. + .pull-left #{link_to 'Markdown tip:', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }} + .pull-right #{link_to 'Attach a file', '#', class: 'markdown-selector', tabindex: -1 } .note-form-actions .buttons diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index 3fb044d736e..4c662336428 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -12,8 +12,13 @@ classes: 'note_text js-note-text' .comment-hints.clearfix - .pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }} - .pull-right Attach files by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }. + .pull-left + = link_to "Markdown tip:", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 } + = random_markdown_tip + .pull-right + = link_to '#', class: 'markdown-selector', tabindex: -1 do + Attach a file + = icon('paperclip') .error-alert .note-form-actions diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb index 14c8c29d008..30a15b974bd 100644 --- a/spec/helpers/gitlab_markdown_helper_spec.rb +++ b/spec/helpers/gitlab_markdown_helper_spec.rb @@ -137,7 +137,6 @@ describe GitlabMarkdownHelper do describe 'random_markdown_tip' do it 'returns a random Markdown tip' do stub_const("#{described_class}::MARKDOWN_TIPS", ['Random tip']) - expect(random_markdown_tip).to eq 'Tip: Random tip' end end end |