Loading js/index.js +12 −0 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,8 @@ for (var i = 0; i < users.length; i++) { for (var i = 0; i < users.length; i++) { $userSelector.append('<option value="' + i + '">' + users[i] + '</option>'); $userSelector.append('<option value="' + i + '">' + users[i] + '</option>'); } } updateJoinButtonStatus(); }); }); }; }; } } Loading Loading @@ -71,6 +73,14 @@ $('.primary-identity-icon').tooltip(); $('.primary-identity-icon').tooltip(); } } /** * Enable or disable the join button if there are selected users or not. */ function updateJoinButtonStatus() { var selectedUserIndex = $('#user-selector-group select').val(); $('#send-join-request-btn').prop("disabled", selectedUserIndex === null); } // When the document is loaded // When the document is loaded $(document).ready(function () { $(document).ready(function () { Loading @@ -93,6 +103,8 @@ $('#info-message-alert').addClass('hide'); $('#info-message-alert').addClass('hide'); }); }); $('#search-user-modal').on('shown.bs.modal', updateJoinButtonStatus); loadTooltips(); loadTooltips(); }); }); Loading Loading
js/index.js +12 −0 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,8 @@ for (var i = 0; i < users.length; i++) { for (var i = 0; i < users.length; i++) { $userSelector.append('<option value="' + i + '">' + users[i] + '</option>'); $userSelector.append('<option value="' + i + '">' + users[i] + '</option>'); } } updateJoinButtonStatus(); }); }); }; }; } } Loading Loading @@ -71,6 +73,14 @@ $('.primary-identity-icon').tooltip(); $('.primary-identity-icon').tooltip(); } } /** * Enable or disable the join button if there are selected users or not. */ function updateJoinButtonStatus() { var selectedUserIndex = $('#user-selector-group select').val(); $('#send-join-request-btn').prop("disabled", selectedUserIndex === null); } // When the document is loaded // When the document is loaded $(document).ready(function () { $(document).ready(function () { Loading @@ -93,6 +103,8 @@ $('#info-message-alert').addClass('hide'); $('#info-message-alert').addClass('hide'); }); }); $('#search-user-modal').on('shown.bs.modal', updateJoinButtonStatus); loadTooltips(); loadTooltips(); }); }); Loading