Page 1 of 1

nuBeforeDelete() event?

Posted: Fri Feb 23, 2018 7:40 am
by toms
Hi,

There's an event nuBeforeSave() that allows you to cancel a save action.
What about a nuBeforeDelete() event? This would be useful if you want to allow/disallow the deletion of certain records.
E.g. to allow a user to delete only his own records or some records that meet certain criterias etc.

Code: Select all

function nuBeforeDelete() {
 if (nuUserName() != $('#cus_name').val()) {
   nuMessage(['You can only delete your own records']);
   return false;
 }
  return true;
}

Re: nuBeforeDelete() event?

Posted: Fri Feb 23, 2018 9:45 am
by admin
toms,

Good idea.

I have added that now on Github.

Steven

Re: nuBeforeDelete() event?

Posted: Sat Feb 24, 2018 12:33 pm
by toms
Thanks!

Re: nuBeforeDelete() event?

Posted: Sat Feb 24, 2018 9:32 pm
by admin
.