mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Fix save server mods
This commit is contained in:
parent
ec0a0319f0
commit
b7ce00f096
@ -26,16 +26,17 @@ module.exports = Marionette.LayoutView.extend({
|
||||
|
||||
initialize: function () {
|
||||
this.filterValue = ''
|
||||
this.modsListView = new ListView({ collection: this.options.mods, filterValue: this.filterValue })
|
||||
},
|
||||
|
||||
updateFilter: function (event) {
|
||||
this.filterValue = event.target.value
|
||||
this.listView.currentView.filterValue = this.filterValue
|
||||
this.listView.currentView.render()
|
||||
this.modsListView.filterValue = this.filterValue
|
||||
this.modsListView.render()
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.listView.show(new ListView({ collection: this.options.mods, filterValue: this.filterValue }))
|
||||
this.listView.show(this.modsListView)
|
||||
},
|
||||
|
||||
refresh: function (event) {
|
||||
|
@ -9,11 +9,24 @@ var template = _.template(tpl)
|
||||
module.exports = ModsView.extend({
|
||||
template: template,
|
||||
|
||||
onRender: function () {
|
||||
this.listView.show(new ListView({
|
||||
modelEvents: {
|
||||
change: 'serverUpdated'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
ModsView.prototype.initialize.call(this, options)
|
||||
this.modsListView = new ListView({
|
||||
collection: this.options.mods,
|
||||
server: this.options.server,
|
||||
filterValue: this.filterValue
|
||||
}))
|
||||
})
|
||||
},
|
||||
|
||||
serverUpdated: function () {
|
||||
this.modsListView.render()
|
||||
},
|
||||
|
||||
serialize: function () {
|
||||
return this.modsListView.serialize()
|
||||
}
|
||||
})
|
||||
|
@ -41,7 +41,7 @@ module.exports = Marionette.LayoutView.extend({
|
||||
onRender: function () {
|
||||
this.infoView.show(new InfoView({ model: this.model }))
|
||||
this.missionsView.show(new MissionsView({ missions: this.missions, model: this.model }))
|
||||
this.modsView.show(new ModsView({ mods: this.mods, server: this.model }))
|
||||
this.modsView.show(new ModsView({ model: this.model, mods: this.mods, server: this.model }))
|
||||
this.parametersView.show(new ParametersListView({ model: this.model }))
|
||||
this.playersView.show(new PlayersView({ model: this.model }))
|
||||
this.settingsView.show(new FormView({ model: this.model }))
|
||||
@ -49,7 +49,6 @@ module.exports = Marionette.LayoutView.extend({
|
||||
|
||||
serverUpdated: function () {
|
||||
this.infoView.currentView.render()
|
||||
this.modsView.currentView.render()
|
||||
this.parametersView.currentView.render()
|
||||
this.playersView.currentView.render()
|
||||
this.settingsView.currentView.render()
|
||||
|
Loading…
Reference in New Issue
Block a user