mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-23 13:18:14 -05:00
31 lines
670 B
JavaScript
31 lines
670 B
JavaScript
|
'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'
|
||
|
};
|
||
|
}
|
||
|
|
||
|
});
|