* 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:
Tobi Schäfer 2008-04-23 08:38:59 +00:00
parent b006cbdf0b
commit 0296ff4a88
6 changed files with 10 additions and 11 deletions

View file

@ -89,9 +89,8 @@ Comment.prototype.update = function(data) {
if (this.site.commentMode === Site.MODERATED || if (this.site.commentMode === Site.MODERATED ||
this.story.commentMode === Site.MODERATED) { this.story.commentMode === Site.MODERATED) {
this.mode = Comment.PENDING; this.mode = Comment.PENDING;
} else if (this.story.status === Story.PRIVATE && } else if (this.story.status !== Story.PRIVATE && this.getDelta(data) > 50) {
this.getDelta(data) > 50) { this.site.modified = new Date;
this.site.lastUpdate = new Date;
} }
this.clearCache(); this.clearCache();
this.touch(); this.touch();

View file

@ -43,7 +43,7 @@ Polls.prototype.getPermission = function(action) {
Polls.prototype.main_action = function() { Polls.prototype.main_action = function() {
var polls = User.getMembership().polls; 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), res.data.pager = renderPager(polls, this.href(req.action),
10, req.queryParams.page); 10, req.queryParams.page);
res.data.title = gettext("Member polls of {0}", this._parent.title); 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.action = this.href(req.action);
res.data.title = gettext("Add poll to site {0}", this._parent.title); 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"); this._parent.renderSkin("Site#page");
return; return;
} }

View file

@ -257,7 +257,7 @@ Site.prototype.main_js_action = function() {
} }
Site.prototype.rss_xml_action = function() { Site.prototype.rss_xml_action = function() {
res.dependsOn(this.lastUpdate); res.dependsOn(this.modified);
res.digest(); res.digest();
res.contentType = "text/xml"; res.contentType = "text/xml";
res.write(this.getXml(this.stories.union)); res.write(this.getXml(this.stories.union));
@ -265,7 +265,7 @@ Site.prototype.rss_xml_action = function() {
} }
Site.prototype.stories_xml_action = function() { Site.prototype.stories_xml_action = function() {
res.dependsOn(this.lastUpdate); res.dependsOn(this.modified);
res.digest(); res.digest();
res.contentType = "text/xml"; res.contentType = "text/xml";
res.write(this.getXml(this.stories.recent)); res.write(this.getXml(this.stories.recent));
@ -273,7 +273,7 @@ Site.prototype.stories_xml_action = function() {
} }
Site.prototype.comments_xml_action = function() { Site.prototype.comments_xml_action = function() {
res.dependsOn(this.lastUpdate); res.dependsOn(this.modified);
res.digest(); res.digest();
res.contentType = "text/xml"; res.contentType = "text/xml";
res.write(this.getXml(this.stories.comments)); res.write(this.getXml(this.stories.comments));

View file

@ -44,7 +44,7 @@ Stories.prototype.getPermission = function(action) {
Stories.prototype.main_action = function() { Stories.prototype.main_action = function() {
var stories = User.getMembership().stories; var stories = User.getMembership().stories;
res.data.list = renderList(stories, "Story#listItem", res.data.list = renderList(stories, "$Story#listItem",
10, req.queryParams.page); 10, req.queryParams.page);
res.data.pager = renderPager(stories, res.data.pager = renderPager(stories,
this.href(req.action), 10, req.queryParams.page); this.href(req.action), 10, req.queryParams.page);

View file

@ -198,7 +198,7 @@ Story.prototype.update = function(data) {
if (this.status !== Story.CLOSED && delta > 50) { if (this.status !== Story.CLOSED && delta > 50) {
site.hitchWebHook(); site.hitchWebHook();
site.lastUpdate = new Date; site.modified = new Date;
} }
this.clearCache(); this.clearCache();

View file

@ -57,7 +57,7 @@ Tag.prototype.main_action = function() {
} }
Tag.prototype.rss_xml_action = function() { Tag.prototype.rss_xml_action = function() {
res.dependsOn(this.lastUpdate); res.dependsOn(this.site.modified);
res.digest(); res.digest();
res.contentType = "text/xml"; res.contentType = "text/xml";
var tagHubs = this.getTagged().list(0, this.site.pageSize); var tagHubs = this.getTagged().list(0, this.site.pageSize);