VRFS-1558 wire up share button dialog / hide new share icon if session has ended

This commit is contained in:
Brian Smith 2014-04-26 23:59:38 -04:00
parent 7e2d37bac5
commit 37c23d4ee2
6 changed files with 20 additions and 9 deletions

View File

@ -36,6 +36,5 @@
//= require AAB_message_factory
//= require AAC_underscore
//= require utils
//= require ui_helper
//= require custom_controls
//= require_directory .

View File

@ -324,9 +324,15 @@
$('.musician-name', $feedItem).click(toggleUserProfile);
$('.artist', $feedItem).click(toggleBandProfile);
$('.btn-share', $feedItem).click(function() {
ui.launchShareDialog(feed.id, 'session');
});
if (!feed.session_removed_at)
{
$('.btn-share', $feedItem).click(function() {
ui.launchShareDialog(feed.id, 'session');
});
}
else {
$('.btn-share', $feedItem).hide();
}
$('.btn-comment', $feedItem).click(function() {
ui.launchCommentDialog(feed.id, 'session');

View File

@ -9,4 +9,5 @@
//= require ga
//= require jam_rest
//= require landing/init
//= require landing/signup
//= require landing/signup
//= require shareDialog

View File

@ -413,7 +413,7 @@
$(dialogId + ' .link-contents').text(entity.share_url)
})
.fail(function(jqXHR) {
app.notifyServerError(jqXHR, "Unable to Fetch Session Data");
app.notifyServerError(jqXHR, "Unable to Fetch Recording Data");
})
}
else {

View File

@ -32,9 +32,10 @@
.left.small
= session_genre(feed_item)
.right.small.feed-details
%a{title: 'Share', class: 'btn-share'}
= image_tag 'content/icon_share.png', :height => "12", :width => "7"
 
- if !feed_item.session_removed_at
%a{title: 'Share', class: 'btn-share'}
= image_tag 'content/icon_share.png', :height => "12", :width => "7"
 
%span.play-count
%span.plays
= feed_item.play_count

View File

@ -25,3 +25,7 @@
$(function () {
window.JK.WelcomePage();
})
- content_for :extra_dialogs do
= render :partial => "clients/shareDialog"
= render :partial => "clients/commentDialog"