##// END OF EJS Templates
components: small order of elements change and a cleanup
ergo -
r983:c5d592d8 default
parent child Browse files
Show More
@@ -5,14 +5,14 b''
5
5
6 <dom-module id="rhodecode-app">
6 <dom-module id="rhodecode-app">
7 <template>
7 <template>
8 <rhodecode-favicon></rhodecode-favicon>
9 <rhodecode-toast id="notifications"></rhodecode-toast>
10 <channelstream-connection
8 <channelstream-connection
11 id="channelstream-connection"
9 id="channelstream-connection"
12 on-channelstream-listen-message="receivedMessage"
10 on-channelstream-listen-message="receivedMessage"
13 on-channelstream-connected="handleConnected"
11 on-channelstream-connected="handleConnected"
14 on-channelstream-subscribed="handleSubscribed">
12 on-channelstream-subscribed="handleSubscribed">
15 </channelstream-connection>
13 </channelstream-connection>
14 <rhodecode-favicon></rhodecode-favicon>
15 <rhodecode-toast id="notifications"></rhodecode-toast>
16 </template>
16 </template>
17 <script src="rhodecode-app.js"></script>
17 <script src="rhodecode-app.js"></script>
18 </dom-module>
18 </dom-module>
@@ -69,7 +69,7 b' var rhodeCodeApp = Polymer({'
69
69
70 /** subscribes users from channels in channelstream */
70 /** subscribes users from channels in channelstream */
71 subscribeToChannelTopic: function (channels) {
71 subscribeToChannelTopic: function (channels) {
72 var channelstreamConnection = this.$['channelstream-connection'];
72 var channelstreamConnection = this.getChannelStreamConnection();
73 var toSubscribe = channelstreamConnection.calculateSubscribe(channels);
73 var toSubscribe = channelstreamConnection.calculateSubscribe(channels);
74 ccLog.debug('subscribeToChannelTopic', toSubscribe);
74 ccLog.debug('subscribeToChannelTopic', toSubscribe);
75 if (toSubscribe.length > 0) {
75 if (toSubscribe.length > 0) {
@@ -104,7 +104,7 b' var rhodeCodeApp = Polymer({'
104 },
104 },
105
105
106 handleConnected: function (event) {
106 handleConnected: function (event) {
107 var channelstreamConnection = this.$['channelstream-connection'];
107 var channelstreamConnection = this.getChannelStreamConnection();
108 channelstreamConnection.set('channelsState',
108 channelstreamConnection.set('channelsState',
109 event.detail.channels_info);
109 event.detail.channels_info);
110 channelstreamConnection.set('userState', event.detail.state);
110 channelstreamConnection.set('userState', event.detail.state);
@@ -112,7 +112,7 b' var rhodeCodeApp = Polymer({'
112 this.propagageChannelsState();
112 this.propagageChannelsState();
113 },
113 },
114 handleSubscribed: function (event) {
114 handleSubscribed: function (event) {
115 var channelstreamConnection = this.$['channelstream-connection'];
115 var channelstreamConnection = this.getChannelStreamConnection();
116 var channelInfo = event.detail.channels_info;
116 var channelInfo = event.detail.channels_info;
117 var channelKeys = Object.keys(event.detail.channels_info);
117 var channelKeys = Object.keys(event.detail.channels_info);
118 for (var i = 0; i < channelKeys.length; i++) {
118 for (var i = 0; i < channelKeys.length; i++) {
@@ -124,7 +124,7 b' var rhodeCodeApp = Polymer({'
124 },
124 },
125 /** propagates channel states on topics */
125 /** propagates channel states on topics */
126 propagageChannelsState: function (event) {
126 propagageChannelsState: function (event) {
127 var channelstreamConnection = this.$['channelstream-connection'];
127 var channelstreamConnection = this.getChannelStreamConnection();
128 var channel_data = channelstreamConnection.channelsState;
128 var channel_data = channelstreamConnection.channelsState;
129 var channels = channelstreamConnection.channels;
129 var channels = channelstreamConnection.channels;
130 for (var i = 0; i < channels.length; i++) {
130 for (var i = 0; i < channels.length; i++) {
General Comments 0
You need to be logged in to leave comments. Login now