summaryrefslogtreecommitdiff
path: root/web-ui/app/js/helpers/triggering.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/helpers/triggering.js')
-rw-r--r--web-ui/app/js/helpers/triggering.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/web-ui/app/js/helpers/triggering.js b/web-ui/app/js/helpers/triggering.js
new file mode 100644
index 00000000..7c8ae136
--- /dev/null
+++ b/web-ui/app/js/helpers/triggering.js
@@ -0,0 +1,13 @@
+define([], function() {
+ 'use strict';
+
+ return function(that, event, data, on) {
+ return function() {
+ if(on) {
+ that.trigger(on, event, data || {});
+ } else {
+ that.trigger(event, data || {});
+ }
+ };
+ };
+});