phpBB

Code Changes

File: styles/prosilver/template/ajax.js

  Unmodified   Added   Modified   Removed
Line 101Line 101
phpbb.addAjaxCallback('notification.mark_all_read', function(res) {
if (typeof res.success !== 'undefined') {
phpbb.markNotifications($('#notification_list li.bg2'), 0);

phpbb.addAjaxCallback('notification.mark_all_read', function(res) {
if (typeof res.success !== 'undefined') {
phpbb.markNotifications($('#notification_list li.bg2'), 0);

 
		phpbb.toggleDropdown.call($('#notification_list_button'));

		phpbb.closeDarkenWrapper(3000);
}
});

		phpbb.closeDarkenWrapper(3000);
}
});

Line 336Line 337
	}
});


	}
});


 
// Prevent accidental double submission of form
$('[data-prevent-flood] input[type=submit]').click(function(event) {
const $submitButton = $(this); // Store the button element
const $form = $submitButton.closest('form');

// Always add the disabled class for visual feedback
$submitButton.addClass('disabled');

// Submit form if it hasn't been submitted yet
if (!$form.prop('data-form-submitted')) {
$form.prop('data-form-submitted', true);

return;
}

// Prevent default submission for subsequent clicks within 5 seconds
event.preventDefault();

setTimeout(() => {
$form.prop('removeProp', 'data-form-submitted');
$submitButton.removeClass('disabled'); // Re-enable after 5 seconds
}, 5000);
});


/**
* This simply appends #preview to the action of the


/**
* This simply appends #preview to the action of the

Line 359Line 383
	$('#post_content' + postId).show();
$('#profile' + postId).show();
$('#post_hidden' + postId).hide();

	$('#post_content' + postId).show();
$('#profile' + postId).show();
$('#post_hidden' + postId).hide();

 
});

/**
* Display hidden post on post review page
*/
$('.display_post_review').on('click', function(e) {
e.preventDefault();

let $displayPostLink = $(this);
$displayPostLink.closest('.post-ignore').removeClass('post-ignore');
$displayPostLink.hide();

});

/**

});

/**