##// END OF EJS Templates
Rename rhodecode.js to base.js
Bradley M. Kuhn -
r4188:6c0215b2 kallithea-2.2.5-r...
parent child Browse files
Show More
1 NO CONTENT: file renamed from kallithea/public/js/rhodecode.js to kallithea/public/js/base.js
NO CONTENT: file renamed from kallithea/public/js/rhodecode.js to kallithea/public/js/base.js
@@ -1,153 +1,153 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html>
2 <!DOCTYPE html>
3
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
5 <head>
6 <title>${self.title()}</title>
6 <title>${self.title()}</title>
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 <meta name="robots" content="index, nofollow"/>
8 <meta name="robots" content="index, nofollow"/>
9 <link rel="icon" href="${h.url('/images/favicon.ico')}" type="image/png" />
9 <link rel="icon" href="${h.url('/images/favicon.ico')}" type="image/png" />
10
10
11 ## CSS ###
11 ## CSS ###
12 <%def name="css()">
12 <%def name="css()">
13 <link rel="stylesheet" type="text/css" href="${h.url('/js/select2/select2.css', ver=c.rhodecode_version)}"/>
13 <link rel="stylesheet" type="text/css" href="${h.url('/js/select2/select2.css', ver=c.rhodecode_version)}"/>
14 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/>
14 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/>
15 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/>
15 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/>
16 <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.rhodecode_version)}" media="screen"/>
16 <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.rhodecode_version)}" media="screen"/>
17 ## EXTRA FOR CSS
17 ## EXTRA FOR CSS
18 ${self.css_extra()}
18 ${self.css_extra()}
19 </%def>
19 </%def>
20
20
21 <%def name="css_extra()"></%def>
21 <%def name="css_extra()"></%def>
22
22
23 ${self.css()}
23 ${self.css()}
24
24
25 %if c.ga_code:
25 %if c.ga_code:
26 <!-- Analytics -->
26 <!-- Analytics -->
27 <script type="text/javascript">
27 <script type="text/javascript">
28 var _gaq = _gaq || [];
28 var _gaq = _gaq || [];
29 _gaq.push(['_setAccount', '${c.ga_code}']);
29 _gaq.push(['_setAccount', '${c.ga_code}']);
30 _gaq.push(['_trackPageview']);
30 _gaq.push(['_trackPageview']);
31
31
32 (function() {
32 (function() {
33 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
33 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
34 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
34 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
35 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
35 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
36 })();
36 })();
37 </script>
37 </script>
38 %endif
38 %endif
39
39
40 ## JAVASCRIPT ##
40 ## JAVASCRIPT ##
41 <%def name="js()">
41 <%def name="js()">
42 <script type="text/javascript">
42 <script type="text/javascript">
43 //JS translations map
43 //JS translations map
44 var TRANSLATION_MAP = {
44 var TRANSLATION_MAP = {
45 'Add another comment':'${_("Add another comment")}',
45 'Add another comment':'${_("Add another comment")}',
46 'Stop following this repository':"${_('Stop following this repository')}",
46 'Stop following this repository':"${_('Stop following this repository')}",
47 'Start following this repository':"${_('Start following this repository')}",
47 'Start following this repository':"${_('Start following this repository')}",
48 'Group':"${_('Group')}",
48 'Group':"${_('Group')}",
49 'members':"${_('members')}",
49 'members':"${_('members')}",
50 'Loading ...':"${_('Loading ...')}",
50 'Loading ...':"${_('Loading ...')}",
51 'loading ...':"${_('loading ...')}",
51 'loading ...':"${_('loading ...')}",
52 'Search truncated': "${_('Search truncated')}",
52 'Search truncated': "${_('Search truncated')}",
53 'No matching files': "${_('No matching files')}",
53 'No matching files': "${_('No matching files')}",
54 'Open new pull request': "${_('Open new pull request')}",
54 'Open new pull request': "${_('Open new pull request')}",
55 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}",
55 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}",
56 'Show selected changesets __S -> __E': "${_('Show selected changesets __S -> __E')}",
56 'Show selected changesets __S -> __E': "${_('Show selected changesets __S -> __E')}",
57 'Show selected changeset __S': "${_('Show selected changeset __S')}",
57 'Show selected changeset __S': "${_('Show selected changeset __S')}",
58 'Selection link': "${_('Selection link')}",
58 'Selection link': "${_('Selection link')}",
59 'Collapse diff': "${_('Collapse diff')}",
59 'Collapse diff': "${_('Collapse diff')}",
60 'Expand diff': "${_('Expand diff')}",
60 'Expand diff': "${_('Expand diff')}",
61 'Failed to revoke permission': "${_('Failed to revoke permission')}",
61 'Failed to revoke permission': "${_('Failed to revoke permission')}",
62 'Confirm to revoke permission for {0}: {1} ?': "${_('confirm to revoke permission for {0}: {1} ?')}",
62 'Confirm to revoke permission for {0}: {1} ?': "${_('confirm to revoke permission for {0}: {1} ?')}",
63 'enabled': "${_('enabled')}",
63 'enabled': "${_('enabled')}",
64 'disabled': "${_('disabled')}",
64 'disabled': "${_('disabled')}",
65 'Select changeset': "${_('Select changeset')}",
65 'Select changeset': "${_('Select changeset')}",
66 'specify changeset': "${_('specify changeset')}",
66 'specify changeset': "${_('specify changeset')}",
67 'MSG_SORTASC': "${_('Click to sort ascending')}",
67 'MSG_SORTASC': "${_('Click to sort ascending')}",
68 'MSG_SORTDESC': "${_('Click to sort descending')}",
68 'MSG_SORTDESC': "${_('Click to sort descending')}",
69 'MSG_EMPTY': "${_('No records found.')}",
69 'MSG_EMPTY': "${_('No records found.')}",
70 'MSG_ERROR': "${_('Data error.')}",
70 'MSG_ERROR': "${_('Data error.')}",
71 'MSG_LOADING': "${_('Loading...')}",
71 'MSG_LOADING': "${_('Loading...')}",
72
72
73
73
74 };
74 };
75 var _TM = TRANSLATION_MAP;
75 var _TM = TRANSLATION_MAP;
76
76
77 var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}";
77 var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}";
78
78
79 var REPO_NAME = "";
79 var REPO_NAME = "";
80 %if hasattr(c, 'repo_name'):
80 %if hasattr(c, 'repo_name'):
81 var REPO_NAME = "${c.repo_name}";
81 var REPO_NAME = "${c.repo_name}";
82 %endif
82 %endif
83 </script>
83 </script>
84 <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script>
84 <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script>
85 <script type="text/javascript" src="${h.url('/js/jquery-1.10.2.min.js', ver=c.rhodecode_version)}"></script>
85 <script type="text/javascript" src="${h.url('/js/jquery-1.10.2.min.js', ver=c.rhodecode_version)}"></script>
86 <script type="text/javascript" src="${h.url('/js/bootstrap.js', ver=c.rhodecode_version)}"></script>
86 <script type="text/javascript" src="${h.url('/js/bootstrap.js', ver=c.rhodecode_version)}"></script>
87 <script type="text/javascript" src="${h.url('/js/select2/select2.js', ver=c.rhodecode_version)}"></script>
87 <script type="text/javascript" src="${h.url('/js/select2/select2.js', ver=c.rhodecode_version)}"></script>
88 <script type="text/javascript" src="${h.url('/js/mousetrap.js', ver=c.rhodecode_version)}"></script>
88 <script type="text/javascript" src="${h.url('/js/mousetrap.js', ver=c.rhodecode_version)}"></script>
89 <!--[if lt IE 9]>
89 <!--[if lt IE 9]>
90 <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script>
90 <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script>
91 <![endif]-->
91 <![endif]-->
92 <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script>
92 <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script>
93 <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script>
93 <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script>
94 <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.rhodecode_version)}"></script>
94 <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.rhodecode_version)}"></script>
95 <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script>
95 <script type="text/javascript" src="${h.url('/js/base.js', ver=c.rhodecode_version)}"></script>
96 ## EXTRA FOR JS
96 ## EXTRA FOR JS
97 ${self.js_extra()}
97 ${self.js_extra()}
98 <script type="text/javascript">
98 <script type="text/javascript">
99 (function(window,undefined){
99 (function(window,undefined){
100 // Prepare
100 // Prepare
101 var History = window.History; // Note: We are using a capital H instead of a lower h
101 var History = window.History; // Note: We are using a capital H instead of a lower h
102 if ( !History.enabled ) {
102 if ( !History.enabled ) {
103 // History.js is disabled for this browser.
103 // History.js is disabled for this browser.
104 // This is because we can optionally choose to support HTML4 browsers or not.
104 // This is because we can optionally choose to support HTML4 browsers or not.
105 return false;
105 return false;
106 }
106 }
107 })(window);
107 })(window);
108
108
109 YUE.onDOMReady(function(){
109 YUE.onDOMReady(function(){
110 tooltip_activate();
110 tooltip_activate();
111 show_more_event();
111 show_more_event();
112 show_changeset_tooltip();
112 show_changeset_tooltip();
113 // routes registration
113 // routes registration
114 pyroutes.register('home', "${h.url('home')}", []);
114 pyroutes.register('home', "${h.url('home')}", []);
115 pyroutes.register('new_gist', "${h.url('new_gist')}", []);
115 pyroutes.register('new_gist', "${h.url('new_gist')}", []);
116 pyroutes.register('gists', "${h.url('gists')}", []);
116 pyroutes.register('gists', "${h.url('gists')}", []);
117 pyroutes.register('new_repo', "${h.url('new_repo')}", []);
117 pyroutes.register('new_repo', "${h.url('new_repo')}", []);
118
118
119 pyroutes.register('summary_home', "${h.url('summary_home', repo_name='%(repo_name)s')}", ['repo_name']);
119 pyroutes.register('summary_home', "${h.url('summary_home', repo_name='%(repo_name)s')}", ['repo_name']);
120 pyroutes.register('changelog_home', "${h.url('changelog_home', repo_name='%(repo_name)s')}", ['repo_name']);
120 pyroutes.register('changelog_home', "${h.url('changelog_home', repo_name='%(repo_name)s')}", ['repo_name']);
121 pyroutes.register('files_home', "${h.url('files_home', repo_name='%(repo_name)s',revision='%(revision)s',f_path='%(f_path)s')}", ['repo_name', 'revision', 'f_path']);
121 pyroutes.register('files_home', "${h.url('files_home', repo_name='%(repo_name)s',revision='%(revision)s',f_path='%(f_path)s')}", ['repo_name', 'revision', 'f_path']);
122 pyroutes.register('edit_repo', "${h.url('edit_repo', repo_name='%(repo_name)s')}", ['repo_name']);
122 pyroutes.register('edit_repo', "${h.url('edit_repo', repo_name='%(repo_name)s')}", ['repo_name']);
123 pyroutes.register('edit_repo_perms', "${h.url('edit_repo_perms', repo_name='%(repo_name)s')}", ['repo_name']);
123 pyroutes.register('edit_repo_perms', "${h.url('edit_repo_perms', repo_name='%(repo_name)s')}", ['repo_name']);
124 pyroutes.register('pullrequest_home', "${h.url('pullrequest_home', repo_name='%(repo_name)s')}", ['repo_name']);
124 pyroutes.register('pullrequest_home', "${h.url('pullrequest_home', repo_name='%(repo_name)s')}", ['repo_name']);
125
125
126 pyroutes.register('toggle_following', "${h.url('toggle_following')}");
126 pyroutes.register('toggle_following', "${h.url('toggle_following')}");
127 pyroutes.register('changeset_info', "${h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
127 pyroutes.register('changeset_info', "${h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
128 pyroutes.register('repo_size', "${h.url('repo_size', repo_name='%(repo_name)s')}", ['repo_name']);
128 pyroutes.register('repo_size', "${h.url('repo_size', repo_name='%(repo_name)s')}", ['repo_name']);
129 pyroutes.register('changeset_comment_preview', "${h.url('changeset_comment_preview', repo_name='%(repo_name)s')}", ['repo_name']);
129 pyroutes.register('changeset_comment_preview', "${h.url('changeset_comment_preview', repo_name='%(repo_name)s')}", ['repo_name']);
130 pyroutes.register('repo_refs_data', "${h.url('repo_refs_data', repo_name='%(repo_name)s')}", ['repo_name']);
130 pyroutes.register('repo_refs_data', "${h.url('repo_refs_data', repo_name='%(repo_name)s')}", ['repo_name']);
131 })
131 })
132 </script>
132 </script>
133 </%def>
133 </%def>
134 <%def name="js_extra()"></%def>
134 <%def name="js_extra()"></%def>
135 ${self.js()}
135 ${self.js()}
136 <%def name="head_extra()"></%def>
136 <%def name="head_extra()"></%def>
137 ${self.head_extra()}
137 ${self.head_extra()}
138 </head>
138 </head>
139 <body id="body">
139 <body id="body">
140 ## IE hacks
140 ## IE hacks
141 <!--[if IE 7]>
141 <!--[if IE 7]>
142 <script>YUD.addClass(document.body,'ie7')</script>
142 <script>YUD.addClass(document.body,'ie7')</script>
143 <![endif]-->
143 <![endif]-->
144 <!--[if IE 8]>
144 <!--[if IE 8]>
145 <script>YUD.addClass(document.body,'ie8')</script>
145 <script>YUD.addClass(document.body,'ie8')</script>
146 <![endif]-->
146 <![endif]-->
147 <!--[if IE 9]>
147 <!--[if IE 9]>
148 <script>YUD.addClass(document.body,'ie9')</script>
148 <script>YUD.addClass(document.body,'ie9')</script>
149 <![endif]-->
149 <![endif]-->
150
150
151 ${next.body()}
151 ${next.body()}
152 </body>
152 </body>
153 </html>
153 </html>
General Comments 0
You need to be logged in to leave comments. Login now