]> source.dussan.org Git - nextcloud-server.git/commitdiff
create an operation based on the correct model
authorMorris Jobke <hey@morrisjobke.de>
Tue, 26 Jul 2016 10:03:16 +0000 (12:03 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 27 Jul 2016 12:10:55 +0000 (14:10 +0200)
apps/workflowengine/js/admin.js

index a29ad82ab89969ff012de7fd46c85bdec1e2b2ac..f51352c45e4aac93eef99f2b3bd622c2ce7c69be 100644 (file)
                                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){