diff options
Diffstat (limited to 'mod/riverdashboard/views')
-rw-r--r-- | mod/riverdashboard/views/default/riverdashboard/js.php | 17 | ||||
-rw-r--r-- | mod/riverdashboard/views/default/riverdashboard/rivercomment.php | 16 |
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 |