[extensions-web] main: Remove the "Show All" button if we have under five comments total
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] main: Remove the "Show All" button if we have under five comments total
- Date: Fri, 12 Apr 2013 16:31:12 +0000 (UTC)
commit 6717048a42d1c9f8092acd158a15a4e66fd78130
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Mar 19 17:04:20 2013 -0400
main: Remove the "Show All" button if we have under five comments total
sweettooth/static/js/main.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/static/js/main.js b/sweettooth/static/js/main.js
index bce74a1..5ba1d4f 100644
--- a/sweettooth/static/js/main.js
+++ b/sweettooth/static/js/main.js
@@ -190,6 +190,9 @@ function($, messages, modal, hashParamUtils, templates) {
$loading.hide();
+ if (comments.length < 5)
+ showAll = false;
+
var data = { comments: comments, show_all: showAll };
var $newContent = $('<div>').append(templates.get('extensions/comments_list')(data));
$newContent.addClass('comments-holder');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]