control the availabiilty of comments on publications (script) through widget

This commit is contained in:
Peli de Halleux 2015-07-09 19:07:22 +01:00
Родитель 9e724a29a1
Коммит 973f9978cb
3 изменённых файлов: 15 добавлений и 5 удалений

Просмотреть файл

@ -46,6 +46,7 @@ module TDev.Browser {
hubTutorials : true, hubTutorials : true,
hubShowcase : true, hubShowcase : true,
hubSocial: true, hubSocial: true,
publicationComments: true,
translateComments: true, translateComments: true,
whileConditionDefault: "true", whileConditionDefault: "true",
@ -126,6 +127,7 @@ module TDev.Browser {
hubUsers: true, hubUsers: true,
notifyAppReloaded: true, notifyAppReloaded: true,
startTutorialButton: true, startTutorialButton: true,
publicationComments: true,
translateComments: true, translateComments: true,
searchHelp: true, searchHelp: true,
outAssign: true, outAssign: true,
@ -255,6 +257,7 @@ module TDev.Browser {
hubUsers: true, hubUsers: true,
hubTags: true, hubTags: true,
hubMyArt: true, hubMyArt: true,
publicationComments: true,
translateComments: true, translateComments: true,
searchHelp: true, searchHelp: true,
outAssign: true, outAssign: true,
@ -446,6 +449,7 @@ module TDev.Browser {
editLibraryButton: true, editLibraryButton: true,
scriptPrintScript: true, scriptPrintScript: true,
scriptPrintTopic: true, scriptPrintTopic: true,
publicationComments: true,
} }
}, },
}, },
@ -510,6 +514,7 @@ module TDev.Browser {
editLibraryButton: true, editLibraryButton: true,
scriptPrintScript: true, scriptPrintScript: true,
scriptPrintTopic: true, scriptPrintTopic: true,
publicationComments: true,
// editor specific // editor specific
publishDescription: true, publishDescription: true,

Просмотреть файл

@ -6289,6 +6289,7 @@
addNum(this.jsonScript.runs, "runs"); addNum(this.jsonScript.runs, "runs");
} else { } else {
addNum(getScriptHeartCount(this.jsonScript), "♥"); addNum(getScriptHeartCount(this.jsonScript), "♥");
if (EditorSettings.widgets().publicationComments)
addNum(this.jsonScript.comments, "✉"); addNum(this.jsonScript.comments, "✉");
} }
if (this.app.isLibrary) { if (this.app.isLibrary) {
@ -6339,6 +6340,7 @@
var addNum = (n:number, sym:string) => { cont.push(ScriptInfo.mkNum(n, sym)) } var addNum = (n:number, sym:string) => { cont.push(ScriptInfo.mkNum(n, sym)) }
addNum(getScriptHeartCount(this.jsonScript), "♥"); addNum(getScriptHeartCount(this.jsonScript), "♥");
if (sz > 1) { if (sz > 1) {
if (EditorSettings.widgets().publicationComments)
addNum(this.jsonScript.comments, "✉"); addNum(this.jsonScript.comments, "✉");
//addNum(jsonScript.installations, "users"); //addNum(jsonScript.installations, "users");
//addNum(jsonScript.runs, "runs"); //addNum(jsonScript.runs, "runs");
@ -6675,7 +6677,7 @@
.forEach(sn => sn.idToHTMLAsync(this.jsonScript.meta[sn.id]).done(d => { if (d) metaDiv.appendChild(d); })); .forEach(sn => sn.idToHTMLAsync(this.jsonScript.meta[sn.id]).done(d => { if (d) metaDiv.appendChild(d); }));
} }
if (this.getPublicationIdOrBaseId()) { if (EditorSettings.widgets().publicationComments && this.getPublicationIdOrBaseId()) {
if (!this.commentsTab) { if (!this.commentsTab) {
this.commentsTab = new CommentsTab(this); this.commentsTab = new CommentsTab(this);
this.commentsTab.initElements(); this.commentsTab.initElements();
@ -8329,6 +8331,7 @@
var cont = []; var cont = [];
var addNum = (n: number, sym: string) => { cont.push(ScriptInfo.mkNum(n, sym)) } var addNum = (n: number, sym: string) => { cont.push(ScriptInfo.mkNum(n, sym)) }
addNum(u.positivereviews, "♥"); addNum(u.positivereviews, "♥");
if (EditorSettings.widgets().publicationComments)
addNum(u.comments, "✉"); addNum(u.comments, "✉");
/* if (big) { /* if (big) {
addNum(u.subscribers, "svg:Person,black,clip=80"); addNum(u.subscribers, "svg:Person,black,clip=80");
@ -9955,6 +9958,7 @@
var addNum = (n: number, sym: string) => { cont.push(ScriptInfo.mkNum(n, sym)) } var addNum = (n: number, sym: string) => { cont.push(ScriptInfo.mkNum(n, sym)) }
addNum(this.json.positivereviews, "♥"); addNum(this.json.positivereviews, "♥");
if (sz > 1) { if (sz > 1) {
if (EditorSettings.widgets().publicationComments)
addNum(this.json.comments, "✉"); addNum(this.json.comments, "✉");
} }

Просмотреть файл

@ -110,6 +110,7 @@ module TDev.Cloud {
hubShowcase?: boolean; hubShowcase?: boolean;
hubSocial?: boolean; hubSocial?: boolean;
startTutorialButton?: boolean; startTutorialButton?: boolean;
publicationComments?: boolean;
translateComments?: boolean; translateComments?: boolean;
searchHelp?: boolean; searchHelp?: boolean;
hideMyScriptHeader?: boolean; hideMyScriptHeader?: boolean;