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