Take max comments to load from config.js
This commit is contained in:
parent
8dbf4d5337
commit
76d5dbc97f
@ -5,6 +5,7 @@ define(function() {
|
|||||||
"css": true,
|
"css": true,
|
||||||
"lang": (navigator.language || navigator.userLanguage).split("-")[0],
|
"lang": (navigator.language || navigator.userLanguage).split("-")[0],
|
||||||
"reply-to-self": false,
|
"reply-to-self": false,
|
||||||
|
"max-comments": 20,
|
||||||
"avatar-bg": "#f0f0f0",
|
"avatar-bg": "#f0f0f0",
|
||||||
"avatar-fg": ["#9abf88", "#5698c4", "#e279a3", "#9163b6",
|
"avatar-fg": ["#9abf88", "#5698c4", "#e279a3", "#9163b6",
|
||||||
"#be5168", "#f19670", "#e4bf80", "#447c69"].join(" ")
|
"#be5168", "#f19670", "#e4bf80", "#447c69"].join(" ")
|
||||||
|
@ -100,7 +100,7 @@ define(["app/text/html", "app/dom", "app/utils", "app/config", "app/api", "app/m
|
|||||||
$("a.load_hidden", el).toggle("click",
|
$("a.load_hidden", el).toggle("click",
|
||||||
function() {
|
function() {
|
||||||
el.remove();
|
el.remove();
|
||||||
api.fetch($("#isso-thread").getAttribute("data-isso-id"), limit=20, parent=commentWrapper.id, lastcreated=lastcreated).then(
|
api.fetch($("#isso-thread").getAttribute("data-isso-id"), limit = config["max-comments"], parent=commentWrapper.id, lastcreated=lastcreated).then(
|
||||||
function(rv) {
|
function(rv) {
|
||||||
if (rv.total_replies == 0) {
|
if (rv.total_replies == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -26,7 +26,7 @@ require(["app/lib/ready", "app/config", "app/api", "app/isso", "app/count", "app
|
|||||||
$("#isso-thread").append(new isso.Postbox(null));
|
$("#isso-thread").append(new isso.Postbox(null));
|
||||||
$("#isso-thread").append('<div id="isso-root"></div>');
|
$("#isso-thread").append('<div id="isso-root"></div>');
|
||||||
|
|
||||||
api.fetch($("#isso-thread").getAttribute("data-isso-id"), limit=20).then(
|
api.fetch($("#isso-thread").getAttribute("data-isso-id"), limit = config["max-comments"]).then(
|
||||||
function(rv) {
|
function(rv) {
|
||||||
if (rv.total_replies == 0) {
|
if (rv.total_replies == 0) {
|
||||||
$("#isso-thread > h4").textContent = Mark.up("{{ i18n-no-comments }}");
|
$("#isso-thread > h4").textContent = Mark.up("{{ i18n-no-comments }}");
|
||||||
|
Loading…
Reference in New Issue
Block a user