diff --git a/src/coffee/controllers/markdown_section_controller.coffee b/src/coffee/controllers/markdown_section_controller.coffee index 8c659e69d..e13dc6f88 100644 --- a/src/coffee/controllers/markdown_section_controller.coffee +++ b/src/coffee/controllers/markdown_section_controller.coffee @@ -88,6 +88,10 @@ module.exports = class MarkdownSectionController extends BaseController @state = State.appologizing w(true).delay(@confirmDuration).then => @resetToDefaultState() + onQuestionClicked: (event)-> + event.preventDefault() + global.feedbackController.enterFeedback '' + onPreviewClicked: (event)-> event.preventDefault() @_updatePreview() @@ -162,6 +166,9 @@ module.exports = class MarkdownSectionController extends BaseController @on Event.change + ':imageBase', => @_imageListController.model.imageBase = @imageBase @listenTo @_imageListController, Event.change + ':valid', => @tryRefresh() + if not global.feedbackController? + @$('.question').hide duration:0 + @$errorText = @$('.error p') @$markdownPanel = @$('.markdown') @$previewButton = @$('button.preview') @@ -200,6 +207,7 @@ module.exports = class MarkdownSectionController extends BaseController 'click button.preview': 'onPreviewClicked' 'click button.return': 'onReturnClicked' 'click button.save': 'onSaveClicked' + 'click .question a': 'onQuestionClicked' 'input textarea': 'onTextChanged' # Private Methods ############################################################################## diff --git a/src/jade/templates/markdown_section.jade b/src/jade/templates/markdown_section.jade index ce2d25f29..02607f4f3 100644 --- a/src/jade/templates/markdown_section.jade +++ b/src/jade/templates/markdown_section.jade @@ -23,6 +23,7 @@ .image_list .buttons .error: p + .question: a(href="javascript:void;") Confused? Click here to ask a question! button.return return button.cancel cancel button.preview preview diff --git a/src/scss/templates/markdown_section.scss b/src/scss/templates/markdown_section.scss index e376f6661..c944fcb1c 100644 --- a/src/scss/templates/markdown_section.scss +++ b/src/scss/templates/markdown_section.scss @@ -50,6 +50,18 @@ All rights reserved. font-weight: bold; } } + + .question { + position: absolute; top: 50%; left: 1em; + + a { + color: $color-gray-medium; + font-family: $font-family-normal; + font-size: $font-size-small; + font-style: italic; + text-decoration: underline; + } + } } .creating {