Skip to content
Snippets Groups Projects
Unverified Commit 3ad1a6f1 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #15526 from nextcloud/fix/noid/building-wfe-handlebars

fix building WFE Handlebars
parents e8d187fd 738ca9f8
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -22,22 +22,6 @@ import OperationTemplate from './templates/operation.handlebars'; ...@@ -22,22 +22,6 @@ import OperationTemplate from './templates/operation.handlebars';
import OperationsTemplate from './templates/operations.handlebars'; import OperationsTemplate from './templates/operations.handlebars';
(function() { (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 || {}, { OCA.WorkflowEngine = _.extend(OCA.WorkflowEngine || {}, {
availablePlugins: [], availablePlugins: [],
availableChecks: [], availableChecks: [],
......
module.exports = function(classname) {
var check = OCA.WorkflowEngine.getCheckByClass(classname);
if (!_.isUndefined(check)) {
return check['operators'];
}
return [];
}
module.exports = function(currentValue, itemValue) {
if (currentValue === itemValue) {
return 'selected="selected"';
}
return "";
}
...@@ -31,11 +31,14 @@ module.exports = { ...@@ -31,11 +31,14 @@ module.exports = {
}, },
{ {
test: /\.handlebars$/, test: /\.handlebars$/,
loader: "handlebars-loader" loader: "handlebars-loader",
} options: {
helperDirs: path.join(__dirname, 'src/hbs_helpers'),
}
},
] ]
}, },
resolve: { resolve: {
extensions: ['*', '.js'] extensions: ['*', '.js', '.handlebars']
} }
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment