mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Improved save server performance
This commit is contained in:
parent
fab9fd572a
commit
0bc37645b3
@ -19,26 +19,34 @@ define(function (require) {
|
||||
rotationView: "#rotation",
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.missions = options.missions;
|
||||
this.server = options.server;
|
||||
|
||||
this.rotationCollection = new MissionRotations(this.server.get('missions'));
|
||||
modelEvents: {
|
||||
"change": "serverUpdated",
|
||||
},
|
||||
|
||||
onRender: function() {
|
||||
initialize: function (options) {
|
||||
this.missions = options.missions;
|
||||
this.model = options.server;
|
||||
|
||||
this.rotationCollection = new MissionRotations(this.model.get('missions'));
|
||||
|
||||
var self = this;
|
||||
|
||||
var availableListView = new AvailableListView({collection: this.missions});
|
||||
availableListView.on('add', function (model) {
|
||||
this.availableListView = new AvailableListView({collection: this.missions});
|
||||
this.availableListView.on('add', function (model) {
|
||||
self.rotationCollection.add([{
|
||||
name: model.get('name').replace('.pbo', ''),
|
||||
}]);
|
||||
});
|
||||
var rotationListView = new RotationListView({collection: this.rotationCollection});
|
||||
this.rotationListView = new RotationListView({collection: this.rotationCollection});
|
||||
},
|
||||
|
||||
this.availableView.show(availableListView);
|
||||
this.rotationView.show(rotationListView);
|
||||
onRender: function() {
|
||||
this.availableView.show(this.availableListView);
|
||||
this.rotationView.show(this.rotationListView);
|
||||
},
|
||||
|
||||
serverUpdated: function() {
|
||||
this.rotationCollection.set(this.model.get('missions'));
|
||||
},
|
||||
|
||||
serialize : function() {
|
||||
|
@ -49,7 +49,6 @@ define(function (require) {
|
||||
|
||||
serverUpdated: function() {
|
||||
this.infoView.currentView.render();
|
||||
this.missionsView.currentView.render();
|
||||
this.modsView.currentView.render();
|
||||
this.playersView.currentView.render();
|
||||
this.settingsView.currentView.render();
|
||||
|
Loading…
Reference in New Issue
Block a user