aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/views
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 21:57:08 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 21:57:08 +0000
commitd86408d2662b961645b4ed4cdbd37d5150819cf4 (patch)
treec6b4488e5a3664aedbb22833249380d674b992c5 /mod/riverdashboard/views
parente66c96a5709b8b2f9c8b8348ba684bf775ae1405 (diff)
downloadelgg-d86408d2662b961645b4ed4cdbd37d5150819cf4.tar.gz
elgg-d86408d2662b961645b4ed4cdbd37d5150819cf4.tar.bz2
Fixed likes interface JS.
git-svn-id: http://code.elgg.org/elgg/trunk@5511 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard/views')
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/js.php17
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/rivercomment.php16
2 files changed, 12 insertions, 21 deletions
diff --git a/mod/riverdashboard/views/default/riverdashboard/js.php b/mod/riverdashboard/views/default/riverdashboard/js.php
index 01adec77c..ad96a6069 100644
--- a/mod/riverdashboard/views/default/riverdashboard/js.php
+++ b/mod/riverdashboard/views/default/riverdashboard/js.php
@@ -1,16 +1,7 @@
-<?php
-
-/*
<script type="text/javascript">
$(document).ready(function() {
-
- var href = $("div.river_pagination a").attr('href');
- href = href.replace("callback=true","callback=");
- $("div.river_pagination a").attr('href',href);
-
+ $('.river_comment_form_button').click(function() {
+ $(this).next('.river_comment_form').toggle();
+ });
});
-</script>
-
-*/
-
-?> \ No newline at end of file
+</script> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/riverdashboard/rivercomment.php b/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
index 4aa255882..61e5c238e 100644
--- a/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
+++ b/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
@@ -3,13 +3,13 @@
* Elgg comments add on river form
* @uses $vars['entity']
*/
-
+
if (isset($vars['entity']) && isloggedin()) {
- $form_body = "<a onclick=\" $('.river_comment_form').show('slow');\">Add comment</a>";
- $form_body .= "<div class=\"river_comment_form\" style=\"display:none;\">";
- $form_body .= elgg_view('input/text',array('internalname' => 'generic_comment', 'value' => 'Add a comment...'));
- $form_body .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
- $form_body .= elgg_view('input/submit', array('value' => elgg_echo("post")));
- $form_body .= "</div>";
- echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add"));
+ $form_body = "<a class=\"river_comment_form_button\">Add comment</a>";
+ $form_body .= "<div class=\"river_comment_form\" style=\"display:none;\">";
+ $form_body .= elgg_view('input/text',array('internalname' => 'generic_comment', 'value' => 'Add a comment...'));
+ $form_body .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
+ $form_body .= elgg_view('input/submit', array('value' => elgg_echo("post")));
+ $form_body .= "</div>";
+ echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add"));
} \ No newline at end of file