properly generate some urls

This commit is contained in:
Zachary Chai
2017-02-07 14:14:39 -05:00
parent bfbdfc645e
commit b09ec1fc69
9 changed files with 20 additions and 15 deletions

View File

@ -26,8 +26,7 @@ class @Meeting
if _meetingInstance
return _meetingInstance
meetingId = $(".page-wrapper").data('id')
if (type = location.pathname.split('/')[1]) != 'rooms'
type = 'meetings'
type = $("body").data('resource')
name = $('.meeting-user-name').val()
adminId = $(".page-wrapper").data('admin-id')
_meetingInstance = new Meeting(meetingId, type, name, adminId)
@ -42,9 +41,9 @@ class @Meeting
fullId = encodeURIComponent(adminId) + '/' + encodeURIComponent(meetingId)
else
fullId = encodeURIComponent(meetingId)
return @buildFullDomainURL() + '/' + type + '/' + fullId
return @buildRootURL() + '/' + type + '/' + fullId
@buildFullDomainURL: ->
@buildRootURL: ->
url = location.protocol + '//' + location.hostname
if location.port
url += ':' + location.port

View File

@ -238,7 +238,7 @@ class @Recordings
getRecordingsURL: ->
if $(".page-wrapper.rooms").data('main-room')
base_url = '/rooms/'+Meeting.getInstance().getAdminId()
base_url = Meeting.buildRootURL()+'/'+$('body').data('resource')+'/'+Meeting.getInstance().getAdminId()
else
base_url = $('.meeting-url').val()
base_url+'/recordings'