ew_ModalDialogShow in front of ew_ModalDialogShow

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sangnandar
User
Posts: 980

ew_ModalDialogShow in front of ew_ModalDialogShow

Post by sangnandar »

I'm trying this scenario:

List page.
ListOptions_()
add link <a ... onclick=ew_ModalDialogShow({url:'table_listpage.php'})> ; // let's say this is ew_ModalDialogShow-1

At table_listpage.php, modal add/edit is enabled. Of course this modal is also <a ... onclick=ew_ModalDialogShow({url:'table_addpage.php'})>. This is ew_ModalDialogShow-2.

When I click on ew_ModalDialogShow-2 --> ew_ModalDialogShow-1 dismissed --> ew_ModalDialogShow-2 shows.

How to keep ew_ModalDialogShow-1 on the screen and ew_ModalDialogShow-2 shows in front of ew_ModalDialogShow-1 ?
Is it possible?

Since ew_ModalDialogShow-2 is an Add/Edit page, when it dismissed ew_ModalDialogShow-1 (List page) should be reloaded.
Any ideas?

Thanks, thanks, thanks.


mobhar
User
Posts: 11721

Post by mobhar »

sangnandar wrote:
add link <a ... onclick=ew_ModalDialogShow({url:'table_listpage.php'})> ; // let's
say this is ew_ModalDialogShow-1

Why did you want to show the List Page inside a Modal dialog window?


sangnandar
User
Posts: 980

Post by sangnandar »

It's the List Page of its detail table (<table>list.php?showmaster=bla..bla..bla..)
ew_ModalDialogShow-1 is actually master/detail page shown as modal.


mobhar
User
Posts: 11721

Post by mobhar »

Cannot reproduce your issue. I tried with demo project with "orders" (master) and "orderdetails" (detail) tables.

I added a new column with the link to open the orderdetailslist.php page in Modal dialog from the List Page that belongs to orderslist.php page. I also enable "Modal dialog" option for "Add Page" for "orderdetails" table.

Now I can open the first Modal dialog that contains the orderdetailslist.php page from the orderslist.php page, and the Modal dialog is shown up properly. Then, from that first Modal dialog, I tried to open the orderdetailsadd.php page in Modal dialog, but nothing happened. The second Modal dialog that contains orderdetailsadd.php page is never shown up.


sangnandar
User
Posts: 980

Post by sangnandar »

Hmm, that's strange.

I deployed demo project with only this modification:

Table: order
List Page.
ListOptions_Load()
$customlink = &$this->ListOptions->Add("customlink");
$this->ListOptions->Items["customlink"]->Header = '';
$customlink->MoveTo(1);

ListOptions_Rendered()
$customlink = "<a class=\"ewRowLink ewEdit\" href=\"javascript:void(0);\" onclick=\"ew_ModalDialogShow({lnk:this,url:'orderdetailslist.php?showmaster=orders&fk_OrderID=".$this->OrderID->CurrentValue."',btn:null});\" ><span class=\"icon-edit ewIcon\" ></span></a>";
$this->ListOptions->Items["customlink"]->Body = $customlink;

Table: orderdetails.
modal Add page enabled.

Generate all files.
First modal dialog shown.
Second modal dialog shown.
Browser F12 shown no error.


mobhar
User
Posts: 11721

Post by mobhar »

Still cannot reproduce your issue. Still the same. The second Modal dialog is never shown up. There is no Javascript error message, too.


Post Reply