Class IPopup can create no-blocking box

This commit is contained in:
Dany De Bontridder 2010-05-15 19:07:29 +00:00
parent 1c2bacd005
commit 3bf6ffe8a8
2 changed files with 14 additions and 3 deletions

View file

@ -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');
}

View file

@ -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('<div id="%s_fond" name="fond" class="popup_back">',$this->name);
$r.="</div>";
if ($this->blocking) {
$r.=sprintf('<div id="%s_fond" name="fond" class="popup_back">',$this->name);
$r.="</div>";
}
if ( isset($this->title) && trim($this->title) != "" ) {
$r.=sprintf('<div name ="%s_border" id="%s_border" class="popup_border_title">',
$this->name,