In the course of #5387, this patch rewrites the lobby GUI page code to use object orientation.
Resulting folder structure:
LeaderboardPage/LeaderboardList.js LeaderboardPage/LeaderboardPage.js LeaderboardPage/LeaderboardPage.xml lobby.js Lobby.js LobbyPage/AnnouncementHandler.js LobbyPage/Buttons/BuddyButton.js LobbyPage/Buttons/HostButton.js LobbyPage/Buttons/JoinButton.js LobbyPage/Buttons/LeaderboardButton.js LobbyPage/Buttons/ProfileButton.js LobbyPage/Buttons/QuitButton.js LobbyPage/Chat/ChatCommandHandler.js LobbyPage/Chat/ChatInputPanel.js LobbyPage/Chat/ChatMessages/ChatMessageEvents.js LobbyPage/Chat/ChatMessages/ChatMessageFormat.js LobbyPage/Chat/ChatMessages/ChatMessageFormatMe.js LobbyPage/Chat/ChatMessages/ChatMessageFormatSay.js LobbyPage/Chat/ChatMessages/ChatMessagePrivateWrapper.js LobbyPage/Chat/ChatMessagesPanel.js LobbyPage/Chat/ChatPanel.js LobbyPage/Chat/ChatPanel.xml LobbyPage/Chat/StatusMessages/StatusMessageEvents.js LobbyPage/Chat/StatusMessages/StatusMessageFormat.js LobbyPage/Chat/SystemMessages/SystemMessageEvents.js LobbyPage/Chat/SystemMessages/SystemMessageFormat.js LobbyPage/Chat/TimestampWrapper.js LobbyPage/ConnectionHandler.js LobbyPage/GameDetails.js LobbyPage/GameDetails.xml LobbyPage/Game.js LobbyPage/GameListFilters/MapSize.js LobbyPage/GameListFilters/MapType.js LobbyPage/GameListFilters/OpenGame.js LobbyPage/GameListFilters/PlayerCount.js LobbyPage/GameListFilters/Rating.js LobbyPage/GameListFilters.xml LobbyPage/GameList.js LobbyPage/GameList.xml LobbyPage/KickStrings.js LobbyPage/LobbyPage.js LobbyPage/LobbyPage.xml LobbyPage/PlayerColor.js LobbyPage/PlayerList.js LobbyPage/PlayerList.xml LobbyPage/ProfilePanel.js LobbyPage/ProfilePanel.xml LobbyPage/Subject.js LobbyPage/Subject.xml lobby.xml ProfilePage/ProfilePage.js ProfilePage/ProfilePage.xml XmppMessages.js
The purpose is to improve moddability, extensibility, readability and scalability by decoupling different page components and separation of concerns.
The class container allows storing variables as locals instead of globals and facilitates information hiding.