"caption" param of "ew_ModalDialogShow" function

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

"caption" param of "ew_ModalDialogShow" function

Post by mobhar »

We need some tweak/customization in the "ewp.js" template file in order to display the "caption" param of "ew_ModalDialogShow" function.

See this code in "ewp.js" template file:
$dlg.find(".modal-title").html($lnk.data("caption") || $lnk.data("original-title"));

We need it to be customized/changed become:
$dlg.find(".modal-title").html(args.caption $lnk.data("caption") $lnk.data("original-title"));

If we do not change it, then this code (for example):
ew_ModalDialogShow({lnk: this, url: 'orderdetailsadd.php', caption: 'Search'});

will NOT display "Search" in modal dialog title section. After customize the code above, then the "Search" caption will be displayed properly in modal dialog title.


Webmaster
User
Posts: 9427

Post by Webmaster »

The "caption" argument is redundant (the data-caption attribute should be used), to be removed in future versions.


mobhar
User
Posts: 11703

Post by mobhar »

Thank you for your response.


mobhar
User
Posts: 11703

Post by mobhar »

Could you please implement this request? I've just realized that this change has not been implemented until version 2017.0.6, when I tried to implement the similar solution for this topic: http://www.hkvforums.com/viewtopic.php?f=4&t=40048

Thank you very much for your consideration.


Webmaster
User
Posts: 9427

Post by Webmaster »

Just add data-caption attribute to the element.


mobhar
User
Posts: 11703

Post by mobhar »

I think I've just found out the solution. For the case in the link above, then here is the example how to add the "data-caption" attribute into <tr> tag:

$('tr').attr('data-caption', 'View');


Post Reply