allow meeting name separately when joining from room

This commit is contained in:
Zachary Chai
2017-01-26 18:59:25 -05:00
parent 066755c56c
commit 5180a99c32
4 changed files with 49 additions and 11 deletions

View File

@ -191,6 +191,15 @@
var initRooms = function() {
displayRoomURL();
$('.center-panel-wrapper').on('keyup', '.meeting-name', function (event, msg) {
var newName = $(this).val();
// Meeting.getInstance().setMeetingId(newId);
Meeting.getInstance().setMeetingName(newName);
// $(".page-wrapper.meetings").data('id', newId);
// $('.meeting-url').val(Meeting.getInstance().getURL());
// $('.join-meeting-title').html(I18n.join_title.replace(/%{id}/, newId));
});
Recordings.getInstance().refresh();
Recordings.getInstance().setupActionHandlers();
};

View File

@ -19,7 +19,7 @@
_meetingInstance = null
class @Meeting
constructor: (@meetingId, @type, @userName) ->
constructor: (@meetingId, @type, @userName, @meetingName) ->
# Gets the current instance or creates a new one
@getInstance: ->
@ -35,8 +35,12 @@ class @Meeting
@clear: ->
_meetingInstance = null
@buildMeetingURL: (id, type) ->
return @buildFullDomainURL() + '/' + type + '/' + encodeURIComponent(id)
@buildMeetingURL: (id, type, name) ->
if name
name = '/' + encodeURIComponent(name)
else
name = ''
return @buildFullDomainURL() + '/' + type + '/' + encodeURIComponent(id) + name
@buildFullDomainURL: ->
url = location.protocol + '//' + location.hostname
@ -80,6 +84,10 @@ class @Meeting
@meetingId = id
return this
setMeetingName: (name) ->
@meetingName = name
return this
getType: ->
return @type
@ -88,7 +96,7 @@ class @Meeting
return this
getURL: ->
return Meeting.buildMeetingURL(@meetingId, @type)
return Meeting.buildMeetingURL(@meetingId, @type, @meetingName)
getUserName: ->
return @userName