Take max comments to load from config.js

pull/83/head
Srijan Choudhary 10 years ago
parent 8dbf4d5337
commit 76d5dbc97f

@ -5,6 +5,7 @@ define(function() {
"css": true,
"lang": (navigator.language || navigator.userLanguage).split("-")[0],
"reply-to-self": false,
"max-comments": 20,
"avatar-bg": "#f0f0f0",
"avatar-fg": ["#9abf88", "#5698c4", "#e279a3", "#9163b6",
"#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",
function() {
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) {
if (rv.total_replies == 0) {
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('<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) {
if (rv.total_replies == 0) {
$("#isso-thread > h4").textContent = Mark.up("{{ i18n-no-comments }}");

Loading…
Cancel
Save