fix building WFE Handlebarstags/v17.0.0beta1
@@ -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: [], |
@@ -0,0 +1,7 @@ | |||
module.exports = function(classname) { | |||
var check = OCA.WorkflowEngine.getCheckByClass(classname); | |||
if (!_.isUndefined(check)) { | |||
return check['operators']; | |||
} | |||
return []; | |||
} |
@@ -0,0 +1,7 @@ | |||
module.exports = function(currentValue, itemValue) { | |||
if (currentValue === itemValue) { | |||
return 'selected="selected"'; | |||
} | |||
return ""; | |||
} |
@@ -31,11 +31,14 @@ module.exports = { | |||
}, | |||
{ | |||
test: /\.handlebars$/, | |||
loader: "handlebars-loader" | |||
} | |||
loader: "handlebars-loader", | |||
options: { | |||
helperDirs: path.join(__dirname, 'src/hbs_helpers'), | |||
} | |||
}, | |||
] | |||
}, | |||
resolve: { | |||
extensions: ['*', '.js'] | |||
extensions: ['*', '.js', '.handlebars'] | |||
} | |||
}; |