forked from External/greenlight
		
	Don't ask for a name in the landing page, redir to the room/meeting
Instead of asking the user for a name in the landing page, it just redirects to the room/meeting page, where the user is asked to enter a name. If the user is signed in, no redirect is necessary and the user's name is used automatically.
This commit is contained in:
		@@ -32,7 +32,10 @@
 | 
			
		||||
    Meeting.clear();
 | 
			
		||||
    var nameInput = $('.meeting-user-name');
 | 
			
		||||
    if (!nameInput.val()) {
 | 
			
		||||
      nameInput.val(localStorage.getItem('lastJoinedName'));
 | 
			
		||||
      var lastName = localStorage.getItem('lastJoinedName');
 | 
			
		||||
      if (lastName !== 'undefined') {
 | 
			
		||||
        nameInput.val(localStorage.getItem('lastJoinedName'));
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // setup event handlers
 | 
			
		||||
@@ -40,18 +43,25 @@
 | 
			
		||||
      var name = $('.meeting-user-name').val();
 | 
			
		||||
      Meeting.getInstance().setName(name);
 | 
			
		||||
      Meeting.getInstance().setId($(".page-wrapper").data('id'));
 | 
			
		||||
      var jqxhr = Meeting.getInstance().getJoinMeetingResponse();
 | 
			
		||||
 | 
			
		||||
      jqxhr.done(function(data) {
 | 
			
		||||
        if (data.messageKey === 'wait_for_moderator') {
 | 
			
		||||
          waitForModerator(Meeting.getInstance().getURL());
 | 
			
		||||
        } else {
 | 
			
		||||
          $(location).attr("href", data.response.join_url);
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      jqxhr.fail(function(xhr, status, error) {
 | 
			
		||||
        console.info("meeting join failed");
 | 
			
		||||
      });
 | 
			
		||||
      // a user name is set, join the user into the session
 | 
			
		||||
      if (name !== undefined && name !== null) {
 | 
			
		||||
        var jqxhr = Meeting.getInstance().getJoinMeetingResponse();
 | 
			
		||||
        jqxhr.done(function(data) {
 | 
			
		||||
          if (data.messageKey === 'wait_for_moderator') {
 | 
			
		||||
            waitForModerator(Meeting.getInstance().getURL());
 | 
			
		||||
          } else {
 | 
			
		||||
            $(location).attr("href", data.response.join_url);
 | 
			
		||||
          }
 | 
			
		||||
        });
 | 
			
		||||
        jqxhr.fail(function(xhr, status, error) {
 | 
			
		||||
          console.info("meeting join failed");
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
      // if not user name was set it means we must ask for a name
 | 
			
		||||
      } else {
 | 
			
		||||
        $(location).attr("href", Meeting.getInstance().getURL());
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $('.center-panel-wrapper').on ('keypress', '.meeting-user-name', function (event) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user