Hi,
I notice, that when I open a table the usual way, I (depending on permissions) am able to add to lookup fields directly.
Unfortunately this is does not seem to be possible when the same table is opened from a child-register in a modal window:
My request: Please add the option to add to lookup fields directly from modal windows as well.
Olaf
enable adding to lookup in modal window
enable adding to lookup in modal window
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: enable adding to lookup in modal window
Hi Olaf,
I believe similar issue was discussed in this post
viewtopic.php?t=3502
I am using pböttcher's suggested codes and it works well.
However, I need to keep changing it whenever I generate the AG files.
I hope this will help.
Stay safe.
I believe similar issue was discussed in this post
viewtopic.php?t=3502
I am using pböttcher's suggested codes and it works well.
However, I need to keep changing it whenever I generate the AG files.
I hope this will help.
Stay safe.
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.
Re: enable adding to lookup in modal window
Hi zibrahim,
sure this helps. Thank you for pointing out the thread.
For my purpose I installed a new button below the child table - maybe someone else can make use of it (this solution will stay when you regenerate your application, but is's a little different approach than zibrahim's link shows):
The code I used was this the following. .. May be easier, but it works (I am no JS type of person). I placed it into the footer and adding the variable which holds all code to DV and TVDV footer:
In the switch of the footer function I am using this to add the code:
Olaf
sure this helps. Thank you for pointing out the thread.
For my purpose I installed a new button below the child table - maybe someone else can make use of it (this solution will stay when you regenerate your application, but is's a little different approach than zibrahim's link shows):
The code I used was this the following. .. May be easier, but it works (I am no JS type of person). I placed it into the footer and adding the variable which holds all code to DV and TVDV footer:
Code: Select all
// START button
$customerhint = '<button type="button" class="btn btn-success hspacer-md" id="SOME_ID" title="SOME_TITLE"><i class="glyphicon glyphicon-plus-sign"></i> New WHATEVER</button>';
$customerhint = '<span class="customerhint">' . $customerhint . '</span>';
//show only once in footer below details table
$customerhint_kurz = "\n<script>\n
\$j(function() {
var k_cnter = 0;
var custxt = setInterval(custHint, 1000);
function custHint (){
var n = \$j('#panel_CHILDTABLENAME-PRIMARYKEYNAME').find('span.customerhint').length; //place outside of table to show count-badge
if (n < 1 ) {
//\$j('#panel_CHILDTABLENAME-PRIMARYKEYNAME tfoot tr td').append(' " . $customerhint . "')
\$j('#panel_CHILDTABLENAME-PRIMARYKEYNAME').append(' " . $customerhint . "'); //place outside of table to show count-badge
\$j('.customerhint').click(function(){
var link = '/AGTABLENAME_TO_ADD_NEW_RECORD.php?addNew_x=1&Embedded=1';
modal_window({
url: link,
size: 'full',
noAnimation: true,
title: 'TITLE SHOWN IN MODAL WINDOW HEADER', /* change that to the desired modal window title */
close: function() {
//do things on close of modal;
}
});
});
} else {
k_cnter++;
if (k_cnter > 20){
clearInterval(custHint);
}
}
};
})
\n</script>\n";
// show extra button only if current user has permissions to add to the table
$usr_has_permission = getTablePermissions('AGTABLENAME_TO_ADD_NEW_RECORD');
if ($usr_has_permission['insert'] != 1) {
$customerhint_kurz = '';
}
// END button
Code: Select all
...
case 'detailview':
$footer = $customerhint_kurz. '<%%FOOTER%%>';
break;
case 'tableview+detailview':
$footer = $customerhint_kurz . '<%%FOOTER%%>';
break;
...
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view