Ongoing rewrite work

This commit is contained in:
Jamie Curnow
2018-07-09 11:22:10 +10:00
parent 30924a6922
commit 54d220a191
72 changed files with 3656 additions and 113 deletions

View File

@ -0,0 +1,30 @@
'use strict';
const Mn = require('backbone.marionette');
const template = require('./main.ejs');
module.exports = Mn.View.extend({
className: 'text-center m-7',
template: template,
ui: {
action: 'a'
},
events: {
'click @ui.action': function (e) {
e.preventDefault();
this.getOption('action')();
}
},
templateContext: function () {
return {
title: this.getOption('title'),
subtitle: this.getOption('subtitle'),
link: this.getOption('link'),
action: typeof this.getOption('action') === 'function'
};
}
});