Extracted javascript templates

| Q                   | A
| ------------------- | ---
| Bug fix?            | no
| New feature?        | no
| BC breaks?          | no
| Tests pass?         | yes
| Scenarios pass?     | ?
| Checkstyle issues?  | no
| Changelog updated?  | no
| Fixed tickets       | 
| Doc PR              |