* Replaced most remaining occurrences of getMessage() method calls with adequate gettext() method calls
* Removed obsolete Root.getSiteList() method * Moved searchview.skin as #result subskin into Story.skin * Fixed alignment of calendar month
This commit is contained in:
parent
78b2261e88
commit
77255296dc
14 changed files with 54 additions and 99 deletions
|
@ -479,7 +479,7 @@ Admin.prototype.blockPrivateSites = function() {
|
|||
var recipient = site.email ? site.email : site.creator.email;
|
||||
warning.addTo(recipient);
|
||||
warning.setFrom(root.sys_email);
|
||||
warning.setSubject(getMessage("mail.blockWarning", site.title));
|
||||
warning.setSubject(gettext("Attention! Your site {0} will soon be blocked!", site.title));
|
||||
var sp = new Object();
|
||||
sp.site = site.alias;
|
||||
sp.url = site.href();
|
||||
|
@ -544,7 +544,7 @@ Admin.prototype.deleteInactiveSites = function() {
|
|||
var recipient = site.email ? site.email : site.creator.email;
|
||||
warning.addTo(recipient);
|
||||
warning.setFrom(root.sys_email);
|
||||
warning.setSubject(getMessage("mail.deleteWarning", site.title));
|
||||
warning.setSubject(gettext("Attention! Your site {0} will soon be deleted!", site.title));
|
||||
var sp = new Object();
|
||||
sp.site = site.alias;
|
||||
sp.url = site.href();
|
||||
|
|
|
@ -276,48 +276,3 @@ Root.prototype.getCreationPermission = function() {
|
|||
Root.prototype.processHref = function(href) {
|
||||
return app.properties.defaulthost + href;
|
||||
};
|
||||
|
||||
// FIXME!
|
||||
Root.prototype.getSiteList = function(limit, show, scroll) {
|
||||
return;
|
||||
if (show && show == "all")
|
||||
var collection = root.publicSites;
|
||||
else
|
||||
var collection = root;
|
||||
|
||||
var size = collection.size();
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
var idx = parseInt (req.data.start, 10);
|
||||
var scroll = (!scroll || scroll == "no" ? false : true);
|
||||
|
||||
if (isNaN(idx) || idx > size-1 || idx < 0)
|
||||
idx = 0;
|
||||
if (scroll && idx > 0) {
|
||||
var sp = new Object();
|
||||
sp.url = root.href("list") + "?start=" + Math.max(0, idx-limit);
|
||||
sp.text = getMessage("Site.previousPage");
|
||||
res.data.prevpage = renderSkinAsString("prevpagelink", sp);
|
||||
}
|
||||
|
||||
var cnt = 0;
|
||||
collection.prefetchChildren(idx, limit);
|
||||
res.push();
|
||||
while (cnt < limit && idx < size) {
|
||||
var s = collection.get(idx++);
|
||||
if (!s.blocked && s.online) {
|
||||
s.renderSkin("Site#list");
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
res.data.sitelist = res.pop();
|
||||
|
||||
if (scroll && idx < size) {
|
||||
var sp = new Object();
|
||||
sp.url = root.href("list") + "?start=" + idx;
|
||||
sp.text = getMessage("Site.nextPage");
|
||||
res.data.nextpage = renderSkinAsString("nextpagelink", sp);
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
|
|
@ -395,7 +395,7 @@ Site.prototype.search_action = function() {
|
|||
res.push();
|
||||
while (rows.next()) {
|
||||
ref = Story.getById(rows.getColumnItem("id"));
|
||||
ref.renderSkin("Story#preview");
|
||||
ref.renderSkin("Story#result");
|
||||
counter += 1;
|
||||
}
|
||||
rows.release();
|
||||
|
|
|
@ -664,6 +664,7 @@ ul.skinmgrTree li div {
|
|||
}
|
||||
|
||||
.calendar {
|
||||
text-align: center;
|
||||
color: <% value "small font color" %>;
|
||||
font-family: <% value "small font" %>;
|
||||
font-size: <% value "small font size" %>;
|
||||
|
|
|
@ -150,7 +150,7 @@ Skin.prototype.diff_action = function() {
|
|||
} else {
|
||||
var diff = originalSkin.diff(this.getSource());
|
||||
if (!diff) {
|
||||
res.data.status = getMessage("Skin.diff.noDiffFound");
|
||||
res.data.status = gettext("No differences were found");
|
||||
} else {
|
||||
res.push();
|
||||
var sp = new Object();
|
||||
|
@ -186,11 +186,8 @@ Skin.prototype.diff_action = function() {
|
|||
}
|
||||
}
|
||||
res.data.body = this.renderSkinAsString("diff");
|
||||
res.data.title = getMessage("Skin.diff.displayTitle", {
|
||||
skinProto: this.proto,
|
||||
skinName: this.name,
|
||||
layoutTitle: this.layout.title
|
||||
});
|
||||
res.data.title = gettext("Diffs for {0}/{1}.skin of layout {2}",
|
||||
this.proto, this.name, this.layout.title);
|
||||
this.layout.skins.renderSkin("Site#page");
|
||||
return;
|
||||
};
|
||||
|
|
|
@ -49,6 +49,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% #result %>
|
||||
<br /><% story.summary %>
|
||||
<div class="small">by <% story.creator %> (<% story.modified short %>)</div>
|
||||
|
||||
<% #top %>
|
||||
<tr>
|
||||
<td align="right" valign="baseline" class="small"><% param.position %></td>
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<br /><% story.content part="title" as="link" %><br />
|
||||
<% story.content part="text" limit="200" suffix=" ..." %>
|
||||
<div class="small">by <% story.creator %> (<% story.modifytime format="short" %>)</div>
|
|
@ -59,8 +59,7 @@ Tags.prototype.getChildElement = function(id) {
|
|||
return {main_action: new Function};
|
||||
|
||||
var self = this;
|
||||
res.data.title = getMessage("Tags.viewTitle", {title: "Tags",
|
||||
siteName: self._parent.title});
|
||||
res.data.title = gettext("Tags of site {0}", self._parent.title);
|
||||
res.data.list = renderList(child, function(item) {
|
||||
item.parent.renderSkin("preview");
|
||||
}, 10, req.data.page);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue