diff options
Diffstat (limited to 'mod/riverdashboard/views/default/riverdashboard/js.php')
-rw-r--r-- | mod/riverdashboard/views/default/riverdashboard/js.php | 44 |
1 files changed, 22 insertions, 22 deletions
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(); |