ADDNEW() on modal dialog from tab

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
User avatar
wsiconcrete
Posts: 18
Joined: 2015-04-27 16:39
Location: SC, USA

ADDNEW() on modal dialog from tab

Post by wsiconcrete » 2020-03-22 23:22

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

Code: Select all

<!--ADDNEW(documents) -->
...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

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: ADDNEW() on modal dialog from tab

Post by pbottcher » 2020-03-23 21:17

Hi,
maybe you should post that on the plugin subforum as it seems related to the plugin, not to the general features.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: ADDNEW() on modal dialog from tab

Post by jsetzer » 2020-03-23 22:03

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!
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: ADDNEW() on modal dialog from tab

Post by jsetzer » 2020-03-23 22:25

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
chrome_4aw8qjVqVT.png (26.42 KiB) Viewed 24969 times

But when I open the same record from a children-tab of a parent record...

chrome_KkVycFUkcp.png
chrome_KkVycFUkcp.png (15.76 KiB) Viewed 24969 times

... the add-button is missing:

chrome_aiEETtxgns.png
chrome_aiEETtxgns.png (28.09 KiB) Viewed 24969 times

And I also can find that kind of comment at the place where I expected the add-button:

Code: Select all

<!-- ADDNEW(accident_types) -->
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
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
wsiconcrete
Posts: 18
Joined: 2015-04-27 16:39
Location: SC, USA

Re: ADDNEW() on modal dialog from tab

Post by wsiconcrete » 2020-03-23 23:04

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

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: ADDNEW() on modal dialog from tab

Post by jsetzer » 2020-03-23 23:11

Thank you for your feedback.
Stay healthy!
Jan
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: ADDNEW() on modal dialog from tab

Post by pbottcher » 2020-03-24 20:13

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 */
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
wsiconcrete
Posts: 18
Joined: 2015-04-27 16:39
Location: SC, USA

Re: ADDNEW() on modal dialog from tab

Post by wsiconcrete » 2020-03-25 00:19

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? :D ), well worth the money!!

Thanks again!
Brandon

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: ADDNEW() on modal dialog from tab

Post by onoehring » 2021-03-06 09:00

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

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: ADDNEW() on modal dialog from tab

Post by a.gneady » 2021-03-07 19:28

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.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.


balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: ADDNEW() on modal dialog from tab

Post by balfons » 2021-03-30 10:36

Hi!

I was also in need of this button because of high use of children tabs :roll:

I would also thank you for checking if you can re-enable this feature

User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Re: ADDNEW() on modal dialog from tab

Post by zibrahim » 2021-04-01 01:51

Hi there,
Good news!!!
It is enabled now in Latest version 5.95 (released on Mar 29, 2021).
Downloaded and tested. Thanks Ahmed!!!
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: ADDNEW() on modal dialog from tab

Post by balfons » 2021-04-06 13:27

Wow! Terrific news! :lol: :lol: :lol:

Thanks a lot Ahmed!!!

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: ADDNEW() on modal dialog from tab

Post by a.gneady » 2021-04-12 13:30

You're always welcome :)
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Post Reply