'change .check-operator': 'checkChanged',
'change .check-value': 'checkChanged',
'change .operation-name': 'operationChanged',
+ 'change .operation-operation': 'operationChanged',
'click .button-reset': 'reset',
'click .button-save': 'save',
'click .button-add': 'add',
return;
}
- if (key !== 'name') {
+ if (key !== 'name' && key !== 'operation') {
console.warn('key "' + key + '" is no valid attribute');
return;
}
}, 7000, this.$el.find('.msg.success'));
this.message = '';
}
+
+ return this.$el;
}
});
events: {
'click .button-add-operation': 'add'
},
- initialize: function() {
- this._initialize('OCA\\WorkflowEngine\\Operation');
- },
- _initialize: function(classname) {
+ initialize: function(classname) {
if (!OCA.WorkflowEngine.availablePlugins.length) {
OCA.WorkflowEngine.availablePlugins = OC.Plugins.getPlugins('OCA.WorkflowEngine.CheckPlugins');
_.each(OCA.WorkflowEngine.availablePlugins, function(plugin) {
var operation = this.collection.create();
this.renderOperation(operation);
},
- renderOperation: function(operation){
- var subView = new OCA.WorkflowEngine.OperationView({
- model: operation
- }),
- operationsElement = this.$el.find('.operations');
+ renderOperation: function(subView){
+ var operationsElement = this.$el.find('.operations');
operationsElement.append(subView.$el);
subView.render();
},
placeholder: t('workflowengine', 'Select tag…'),
query: _.debounce(function(query) {
query.callback({
- results: OCA.WorkflowEngine.Plugins.FileSystemTagsPlugin.collection.filterByName(query.term)
+ results: OC.SystemTags.collection.filterByName(query.term)
});
}, 100, true),
id: function(element) {
return OC.SystemTags.getDescriptiveTag(tag);
},
formatSelection: function (tagId) {
- tag = OCA.WorkflowEngine.Plugins.FileSystemTagsPlugin.collection.get(tagId);
+ var tag = OC.SystemTags.collection.get(tagId);
return OC.SystemTags.getDescriptiveTag(tag);
},
escapeMarkup: function(m) {