diff --git a/web/app/assets/javascripts/application.js b/web/app/assets/javascripts/application.js index eaa5c92fc..ec1dee5c6 100644 --- a/web/app/assets/javascripts/application.js +++ b/web/app/assets/javascripts/application.js @@ -36,6 +36,5 @@ //= require AAB_message_factory //= require AAC_underscore //= require utils -//= require ui_helper //= require custom_controls //= require_directory . diff --git a/web/app/assets/javascripts/feed.js b/web/app/assets/javascripts/feed.js index 0280a24eb..df1820f3d 100644 --- a/web/app/assets/javascripts/feed.js +++ b/web/app/assets/javascripts/feed.js @@ -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'); diff --git a/web/app/assets/javascripts/landing/landing.js b/web/app/assets/javascripts/landing/landing.js index 3a9e9f7d0..fbdb167c0 100644 --- a/web/app/assets/javascripts/landing/landing.js +++ b/web/app/assets/javascripts/landing/landing.js @@ -9,4 +9,5 @@ //= require ga //= require jam_rest //= require landing/init -//= require landing/signup \ No newline at end of file +//= require landing/signup +//= require shareDialog \ No newline at end of file diff --git a/web/app/assets/javascripts/shareDialog.js b/web/app/assets/javascripts/shareDialog.js index c5dceb65b..dc3bca311 100644 --- a/web/app/assets/javascripts/shareDialog.js +++ b/web/app/assets/javascripts/shareDialog.js @@ -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 { diff --git a/web/app/views/users/_feed_music_session.html.haml b/web/app/views/users/_feed_music_session.html.haml index 6b0ee7294..d903ec43f 100644 --- a/web/app/views/users/_feed_music_session.html.haml +++ b/web/app/views/users/_feed_music_session.html.haml @@ -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 diff --git a/web/app/views/users/welcome.html.haml b/web/app/views/users/welcome.html.haml index 6624039b7..dcad67dd0 100644 --- a/web/app/views/users/welcome.html.haml +++ b/web/app/views/users/welcome.html.haml @@ -25,3 +25,7 @@ $(function () { window.JK.WelcomePage(); }) + +- content_for :extra_dialogs do + = render :partial => "clients/shareDialog" + = render :partial => "clients/commentDialog"