Initial implementation of tutorial pages

This commit is contained in:
Andrew Miner
2015-03-20 12:22:01 -07:00
parent ee5ff2b578
commit 89a7f7a9d3
26 changed files with 556 additions and 87 deletions
@@ -0,0 +1,40 @@
###
Crafting Guide - markdown_section_controller.coffee
Copyright (c) 2015 by Redwood Labs
All rights reserved.
###
BaseController = require './base_controller'
########################################################################################################################
module.exports = class MarkdownSectionController extends BaseController
constructor: (options={})->
options.model ?= ''
options.title ?= 'Description'
options.templateName = 'markdown_section'
super options
@title = options.title
# BaseController Overrides #####################################################################
onDidRender: ->
@$title = @$('h2')
@$markdownPanel = @$('.markdown')
super
refresh: ->
@$title.html @title
@$markdownPanel.empty()
@$markdownPanel.html _.parseMarkdown @model
super
# Backbone.View Overrides ######################################################################
events: ->
return _.extend super,
'click .markdown': 'routeLinkClick'