diff --git a/rhodecode/templates/journal/journal.html b/rhodecode/templates/journal/journal.html
--- a/rhodecode/templates/journal/journal.html
+++ b/rhodecode/templates/journal/journal.html
@@ -43,73 +43,36 @@
- ## loaded via AJAX
- ${_('Loading...')}
+
-
-
- %if c.following:
-
- %else:
-
- ${_('You are not following any users or repositories')}
-
- %endif
+
+
@@ -134,29 +97,47 @@
});
fix_j_filter_width(YUD.get('j_filter').value.length);
- var show_my = function(e){
- YUD.setStyle('watched','display','none');
- YUD.setStyle('my','display','');
-
- var url = "${h.url('admin_settings_my_repos')}";
- ypjax(url, 'my', function(){
+ YUE.on('refresh','click',function(e){
+ ypjax("${h.url.current(filter=c.search_term)}","journal",function(){
+ show_more_event();
tooltip_activate();
- quick_repo_menu();
- var nodes = YUQ('#my tr td a.repo_name');
- var func = function(node){
- return node.parentNode.parentNode.parentNode;
- }
- q_filter('q_filter',nodes,func);
- });
+ show_changeset_tooltip();
+ });
+ YUE.preventDefault(e);
+ });
+
+ var show_my = function(e){
+ YUD.setStyle('watched_container','display','none');
+ YUD.setStyle('my_container','display','');
+ YUD.setStyle('q_filter','display','');
+ YUD.setStyle('q_filter_watched','display','none');
+ YUD.addClass('show_my', 'current');
+ YUD.removeClass('show_watched','current');
+
+ if(!YUD.hasClass('show_my', 'loaded')){
+ table_renderer(${c.data |n});
+ YUD.addClass('show_my', 'loaded');
+ }
}
YUE.on('show_my','click',function(e){
show_my(e);
})
var show_watched = function(e){
- YUD.setStyle('my','display','none');
- YUD.setStyle('watched','display','');
- var nodes = YUQ('#watched .watched_repo a');
+ YUD.setStyle('my_container','display','none');
+ YUD.setStyle('watched_container','display','');
+ YUD.setStyle('q_filter_watched','display','');
+ YUD.setStyle('q_filter','display','none');
+
+ YUD.addClass('show_watched', 'current');
+ YUD.removeClass('show_my','current');
+ if(!YUD.hasClass('show_watched', 'loaded')){
+ watched_renderer(${c.watched_data |n});
+ YUD.addClass('show_watched', 'loaded');
+ }
+
+ return
+ var nodes = YUQ('#watched_container .watched_repo a');
var target = 'q_filter';
var func = function(node){
return node.parentNode.parentNode;
@@ -182,60 +163,213 @@
func();
}
}
+ function watched_renderer(data){
+ var myDataSource = new YAHOO.util.DataSource(data);
+ myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
- YUE.on('refresh','click',function(e){
- ypjax("${h.url.current(filter=c.search_term)}","journal",function(){
- show_more_event();
- tooltip_activate();
- show_changeset_tooltip();
- });
- YUE.preventDefault(e);
- });
+ myDataSource.responseSchema = {
+ resultsList: "records",
+ fields: [
+ {key:"menu"},
+ {key:"raw_name"},
+ {key:"name"},
+ {key:"last_changeset"},
+ {key:"action"},
+ ]
+ };
+ myDataSource.doBeforeCallback = function(req,raw,res,cb) {
+ // This is the filter function
+ var data = res.results || [],
+ filtered = [],
+ i,l;
+ if (req) {
+ req = req.toLowerCase();
+ for (i = 0; i
%def>