This topic is locked
[SOLVED]

 Modal Popup

10/31/2013 6:58:31 PM
PHPRunner General questions
S
stiven author

Hello,
I hope someone can help me with this issue. I am using the example on the tips and tricks on how to add a modal popup window. Everything works fine the only things is that I can not get rid off the scroll. the window is very small it doesn't need the scroll. attached is a picture so you can see what I mean. Also the code I am using is here.



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)

{
params = {

url: url,

width: w,

height: h,

afterClose: function(win) {

win.destroy(true);

if(url_redirection !== '')

{

location.href = url_redirection+id;

}

},

headerContent: 'Add Log'

};

displayPopup(params);

}
//this is how I call the function..

//<a href="#" onclick="AddLog(\'reports_upload_edit.php?editid1='.$case.'\',\''.$case.'\',\'560\',\'325\',\'\')">Add</a>'


EDIT: I JUST NOTICED IT HAPPENS IN CHROME, FIREFOX LOOKS FINE.

Sergey Kornilov admin 10/31/2013

This may work a bit different with different versions of PHPRunner. What is your version of PHPRunner?

S
stiven author 11/1/2013

I am using PHPRunner 6.2 Build 16275.
Also is there a way to change the blue color on the title? where it says Add Log? is the title of the modal popup it appears on any edit, add, view pages that are using modal popup. I was not able to find where I could change this color.
Thanks



This may work a bit different with different versions of PHPRunner. What is your version of PHPRunner?

Sergey Kornilov admin 11/1/2013

Your code is actually correct and should work just fine in version 6.2. Try to increase the height of this popup window in your code. It's quite possible that Add page is a bit higher than it looks and requires more vertical space.
In regards to changing title color - unfortunately the only way to do that is to modify CSS files that come with YUI.