diff --git a/html/js/scripts.js b/html/js/scripts.js index a68c53eaa..686174102 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -192,7 +192,7 @@ function showIPopup(p_name) { if ( window.scrollY) { sx=window.scrollY+40;} else { sx=document.body.scrollTop+40;} $(p_name+'_border').style.top=sx; - show(p_name+'_fond'); + if ( g(p_name+'_fond') ) {show(p_name+'_fond');} show(p_name+'_border'); show(p_name+'_content'); } diff --git a/include/class_ipopup.php b/include/class_ipopup.php index 55df02cf6..ee4c4b337 100644 --- a/include/class_ipopup.php +++ b/include/class_ipopup.php @@ -37,6 +37,7 @@ class IPopup extends HtmlInput $this->parameter=''; $this->attribute=array(); $this->drag=false; + $this->blocking=true; } function set_width($p_val) { $js=sprintf('$("%s'.'_border").style.width="%s";', @@ -50,6 +51,14 @@ class IPopup extends HtmlInput $this->parameter.=$js; } + /** + *@brief set or not a blocking fond + *@param $p_block if true if you want to avoid access to background, + *accept true or false + */ + function set_block($p_block) { + $this->blocking=$p_block; + } function set_zindex($p_val) { $js=sprintf('$("%s'.'_border").style.zIndex=%d;', @@ -81,8 +90,10 @@ class IPopup extends HtmlInput } function input() { $r=""; - $r=sprintf('"; + if ($this->blocking) { + $r.=sprintf('"; + } if ( isset($this->title) && trim($this->title) != "" ) { $r.=sprintf('