Show More
@@ -42,6 +42,26 b" c.template_context['visual']['default_re" | |||
|
42 | 42 | |
|
43 | 43 | ## JAVASCRIPT |
|
44 | 44 | <%def name="js()"> |
|
45 | <script> | |
|
46 | // setup Polymer options | |
|
47 | window.Polymer = {lazyRegister: true, dom: 'shadow'}; | |
|
48 | ||
|
49 | // load webcomponents polyfills | |
|
50 | (function() { | |
|
51 | if ('registerElement' in document | |
|
52 | && 'import' in document.createElement('link') | |
|
53 | && 'content' in document.createElement('template')) { | |
|
54 | // browser has web components | |
|
55 | } else { | |
|
56 | // polyfill web components | |
|
57 | var e = document.createElement('script'); | |
|
58 | e.src = '${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.min.js', ver=c.rhodecode_version_hash)}'; | |
|
59 | document.head.appendChild(e); | |
|
60 | } | |
|
61 | })(); | |
|
62 | </script> | |
|
63 | <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}" async> | |
|
64 | ||
|
45 | 65 | <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script> |
|
46 | 66 | <script type="text/javascript"> |
|
47 | 67 | // register templateContext to pass template variables to JS |
@@ -82,25 +102,6 b" c.template_context['visual']['default_re" | |||
|
82 | 102 | <!--[if lt IE 9]> |
|
83 | 103 | <script language="javascript" type="text/javascript" src="${h.asset('js/excanvas.min.js')}"></script> |
|
84 | 104 | <![endif]--> |
|
85 | <script> | |
|
86 | // setup Polymer options | |
|
87 | window.Polymer = {lazyRegister: true, dom: 'shadow'}; | |
|
88 | ||
|
89 | // load webcomponents polyfills | |
|
90 | (function() { | |
|
91 | if ('registerElement' in document | |
|
92 | && 'import' in document.createElement('link') | |
|
93 | && 'content' in document.createElement('template')) { | |
|
94 | // browser has web components | |
|
95 | } else { | |
|
96 | // polyfill web components | |
|
97 | var e = document.createElement('script'); | |
|
98 | e.src = '${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.min.js', ver=c.rhodecode_version_hash)}'; | |
|
99 | document.head.appendChild(e); | |
|
100 | } | |
|
101 | })(); | |
|
102 | </script> | |
|
103 | <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}"> | |
|
104 | 105 | <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script> |
|
105 | 106 | <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script> |
|
106 | 107 | ## avoide escaping the %N |
General Comments 0
You need to be logged in to leave comments.
Login now