Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Could you make the "Delete All" button visible on both the Browse and Edit Form? This allows you to delete all debug entries right from the Browse form without the need to open a record first.
debug_view.PNG
I made this small change to the zzzzsys_debug javascript:
if(nuFORM.getCurrent().record_id != ''){
$('.nuActionButton').remove();
nuAddActionButton('Delete');
// old position: nuAddActionButton('DeleteAll','Delete All', 'nuDeleteAllAction()');
}
// new position:
nuAddActionButton('DeleteAll','Delete All', 'nuDeleteAllAction()');
In addition to that, to prevent the debug form from closing after hitting the "Delete All" button, I modified nuajax.js (There might be another way of doing it)
The deleting works just fine. I just noticed a small glitch in the record navigator. "1/0" is shown instead of "0/0" after hitting "Delete All". This issue might occur on any other Browse Form too.
page1_0.PNG
You do not have the required permissions to view the files attached to this post.
The number of pages is now displayed correctly (Page 1 / 1) after deleting all records.
Now if I click the next icon (►) in the record navigator, (Page 0 / 1) is shown. Then, hitting twice the back button (◄) , I see two new entries in the debug list:
nuDebug_Errors.png
===PDO MESSAGE===
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-15, 15' at line 4
===SQL===========
SELECT zzzzsys_debug_id,deb_message,deb_added
FROM zzzzsys_debug
WHERE 1
ORDER BY zzzzsys_debug_id DESC LIMIT -15, 15
===BACK TRACE====
You do not have the required permissions to view the files attached to this post.