summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/helpers
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-09-29 13:03:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-09-29 13:03:17 +0200
commit6a997661dc5c259f844531382a90a4ca120f1233 (patch)
tree085a76d4bac208963649a62f9393e0c0b049e869 /pyload/web/app/scripts/helpers
parentrewritten decrypter and info fetching thread (diff)
downloadpyload-6a997661dc5c259f844531382a90a4ca120f1233.tar.xz
basics for web setup
Diffstat (limited to 'pyload/web/app/scripts/helpers')
-rw-r--r--pyload/web/app/scripts/helpers/ifEq.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/pyload/web/app/scripts/helpers/ifEq.js b/pyload/web/app/scripts/helpers/ifEq.js
new file mode 100644
index 000000000..1c8a71b61
--- /dev/null
+++ b/pyload/web/app/scripts/helpers/ifEq.js
@@ -0,0 +1,14 @@
+define('helpers/ifEq', ['underscore', 'handlebars'],
+ function(_, Handlebars) {
+ /*jshint validthis:true */
+ 'use strict';
+ function ifEq(v1, v2, options) {
+ if (v1 === v2) {
+ return options.fn(this);
+ }
+ return options.inverse(this);
+ }
+
+ Handlebars.registerHelper('ifEq', ifEq);
+ return ifEq;
+ });