1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
import { IDirective, IScope } from 'angular';
import ExpandOnClick from './ExpandOnClick';
export default function piwikExpandOnClick(): IDirective {
return {
restrict: 'A',
link: function expandOnClickLink(scope: IScope, element: JQuery) {
const binding = {
instance: null,
value: {
expander: element.find('.title').first()[0],
},
oldValue: null,
modifiers: {},
dir: {},
};
const wrapped = ExpandOnClick;
wrapped.mounted(element[0], binding);
element.on('$destroy', () => wrapped.unmounted(element[0], binding));
},
};
}
piwikExpandOnClick.$inject = [];
angular.module('piwikApp').directive('piwikExpandOnClick', piwikExpandOnClick);
|