Show More
@@ -1,135 +1,135 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
3 | 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 | 4 | <head> |
|
5 | 5 | <title>${self.title()}</title> |
|
6 | 6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
7 | 7 | <meta name="robots" content="index, nofollow"/> |
|
8 | 8 | <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> |
|
9 | 9 | |
|
10 | 10 | ## CSS ### |
|
11 | 11 | <%def name="css()"> |
|
12 | 12 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen"/> |
|
13 | 13 | <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css')}"/> |
|
14 | 14 | ## EXTRA FOR CSS |
|
15 | 15 | ${self.css_extra()} |
|
16 | 16 | </%def> |
|
17 | 17 | <%def name="css_extra()"> |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | ${self.css()} |
|
21 | 21 | |
|
22 | 22 | %if c.ga_code: |
|
23 | 23 | <!-- Analytics --> |
|
24 | 24 | <script type="text/javascript"> |
|
25 | 25 | var _gaq = _gaq || []; |
|
26 | 26 | _gaq.push(['_setAccount', '${c.ga_code}']); |
|
27 | 27 | _gaq.push(['_trackPageview']); |
|
28 | 28 | |
|
29 | 29 | (function() { |
|
30 | 30 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
|
31 | 31 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
|
32 | 32 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
|
33 | 33 | })(); |
|
34 | 34 | </script> |
|
35 | 35 | %endif |
|
36 | 36 | |
|
37 | 37 | ## JAVASCRIPT ## |
|
38 | 38 | <%def name="js()"> |
|
39 | 39 | <script type="text/javascript" src="${h.url('/js/yui.2.9.js')}"></script> |
|
40 | <!--[if IE]> | |
|
40 | <!--[if lt IE 9]> | |
|
41 | 41 | <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script> |
|
42 | 42 | <![endif]--> |
|
43 | 43 | <script type="text/javascript" src="${h.url('/js/yui.flot.js')}"></script> |
|
44 | 44 | <script type="text/javascript" src="${h.url('/js/rhodecode.js')}"></script> |
|
45 | 45 | ## EXTRA FOR JS |
|
46 | 46 | ${self.js_extra()} |
|
47 | 47 | |
|
48 | 48 | <script type="text/javascript"> |
|
49 | 49 | var follow_base_url = "${h.url('toggle_following')}"; |
|
50 | 50 | var stop_follow_text = "${_('Stop following this repository')}"; |
|
51 | 51 | var start_follow_text = "${_('Start following this repository')}"; |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | var onSuccessFollow = function(target){ |
|
55 | 55 | var f = YUD.get(target.id); |
|
56 | 56 | var f_cnt = YUD.get('current_followers_count'); |
|
57 | 57 | |
|
58 | 58 | if(f.getAttribute('class')=='follow'){ |
|
59 | 59 | f.setAttribute('class','following'); |
|
60 | 60 | f.setAttribute('title',stop_follow_text); |
|
61 | 61 | |
|
62 | 62 | if(f_cnt){ |
|
63 | 63 | var cnt = Number(f_cnt.innerHTML)+1; |
|
64 | 64 | f_cnt.innerHTML = cnt; |
|
65 | 65 | } |
|
66 | 66 | } |
|
67 | 67 | else{ |
|
68 | 68 | f.setAttribute('class','follow'); |
|
69 | 69 | f.setAttribute('title',start_follow_text); |
|
70 | 70 | if(f_cnt){ |
|
71 | 71 | var cnt = Number(f_cnt.innerHTML)+1; |
|
72 | 72 | f_cnt.innerHTML = cnt; |
|
73 | 73 | } |
|
74 | 74 | } |
|
75 | 75 | } |
|
76 | 76 | |
|
77 | 77 | var toggleFollowingUser = function(target,fallows_user_id,token,user_id){ |
|
78 | 78 | args = 'follows_user_id='+fallows_user_id; |
|
79 | 79 | args+= '&auth_token='+token; |
|
80 | 80 | if(user_id != undefined){ |
|
81 | 81 | args+="&user_id="+user_id; |
|
82 | 82 | } |
|
83 | 83 | YUC.asyncRequest('POST',follow_base_url,{ |
|
84 | 84 | success:function(o){ |
|
85 | 85 | onSuccessFollow(target); |
|
86 | 86 | } |
|
87 | 87 | },args); |
|
88 | 88 | return false; |
|
89 | 89 | } |
|
90 | 90 | |
|
91 | 91 | var toggleFollowingRepo = function(target,fallows_repo_id,token,user_id){ |
|
92 | 92 | |
|
93 | 93 | args = 'follows_repo_id='+fallows_repo_id; |
|
94 | 94 | args+= '&auth_token='+token; |
|
95 | 95 | if(user_id != undefined){ |
|
96 | 96 | args+="&user_id="+user_id; |
|
97 | 97 | } |
|
98 | 98 | YUC.asyncRequest('POST',follow_base_url,{ |
|
99 | 99 | success:function(o){ |
|
100 | 100 | onSuccessFollow(target); |
|
101 | 101 | } |
|
102 | 102 | },args); |
|
103 | 103 | return false; |
|
104 | 104 | } |
|
105 | 105 | YUE.onDOMReady(function(){ |
|
106 | 106 | tooltip_activate(); |
|
107 | 107 | show_more_event(); |
|
108 | 108 | |
|
109 | 109 | YUE.on('quick_login_link','click',function(e){ |
|
110 | 110 | // make sure we don't redirect |
|
111 | 111 | YUE.preventDefault(e); |
|
112 | 112 | |
|
113 | 113 | if(YUD.hasClass('quick_login_link','enabled')){ |
|
114 | 114 | YUD.setStyle('quick_login','display','none'); |
|
115 | 115 | YUD.removeClass('quick_login_link','enabled'); |
|
116 | 116 | } |
|
117 | 117 | else{ |
|
118 | 118 | YUD.setStyle('quick_login','display',''); |
|
119 | 119 | YUD.addClass('quick_login_link','enabled'); |
|
120 | 120 | var usr = YUD.get('username'); |
|
121 | 121 | if(usr){ |
|
122 | 122 | usr.focus(); |
|
123 | 123 | } |
|
124 | 124 | } |
|
125 | 125 | }); |
|
126 | 126 | }) |
|
127 | 127 | </script> |
|
128 | 128 | </%def> |
|
129 | 129 | <%def name="js_extra()"></%def> |
|
130 | 130 | ${self.js()} |
|
131 | 131 | </head> |
|
132 | 132 | <body id="body"> |
|
133 | 133 | ${next.body()} |
|
134 | 134 | </body> |
|
135 | 135 | </html> |
General Comments 0
You need to be logged in to leave comments.
Login now