You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
549 B
JavaScript
31 lines
549 B
JavaScript
10 years ago
|
define([
|
||
|
'underscore',
|
||
|
'marionette',
|
||
|
'lib/markdown',
|
||
|
'widgets/slide/template'
|
||
|
], function AppSlideWidget(_, Marionette, markdown, template) {
|
||
|
'use strict';
|
||
|
|
||
|
var SlideView = Marionette.ItemView.extend({
|
||
|
template: template,
|
||
|
|
||
|
ui: {
|
||
|
copy: '.copy',
|
||
|
code: 'pre.language-javascript'
|
||
|
},
|
||
|
|
||
|
modelEvents: {
|
||
|
change: 'render'
|
||
|
},
|
||
|
|
||
|
onRender: function onRender() {
|
||
|
var copy = this.model.get('copy');
|
||
|
if (copy) {
|
||
|
this.ui.copy.html(markdown(copy));
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
return SlideView;
|
||
|
});
|