VRFS-1020 display share URL on dialog
This commit is contained in:
parent
db21415b7b
commit
003b5f8d33
|
|
@ -102,6 +102,9 @@
|
|||
sessionId = data.id;
|
||||
$('#session-mytracks-container').empty();
|
||||
displayDoneRecording(); // assumption is that you can't join a recording session, so this should be safe
|
||||
|
||||
var shareDialog = new JK.ShareDialog(context.JK.app, sessionId, "session");
|
||||
shareDialog.initialize(context.JK.FacebookHelperInstance);
|
||||
}
|
||||
|
||||
function alertCallback(type, text) {
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
$("#divWidgetPreview").addClass(entityType);
|
||||
|
||||
// SESSION
|
||||
if (entityType === sessionText.toLowerCase() ) {
|
||||
if (entityType === sessionText.toLowerCase()) {
|
||||
$("#lblWidgetCodeType").html(sessionText.toLowerCase());
|
||||
$("#lblWidgetPreviewType").html(sessionText.toLowerCase());
|
||||
$("#spnWidgetCodeBranding").text(liveSessionText.toLowerCase());
|
||||
|
|
@ -265,12 +265,13 @@
|
|||
|
||||
rest.getSessionHistory(entityId)
|
||||
.done(function(response) {
|
||||
var name, photoUrl;
|
||||
// var name, photoUrl;
|
||||
$(".link-contents").html(response.share_url);
|
||||
});
|
||||
}
|
||||
|
||||
// RECORDING
|
||||
else {
|
||||
else if (entityType === "recording") {
|
||||
var recordedText = textMap.RECORDED.toLowerCase();
|
||||
$("#lblWidgetCodeType").text(textMap.RECORDING);
|
||||
$("#lblWidgetPreviewType").text(textMap.RECORDING);
|
||||
|
|
@ -290,6 +291,8 @@
|
|||
photoUrl = context.JK.resolveAvatarUrl(response.recording.owner.photo_url);
|
||||
}
|
||||
|
||||
$(".link-contents").html(response.share_url);
|
||||
|
||||
$("#imgWidgetCodeAvatar").attr('src', photoUrl);
|
||||
$("#imgWidgetPreviewAvatar").attr('src', photoUrl);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@
|
|||
$("#txtRecordingComment").keypress(function(e) {
|
||||
if (e.which === 13) {
|
||||
addComment();
|
||||
$(this).val('');
|
||||
$(this).blur();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@
|
|||
$("#txtSessionComment").keypress(function(e) {
|
||||
if (e.which === 13) {
|
||||
addComment();
|
||||
this.val('')
|
||||
$(this).val('');
|
||||
$(this).blur();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ object @claimed_recording
|
|||
|
||||
attributes :id, :name, :description, :is_public, :is_downloadable, :genre_id
|
||||
|
||||
node :share_url do|claimed_recording|
|
||||
share_token_url(claimed_recording.share_token.token)
|
||||
node :share_url do |claimed_recording|
|
||||
unless claimed_recording.share_token.nil?
|
||||
share_token_url(claimed_recording.share_token.token)
|
||||
end
|
||||
end
|
||||
|
||||
child(:recording => :recording) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ object @history
|
|||
|
||||
attributes :music_session_id, :description, :genres
|
||||
|
||||
node :share_url do |history|
|
||||
unless history.share_token.nil?
|
||||
share_token_url(history.share_token.token)
|
||||
end
|
||||
end
|
||||
|
||||
child(:user => :creator) {
|
||||
attributes :name, :photo_url
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,10 @@ if :is_recording?
|
|||
end
|
||||
end
|
||||
|
||||
node :share_url do|music_session|
|
||||
node :share_url do |music_session|
|
||||
unless music_session.music_session_history.share_token.nil?
|
||||
share_token_url(music_session.music_session_history.share_token.token)
|
||||
end
|
||||
end
|
||||
|
||||
child(:connections => :participants) {
|
||||
|
|
|
|||
|
|
@ -39,10 +39,6 @@
|
|||
<div class="share-link">
|
||||
<h3>Share a Link:</h3>
|
||||
<div class="link-contents">
|
||||
<% unless true %>
|
||||
<%= "#{root_url}" %>
|
||||
<% end %>
|
||||
http://www.jamkazam.com/SOUt2Az
|
||||
</div>
|
||||
|
||||
<div class="right"><a class="button-orange">COPY LINK</a></div>
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@
|
|||
|
||||
JK = JK || {};
|
||||
|
||||
JK.root_url = "<%= root_url %>"
|
||||
|
||||
<% if Rails.env == "development" %>
|
||||
// if in development mode, we assume you are running websocket-gateway
|
||||
// on the same host as you hit your server.
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
$(function () {
|
||||
JK = JK || {};
|
||||
|
||||
JK.root_url = "<%= root_url %>"
|
||||
|
||||
<% if current_user %>
|
||||
JK.currentUserId = '<%= current_user.id %>';
|
||||
JK.currentUserAvatarUrl = JK.resolveAvatarUrl('<%= current_user.photo_url %>');
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@
|
|||
$(function () {
|
||||
JK = JK || {};
|
||||
|
||||
JK.root_url = "<%= root_url %>"
|
||||
|
||||
<% if current_user %>
|
||||
JK.currentUserId = '<%= current_user.id %>';
|
||||
JK.currentUserAvatarUrl = JK.resolveAvatarUrl('<%= current_user.photo_url %>');
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@
|
|||
$(function () {
|
||||
JK = JK || {};
|
||||
|
||||
JK.root_url = "<%= root_url %>"
|
||||
|
||||
<% if current_user %>
|
||||
JK.currentUserId = '<%= current_user.id %>';
|
||||
JK.currentUserAvatarUrl = JK.resolveAvatarUrl('<%= current_user.photo_url %>');
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@
|
|||
|
||||
JK = JK || {};
|
||||
|
||||
JK.root_url = "<%= root_url %>"
|
||||
|
||||
<% if current_user %>
|
||||
JK.currentUserId = '<%= current_user.id %>';
|
||||
JK.currentUserAvatarUrl = JK.resolveAvatarUrl('<%= current_user.photo_url %>');
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
<%= javascript_include_tag "web/sessions" %>
|
||||
|
||||
<% content_for :extra_dialogs do %>
|
||||
<%= render :partial => "clients/shareDialog", :locals => {:session => @music_session} %>
|
||||
<%= render :partial => "clients/shareDialog" %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :extra_js do %>
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
<%= javascript_include_tag "web/recordings" %>
|
||||
|
||||
<% content_for :extra_dialogs do %>
|
||||
<%= render :partial => "clients/shareDialog", :locals => {:recording => @claimed_recording, :share_token => @claimed_recording.share_token} %>
|
||||
<%= render :partial => "clients/shareDialog" %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :extra_js do %>
|
||||
|
|
|
|||
Loading…
Reference in New Issue