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

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

@ -6289,7 +6289,8 @@
addNum(this.jsonScript.runs, "runs");
} else {
addNum(getScriptHeartCount(this.jsonScript), "♥");
addNum(this.jsonScript.comments, "✉");
if (EditorSettings.widgets().publicationComments)
addNum(this.jsonScript.comments, "✉");
}
if (this.app.isLibrary) {
var sp = document.createElement('span'); sp.className = 'sdNumber symbol';
@ -6339,7 +6340,8 @@
var addNum = (n:number, sym:string) => { cont.push(ScriptInfo.mkNum(n, sym)) }
addNum(getScriptHeartCount(this.jsonScript), "♥");
if (sz > 1) {
addNum(this.jsonScript.comments, "✉");
if (EditorSettings.widgets().publicationComments)
addNum(this.jsonScript.comments, "✉");
//addNum(jsonScript.installations, "users");
//addNum(jsonScript.runs, "runs");
}
@ -6675,7 +6677,7 @@
.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) {
this.commentsTab = new CommentsTab(this);
this.commentsTab.initElements();
@ -8329,7 +8331,8 @@
var cont = [];
var addNum = (n: number, sym: string) => { cont.push(ScriptInfo.mkNum(n, sym)) }
addNum(u.positivereviews, "♥");
addNum(u.comments, "✉");
if (EditorSettings.widgets().publicationComments)
addNum(u.comments, "✉");
/* if (big) {
addNum(u.subscribers, "svg:Person,black,clip=80");
} */
@ -9955,7 +9958,8 @@
var addNum = (n: number, sym: string) => { cont.push(ScriptInfo.mkNum(n, sym)) }
addNum(this.json.positivereviews, "♥");
if (sz > 1) {
addNum(this.json.comments, "✉");
if (EditorSettings.widgets().publicationComments)
addNum(this.json.comments, "✉");
}
var nums = div("hubTileNumbers", cont, div("hubTileNumbersOverlay"));

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

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