projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Part of ACREP-80: new 'widget' parameter to team.newSearch
[mkws-moved-to-github.git]
/
src
/
mkws-handlebars.js
diff --git
a/src/mkws-handlebars.js
b/src/mkws-handlebars.js
index
606dc10
..
1572f89
100644
(file)
--- a/
src/mkws-handlebars.js
+++ b/
src/mkws-handlebars.js
@@
-97,6
+97,10
@@
Handlebars.registerHelper('mkws-index1', function(obj) {
return obj.data.index + 1;
});
return obj.data.index + 1;
});
+Handlebars.registerHelper('mkws-indexplus', function(delta, obj) {
+ return obj.data.index + delta;
+});
+
Handlebars.registerHelper('mkws-repeat', function(count, options) {
var out = "";
for (var i = 0; i < count; i++) {
Handlebars.registerHelper('mkws-repeat', function(count, options) {
var out = "";
for (var i = 0; i < count; i++) {
@@
-143,7
+147,8
@@
Handlebars.registerHelper('compare', function (lvalue, operator, rvalue, options
'>': function (l, r) { return l > r; },
'<=': function (l, r) { return l <= r; },
'>=': function (l, r) { return l >= r; },
'>': function (l, r) { return l > r; },
'<=': function (l, r) { return l <= r; },
'>=': function (l, r) { return l >= r; },
- 'typeof': function (l, r) { return typeof l == r; }
+ 'typeof': function (l, r) { return typeof l == r; },
+ 'matches': function (l, r) { return l.match(r); }
};
if (!operators[operator]) {
};
if (!operators[operator]) {