noalyss
Version-6.7.2
|
Public Member Functions | |
__construct ($p_name) | |
input () | |
set_attribute ($p_name, $p_val) | |
set the attribute thanks javascript as the width, the position ... | |
set_block ($p_block) | |
set or not a blocking fond | |
set_dragguable ($p_value) | |
set_height ($p_val) | |
set_title ($p_title) | |
set the title of a ipopup thanks javascript and php mode | |
set_width ($p_val) | |
set_zindex ($p_val) | |
Static Public Member Functions | |
static | test_me () |
Data Fields | |
$name |
Definition at line 30 of file class_ipopup.php.
IPopup::__construct | ( | $ | p_name | ) |
Definition at line 33 of file class_ipopup.php.
References name.
{ $this->name=$p_name; $this->parameter=''; $this->attribute=array(); $this->drag=false; $this->blocking=true; }
IPopup::input | ( | ) |
Definition at line 97 of file class_ipopup.php.
References HtmlInput\$javascript, $name, $r, HtmlInput\$value, create_script(), name, title, trim(), and value.
{ $r=""; if ($this->blocking) { $r.=sprintf('<div id="%s_fond" name="fond" class="popup_back">',$this->name); $r.="</div>"; } $javascript=sprintf("javascript:hideIPopup('%s')", $this->name); if ( isset($this->title) && trim($this->title) != "" ) { $r.=sprintf('<div name ="%s_border" id="%s_border" class="popup_border_title">', $this->name, $this->name); $r.=sprintf('<span id="%s_">%s</span>',$this->name,$this->title); } else { $r.=sprintf('<div name ="%s_border" id="%s_border" class="popup_border_notitle">', $this->name, $this->name); } $r.='<div style="position:absolute;top:0px;right:10px;font-weight:normal;font-size:9px;color:black;text-align:right">'; $r.=sprintf('<a style="background-color:blue;color:white;text-decoration:none" href="%s">'._('Fermer').'</a></div>', $javascript); $r.=sprintf('<div name ="%s_content" id="%s_content" class="popup_content"> %s </div></div>', $this->name, $this->name, $this->value); /* Add properties at the widget */ $attr=$this->parameter; for ($i=0;$i< count($this->attribute);$i++) { list($name,$value)=$this->attribute[$i]; $tmp1=sprintf("$('%s').%s='%s';", $this->name, $name, $value); $attr.=$tmp1; } $draggable=''; if ($this->drag==true) { /* add draggable possibility */ $draggable=sprintf(" new Draggable('%s_border',{starteffect:function(){ new Effect.Highlight('%s_border',{scroll:window,queue:'end'}); } });" ,$this->name ,$this->name); } $attr=create_script($attr.$draggable); $r.=$attr; return $r; }
IPopup::set_attribute | ( | $ | p_name, |
$ | p_val | ||
) |
set the attribute thanks javascript as the width, the position ...
$p_name | attribute name |
$p_val | val of the attribute |
Reimplemented from HtmlInput.
Definition at line 82 of file class_ipopup.php.
{ $this->attribute[]=array($p_name,$p_val); }
IPopup::set_block | ( | $ | p_block | ) |
set or not a blocking fond
$p_block | if true if you want to avoid access to background, accept true or false |
Definition at line 60 of file class_ipopup.php.
{ $this->blocking=$p_block; }
IPopup::set_dragguable | ( | $ | p_value | ) |
Definition at line 73 of file class_ipopup.php.
{ $this->drag=$p_value; }
IPopup::set_height | ( | $ | p_val | ) |
IPopup::set_title | ( | $ | p_title | ) |
set the title of a ipopup thanks javascript and php mode
title | of the IPopup |
Definition at line 90 of file class_ipopup.php.
References $s, create_script(), name, and title.
IPopup::set_width | ( | $ | p_val | ) |
IPopup::set_zindex | ( | $ | p_val | ) |
static IPopup::test_me | ( | ) | [static] |
Definition at line 158 of file class_ipopup.php.
References $a, $e, echo, and js_include().
{ echo js_include('js/scripts.js'); require_once('class_iselect.php'); $select=new ISelect('a'); $select->value=array(array ('value'=>0,'label'=>'Première valeur'), array ('value'=>0,'label'=>'Première valeur'), array ('value'=>0,'label'=>'Première valeur')); for ($e=0;$e<50;$e++) { echo $select->input(); if ($e%10 == 0 ) echo '<hr>'; } $a=new IPopup('pop1'); $a->value=""; for ($e=0;$e<500;$e++) { $a->value.="<p>Il etait une fois dans un pays vraiment lointain où même plus loin que ça</p>"; } echo $a->input(); echo ' <input type="button" onclick="hide(\'pop1\');hide(\'pop1_border\')" value="cacher"> <input type="button" onclick="showIPopup(\'pop1\')" value="montrer"> ', $a=new IPopup('pop2'); $a->value=''; $a->title="Retrouvez une saucisse"; echo $a->input(); echo ' <input type="button" onclick="hide(\'pop2\');hide(\'pop2_border\')" value="cacher"> <input type="button" onclick="showIPopup(\'pop2\')" value="montrer"> '; }
IPopup::$name |
name name and id of the div
Reimplemented from HtmlInput.
Definition at line 32 of file class_ipopup.php.
Referenced by input().