Initial commit

This commit is contained in:
Jamie Curnow
2017-12-21 09:02:37 +10:00
parent dc830df253
commit 6e7435c35d
140 changed files with 19554 additions and 0 deletions

View File

@ -0,0 +1,33 @@
'use strict';
import Mn from 'backbone.marionette';
const template = require('./reconfigure.ejs');
const Api = require('../api');
const App = require('../main');
module.exports = Mn.View.extend({
template: template,
ui: {
buttons: 'form button',
reconfigure: 'button.reconfigure'
},
events: {
'click @ui.reconfigure': function (e) {
e.preventDefault();
this.ui.buttons.prop('disabled', true).addClass('btn-disabled');
Api.Hosts.reconfigure(this.model.get('_id'))
.then((/*result*/) => {
App.UI.closeModal();
})
.catch(err => {
alert(err.message);
this.ui.buttons.prop('disabled', false).removeClass('btn-disabled');
});
}
}
});