From 64e5d438c7ce291dd030b51d1467fc8736f0aa27 Mon Sep 17 00:00:00 2001
From: Andy Staudacher
Date: Sat, 13 Feb 2010 13:57:02 -0800
Subject: HTML validation, avoid empty
---
modules/comment/js/comment.js | 2 +-
modules/comment/views/comments.html.php | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
(limited to 'modules/comment')
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js
index bb204b78..3c8097c6 100644
--- a/modules/comment/js/comment.js
+++ b/modules/comment/js/comment.js
@@ -29,7 +29,7 @@ function ajaxify_comment_form() {
dataType: "json",
success: function(data) {
if (data.result == "success") {
- $("#g-comments #g-comment-detail ul").append(data.view);
+ $("#g-comments #g-comment-detail ul").append(data.view);
$("#g-comments #g-comment-detail ul li:last").effect("highlight", {color: "#cfc"}, 8000);
$("#g-comment-form").hide(2000).remove();
$("#g-no-comments-yet").hide(2000);
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index 0ed07c22..58ff1765 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -10,7 +10,9 @@
= t("No comments yet. Be the first to comment!",
array("attrs" => html::mark_clean("id= \"g-no-comments\" href=\"" . url::site("form/add/comments/{$item->id}") . "\" class=\"showCommentForm\""))) ?>
+
endif ?>
+ if ($comments->count()): ?>
foreach ($comments as $comment): ?>
endforeach ?>
+ endif ?>
--
cgit v1.2.3
From b103306f3d60407fd4e97ec601ba9baed467f766 Mon Sep 17 00:00:00 2001
From: Chad Kieffer
Date: Thu, 18 Feb 2010 19:26:07 -0700
Subject: Don't need 'right' class here. Positioning is absolute to the right.
---
modules/comment/views/comments.html.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'modules/comment')
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index 58ff1765..8e2a9e51 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -1,6 +1,6 @@
id}") ?>" id="g-admin-comment-button"
- class="g-button ui-corner-all ui-icon-left ui-state-default right">
+ class="g-button ui-corner-all ui-icon-left ui-state-default">
= t("Add a comment") ?>
--
cgit v1.2.3
From d4423eb34970f0068af463ebea17a748910ca835 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Tue, 23 Feb 2010 13:50:57 -0800
Subject: Reset the active user to admin in all test cases where we change the
user to something else.
---
modules/comment/tests/Comment_Model_Test.php | 3 +++
modules/gallery/tests/Access_Helper_Test.php | 9 +++++----
modules/gallery/tests/Item_Helper_Test.php | 3 +--
modules/gallery/tests/Item_Rest_Helper_Test.php | 4 ++++
modules/tag/tests/Tags_Rest_Helper_Test.php | 4 ++++
5 files changed, 17 insertions(+), 6 deletions(-)
(limited to 'modules/comment')
diff --git a/modules/comment/tests/Comment_Model_Test.php b/modules/comment/tests/Comment_Model_Test.php
index f0449c05..798e4f6d 100644
--- a/modules/comment/tests/Comment_Model_Test.php
+++ b/modules/comment/tests/Comment_Model_Test.php
@@ -18,6 +18,9 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Comment_Model_Test extends Gallery_Unit_Test_Case {
+ public function teardown() {
+ identity::set_active_user(identity::admin_user());
+ }
public function cant_view_comments_for_unviewable_items_test() {
$album = test::random_album();
diff --git a/modules/gallery/tests/Access_Helper_Test.php b/modules/gallery/tests/Access_Helper_Test.php
index 5331117d..6eca396c 100644
--- a/modules/gallery/tests/Access_Helper_Test.php
+++ b/modules/gallery/tests/Access_Helper_Test.php
@@ -20,6 +20,10 @@
class Access_Helper_Test extends Gallery_Unit_Test_Case {
private $_group;
+ public function setup() {
+ identity::set_active_user(identity::guest());
+ }
+
public function teardown() {
try {
$group = identity::lookup_group_by_name("access_test");
@@ -41,10 +45,7 @@ class Access_Helper_Test extends Gallery_Unit_Test_Case {
// Reset some permissions that we mangle below
access::allow(identity::everybody(), "view", item::root());
- }
-
- public function setup() {
- identity::set_active_user(identity::guest());
+ identity::set_active_user(identity::admin_user());
}
public function groups_and_permissions_are_bound_to_columns_test() {
diff --git a/modules/gallery/tests/Item_Helper_Test.php b/modules/gallery/tests/Item_Helper_Test.php
index 50587702..90106562 100644
--- a/modules/gallery/tests/Item_Helper_Test.php
+++ b/modules/gallery/tests/Item_Helper_Test.php
@@ -18,8 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Item_Helper_Test extends Gallery_Unit_Test_Case {
-
- public function setup() {
+ public function teardown() {
identity::set_active_user(identity::admin_user());
}
diff --git a/modules/gallery/tests/Item_Rest_Helper_Test.php b/modules/gallery/tests/Item_Rest_Helper_Test.php
index 6d1dd864..7b86c153 100644
--- a/modules/gallery/tests/Item_Rest_Helper_Test.php
+++ b/modules/gallery/tests/Item_Rest_Helper_Test.php
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Item_Rest_Helper_Test extends Gallery_Unit_Test_Case {
+ public function teardown() {
+ identity::set_active_user(identity::admin_user());
+ }
+
public function resolve_test() {
$album = test::random_album();
$resolved = rest::resolve(rest::url("item", $album));
diff --git a/modules/tag/tests/Tags_Rest_Helper_Test.php b/modules/tag/tests/Tags_Rest_Helper_Test.php
index cdf7bfdf..dbad0b02 100644
--- a/modules/tag/tests/Tags_Rest_Helper_Test.php
+++ b/modules/tag/tests/Tags_Rest_Helper_Test.php
@@ -26,6 +26,10 @@ class Tags_Rest_Helper_Test extends Gallery_Unit_Test_Case {
}
}
+ public function teardown() {
+ identity::set_active_user(identity::admin_user());
+ }
+
public function get_test() {
$t1 = tag::add(item::root(), "t1");
$t2 = tag::add(item::root(), "t2");
--
cgit v1.2.3