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