github.com/manicqin/nomad@v0.9.5/ui/app/helpers/lazy-click.js (about)

     1  import Helper from '@ember/component/helper';
     2  import $ from 'jquery';
     3  
     4  /**
     5   * Lazy Click Event
     6   *
     7   * Usage: {{lazy-click action}}
     8   *
     9   * Calls the provided action only if the target isn't an anchor
    10   * that should be handled instead.
    11   */
    12  export function lazyClick([onClick, event]) {
    13    if (!$(event.target).is('a')) {
    14      onClick(event);
    15    }
    16  }
    17  
    18  export default Helper.helper(lazyClick);