Fix reload between permalink and user page
this.initPager();
this.username = username;
this.baseFrag = username;
+}
+User.prototype = new Pager();
+User.prototype.constructor = User;
+
+User.prototype.show = function() {
+ $$('[name=section]').each(function(v) { v.update(' @' + this.username) }.bind(this));
+ $('welcome').hide();
+ items.show();
+ $('rss').show();
+ $('rsslink').href = '/rss/' + this.username;
+ $$('[name=user.reflink]').each(function(e) {
+ e.href = '/#/ref/' + this.username;
+ }.bind(this));
+ $('usercontrols').show();
+}
+
+User.prototype.reload = function() {
+ this.pageStart = null;
$$('[name=user.subscribelink]').each(Element.hide);
$$('[name=user.unsubscribelink]').each(Element.hide);
});
}
- new Ajax.Request(baseURL + '/info/' + username, {
+ new Ajax.Request(baseURL + '/info/' + this.username, {
method: 'get',
onSuccess: function(r) {
var j = r.responseText.evalJSON();
}.bind(this)
});
}
-User.prototype = new Pager();
-User.prototype.constructor = User;
-
-User.prototype.show = function() {
- $$('[name=section]').each(function(v) { v.update(' @' + this.username) }.bind(this));
- $('welcome').hide();
- items.show();
- $('rss').show();
- $('rsslink').href = '/rss/' + this.username;
- $$('[name=user.reflink]').each(function(e) {
- e.href = '/#/ref/' + this.username;
- }.bind(this));
- $('usercontrols').show();
-}
User.prototype.loadItems = function(from, to, continuation) {
var url;
} else {
currentPager.showRecord(r);
}
+ } else {
+ currentPager.reload();
}
- // Do nothing otherwise, the User constructor takes care of it
} else {
$$('[name=section]').each(function(v) { v.update('Welcome') });
$('signup').hide();