annotate rhodecode/templates/base/root.html @ 3001:37c7abd34d44 beta

implements #636, lazy loading of history and authors to speed up page responsiveness. - loading full history is not always needed, and it's very heavy operation. Now this is lazy loaded when clicking on button
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 13 Nov 2012 22:26:06 +0100
parents 95f03f8f5f9a
children 5d580e9bc730
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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')}",
2979
95f03f8f5f9a - add loading message on lazy loaded toolips for journals
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
47 'loading...':"${_('loading...')}",
2428
530bd12fc18a removed JSON array envelope from filter files function
Marcin Kuzminski <marcin@python-works.com>
parents: 2413
diff changeset
48 'search truncated': "${_('search truncated')}",
2927
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2850
diff changeset
49 'no matching files': "${_('no matching files')}",
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2850
diff changeset
50 'Open new pull request': "${_('Open new pull request')}",
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2850
diff changeset
51 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}",
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2850
diff changeset
52 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}",
3001
37c7abd34d44 implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents: 2979
diff changeset
53 'Selection link': "${_('Selection link')}",
2369
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2188
diff changeset
54 };
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2188
diff changeset
55 var _TM = TRANSLATION_MAP;
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2188
diff changeset
56 </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
57 <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
58 <!--[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
59 <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
60 <![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
61 <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
62 <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
63 <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
64 ## 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
65 ${self.js_extra()}
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
66
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
67 <script type="text/javascript">
2686
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
68 (function(window,undefined){
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
69
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
70 // Prepare
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
71 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
72 if ( !History.enabled ) {
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
73 // History.js is disabled for this browser.
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
74 // 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
75 return false;
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
76 }
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
77 })(window);
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
78 var follow_base_url = "${h.url('toggle_following')}";
2188
56e96d4e9f6e white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2187
diff changeset
79
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
80 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
81 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
82 var f_cnt = YUD.get('current_followers_count');
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.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
85 f.setAttribute('class','following');
2369
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2188
diff changeset
86 f.setAttribute('title',_TM['Stop following this repository']);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
87
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
88 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
89 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
90 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
91 }
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 }
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
93 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
94 f.setAttribute('class','follow');
2369
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2188
diff changeset
95 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
96 if(f_cnt){
2812
ad4bc0f66d6a fixes #557 follower counter always counts up
Marcin Kuzminski <marcin@python-works.com>
parents: 2686
diff changeset
97 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
98 f_cnt.innerHTML = cnt;
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
99 }
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 }
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 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
102
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
103 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
104 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
105 args+= '&amp;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
106 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
107 args+="&amp;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
108 }
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
109 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
110 success:function(o){
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
111 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
112 }
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
113 },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
114 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
115 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
116
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
117 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
118
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
119 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
120 args+= '&amp;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
121 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
122 args+="&amp;user_id="+user_id;
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
123 }
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
124 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
125 success:function(o){
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
126 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
127 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
128 },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
129 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
130 }
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.onDOMReady(function(){
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
132 tooltip_activate();
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
133 show_more_event();
2971
2bfcec6a3985 new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents: 2927
diff changeset
134 show_changeset_tooltip();
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
135
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
136 YUE.on('quick_login_link','click',function(e){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
137 // make sure we don't redirect
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
138 YUE.preventDefault(e);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
139
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
140 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
141 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
142 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
143 }
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
144 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
145 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
146 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
147 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
148 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
149 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
150 }
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
151 }
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
152 });
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
153 })
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
154 </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
155 </%def>
1700
bc16d1d0869a js cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1610
diff changeset
156 <%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
157 ${self.js()}
2413
6bef2a9f73e2 added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents: 2369
diff changeset
158 <%def name="head_extra()"></%def>
6bef2a9f73e2 added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents: 2369
diff changeset
159 ${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
160 </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
161 <body id="body">
2163
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
162 ## IE hacks
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
163 <!--[if IE 7]>
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
164 <script>YUD.addClass(document.body,'ie7')</script>
2174
85a64b981c07 ws cleanup, +changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 2163
diff changeset
165 <![endif]-->
2163
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
166 <!--[if IE 8]>
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
167 <script>YUD.addClass(document.body,'ie8')</script>
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
168 <![endif]-->
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
169 <!--[if IE 9]>
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
170 <script>YUD.addClass(document.body,'ie9')</script>
2174
85a64b981c07 ws cleanup, +changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 2163
diff changeset
171 <![endif]-->
2163
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
172
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
173 ${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
174 </body>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
175 </html>