InPlace_Switch : do not echo , return a string instead
This commit is contained in:
parent
c7c480b34c
commit
b6607f89d7
1 changed files with 5 additions and 4 deletions
|
|
@ -70,16 +70,17 @@ class Inplace_Switch
|
|||
throw new Exception(_("Invalide value"));
|
||||
}
|
||||
|
||||
printf('<span style="text-decoration: none;color:%s" class="inplace_edit icon" id="%s">', $color,$this->name);
|
||||
echo $icon;
|
||||
echo '</span>';
|
||||
echo <<<EOF
|
||||
$r=sprintf('<span style="text-decoration: none;color:%s" class="inplace_edit icon" id="%s">', $color,$this->name);
|
||||
$r.=$icon;
|
||||
$r.= '</span>';
|
||||
$r.=<<<EOF
|
||||
<script>
|
||||
{$this->name}.onclick=function() {new Ajax.Updater({$this->name},'{$this->callback}',{method:"get",parameters:{$this->json},evalScripts:true} );
|
||||
{$this->jscript}
|
||||
}
|
||||
</script>
|
||||
EOF;
|
||||
return $r;
|
||||
}
|
||||
public function get_jscript()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue