Page 1 of 1

Link to open Modal dialog in Preview extension

Posted: Mon Oct 03, 2016 1:25 pm
by mobhar

It seems the link to open the Modal dialog in Preview extension does not follow the logic in PHPMaker core template.

To reproduce the issue, please do the following steps:

  1. Open the demo project file using PHPMaker, and make sure "Preview" extension has been enabled,
  2. Click on "orderdetails" table, then enable "Modal dialog" option under "Table" setup -> "Add Page" and "Edit Page",
  3. Regenerate ALL the script files using PHPMaker,
  4. Run the generated web application via browser, go to "Orders" List page,
  5. Click on "+" (plus) button next to one of the records in the table to expand the "Order Details" preview area,
  6. Select an "Edit" link from the List Options of "Order Details" preview area, then the normal "Edit Page" will be shown up, instead of the Modal dialog.

Re: Link to open Modal dialog in Preview extension

Posted: Mon Oct 03, 2016 4:53 pm
by Webmaster

Preview extension does not support modal dialog. The preview extension itself show contents retrieved by Ajax, and it cannot refresh itself even you change the links to show modal dialogs.


Re: Link to open Modal dialog in Preview extension

Posted: Mon Oct 03, 2016 5:37 pm
by mobhar

Understood. However, it looks funny when we intent to display the Add/View/Edit Pages using Modal dialog, but in the other side, those pages that opened from Preview area not using Modal dialog. This is not consistent. In addition, since Modal dialog will refresh the current background page, then there should be no problem about the refresh process. Of course we agree to follow the process for the current (master) List page, and of course this will automatically refresh the Preview area itself.


Re: Link to open Modal dialog in Preview extension

Posted: Mon Oct 03, 2016 6:13 pm
by Webmaster

Webmaster wrote:
The preview extension itself show contents retrieved by Ajax

Refreshing the List page is not same as refreshing the preview row. You need to re-open the previously opened preview row. Correct approach should be to reload the preview row only by Ajax, but currently there is no such functionality in the preview extension.


Re: Link to open Modal dialog in Preview extension

Posted: Mon Oct 03, 2016 6:20 pm
by mobhar

Webmaster wrote:
Correct approach should be to reload the preview row only

We know this limitation. That's why we don't care about it. Refreshing the current master List page is fine. This analog is similar to deleting process from Preview area. As we can see, the Preview row cannot be reloaded. In this case, the current master List page will be reloaded/refreshed as well.