mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
32 lines
729 B
JavaScript
32 lines
729 B
JavaScript
define(function (require) {
|
|
|
|
"use strict";
|
|
|
|
var $ = require('jquery'),
|
|
_ = require('underscore'),
|
|
Backbone = require('backbone'),
|
|
Marionette = require('marionette'),
|
|
Settings = require('app/models/settings'),
|
|
tpl = require('text!tpl/settings.html');
|
|
|
|
return Marionette.ItemView.extend({
|
|
template: _.template(tpl),
|
|
|
|
modelEvents: {
|
|
'change': 'render',
|
|
},
|
|
|
|
initialize: function () {
|
|
this.model = new Settings()
|
|
this.model.fetch();
|
|
},
|
|
|
|
templateHelpers: {
|
|
isTypeChecked: function(type) {
|
|
return this.type === type ? 'checked' : '';
|
|
},
|
|
},
|
|
});
|
|
|
|
});
|