summaryrefslogtreecommitdiff
path: root/assets/js/components/template.js
blob: c9ca9ab6d12d775cce24de0ddddff19e42945418 (plain)
1
2
3
4
5
6
7
8
9
10
11
KB.onClick('.js-template', function (e) {
    var template = KB.dom(e.target).data('template');
    var target = KB.dom(e.target).data('templateTarget');
    var targetField = KB.find(target);

    if (targetField) {
        targetField.build().value = template;
    }

    _KB.controllers.Dropdown.close();
});