name=$p_name; $this->parameter=''; $this->attribute=array(); $this->drag=false; $this->blocking=true; } /*!\brief set the attribute thanks javascript as the width, the position ... *\param $p_name attribute name valid value are id, cssclass and html *\param $p_val val of the attribute *\note add to the this->attribut, it will be used in input() */ function set_attribute($p_name,$p_val) { $this->attribute[]=array($p_name,$p_val); } function set_dragguable($p_value){ $this->drag=$p_value; } function input() { $r=""; $object=$this->make_object(); $r.=sprintf(" add_div (%s)",$object); $result=create_script($r); if ($this->drag==true){ /* add draggable possibility */ $r.=sprintf(" new Draggable('%s',{starteffect:function(){ new Effect.Highlight('%s',{scroll:window,queue:'end'}); } });" ,$this->name ,$this->name); } return $resultxs; } static function test_me() { echo js_include('js/scripts.js'); } }