diff options
-rw-r--r-- | app/assets/javascripts/lib/text_utility.js.coffee | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/markdown_area.scss | 5 | ||||
-rw-r--r-- | app/views/projects/_md_preview.html.haml | 25 | ||||
-rw-r--r-- | app/views/projects/notes/_hints.html.haml | 11 |
4 files changed, 30 insertions, 13 deletions
diff --git a/app/assets/javascripts/lib/text_utility.js.coffee b/app/assets/javascripts/lib/text_utility.js.coffee index 3dcc5b24548..0a4ebb8381e 100644 --- a/app/assets/javascripts/lib/text_utility.js.coffee +++ b/app/assets/javascripts/lib/text_utility.js.coffee @@ -41,7 +41,7 @@ text, textArea.selectionStart, textArea.selectionEnd, - ("#{lineBreak}#{tag} #{selObj.toString()} \n") + ("#{lineBreak}#{tag}#{selObj.toString()} \n") ) $textArea.data('old-val', text).val(replaceWith); gl.text.undoManager.addUndo(oldVal, $textArea.val()) diff --git a/app/assets/stylesheets/framework/markdown_area.scss b/app/assets/stylesheets/framework/markdown_area.scss index fd885b38680..0b45691aae9 100644 --- a/app/assets/stylesheets/framework/markdown_area.scss +++ b/app/assets/stylesheets/framework/markdown_area.scss @@ -65,6 +65,11 @@ a { padding-top: 0; line-height: 1; + border-bottom: 1px solid $border-color; + + &.btn.btn-xs { + padding: 2px 5px; + } } } } diff --git a/app/views/projects/_md_preview.html.haml b/app/views/projects/_md_preview.html.haml index 28a28282fd3..9c242828c12 100644 --- a/app/views/projects/_md_preview.html.haml +++ b/app/views/projects/_md_preview.html.haml @@ -14,8 +14,29 @@ %span This is a confidential issue. Your comment will not be visible to the public. %li.pull-right - %button.zen-control.zen-control-full.js-zen-enter{ type: 'button', tabindex: -1 } - Go full screen + + %a.btn.btn-xs.js-md{ 'data-md-tag' => '**' } + =icon('bold fw') + %a.btn.btn-xs.js-md{ 'data-md-tag' => '*' } + =icon('italic fw') + %a.btn.btn-xs.js-md{ 'data-md-tag' => '`' } + =icon('code fw') + %a.btn.btn-xs.js-md.js-list{ 'data-md-tag' => '* ', 'data-md-prepend' => true } + =icon('list-ul fw') + %a.btn.btn-xs.js-md.js-list.hidden-xs{ 'data-md-tag' => '1. ', 'data-md-prepend' => true } + =icon('list-ol fw') + %a.btn.btn-xs.js-md.js-list.hidden-xs{ 'data-md-tag' => '* [ ] ', 'data-md-prepend' => true } + =icon('check-square-o fw') + %a.btn.btn-xs.js-md.js-list.hidden-xs{ 'data-md-tag' => '> ', 'data-md-prepend' => true } + =icon('quote-right fw') + + %a.btn.btn-xs.js-md.js-list.hidden-xs{ 'data-md-tag' => '!', 'data-md-prepend' => true } + =icon('tasks fw') + %a.btn.btn-xs.js-md.js-list.hidden-xs{ 'data-md-tag' => '#', 'data-md-prepend' => true } + =icon('exclamation-circle fw') + + %a.btn.btn-xs.js-zen-enter.hidden-xs + =icon('arrows-alt fw') .md-write-holder = yield diff --git a/app/views/projects/notes/_hints.html.haml b/app/views/projects/notes/_hints.html.haml index f26866468ce..7d1cbc62e86 100644 --- a/app/views/projects/notes/_hints.html.haml +++ b/app/views/projects/notes/_hints.html.haml @@ -5,13 +5,4 @@ is supported %button.toolbar-button.markdown-selector{ type: 'button', tabindex: '-1' } = icon('file-image-o', class: 'toolbar-button-icon') - Attach a file -.md-helper - %a.btn.btn-xs.js-md{ 'data-md-tag' => '**' } - =icon('bold fw') - %a.btn.btn-xs.js-md{ 'data-md-tag' => '*' } - =icon('italic fw') - %a.btn.btn-xs.js-md.js-list{ 'data-md-tag' => '*', 'data-md-prepend' => true } - =icon('list-ul fw') - %a.btn.btn-xs.js-md.js-list{ 'data-md-tag' => '1.', 'data-md-prepend' => true } - =icon('list-ol fw')
\ No newline at end of file + Attach a file
\ No newline at end of file |