aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/src
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/src')
-rw-r--r--apps/workflowengine/src/admin.js16
-rw-r--r--apps/workflowengine/src/hbs_helpers/getOperators.js7
-rw-r--r--apps/workflowengine/src/hbs_helpers/selectItem.js7
3 files changed, 14 insertions, 16 deletions
diff --git a/apps/workflowengine/src/admin.js b/apps/workflowengine/src/admin.js
index f4635fe5b8c..92f485a8b4c 100644
--- a/apps/workflowengine/src/admin.js
+++ b/apps/workflowengine/src/admin.js
@@ -22,22 +22,6 @@ import OperationTemplate from './templates/operation.handlebars';
import OperationsTemplate from './templates/operations.handlebars';
(function() {
- Handlebars.registerHelper('selectItem', function(currentValue, itemValue) {
- if (currentValue === itemValue) {
- return 'selected="selected"';
- }
-
- return "";
- });
-
- Handlebars.registerHelper('getOperators', function(classname) {
- var check = OCA.WorkflowEngine.getCheckByClass(classname);
- if (!_.isUndefined(check)) {
- return check['operators'];
- }
- return [];
- });
-
OCA.WorkflowEngine = _.extend(OCA.WorkflowEngine || {}, {
availablePlugins: [],
availableChecks: [],
diff --git a/apps/workflowengine/src/hbs_helpers/getOperators.js b/apps/workflowengine/src/hbs_helpers/getOperators.js
new file mode 100644
index 00000000000..4e3606fe82c
--- /dev/null
+++ b/apps/workflowengine/src/hbs_helpers/getOperators.js
@@ -0,0 +1,7 @@
+module.exports = function(classname) {
+ var check = OCA.WorkflowEngine.getCheckByClass(classname);
+ if (!_.isUndefined(check)) {
+ return check['operators'];
+ }
+ return [];
+}
diff --git a/apps/workflowengine/src/hbs_helpers/selectItem.js b/apps/workflowengine/src/hbs_helpers/selectItem.js
new file mode 100644
index 00000000000..594e3debadd
--- /dev/null
+++ b/apps/workflowengine/src/hbs_helpers/selectItem.js
@@ -0,0 +1,7 @@
+module.exports = function(currentValue, itemValue) {
+ if (currentValue === itemValue) {
+ return 'selected="selected"';
+ }
+
+ return "";
+}