1 |
efrain |
1 |
{{- /*
|
|
|
2 |
Link to JS Documentation created by `grunt jsdoc`.
|
|
|
3 |
|
|
|
4 |
Usage: `jsdoc [args]`
|
|
|
5 |
|
|
|
6 |
`args` are required:
|
|
|
7 |
module: the name of the amd module to be linked
|
|
|
8 |
class: the name of the class to be linked
|
|
|
9 |
event: the name of an AMD event to link to within the module
|
|
|
10 |
|
|
|
11 |
Examples:
|
|
|
12 |
|
|
|
13 |
Link to an 'core/toast' module:
|
|
|
14 |
{{< jsdoc module="core/toast" >}}
|
|
|
15 |
|
|
|
16 |
Link to the 'events' class:
|
|
|
17 |
{{< jsdoc class="events" >}}
|
|
|
18 |
|
|
|
19 |
Link to the 'fieldValidationFailed' event in the 'core_form/events' module:
|
|
|
20 |
{{< jsdoc module="core_form/events" event="fieldValidationFailed" >}}
|
|
|
21 |
|
|
|
22 |
*/ -}}
|
|
|
23 |
|
|
|
24 |
{{- $filelink := "" -}}
|
|
|
25 |
{{- $linktext := "" -}}
|
|
|
26 |
|
|
|
27 |
{{- if .Get "module" -}}
|
|
|
28 |
{{- $modulename := .Get "module" -}}
|
|
|
29 |
{{- $linktext := $modulename -}}
|
|
|
30 |
|
|
|
31 |
{{- with .Get "module" -}}
|
|
|
32 |
{{- $filelink = printf "module-%s.html" (replace $modulename "/" "_") -}}
|
|
|
33 |
{{- end -}}
|
|
|
34 |
|
|
|
35 |
{{- if .Get "event" -}}
|
|
|
36 |
{{- with .Get "event" -}}
|
|
|
37 |
{{- $filelink = printf "%s#~event:%s" $filelink . -}}
|
|
|
38 |
{{- $linktext = printf "event:%s" . -}}
|
|
|
39 |
{{- end -}}
|
|
|
40 |
{{- end -}}
|
|
|
41 |
|
|
|
42 |
<a href="http://JSDOC/{{ $filelink }}" target="_blank">{{ $linktext }}</a>
|
|
|
43 |
{{- end -}}
|
|
|
44 |
|
|
|
45 |
{{- with .Get "class" -}}
|
|
|
46 |
{{- $filelink = printf "%s.html" (replace . "/" "_") -}}
|
|
|
47 |
{{- $linktext = . -}}
|
|
|
48 |
|
|
|
49 |
<a href="http://JSDOC/{{ $filelink }}" target="_blank">{{ $linktext }}</a>
|
|
|
50 |
{{- end -}}
|
|
|
51 |
|
|
|
52 |
{{- /* Strip trailing newline. */ -}}
|