Show More
@@ -6,12 +6,15 b' var rhodeCodeApp = Polymer({' | |||
|
6 | 6 | attached: function () { |
|
7 | 7 | ccLog.debug('rhodeCodeApp created'); |
|
8 | 8 | $.Topic('/notifications').subscribe(this.handleNotifications.bind(this)); |
|
9 | $.Topic('/connection_controller/subscribe').subscribe( | |
|
10 | this.subscribeToChannelTopic.bind(this)); | |
|
11 | // this event can be used to coordinate plugins to do their | |
|
12 | // initialization before channelstream is kicked off | |
|
13 | $.Topic('/__MAIN_APP__').publish({}); | |
|
9 | 14 | |
|
10 | 15 | for (var i = 0; i < alertMessagePayloads.length; i++) { |
|
11 | 16 | $.Topic('/notifications').publish(alertMessagePayloads[i]); |
|
12 | 17 | } |
|
13 | $.Topic('/connection_controller/subscribe').subscribe( | |
|
14 | this.subscribeToChannelTopic.bind(this)); | |
|
15 | 18 | this.kickoffChannelstreamPlugin(); |
|
16 | 19 | }, |
|
17 | 20 | |
@@ -33,7 +36,7 b' var rhodeCodeApp = Polymer({' | |||
|
33 | 36 | channels.push(addChannels[i]); |
|
34 | 37 | } |
|
35 | 38 | if (window.CHANNELSTREAM_SETTINGS && CHANNELSTREAM_SETTINGS.enabled){ |
|
36 |
var channelstreamConnection = this. |
|
|
39 | var channelstreamConnection = this.getChannelStreamConnection(); | |
|
37 | 40 | channelstreamConnection.connectUrl = CHANNELSTREAM_URLS.connect; |
|
38 | 41 | channelstreamConnection.subscribeUrl = CHANNELSTREAM_URLS.subscribe; |
|
39 | 42 | channelstreamConnection.websocketUrl = CHANNELSTREAM_URLS.ws + '/ws'; |
@@ -1,3 +1,4 b'' | |||
|
1 | /__MAIN_APP__ - launched when rhodecode-app element is attached to DOM | |
|
1 | 2 | /plugins/__REGISTER__ - launched after the onDomReady() code from rhodecode.js is executed |
|
2 | 3 | /ui/plugins/code/anchor_focus - launched when rc starts to scroll on load to anchor on PR/Codeview |
|
3 | 4 | /ui/plugins/code/comment_form_built - launched when injectInlineForm() is executed and the form object is created |
@@ -17,6 +17,8 b" c.template_context['visual']['default_re" | |||
|
17 | 17 | %> |
|
18 | 18 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
19 | 19 | <head> |
|
20 | <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.min.js', ver=c.rhodecode_version_hash)}"></script> | |
|
21 | <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}"> | |
|
20 | 22 | <title>${self.title()}</title> |
|
21 | 23 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
22 | 24 | <%def name="robots()"> |
@@ -64,10 +66,6 b" c.template_context['visual']['default_re" | |||
|
64 | 66 | && 'content' in document.createElement('template') |
|
65 | 67 | ); |
|
66 | 68 | if (!webComponentsSupported) { |
|
67 | var e = document.createElement('script'); | |
|
68 | e.async = true; | |
|
69 | e.src = '${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.min.js', ver=c.rhodecode_version_hash)}'; | |
|
70 | document.head.appendChild(e); | |
|
71 | 69 | } else { |
|
72 | 70 | onload(); |
|
73 | 71 | } |
@@ -122,14 +120,9 b" c.template_context['visual']['default_re" | |||
|
122 | 120 | <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script> |
|
123 | 121 | <script> var alertMessagePayloads = ${h.flash.json_alerts()|n}; </script> |
|
124 | 122 | <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script> |
|
125 | <script> | |
|
126 | var e = document.createElement('script'); | |
|
127 | e.src = '${h.asset('js/rhodecode-components.js', ver=c.rhodecode_version_hash)}'; | |
|
128 | document.head.appendChild(e); | |
|
129 | </script> | |
|
130 | <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}"> | |
|
131 | 123 | ## avoide escaping the %N |
|
132 | 124 | <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script> |
|
125 | <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode-components.js', ver=c.rhodecode_version_hash)}"></script> | |
|
133 | 126 | |
|
134 | 127 | |
|
135 | 128 | ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates |
General Comments 0
You need to be logged in to leave comments.
Login now