Unexpected confirm.
4288}
4289
4290function nuDeleteAllAction () {
4291 if (confirm(nuTranslate('Delete All Records?'))) {4292 $('#nuDelete').prop('checked', true)
4293 nuUpdateData('delete', 'all')
4294 }
Unexpected confirm.
4281}
4282
4283function nuDeleteAction () {
4284 if (confirm(nuTranslate('Delete This Record?'))) {4285 $('#nuDelete').prop('checked', true)
4286 nuUpdateData('delete')
4287 }
Unexpected confirm.
2543 e.stopPropagation()
2544 e.preventDefault()
2545
2546 if (confirm(nuTranslate('Paste Data? Existing data might get overwritten'))) {2547 $('[data-nu-form="' + subformId + '"]').removeAttr('data-prevalue')
2548 nuSubformPaste(e, jsonObj)
2549
Unexpected confirm.
2475}
2476
2477function nuSubformUndoPaste (t) {
2478 if (confirm(nuTranslate('Undo the last paste? (The values before the insertion will be restored)?'))) {2479 $('[data-prevalue]').each(function () {
2480 const v = $(this).attr('data-prevalue')
2481 $(this).val(v).change()
Description
JavaScript's alert
, confirm
and prompt
functions are widely considered to be obtrusive as UI elements and should be replaced by a more appropriate custom UI implementation.
Furthermore, alert
is often used while debugging code, which should be removed before deployment to production.
Bad Practice
alert("here!");
confirm("Are you sure?");
prompt("What is your name?", "John Doe");
Recommended
customAlert("Something happened!");
customConfirm("Are you sure?");
customPrompt("Who are you?");
function foo() {
const alert = myCustomLib.customAlert;
alert();
}