summaryrefslogtreecommitdiff
path: root/web-ui/app/js/helpers/triggering.js
blob: 7c8ae1361bada12ecc5a4d1976ba1cdd9a2b0879 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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 || {});
      }
    };
  };
});