This topic is locked
[SOLVED]

 Click Events on Other Layouts

7/17/2017 6:50:38 PM
PHPRunner General questions
S
salus2 author

Hi,

The addition of Click Actions for fields or rows in List View is a major bonus. Does anybody know of a way to emulate the same behavior on other layouts? Being able to open external reference pages in a native pop-up would be incredibly useful on an Edit or Detail layout.

Thanks!

mbintex 7/18/2017

You can always add a button which could open a bootstrap popover or switch to another page in a new window via Javascript.

S
salus2 author 7/18/2017

I could try to figure out how to do that and make it look professional or I could ask in a support forum to see if there is a way to replicate the functionality of a really good new feature that works extremely well in List layouts but has no counterpart yet in View or Edit layouts. I've looked and looked at the source to see if I can figure it out but no joy.

S
salus2 author 7/19/2017

Thanks for this info but I am really trying to replicate the themed sweetness of the new List View Click Events. For example, if you visit www.hccvault.com and click on the Price field in the initial List View you'll see what I am talking about. Good looking, incredibly useful. I need to get the same awesomeness but on the Edit page.
Being able to have associated look-ups, instructions, reference databases, audio recorders, etc... pop-up during the record editing process would be da' bomb.

admin 7/19/2017

Use 'Field Events' in PHPRunner 9.8 for tasks like these.

S
salus2 author 7/19/2017



Use 'Field Events' in PHPRunner 9.8 for tasks like these.


Thanks for this info, I have 9.8 but don't see a way to emulate the themed pop-up that is generated by the List page's Field Click events. A little more info please?

HJB 7/20/2017

@mbintex - Good point ..., order or mail form to appear under popup once clicking the price is the way out here, best under usage of:
Show Add page in popup, close popup on 'Save' and refresh the List page
There is added a button to the list page to display Add page in popup and once record is saved we close the popup and refresh the list page to show a new record.
Button's ClientBefore code
window.popup = Runner.displayPopup({
url: Runner.pages.getUrl("carsmake","add"),
width: 700,
height: 700,
header: 'Add Category'
});
AfterAdd event
$pageObject->setProxyValue('saved', true);
$pageObject->stopPRG = true;
Javascript OnLoad event of Add page
if ((proxy['saved']) && window.parent && window.parent.popup) {
window.parent.location.reload();
window.parent.popup.close();
}
If you need to close popup without refreshing the page you need to comment the line:

window.parent.location.reload();

S
salus2 author 7/20/2017

Thank you all very much for your help. I can now place perfectly themed and sized Bootstrap pop-ups pretty much any place they make sense.
AWESOMENESS ACCOMPLISHED!
Custom Buttom - Client Before tab
var win = Runner.displayPopup( {

url: "http://hccvault.com/audior/";,

width: 700,

height: 500,

header: 'Voice Recorder',

footer: '<a href="#" onclick="window.win.close();">Close window</a>',

afterCreate: function(win) {

window.win = win;

}

});