Show More
@@ -6,12 +6,15 b' var rhodeCodeApp = Polymer({' | |||||
6 | attached: function () { |
|
6 | attached: function () { | |
7 | ccLog.debug('rhodeCodeApp created'); |
|
7 | ccLog.debug('rhodeCodeApp created'); | |
8 | $.Topic('/notifications').subscribe(this.handleNotifications.bind(this)); |
|
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 | for (var i = 0; i < alertMessagePayloads.length; i++) { |
|
15 | for (var i = 0; i < alertMessagePayloads.length; i++) { | |
11 | $.Topic('/notifications').publish(alertMessagePayloads[i]); |
|
16 | $.Topic('/notifications').publish(alertMessagePayloads[i]); | |
12 | } |
|
17 | } | |
13 | $.Topic('/connection_controller/subscribe').subscribe( |
|
|||
14 | this.subscribeToChannelTopic.bind(this)); |
|
|||
15 | this.kickoffChannelstreamPlugin(); |
|
18 | this.kickoffChannelstreamPlugin(); | |
16 | }, |
|
19 | }, | |
17 |
|
20 | |||
@@ -33,7 +36,7 b' var rhodeCodeApp = Polymer({' | |||||
33 | channels.push(addChannels[i]); |
|
36 | channels.push(addChannels[i]); | |
34 | } |
|
37 | } | |
35 | if (window.CHANNELSTREAM_SETTINGS && CHANNELSTREAM_SETTINGS.enabled){ |
|
38 | if (window.CHANNELSTREAM_SETTINGS && CHANNELSTREAM_SETTINGS.enabled){ | |
36 |
var channelstreamConnection = this. |
|
39 | var channelstreamConnection = this.getChannelStreamConnection(); | |
37 | channelstreamConnection.connectUrl = CHANNELSTREAM_URLS.connect; |
|
40 | channelstreamConnection.connectUrl = CHANNELSTREAM_URLS.connect; | |
38 | channelstreamConnection.subscribeUrl = CHANNELSTREAM_URLS.subscribe; |
|
41 | channelstreamConnection.subscribeUrl = CHANNELSTREAM_URLS.subscribe; | |
39 | channelstreamConnection.websocketUrl = CHANNELSTREAM_URLS.ws + '/ws'; |
|
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 | /plugins/__REGISTER__ - launched after the onDomReady() code from rhodecode.js is executed |
|
2 | /plugins/__REGISTER__ - launched after the onDomReady() code from rhodecode.js is executed | |
2 | /ui/plugins/code/anchor_focus - launched when rc starts to scroll on load to anchor on PR/Codeview |
|
3 | /ui/plugins/code/anchor_focus - launched when rc starts to scroll on load to anchor on PR/Codeview | |
3 | /ui/plugins/code/comment_form_built - launched when injectInlineForm() is executed and the form object is created |
|
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 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
18 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
19 | <head> |
|
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 | <title>${self.title()}</title> |
|
22 | <title>${self.title()}</title> | |
21 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
23 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
22 | <%def name="robots()"> |
|
24 | <%def name="robots()"> | |
@@ -64,10 +66,6 b" c.template_context['visual']['default_re" | |||||
64 | && 'content' in document.createElement('template') |
|
66 | && 'content' in document.createElement('template') | |
65 | ); |
|
67 | ); | |
66 | if (!webComponentsSupported) { |
|
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 | } else { |
|
69 | } else { | |
72 | onload(); |
|
70 | onload(); | |
73 | } |
|
71 | } | |
@@ -122,14 +120,9 b" c.template_context['visual']['default_re" | |||||
122 | <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script> |
|
120 | <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script> | |
123 | <script> var alertMessagePayloads = ${h.flash.json_alerts()|n}; </script> |
|
121 | <script> var alertMessagePayloads = ${h.flash.json_alerts()|n}; </script> | |
124 | <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script> |
|
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 | ## avoide escaping the %N |
|
123 | ## avoide escaping the %N | |
132 | <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script> |
|
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 | ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates |
|
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