Page 1 of 1
ADDNEW() on modal dialog from tab
Posted: 2020-03-22 23:22
by wsiconcrete
Using AppGini 5.82 and have child tables displaying in tabs (also using inline detail view plugin). When I open a record from one of the tabs there is a lookup field that I want to add a new record to but there is no "add" button. Using inspector to view source I see
...in the source code where the button should be, where 'documents' is the table row I want to add a record to. Just curious if it is possible to add a new record in a modal opened this way or not. If I go directly to the child table and view a record i do get the add new button fwiw.
Thanks!
Brandon
Re: ADDNEW() on modal dialog from tab
Posted: 2020-03-23 21:17
by pbottcher
Hi,
maybe you should post that on the plugin subforum as it seems related to the plugin, not to the general features.
Re: ADDNEW() on modal dialog from tab
Posted: 2020-03-23 22:03
by jsetzer
wsiconcrete wrote: ↑2020-03-22 23:22
[...] (also using inline detail view plugin) [...]
Hi,
before creating a new post in a different subforum, can you please (1) deactivate the Inline DV plugin for this table for a second, then (2) clear browser cache and (3) reload a record in detail view. Check the behaviour again.
By deactivating Inline DV Plugin we can narrow down the problem and see if this is related to the plugin, as pböttcher suspects. Usually the Inline DV function does not interfere with (lazy loaded) children-tabs, so I'm confused about "[...] it seems related to the plugin [...]". I did not get any bugreport describing that behaviour, but maybe you are the first.
Best,
Jan
PS: Take care and stay at home!
Re: ADDNEW() on modal dialog from tab
Posted: 2020-03-23 22:25
by jsetzer
Hi @wsiconcrete,
I can confirm the described behaviour, it seems you are right: When I open a detail view directly from the table view, there is the Add-button next to the dropdown as I would expect.
- chrome_4aw8qjVqVT.png (26.42 KiB) Viewed 25049 times
But when I open the same record from a children-tab of a parent record...
- chrome_KkVycFUkcp.png (15.76 KiB) Viewed 25049 times
... the add-button is missing:
- chrome_aiEETtxgns.png (28.09 KiB) Viewed 25049 times
And I also can find that kind of comment at the place where I expected the add-button:
Is this similar to your scenario? This seems to be the standard behaviour of AppGini 5.82.
Best,
Jan
PS: Inline DV plugin is
not installed in that project
Re: ADDNEW() on modal dialog from tab
Posted: 2020-03-23 23:04
by wsiconcrete
Thank you for the replies Jan! Yes, exactly what I am seeing even with inline-div plugin deactivated (linked video below was after deactivating plugin on all tables then clearing all cache). Mostly I was just curious if this was intended/known behavior or something wrong with my installation. Would be nice for my particular workflow to have the add new button there, but not essential.
http://wsirmc.co/appgini.mp4
Thanks again for your input!
Brandon
Re: ADDNEW() on modal dialog from tab
Posted: 2020-03-23 23:11
by jsetzer
Thank you for your feedback.
Stay healthy!
Jan
Re: ADDNEW() on modal dialog from tab
Posted: 2020-03-24 20:13
by pbottcher
Hi,
so if it is native AppGini, you can try this:
In templates/TABLE_dml.php
search for
Code: Select all
// if user has insert permission to parent table of a lookup field, put an add new button
if($pt_perm['insert'] && .....
and replace it to
Code: Select all
// if user has insert permission to parent table of a lookup field, put an add new button
if($pt_perm['insert']) {
in templates/TABLE_templateDV.html
search for
Code: Select all
if(!embedded_mode) {
/* add a horizontal spacer to [add new parent] buttons that don't have a spacered element before them */
and replace it to
Code: Select all
if(1) {
/* add a horizontal spacer to [add new parent] buttons that don't have a spacered element before them */
Re: ADDNEW() on modal dialog from tab
Posted: 2020-03-25 00:19
by wsiconcrete
That got the buttons back. And FWIW it kept working after clearing cache and reactivating Inline Detail plugin.
Thanks for the quick assessment and solution!
Can't say enough about this program (AppGini) and all of the great folks on this forum. Stumbled across this community about 5 years ago and it has been so helpful to me and our business. Really excited about some of the updates and plugins that have been/are being released! Hope to see this project keep growing/improving! If anyone doesn't have it yet, get the Javascript Helper from bizzworxx (is it April yet?
), well worth the money!!
Thanks again!
Brandon
Re: ADDNEW() on modal dialog from tab
Posted: 2021-03-06 09:00
by onoehring
Hi,
I just want to push this thread, as this "error" unfortunately still exists in 5.94
(it's my feature request from
viewtopic.php?f=6&t=4221 )
Olaf
Re: ADDNEW() on modal dialog from tab
Posted: 2021-03-07 19:28
by a.gneady
Hello everyone
I remember that I disabled the insert button in modals because it was causing some issues on iOS -- specifically, nested modals (modals opened inside other modals) --- that was a few years ago so perhaps it's now fixed. I'll check it and re-enable the button if it's fixed.
Re: ADDNEW() on modal dialog from tab
Posted: 2021-03-07 21:46
by onoehring
HI,
great. Thanks for checking.
Olaf
Re: ADDNEW() on modal dialog from tab
Posted: 2021-03-30 10:36
by balfons
Hi!
I was also in need of this button because of high use of children tabs
I would also thank you for checking if you can re-enable this feature
Re: ADDNEW() on modal dialog from tab
Posted: 2021-04-01 01:51
by zibrahim
Hi there,
Good news!!!
It is enabled now in Latest version 5.95 (released on Mar 29, 2021).
Downloaded and tested. Thanks Ahmed!!!
Re: ADDNEW() on modal dialog from tab
Posted: 2021-04-06 13:27
by balfons
Wow! Terrific news!
Thanks a lot Ahmed!!!
Re: ADDNEW() on modal dialog from tab
Posted: 2021-04-12 13:30
by a.gneady
You're always welcome