mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-01 02:04:26 +02:00
markdown parsing
This commit is contained in:
parent
332c36e090
commit
79522a3560
4 changed files with 2211 additions and 7 deletions
2197
build/bundle.js
2197
build/bundle.js
File diff suppressed because it is too large
Load diff
|
@ -14,6 +14,7 @@
|
|||
"backbone": "~0.9.9",
|
||||
"underscore": "~1.4.3",
|
||||
"jquery": "~1.8.3",
|
||||
"q": "~0.8.11"
|
||||
"q": "~0.8.11",
|
||||
"markdown": "~0.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,16 +151,29 @@ var ModalAlert = ContainedBase.extend({
|
|||
template: _.template($('#modal-alert-template').html()),
|
||||
|
||||
initialize: function(options) {
|
||||
options = options = {};
|
||||
options = options || {};
|
||||
this.JSON = {
|
||||
title: options.title || 'Something to say',
|
||||
text: options.text || 'Here is a paragraph'
|
||||
text: options.text || 'Here is a paragraph',
|
||||
markdown: options.markdown
|
||||
};
|
||||
|
||||
this.container = new ModalTerminal({
|
||||
title: 'Alert!'
|
||||
});
|
||||
this.render();
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var destination = this.destination || this.container.getInsideElement();
|
||||
var HTML = null;
|
||||
if (this.JSON.markdown) {
|
||||
HTML = require('markdown').markdown.toHTML(this.JSON.markdown);
|
||||
} else {
|
||||
HTML = this.template(this.JSON);
|
||||
}
|
||||
this.$el.html(HTML);
|
||||
$(destination).append(this.el);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
1
todo.txt
1
todo.txt
|
@ -27,6 +27,7 @@ Big Bugs to fix:
|
|||
Done things:
|
||||
(I only started this on Dec 17th 2012 to get a better sense of what was done)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
[x] markdown parsing yay!!
|
||||
[x] check animation for command entry fading nicely wtf
|
||||
[x] no more CSS ids in views
|
||||
[x] promise-based confirm cnacel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue