create an operation based on the correct model

This commit is contained in:
Morris Jobke 2016-07-26 12:03:16 +02:00
parent 2f42a3fc31
commit 8c31ac57ce
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 1 additions and 6 deletions

View File

@ -341,18 +341,13 @@
this._initialize('OCA\\WorkflowEngine\\Operation');
},
_initialize: function(classname) {
var data = {};
if (this.operationsClass !== null) {
data['class'] = this.operationsClass;
}
this.collection.fetch({data: {
'class': classname
}});
this.collection.once('sync', this.render, this);
},
add: function() {
var operation = new OCA.WorkflowEngine.Operation();
this.collection.add(operation);
var operation = this.collection.create();
this.renderOperation(operation);
},
renderOperation: function(operation){