25 lines
916 B
JavaScript
25 lines
916 B
JavaScript
$(document).ready(function() {
|
|
//Check if the dialog should be shown based on the flag in local storage
|
|
if (!localStorage.getItem('tbm_dialog_closed')) {
|
|
$('#tbm-not-set-modal').modal('show');
|
|
}
|
|
|
|
//Handle click event for the close link
|
|
$('#close-tbm-modal').click(function() {
|
|
//Set flag in local storage when the close link is clicked
|
|
localStorage.setItem('tbm_dialog_closed', 'true');
|
|
});
|
|
|
|
//Handle click event for the "Set Measurements" button
|
|
$('#set-measurements-tbm-modal').click(function() {
|
|
//Set flag in local storage when the "Set Measurements" button is clicked
|
|
localStorage.setItem('tbm_dialog_closed', 'true');
|
|
});
|
|
|
|
//Listen for click event on logout button
|
|
$('.logout').click(function() {
|
|
//Clear the local storage item
|
|
localStorage.removeItem('tbm_dialog_closed');
|
|
});
|
|
});
|