summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/src
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-05-14 11:51:01 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-05-15 11:24:12 +0200
commit738ca9f84915e6bb3eb769cc19fbfb24510c8349 (patch)
tree1df0e8e6e19c886bdd80479f8aec8b83fb289876 /apps/workflowengine/src
parentc41aa7a20929118ce1092c603f709d06aef1da57 (diff)
downloadnextcloud-server-738ca9f84915e6bb3eb769cc19fbfb24510c8349.tar.gz
nextcloud-server-738ca9f84915e6bb3eb769cc19fbfb24510c8349.zip
fix building WFE Handlebars
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
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 "";
+}