Mercurial > kallithea
annotate rhodecode/templates/base/root.html @ 2904:1b275d04ac07 beta
#595 add rcextension hook for repository delete
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 09 Oct 2012 00:08:35 +0200 |
parents | 867820342329 |
children | 58bb350bfef8 |
rev | line source |
---|---|
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
2163
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
2 <!DOCTYPE html> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <html xmlns="http://www.w3.org/1999/xhtml"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 <head> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 <title>${self.title()}</title> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 <meta name="robots" content="index, nofollow"/> |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
8 <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
9 |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
10 ## CSS ### |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
11 <%def name="css()"> |
2850
867820342329
fix for #569 add version to static files for rhodecode to overcome cache problems
Marcin Kuzminski <marcin@python-works.com>
parents:
2812
diff
changeset
|
12 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/> |
867820342329
fix for #569 add version to static files for rhodecode to overcome cache problems
Marcin Kuzminski <marcin@python-works.com>
parents:
2812
diff
changeset
|
13 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/> |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
14 ## EXTRA FOR CSS |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
15 ${self.css_extra()} |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
16 </%def> |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
17 <%def name="css_extra()"> |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
18 </%def> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
19 |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 ${self.css()} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
21 |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 %if c.ga_code: |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 <!-- Analytics --> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 <script type="text/javascript"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 var _gaq = _gaq || []; |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 _gaq.push(['_setAccount', '${c.ga_code}']); |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 _gaq.push(['_trackPageview']); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
28 |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 (function() { |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
31 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
32 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 })(); |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 </script> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
36 |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
37 ## JAVASCRIPT ## |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
38 <%def name="js()"> |
2369
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
39 <script type="text/javascript"> |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
40 //JS translations map |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
41 var TRANSLATION_MAP = { |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
42 'add another comment':'${_("add another comment")}', |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
43 'Stop following this repository':"${_('Stop following this repository')}", |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
44 'Start following this repository':"${_('Start following this repository')}", |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
45 'Group':"${_('Group')}", |
2428
530bd12fc18a
removed JSON array envelope from filter files function
Marcin Kuzminski <marcin@python-works.com>
parents:
2413
diff
changeset
|
46 'members':"${_('members')}", |
530bd12fc18a
removed JSON array envelope from filter files function
Marcin Kuzminski <marcin@python-works.com>
parents:
2413
diff
changeset
|
47 'search truncated': "${_('search truncated')}", |
2453
d2a528b60e50
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2428
diff
changeset
|
48 'no matching files': "${_('no matching files')}" |
2369
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
49 |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
50 }; |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
51 var _TM = TRANSLATION_MAP; |
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
52 </script> |
2850
867820342329
fix for #569 add version to static files for rhodecode to overcome cache problems
Marcin Kuzminski <marcin@python-works.com>
parents:
2812
diff
changeset
|
53 <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script> |
2141
9d54d6516e2e
disabled ext canvas for >ie9
Marcin Kuzminski <marcin@python-works.com>
parents:
2001
diff
changeset
|
54 <!--[if lt IE 9]> |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
55 <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script> |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
56 <![endif]--> |
2850
867820342329
fix for #569 add version to static files for rhodecode to overcome cache problems
Marcin Kuzminski <marcin@python-works.com>
parents:
2812
diff
changeset
|
57 <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script> |
867820342329
fix for #569 add version to static files for rhodecode to overcome cache problems
Marcin Kuzminski <marcin@python-works.com>
parents:
2812
diff
changeset
|
58 <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script> |
867820342329
fix for #569 add version to static files for rhodecode to overcome cache problems
Marcin Kuzminski <marcin@python-works.com>
parents:
2812
diff
changeset
|
59 <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script> |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
60 ## EXTRA FOR JS |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
61 ${self.js_extra()} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
62 |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
63 <script type="text/javascript"> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
64 (function(window,undefined){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
65 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
66 // Prepare |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
67 var History = window.History; // Note: We are using a capital H instead of a lower h |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
68 if ( !History.enabled ) { |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
69 // History.js is disabled for this browser. |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
70 // This is because we can optionally choose to support HTML4 browsers or not. |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
71 return false; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
72 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2453
diff
changeset
|
73 })(window); |
1700 | 74 var follow_base_url = "${h.url('toggle_following')}"; |
2188
56e96d4e9f6e
white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2187
diff
changeset
|
75 |
1700 | 76 var onSuccessFollow = function(target){ |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
77 var f = YUD.get(target.id); |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
78 var f_cnt = YUD.get('current_followers_count'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
79 |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
80 if(f.getAttribute('class')=='follow'){ |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
81 f.setAttribute('class','following'); |
2369
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
82 f.setAttribute('title',_TM['Stop following this repository']); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
83 |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
84 if(f_cnt){ |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
85 var cnt = Number(f_cnt.innerHTML)+1; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
86 f_cnt.innerHTML = cnt; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
87 } |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
88 } |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
89 else{ |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
90 f.setAttribute('class','follow'); |
2369
c2f131502037
Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2188
diff
changeset
|
91 f.setAttribute('title',_TM['Start following this repository']); |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
92 if(f_cnt){ |
2812
ad4bc0f66d6a
fixes #557 follower counter always counts up
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
93 var cnt = Number(f_cnt.innerHTML)-1; |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
94 f_cnt.innerHTML = cnt; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
95 } |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
96 } |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
97 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
98 |
1700 | 99 var toggleFollowingUser = function(target,fallows_user_id,token,user_id){ |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
100 args = 'follows_user_id='+fallows_user_id; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
101 args+= '&auth_token='+token; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
102 if(user_id != undefined){ |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
103 args+="&user_id="+user_id; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
104 } |
1700 | 105 YUC.asyncRequest('POST',follow_base_url,{ |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
106 success:function(o){ |
1700 | 107 onSuccessFollow(target); |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
108 } |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
109 },args); |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
110 return false; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
111 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
112 |
1700 | 113 var toggleFollowingRepo = function(target,fallows_repo_id,token,user_id){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
114 |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
115 args = 'follows_repo_id='+fallows_repo_id; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
116 args+= '&auth_token='+token; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
117 if(user_id != undefined){ |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
118 args+="&user_id="+user_id; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
119 } |
1700 | 120 YUC.asyncRequest('POST',follow_base_url,{ |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
121 success:function(o){ |
1700 | 122 onSuccessFollow(target); |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
123 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
124 },args); |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
125 return false; |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
126 } |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
127 YUE.onDOMReady(function(){ |
1700 | 128 tooltip_activate(); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
129 show_more_event(); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
130 |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
131 YUE.on('quick_login_link','click',function(e){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
132 // make sure we don't redirect |
1700 | 133 YUE.preventDefault(e); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
134 |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
135 if(YUD.hasClass('quick_login_link','enabled')){ |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
136 YUD.setStyle('quick_login','display','none'); |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
137 YUD.removeClass('quick_login_link','enabled'); |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
138 } |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
139 else{ |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
140 YUD.setStyle('quick_login','display',''); |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
141 YUD.addClass('quick_login_link','enabled'); |
1926
049bc911b04f
removed upper menu to save space and did little rip off menu similar to G+
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
142 var usr = YUD.get('username'); |
049bc911b04f
removed upper menu to save space and did little rip off menu similar to G+
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
143 if(usr){ |
049bc911b04f
removed upper menu to save space and did little rip off menu similar to G+
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
144 usr.focus(); |
049bc911b04f
removed upper menu to save space and did little rip off menu similar to G+
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
145 } |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
146 } |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
147 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
148 }) |
1421
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
149 </script> |
c6b811f11c94
Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents:
1305
diff
changeset
|
150 </%def> |
1700 | 151 <%def name="js_extra()"></%def> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
152 ${self.js()} |
2413
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2369
diff
changeset
|
153 <%def name="head_extra()"></%def> |
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2369
diff
changeset
|
154 ${self.head_extra()} |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
155 </head> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
156 <body id="body"> |
2163
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
157 ## IE hacks |
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
158 <!--[if IE 7]> |
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
159 <script>YUD.addClass(document.body,'ie7')</script> |
2174
85a64b981c07
ws cleanup, +changelog
Marcin Kuzminski <marcin@python-works.com>
parents:
2163
diff
changeset
|
160 <![endif]--> |
2163
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
161 <!--[if IE 8]> |
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
162 <script>YUD.addClass(document.body,'ie8')</script> |
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
163 <![endif]--> |
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
164 <!--[if IE 9]> |
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
165 <script>YUD.addClass(document.body,'ie9')</script> |
2174
85a64b981c07
ws cleanup, +changelog
Marcin Kuzminski <marcin@python-works.com>
parents:
2163
diff
changeset
|
166 <![endif]--> |
2163
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
167 |
e77fbd3b069c
IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents:
2141
diff
changeset
|
168 ${next.body()} |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
169 </body> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
170 </html> |