-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a markdown view with stubbed out methods, plus a markdown template. This view will retrieve and parse markdown. refs #820
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class = "markdown"> | ||
<%=parsedMarkdown%> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
define(["jquery", | ||
"underscore", | ||
"Backbone", | ||
"text!templates/markdown.html"], function($, _, Backbone, markdownTemplate){ | ||
|
||
/* The markdownView is a view that will retrieve and parse markdown */ | ||
var markdownView = Backbone.View.extend({ | ||
|
||
/* The markdown Element */ | ||
el: ".markdown", | ||
|
||
/* TODO: Decide if we need this */ | ||
type: "markdown", | ||
|
||
/* Renders the compiled template into HTML */ | ||
template: _.template(markdownTemplate), | ||
|
||
/* The events that this view listens to */ | ||
events: { | ||
|
||
}, | ||
|
||
/* Construct a new instance of markdownView */ | ||
initialize: function() { | ||
|
||
}, | ||
|
||
/* Render the view */ | ||
render: function() { | ||
|
||
}, | ||
|
||
/* Close and destroy the view */ | ||
onClose: function() { | ||
|
||
} | ||
|
||
}); | ||
|
||
return markdownView; | ||
}); |