forked from External/greenlight
cleanup meetings
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
};
|
||||
|
||||
var init = function() {
|
||||
Meeting.clear();
|
||||
|
||||
$('.center-panel-wrapper').on ('click', '.meeting-join', function (event) {
|
||||
var name = $('.meeting-user-name').val();
|
||||
@ -69,16 +70,17 @@
|
||||
|
||||
$('.generate-link').click (function (e) {
|
||||
e.preventDefault();
|
||||
var newId = Math.trunc(Math.random() * 1000000000);
|
||||
$(".page-wrapper.meetings").data('id', newId);
|
||||
var link = window.location.protocol +
|
||||
'//' +
|
||||
window.location.hostname +
|
||||
'/meetings/' +
|
||||
Math.trunc(Math.random() * 1000000000);
|
||||
|
||||
newId;
|
||||
$('.meeting-url').val(link);
|
||||
});
|
||||
|
||||
if (meetingId = $('.meeting-url').data('meetingId')) {
|
||||
if (meetingId = $(".page-wrapper.meetings").data('id')) {
|
||||
var link = window.location.protocol +
|
||||
'//' +
|
||||
window.location.hostname +
|
||||
|
@ -9,18 +9,25 @@ class @Meeting
|
||||
@getInstance: ->
|
||||
if _meetingInstance
|
||||
return _meetingInstance
|
||||
id = $(".page-wrapper.rooms").data('room')
|
||||
url = @buildURL()
|
||||
id = $(".page-wrapper").data('id')
|
||||
url = @buildURL(id)
|
||||
name = $('.meeting-user-name').val()
|
||||
_meetingInstance = new Meeting(id, url, name)
|
||||
return _meetingInstance
|
||||
|
||||
@buildURL: ->
|
||||
@clear: ->
|
||||
_meetingInstance = null
|
||||
|
||||
@buildURL: (id) ->
|
||||
if (resource = location.pathname.split('/')[1]) != 'rooms'
|
||||
resource = 'meetings'
|
||||
return location.protocol +
|
||||
'//' +
|
||||
location.hostname +
|
||||
'/rooms/' +
|
||||
$('.rooms').data('room')
|
||||
'/' +
|
||||
resource +
|
||||
'/' +
|
||||
id;
|
||||
|
||||
# Sends the end meeting request
|
||||
# Returns a response object
|
||||
|
@ -50,7 +50,7 @@ class @Recordings
|
||||
str = ''
|
||||
if row.published
|
||||
for d in data
|
||||
str += '<a href="'+d.url+'">'+d.type+'</a> '
|
||||
str += '<a href="'+d.url+'">'+d.type_i18n+'</a> '
|
||||
return str
|
||||
return data
|
||||
},
|
||||
|
Reference in New Issue
Block a user