aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/riverdashboard/start.php1
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/js.php44
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/river/footer.php11
3 files changed, 28 insertions, 28 deletions
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php
index e42bc6e01..cc0c4abac 100644
--- a/mod/riverdashboard/start.php
+++ b/mod/riverdashboard/start.php
@@ -363,6 +363,7 @@ function riverdashboard_view_river_item($item) {
'pict' => elgg_view('core/river/image', array('item' => $item)),
'body' => elgg_view('riverdashboard/river/body', array('item' => $item)),
'class' => 'elgg-river-item',
+ 'id' => "river-entity-{$object->guid}",
);
return elgg_view('layout/objects/media', $vars);
/*
diff --git a/mod/riverdashboard/views/default/riverdashboard/js.php b/mod/riverdashboard/views/default/riverdashboard/js.php
index 9286d33fe..4995799f1 100644
--- a/mod/riverdashboard/views/default/riverdashboard/js.php
+++ b/mod/riverdashboard/views/default/riverdashboard/js.php
@@ -4,14 +4,14 @@
elgg_slide_toggle(this, '.elgg-module', '.river-comment-form');
});
- $('.likes_user_list_button').click(function() {
- var myParent = $(this).closest('.river-item');
+ $('.likes-user-list-button').click(function() {
+ var myParent = $(this).closest('.elgg-river-item');
var likesList = myParent.find('.likes-list');
if (likesList.css('display') == 'none') {
// pull in likes via ajax to save on loading many avatars
- var riverItem = $(this).closest('.river-item');
- var guid = riverItem.attr('id').replace('river_entity_', '');
+ var riverItem = $(this).closest('.elgg-river-item');
+ var guid = riverItem.attr('id').replace('river-entity-', '');
var params = {
'entity_guid': guid
@@ -19,37 +19,37 @@
$(likesList).load('<?php echo elgg_get_site_url();?>mod/riverdashboard/endpoint/get_likes.php', params, function(data) {
// hide comments
- myParent.find('.comments_container').animate({"height": "toggle", "opacity": "toggle"}, { duration: 400 });
+ myParent.find('.comments-container').animate({"height": "toggle", "opacity": "toggle"}, { duration: 400 });
// change selected tab
- myParent.find('.show_comments_button').addClass('off');
- myParent.find('.likes_user_list_button').removeClass('off');
+ myParent.find('.show-comments-button').addClass('off');
+ myParent.find('.likes-user-list-button').removeClass('off');
// show users that liked object
- elgg_slide_toggle(this, '.river-item', '.likes-list');
+ elgg_slide_toggle(this, '.elgg-river-item', '.likes-list');
});
}
});
- $('.show_comments_button').click(function() {
- var myParent = $(this).closest('.river-item');
- if (myParent.find('.comments_container').css('display') == 'none') {
+ $('.show-comments-button').click(function() {
+ var myParent = $(this).closest('.elgg-river-item');
+ if (myParent.find('.comments-container').css('display') == 'none') {
// hide likes
myParent.find('.likes-list').animate({"height": "toggle", "opacity": "toggle"}, { duration: 400 });
// change selected tab
- myParent.find('.show_comments_button').removeClass('off');
- myParent.find('.likes_user_list_button').addClass('off');
+ myParent.find('.show-comments-button').removeClass('off');
+ myParent.find('.likes-user-list-button').addClass('off');
// show users that liked object
- elgg_slide_toggle(this, '.river-item', '.comments_container');
+ elgg_slide_toggle(this, '.elgg-river-item', '.comments-container');
}
});
// grab more comments
- $('.river-more-comments.show_more_button').click(function() {
- var showLess = $(this).next('.show_less_button');
+ $('.river-more-comments.show-more-button').click(function() {
+ var showLess = $(this).next('.show-less-button');
var showMore = $(this);
- var riverItem = $(this).closest('.river-item');
+ var riverItem = $(this).closest('.elgg-river-item');
- var guid = riverItem.attr('id').replace('river_entity_', '');
- var commentsList = riverItem.find('.comments_list');
+ var guid = riverItem.attr('id').replace('river-entity-', '');
+ var commentsList = riverItem.find('.comments-list');
var numComments = riverItem.find('.river-comment').length;
var params = {
@@ -67,10 +67,10 @@
});
// hide more comments
- $('.river-more-comments.show_less_button').click(function() {
+ $('.river-more-comments.show-less-button').click(function() {
var showLess = $(this);
- var showMore = $(this).prev('.show_more_button');
- var riverItem = $(this).closest('.river-item');
+ var showMore = $(this).prev('.show-more-button');
+ var riverItem = $(this).closest('.elgg-river-item');
// want to keep the latest 3 comments
var comments = riverItem.find('.river-comment')
comments = $.makeArray(comments).reverse();
diff --git a/mod/riverdashboard/views/default/riverdashboard/river/footer.php b/mod/riverdashboard/views/default/riverdashboard/river/footer.php
index 82aae00c2..6df58b5da 100644
--- a/mod/riverdashboard/views/default/riverdashboard/river/footer.php
+++ b/mod/riverdashboard/views/default/riverdashboard/river/footer.php
@@ -40,7 +40,7 @@ if ($comments){
$counter = 0;
echo "<div class='river-comments-tabs clearfix'>";
- echo "<a class='river-more-comments show_comments_button link'>" . elgg_echo('comments') . '</a>';
+ echo "<a class='river-more-comments show-comments-button link'>" . elgg_echo('comments') . '</a>';
if ($likes_count != 0) {
echo elgg_view('forms/likes/display', array('entity' => $object));
@@ -56,15 +56,15 @@ if ($comments){
echo "<div class='likes-list hidden'></div>";
}
- echo "<div class=\"comments_container\">";
+ echo "<div class=\"comments-container\">";
// display appropriate comment link
if ($more_comments_count > 0) {
- echo "<a class=\"river-more-comments show_more_button link\">" .
+ echo "<a class=\"river-more-comments show-more-button link\">" .
elgg_echo('riverdashboard:n_more_comments', array($more_comments_count)) . '</a>';
- echo "<a style=\"display: none\" class=\"river-more-comments show_less_button link\">" . elgg_echo('riverdashboard:show_less') . '</a>';
+ echo "<a style=\"display: none\" class=\"river-more-comments show-less-button link\">" . elgg_echo('riverdashboard:show_less') . '</a>';
}
- echo "<div class=\"comments_list\">";
+ echo "<div class=\"comments-list\">";
foreach ($comments as $comment) {
//get the comment owner
$comment_owner = get_user($comment->owner_guid);
@@ -128,4 +128,3 @@ if ($comments){
echo "</div>";
}
}
-?>