create an operation based on the correct model
This commit is contained in:
parent
2f42a3fc31
commit
8c31ac57ce
|
@ -341,18 +341,13 @@
|
||||||
this._initialize('OCA\\WorkflowEngine\\Operation');
|
this._initialize('OCA\\WorkflowEngine\\Operation');
|
||||||
},
|
},
|
||||||
_initialize: function(classname) {
|
_initialize: function(classname) {
|
||||||
var data = {};
|
|
||||||
if (this.operationsClass !== null) {
|
|
||||||
data['class'] = this.operationsClass;
|
|
||||||
}
|
|
||||||
this.collection.fetch({data: {
|
this.collection.fetch({data: {
|
||||||
'class': classname
|
'class': classname
|
||||||
}});
|
}});
|
||||||
this.collection.once('sync', this.render, this);
|
this.collection.once('sync', this.render, this);
|
||||||
},
|
},
|
||||||
add: function() {
|
add: function() {
|
||||||
var operation = new OCA.WorkflowEngine.Operation();
|
var operation = this.collection.create();
|
||||||
this.collection.add(operation);
|
|
||||||
this.renderOperation(operation);
|
this.renderOperation(operation);
|
||||||
},
|
},
|
||||||
renderOperation: function(operation){
|
renderOperation: function(operation){
|
||||||
|
|
Loading…
Reference in New Issue