markdown parsing

This commit is contained in:
Peter Cottle 2012-12-20 13:06:37 -08:00
parent 332c36e090
commit 79522a3560
4 changed files with 2211 additions and 7 deletions

File diff suppressed because it is too large Load diff

View file

@ -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"
}
}

View file

@ -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);
}
});

View file

@ -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