CGI-Bus
view release on metacpan or search on metacpan
lib/CGI/Bus/tm.pm view on Meta::CPAN
.$p->htmlescape($v)
: $p->htmlescape($v)) .' '
: $v ? ( $p->{-iurl} && $img{$b}
? $g->image_button(-name=>$s->pxnme(-pxcb=>$b)
,-value=>$v
,-src=>$p->{-iurl} .'/' .$img{$b}
,-align=>'bottom'
,-accesskey=>substr($v,0,1)
,-title=>$v .'. ' .$t
,-class=>'MenuArea MenuButton'
,-style=>'cursor: default;'
,%a)
.((($b =~/^-(?:ins|upd|del|frm)/) ||
(!$s->{-keyval} && $b =~/^-q(?:sel|edt)/)) && 1
?$g->span({
-title=>$t
,-class=>'MenuArea MenuButton'
,-style=>'cursor: default;'
,-onClick=>$j='{' .$s->pxnme(-pxcb=>'-cmdi') .'.value="'.$b .'"; submit(); return(false)}'}
,$p->htmlescape($v))
:$g->a({href=>$s->qurl('',$s->pxnme(-pxcb=>'-cmd')=>$b, !$s->{-keyval} ? () : ($s->keyfld=>$s->{-keyval}))
,-title=>$t
,-class=>'MenuArea MenuButton'
,-onClick=>$j='{' .$s->pxnme(-pxcb=>'-cmdi') .'.value="'.$b .'"; submit(); return(false)}'}
,$p->htmlescape($v)
))
# !!! variants below does not works, -cmdi hidden variable added for above !!!
# .'<font size=-1>' .$g->a({href=>$s->qurl('',$s->pxnme(-pxcb=>'-cmd')=>$b), -onClick=>'{' .$s->pxnme(-pxcb=>$b).'.click(); return(false)}'}, $p->htmlescape($v)) .'</font>'
lib/CGI/Bus/tm.pm view on Meta::CPAN
my $m =defined($_[2]) ? $_[2] : $@||'';
my $t =scalar(@{$s->pushmsg}) >1 ||(scalar(@{$s->pushmsg}) ==1 && $s->pushmsg->[0] ne 'COMMIT');
my $r ='';
if (!$s->parent->{-cache} ||!$s->parent->{-cache}->{-httpheader}) {
$r =$s->parent->htpgstart;
}
if (!$c) {
my $h=$s->lng(0,'Failure') ." '" .$s->lng(0,$s->{-cmd}) ."': ";
my $e=$s->htmlescape($m);
$r .='<span class="FooterArea" onclick="{_tsw_FooterArea.style.display=(_tsw_FooterArea.style.display==\'none\' ? \'inline\' : \'none\')}" style="cursor: hand; ">';
$r .='<span class="FooterArea ErrorMessage">' .$g->hr ."<h1 class=\"FooterArea ErrorMessage\">$h</h1>" .$e ."</span>\n";
$r .='<hr class="FooterArea" />';
}
elsif ((grep {$s->{-cmd} eq $_} qw(-sel -ins -upd -del)) ||$t) {
$r .='<span class="FooterArea" onclick="{_tsw_FooterArea.style.display=(_tsw_FooterArea.style.display==\'none\' ? \'inline\' : \'none\')}" style="cursor: hand; ">'
.'<hr class="FooterArea" />'
.'<strong class="FooterArea">'
.($s->cmd('-lst') && $s->{-genlstm}
? $s->{-genlstm}
: ($s->lng(0,'Success') ." '" .$s->lng(0,$s->{-cmd}) ."'"))
."</strong>\n";
$r .=$s->htmlescape($s->parent->set('-problem')) ."\n" if $s->parent->set('-problem')
}
if ($r && (!$c || ($s->parent->{-debug}) >0)) {
my $r1 =join(";<br /><br />\n"
( run in 0.229 second using v1.01-cache-2.11-cpan-4d50c553e7e )