* VRFS-2192 - export recording button added to file sync dialog
This commit is contained in:
parent
fe7edbba5d
commit
58d96fc171
|
|
@ -9,8 +9,6 @@ module JamRuby
|
|||
attr_writer :current_user
|
||||
|
||||
|
||||
|
||||
|
||||
belongs_to :user, :class_name => "JamRuby::User", :inverse_of => :quick_mixes
|
||||
belongs_to :recording, :class_name => "JamRuby::Recording", :inverse_of => :quick_mixes, :foreign_key => 'recording_id'
|
||||
validates :ogg_md5, :presence => true, :if => :upload_starting?
|
||||
|
|
|
|||
|
|
@ -527,6 +527,23 @@ context.JK.SyncViewer = class SyncViewer
|
|||
$uploadState.addClass('is-native-client') if context.jamClient.IsNativeClient()
|
||||
$track
|
||||
|
||||
exportRecording: (e) =>
|
||||
$export = $(e.target)
|
||||
recordingId = $export.closest('.details').attr('data-recording-id')
|
||||
if !recordingId? or recordingId == ""
|
||||
throw "exportRecording can't find data-recording-id"
|
||||
|
||||
cmd =
|
||||
{ type: 'export_recording',
|
||||
action: 'export'
|
||||
queue: 'upload',
|
||||
recording_id: recordingId}
|
||||
|
||||
logger.debug("enqueueing export")
|
||||
context.jamClient.OnTrySyncCommand(cmd)
|
||||
return false;
|
||||
|
||||
|
||||
createRecordingWrapper: ($toWrap, recordingInfo) =>
|
||||
recordingInfo.recording_landing_url = "/recordings/#{recordingInfo.id}"
|
||||
$wrapperDetails = $(context._.template(@templateRecordingWrapperDetails.html(), recordingInfo, {variable: 'data'}))
|
||||
|
|
@ -539,6 +556,8 @@ context.JK.SyncViewer = class SyncViewer
|
|||
# create a virtual mix so that the UI is consistent
|
||||
$wrapper.append(this.createMix('fake', recordingInfo))
|
||||
|
||||
$wrapper.find('a.export').click(this.exportRecording)
|
||||
|
||||
separateByRecording: () =>
|
||||
$recordedTracks = @list.find('.sync')
|
||||
|
||||
|
|
|
|||
|
|
@ -192,8 +192,14 @@
|
|||
@include border_box_sizing;
|
||||
@include vertical-align-column;
|
||||
|
||||
.export {
|
||||
float:right;
|
||||
margin-right:3px;
|
||||
font-size:12px;
|
||||
}
|
||||
.timeago {
|
||||
float:right;
|
||||
font-size:12px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,13 +88,14 @@ script type="text/template" id='template-sync-viewer-no-syncs'
|
|||
| You have no recordings.
|
||||
|
||||
script type="text/template" id="template-sync-viewer-recording-wrapper-details"
|
||||
.details
|
||||
a.session-detail-page href="{{data.recording_landing_url}}" rel="external" data-session-id="{{data.recording_id}}"
|
||||
.details data-recording-id="{{data.id}}"
|
||||
a.session-detail-page href="{{data.recording_landing_url}}" rel="external"
|
||||
span.name
|
||||
| {{data.my ? data.my.name : 'Unknown Name'}}
|
||||
span.export
|
||||
span.timeago
|
||||
| {{$.timeago(data.created_at)}}
|
||||
a.export href="#"
|
||||
| EXPORT
|
||||
|
||||
script type="text/template" id="template-sync-viewer-hover-recorded-track"
|
||||
.help-hover-recorded-tracks
|
||||
|
|
|
|||
Loading…
Reference in New Issue