* Fixed skin name of poll editor
* Fixed condition for setting the site modification date on comment update (hopefully this is correct...) * Replace site.lastUpdate with site.modified (still needs some more care - what do we do with lastUpdate anyway?)
This commit is contained in:
parent
b006cbdf0b
commit
0296ff4a88
6 changed files with 10 additions and 11 deletions
|
@ -89,9 +89,8 @@ Comment.prototype.update = function(data) {
|
|||
if (this.site.commentMode === Site.MODERATED ||
|
||||
this.story.commentMode === Site.MODERATED) {
|
||||
this.mode = Comment.PENDING;
|
||||
} else if (this.story.status === Story.PRIVATE &&
|
||||
this.getDelta(data) > 50) {
|
||||
this.site.lastUpdate = new Date;
|
||||
} else if (this.story.status !== Story.PRIVATE && this.getDelta(data) > 50) {
|
||||
this.site.modified = new Date;
|
||||
}
|
||||
this.clearCache();
|
||||
this.touch();
|
||||
|
|
|
@ -43,7 +43,7 @@ Polls.prototype.getPermission = function(action) {
|
|||
|
||||
Polls.prototype.main_action = function() {
|
||||
var polls = User.getMembership().polls;
|
||||
res.data.list = renderList(polls, "Poll#listItem", 10, req.queryParams.page);
|
||||
res.data.list = renderList(polls, "$Poll#listItem", 10, req.queryParams.page);
|
||||
res.data.pager = renderPager(polls, this.href(req.action),
|
||||
10, req.queryParams.page);
|
||||
res.data.title = gettext("Member polls of {0}", this._parent.title);
|
||||
|
@ -69,7 +69,7 @@ Polls.prototype.create_action = function() {
|
|||
}
|
||||
res.data.action = this.href(req.action);
|
||||
res.data.title = gettext("Add poll to site {0}", this._parent.title);
|
||||
res.data.body = poll.renderSkinAsString("Poll#edit");
|
||||
res.data.body = poll.renderSkinAsString("$Poll#edit");
|
||||
this._parent.renderSkin("Site#page");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ Site.prototype.main_js_action = function() {
|
|||
}
|
||||
|
||||
Site.prototype.rss_xml_action = function() {
|
||||
res.dependsOn(this.lastUpdate);
|
||||
res.dependsOn(this.modified);
|
||||
res.digest();
|
||||
res.contentType = "text/xml";
|
||||
res.write(this.getXml(this.stories.union));
|
||||
|
@ -265,7 +265,7 @@ Site.prototype.rss_xml_action = function() {
|
|||
}
|
||||
|
||||
Site.prototype.stories_xml_action = function() {
|
||||
res.dependsOn(this.lastUpdate);
|
||||
res.dependsOn(this.modified);
|
||||
res.digest();
|
||||
res.contentType = "text/xml";
|
||||
res.write(this.getXml(this.stories.recent));
|
||||
|
@ -273,7 +273,7 @@ Site.prototype.stories_xml_action = function() {
|
|||
}
|
||||
|
||||
Site.prototype.comments_xml_action = function() {
|
||||
res.dependsOn(this.lastUpdate);
|
||||
res.dependsOn(this.modified);
|
||||
res.digest();
|
||||
res.contentType = "text/xml";
|
||||
res.write(this.getXml(this.stories.comments));
|
||||
|
|
|
@ -44,7 +44,7 @@ Stories.prototype.getPermission = function(action) {
|
|||
|
||||
Stories.prototype.main_action = function() {
|
||||
var stories = User.getMembership().stories;
|
||||
res.data.list = renderList(stories, "Story#listItem",
|
||||
res.data.list = renderList(stories, "$Story#listItem",
|
||||
10, req.queryParams.page);
|
||||
res.data.pager = renderPager(stories,
|
||||
this.href(req.action), 10, req.queryParams.page);
|
||||
|
|
|
@ -198,7 +198,7 @@ Story.prototype.update = function(data) {
|
|||
|
||||
if (this.status !== Story.CLOSED && delta > 50) {
|
||||
site.hitchWebHook();
|
||||
site.lastUpdate = new Date;
|
||||
site.modified = new Date;
|
||||
}
|
||||
|
||||
this.clearCache();
|
||||
|
|
|
@ -57,7 +57,7 @@ Tag.prototype.main_action = function() {
|
|||
}
|
||||
|
||||
Tag.prototype.rss_xml_action = function() {
|
||||
res.dependsOn(this.lastUpdate);
|
||||
res.dependsOn(this.site.modified);
|
||||
res.digest();
|
||||
res.contentType = "text/xml";
|
||||
var tagHubs = this.getTagged().list(0, this.site.pageSize);
|
||||
|
|
Loading…
Add table
Reference in a new issue