##// END OF EJS Templates
frontend: ensure polyfills are loaded as early as possible
ergo -
r880:36b5db0c default
parent child Browse files
Show More
@@ -1,129 +1,132 b''
1 ccLog = Logger.get('RhodeCodeApp');
1 ccLog = Logger.get('RhodeCodeApp');
2 ccLog.setLevel(Logger.OFF);
2 ccLog.setLevel(Logger.OFF);
3
3
4 var rhodeCodeApp = Polymer({
4 var rhodeCodeApp = Polymer({
5 is: 'rhodecode-app',
5 is: 'rhodecode-app',
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
18 /** proxy to channelstream connection */
21 /** proxy to channelstream connection */
19 getChannelStreamConnection: function () {
22 getChannelStreamConnection: function () {
20 return this.$['channelstream-connection'];
23 return this.$['channelstream-connection'];
21 },
24 },
22
25
23 handleNotifications: function (data) {
26 handleNotifications: function (data) {
24 this.$['notifications'].handleNotification(data);
27 this.$['notifications'].handleNotification(data);
25 },
28 },
26
29
27 /** opens connection to ws server */
30 /** opens connection to ws server */
28 kickoffChannelstreamPlugin: function (data) {
31 kickoffChannelstreamPlugin: function (data) {
29 ccLog.debug('kickoffChannelstreamPlugin');
32 ccLog.debug('kickoffChannelstreamPlugin');
30 var channels = ['broadcast'];
33 var channels = ['broadcast'];
31 var addChannels = this.checkViewChannels();
34 var addChannels = this.checkViewChannels();
32 for (var i = 0; i < addChannels.length; i++) {
35 for (var i = 0; i < addChannels.length; i++) {
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.$['channelstream-connection'];
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';
40 channelstreamConnection.longPollUrl = CHANNELSTREAM_URLS.longpoll + '/listen';
43 channelstreamConnection.longPollUrl = CHANNELSTREAM_URLS.longpoll + '/listen';
41 // some channels might already be registered by topic
44 // some channels might already be registered by topic
42 for (var i = 0; i < channels.length; i++) {
45 for (var i = 0; i < channels.length; i++) {
43 channelstreamConnection.push('channels', channels[i]);
46 channelstreamConnection.push('channels', channels[i]);
44 }
47 }
45 // append any additional channels registered in other plugins
48 // append any additional channels registered in other plugins
46 $.Topic('/connection_controller/subscribe').processPrepared();
49 $.Topic('/connection_controller/subscribe').processPrepared();
47 channelstreamConnection.connect();
50 channelstreamConnection.connect();
48 }
51 }
49 },
52 },
50
53
51 checkViewChannels: function () {
54 checkViewChannels: function () {
52 var channels = []
55 var channels = []
53 // subscribe to PR repo channel for PR's'
56 // subscribe to PR repo channel for PR's'
54 if (templateContext.pull_request_data.pull_request_id) {
57 if (templateContext.pull_request_data.pull_request_id) {
55 var channelName = '/repo$' + templateContext.repo_name + '$/pr/' +
58 var channelName = '/repo$' + templateContext.repo_name + '$/pr/' +
56 String(templateContext.pull_request_data.pull_request_id);
59 String(templateContext.pull_request_data.pull_request_id);
57 channels.push(channelName);
60 channels.push(channelName);
58 }
61 }
59 return channels;
62 return channels;
60 },
63 },
61
64
62 /** subscribes users from channels in channelstream */
65 /** subscribes users from channels in channelstream */
63 subscribeToChannelTopic: function (channels) {
66 subscribeToChannelTopic: function (channels) {
64 var channelstreamConnection = this.$['channelstream-connection'];
67 var channelstreamConnection = this.$['channelstream-connection'];
65 var toSubscribe = channelstreamConnection.calculateSubscribe(channels);
68 var toSubscribe = channelstreamConnection.calculateSubscribe(channels);
66 ccLog.debug('subscribeToChannelTopic', toSubscribe);
69 ccLog.debug('subscribeToChannelTopic', toSubscribe);
67 if (toSubscribe.length > 0) {
70 if (toSubscribe.length > 0) {
68 // if we are connected then subscribe
71 // if we are connected then subscribe
69 if (channelstreamConnection.connected) {
72 if (channelstreamConnection.connected) {
70 channelstreamConnection.subscribe(toSubscribe);
73 channelstreamConnection.subscribe(toSubscribe);
71 }
74 }
72 // not connected? just push channels onto the stack
75 // not connected? just push channels onto the stack
73 else {
76 else {
74 for (var i = 0; i < toSubscribe.length; i++) {
77 for (var i = 0; i < toSubscribe.length; i++) {
75 channelstreamConnection.push('channels', toSubscribe[i]);
78 channelstreamConnection.push('channels', toSubscribe[i]);
76 }
79 }
77 }
80 }
78 }
81 }
79 },
82 },
80
83
81 /** publish received messages into correct topic */
84 /** publish received messages into correct topic */
82 receivedMessage: function (event) {
85 receivedMessage: function (event) {
83 for (var i = 0; i < event.detail.length; i++) {
86 for (var i = 0; i < event.detail.length; i++) {
84 var message = event.detail[i];
87 var message = event.detail[i];
85 if (message.message.topic) {
88 if (message.message.topic) {
86 ccLog.debug('publishing', message.message.topic);
89 ccLog.debug('publishing', message.message.topic);
87 $.Topic(message.message.topic).publish(message);
90 $.Topic(message.message.topic).publish(message);
88 }
91 }
89 else if (message.type === 'presence'){
92 else if (message.type === 'presence'){
90 $.Topic('/connection_controller/presence').publish(message);
93 $.Topic('/connection_controller/presence').publish(message);
91 }
94 }
92 else {
95 else {
93 ccLog.warn('unhandled message', message);
96 ccLog.warn('unhandled message', message);
94 }
97 }
95 }
98 }
96 },
99 },
97
100
98 handleConnected: function (event) {
101 handleConnected: function (event) {
99 var channelstreamConnection = this.$['channelstream-connection'];
102 var channelstreamConnection = this.$['channelstream-connection'];
100 channelstreamConnection.set('channelsState',
103 channelstreamConnection.set('channelsState',
101 event.detail.channels_info);
104 event.detail.channels_info);
102 channelstreamConnection.set('userState', event.detail.state);
105 channelstreamConnection.set('userState', event.detail.state);
103 channelstreamConnection.set('channels', event.detail.channels);
106 channelstreamConnection.set('channels', event.detail.channels);
104 this.propagageChannelsState();
107 this.propagageChannelsState();
105 },
108 },
106 handleSubscribed: function (event) {
109 handleSubscribed: function (event) {
107 var channelstreamConnection = this.$['channelstream-connection'];
110 var channelstreamConnection = this.$['channelstream-connection'];
108 var channelInfo = event.detail.channels_info;
111 var channelInfo = event.detail.channels_info;
109 var channelKeys = Object.keys(event.detail.channels_info);
112 var channelKeys = Object.keys(event.detail.channels_info);
110 for (var i = 0; i < channelKeys.length; i++) {
113 for (var i = 0; i < channelKeys.length; i++) {
111 var key = channelKeys[i];
114 var key = channelKeys[i];
112 channelstreamConnection.set(['channelsState', key], channelInfo[key]);
115 channelstreamConnection.set(['channelsState', key], channelInfo[key]);
113 }
116 }
114 channelstreamConnection.set('channels', event.detail.channels);
117 channelstreamConnection.set('channels', event.detail.channels);
115 this.propagageChannelsState();
118 this.propagageChannelsState();
116 },
119 },
117 /** propagates channel states on topics */
120 /** propagates channel states on topics */
118 propagageChannelsState: function (event) {
121 propagageChannelsState: function (event) {
119 var channelstreamConnection = this.$['channelstream-connection'];
122 var channelstreamConnection = this.$['channelstream-connection'];
120 var channel_data = channelstreamConnection.channelsState;
123 var channel_data = channelstreamConnection.channelsState;
121 var channels = channelstreamConnection.channels;
124 var channels = channelstreamConnection.channels;
122 for (var i = 0; i < channels.length; i++) {
125 for (var i = 0; i < channels.length; i++) {
123 var key = channels[i];
126 var key = channels[i];
124 $.Topic('/connection_controller/channel_update').publish(
127 $.Topic('/connection_controller/channel_update').publish(
125 {channel: key, state: channel_data[key]}
128 {channel: key, state: channel_data[key]}
126 );
129 );
127 }
130 }
128 }
131 }
129 });
132 });
@@ -1,7 +1,8 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
4 /notifications - shows new event notifications
5 /notifications - shows new event notifications
5 /connection_controller/subscribe - subscribes user to new channels
6 /connection_controller/subscribe - subscribes user to new channels
6 /connection_controller/presence - receives presence change messages
7 /connection_controller/presence - receives presence change messages
7 /connection_controller/channel_update - receives channel states
8 /connection_controller/channel_update - receives channel states
@@ -1,181 +1,174 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html>
2 <!DOCTYPE html>
3
3
4 <%
4 <%
5 c.template_context['repo_name'] = getattr(c, 'repo_name', '')
5 c.template_context['repo_name'] = getattr(c, 'repo_name', '')
6
6
7 if hasattr(c, 'rhodecode_db_repo'):
7 if hasattr(c, 'rhodecode_db_repo'):
8 c.template_context['repo_type'] = c.rhodecode_db_repo.repo_type
8 c.template_context['repo_type'] = c.rhodecode_db_repo.repo_type
9 c.template_context['repo_landing_commit'] = c.rhodecode_db_repo.landing_rev[1]
9 c.template_context['repo_landing_commit'] = c.rhodecode_db_repo.landing_rev[1]
10
10
11 if getattr(c, 'rhodecode_user', None) and c.rhodecode_user.user_id:
11 if getattr(c, 'rhodecode_user', None) and c.rhodecode_user.user_id:
12 c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username
12 c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username
13 c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email
13 c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email
14 c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True)
14 c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True)
15
15
16 c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer')
16 c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer')
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()">
23 <meta name="robots" content="index, nofollow"/>
25 <meta name="robots" content="index, nofollow"/>
24 </%def>
26 </%def>
25 ${self.robots()}
27 ${self.robots()}
26 <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" />
28 <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" />
27
29
28 ## CSS definitions
30 ## CSS definitions
29 <%def name="css()">
31 <%def name="css()">
30 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
32 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
31 <!--[if lt IE 9]>
33 <!--[if lt IE 9]>
32 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/>
34 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/>
33 <![endif]-->
35 <![endif]-->
34 ## EXTRA FOR CSS
36 ## EXTRA FOR CSS
35 ${self.css_extra()}
37 ${self.css_extra()}
36 </%def>
38 </%def>
37 ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites
39 ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites
38 <%def name="css_extra()">
40 <%def name="css_extra()">
39 </%def>
41 </%def>
40
42
41 ${self.css()}
43 ${self.css()}
42
44
43 ## JAVASCRIPT
45 ## JAVASCRIPT
44 <%def name="js()">
46 <%def name="js()">
45 <script>
47 <script>
46 // setup Polymer options
48 // setup Polymer options
47 window.Polymer = {lazyRegister: true, dom: 'shadow'};
49 window.Polymer = {lazyRegister: true, dom: 'shadow'};
48
50
49 // Load webcomponentsjs polyfill if browser does not support native Web Components
51 // Load webcomponentsjs polyfill if browser does not support native Web Components
50 (function() {
52 (function() {
51 'use strict';
53 'use strict';
52 var onload = function() {
54 var onload = function() {
53 // For native Imports, manually fire WebComponentsReady so user code
55 // For native Imports, manually fire WebComponentsReady so user code
54 // can use the same code path for native and polyfill'd imports.
56 // can use the same code path for native and polyfill'd imports.
55 if (!window.HTMLImports) {
57 if (!window.HTMLImports) {
56 document.dispatchEvent(
58 document.dispatchEvent(
57 new CustomEvent('WebComponentsReady', {bubbles: true})
59 new CustomEvent('WebComponentsReady', {bubbles: true})
58 );
60 );
59 }
61 }
60 };
62 };
61 var webComponentsSupported = (
63 var webComponentsSupported = (
62 'registerElement' in document
64 'registerElement' in document
63 && 'import' in document.createElement('link')
65 && 'import' in document.createElement('link')
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 }
74 })();
72 })();
75 </script>
73 </script>
76
74
77 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
75 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
78 <script type="text/javascript">
76 <script type="text/javascript">
79 // register templateContext to pass template variables to JS
77 // register templateContext to pass template variables to JS
80 var templateContext = ${h.json.dumps(c.template_context)|n};
78 var templateContext = ${h.json.dumps(c.template_context)|n};
81
79
82 var REPO_NAME = "${getattr(c, 'repo_name', '')}";
80 var REPO_NAME = "${getattr(c, 'repo_name', '')}";
83 %if hasattr(c, 'rhodecode_db_repo'):
81 %if hasattr(c, 'rhodecode_db_repo'):
84 var REPO_LANDING_REV = '${c.rhodecode_db_repo.landing_rev[1]}';
82 var REPO_LANDING_REV = '${c.rhodecode_db_repo.landing_rev[1]}';
85 var REPO_TYPE = '${c.rhodecode_db_repo.repo_type}';
83 var REPO_TYPE = '${c.rhodecode_db_repo.repo_type}';
86 %else:
84 %else:
87 var REPO_LANDING_REV = '';
85 var REPO_LANDING_REV = '';
88 var REPO_TYPE = '';
86 var REPO_TYPE = '';
89 %endif
87 %endif
90 var APPLICATION_URL = "${h.url('home').rstrip('/')}";
88 var APPLICATION_URL = "${h.url('home').rstrip('/')}";
91 var ASSET_URL = "${h.asset('')}";
89 var ASSET_URL = "${h.asset('')}";
92 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
90 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
93 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
91 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
94 % if getattr(c, 'rhodecode_user', None):
92 % if getattr(c, 'rhodecode_user', None):
95 var USER = {name:'${c.rhodecode_user.username}'};
93 var USER = {name:'${c.rhodecode_user.username}'};
96 % else:
94 % else:
97 var USER = {name:null};
95 var USER = {name:null};
98 % endif
96 % endif
99
97
100 var APPENLIGHT = {
98 var APPENLIGHT = {
101 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
99 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
102 key: '${getattr(c, "appenlight_api_public_key", "")}',
100 key: '${getattr(c, "appenlight_api_public_key", "")}',
103 % if getattr(c, 'appenlight_server_url', None):
101 % if getattr(c, 'appenlight_server_url', None):
104 serverUrl: '${getattr(c, "appenlight_server_url", "")}',
102 serverUrl: '${getattr(c, "appenlight_server_url", "")}',
105 % endif
103 % endif
106 requestInfo: {
104 requestInfo: {
107 % if getattr(c, 'rhodecode_user', None):
105 % if getattr(c, 'rhodecode_user', None):
108 ip: '${c.rhodecode_user.ip_addr}',
106 ip: '${c.rhodecode_user.ip_addr}',
109 username: '${c.rhodecode_user.username}'
107 username: '${c.rhodecode_user.username}'
110 % endif
108 % endif
111 },
109 },
112 tags: {
110 tags: {
113 rhodecode_version: '${c.rhodecode_version}',
111 rhodecode_version: '${c.rhodecode_version}',
114 rhodecode_edition: '${c.rhodecode_edition}'
112 rhodecode_edition: '${c.rhodecode_edition}'
115 }
113 }
116 };
114 };
117 </script>
115 </script>
118 <%include file="/base/plugins_base.html"/>
116 <%include file="/base/plugins_base.html"/>
119 <!--[if lt IE 9]>
117 <!--[if lt IE 9]>
120 <script language="javascript" type="text/javascript" src="${h.asset('js/excanvas.min.js')}"></script>
118 <script language="javascript" type="text/javascript" src="${h.asset('js/excanvas.min.js')}"></script>
121 <![endif]-->
119 <![endif]-->
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
136 ${self.js_extra()}
129 ${self.js_extra()}
137
130
138 <script type="text/javascript">
131 <script type="text/javascript">
139 $(document).ready(function(){
132 $(document).ready(function(){
140 show_more_event();
133 show_more_event();
141 timeagoActivate();
134 timeagoActivate();
142 })
135 })
143 </script>
136 </script>
144
137
145 </%def>
138 </%def>
146
139
147 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
140 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
148 <%def name="js_extra()"></%def>
141 <%def name="js_extra()"></%def>
149 ${self.js()}
142 ${self.js()}
150
143
151 <%def name="head_extra()"></%def>
144 <%def name="head_extra()"></%def>
152 ${self.head_extra()}
145 ${self.head_extra()}
153 ## extra stuff
146 ## extra stuff
154 %if c.pre_code:
147 %if c.pre_code:
155 ${c.pre_code|n}
148 ${c.pre_code|n}
156 %endif
149 %endif
157 </head>
150 </head>
158 <body id="body">
151 <body id="body">
159 <noscript>
152 <noscript>
160 <div class="noscript-error">
153 <div class="noscript-error">
161 ${_('Please enable JavaScript to use RhodeCode Enterprise')}
154 ${_('Please enable JavaScript to use RhodeCode Enterprise')}
162 </div>
155 </div>
163 </noscript>
156 </noscript>
164 ## IE hacks
157 ## IE hacks
165 <!--[if IE 7]>
158 <!--[if IE 7]>
166 <script>$(document.body).addClass('ie7')</script>
159 <script>$(document.body).addClass('ie7')</script>
167 <![endif]-->
160 <![endif]-->
168 <!--[if IE 8]>
161 <!--[if IE 8]>
169 <script>$(document.body).addClass('ie8')</script>
162 <script>$(document.body).addClass('ie8')</script>
170 <![endif]-->
163 <![endif]-->
171 <!--[if IE 9]>
164 <!--[if IE 9]>
172 <script>$(document.body).addClass('ie9')</script>
165 <script>$(document.body).addClass('ie9')</script>
173 <![endif]-->
166 <![endif]-->
174
167
175 ${next.body()}
168 ${next.body()}
176 %if c.post_code:
169 %if c.post_code:
177 ${c.post_code|n}
170 ${c.post_code|n}
178 %endif
171 %endif
179 <rhodecode-app></rhodecode-app>
172 <rhodecode-app></rhodecode-app>
180 </body>
173 </body>
181 </html>
174 </html>
General Comments 0
You need to be logged in to leave comments. Login now