This topic is locked

Pop Up Appearance

12/11/2014 3:20:32 PM
PHPRunner General questions
S
stiven author

Hello,
I have a modal pop up window that is opened when the user clicks a button. Everything works but I am wondering if it is possible to make it look nice and clean how it looks when I edit or add page in pop up mode. Here are 2 screen shots of how it looks and also the code I am using which is the one from the tutorial opening any page in modal popup
Thank you,
This is how it looks in native phprunner popup mode


This is how it looks with custom button following the tutorial


This is the code I am using



function displayPopup(params)

{

var pageid=1;

var pageObj = Runner.pages.PageManager.getById(pageid);

args = {

bodyContent: "<iframe frameborder='0' id='popupIframe" + pageid + "' style='width: 100%; height: 100%; border: 0;'></iframe>",

footerContent: "<span>&nbsp;</span>",

headerContent: params.headerContent,

centered: true,

render: true,

width: params.width ? params.width : 800,

height: params.height ? params.height : 600

},

afterCreateHandler = function(win) {

var bodyNode = $(win.bodyNode.getDOMNode()),

iframeNode = $("iframe#popupIframe" + pageid, bodyNode);



iframeNode.load(function() {

if (Runner.isChrome) {

bodyNode.addClass("noScrollBar");

}

win.show();



}).attr("src", params.url);

},

afterCloseHandler = params.afterClose;



if (Runner.isChrome) {

$("< style type='text/css'> .yui3-widget-bd::-webkit-scrollbar {display:none;} < /style>").appendTo("head");

}



Runner.pages.PageManager.createFlyWin.call(pageObj, args, true,

afterCreateHandler, afterCloseHandler);

}
function AddLog(url,id,w,h,url_redirection,title)

{
params = {

url: url,

width: w,

height: h,

afterClose: function(win) {

win.destroy(true);

if(url_redirection !== '')

{

location.href = url_redirection+id;

}

},

headerContent: title

};

displayPopup(params);

}