CGI-Bus

 view release on metacpan or  search on metacpan

lib/CGI/Bus.pm  view on Meta::CPAN

sub htmlstart {
 my $s =shift;
 my %p =!defined($_[0]) ? () : @_==1 && ref($_[0]) ? %{$_[0]} : @_;
 if (ref($s->{-htmlstart})) {
    foreach my $k (keys(%{$s->{-htmlstart}})) {
      if (!exists($p{$k})) {$p{$k} =$s->{-htmlstart}->{$k}}
    }
 }
 $p{-style} ={code=>
	".Form, .List, .Help, .MenuArea, .FooterArea {margin-top:0px; font-size: 8pt; font-family: Verdana, Helvetica, Arial, sans-serif; }\n"
	#."a:link.ListTable {font-weight: bold}\n"
	.".MenuButton {background-color: buttonface; color: black; text-decoration: none; font-size: 7pt;}\n"
	#."td.MenuButton {background-color: activeborder;}\n"
	#.".MenuArea {background-color: blue; color: white;}"
	#.".MenuButton {background-color: blue; color: white; text-decoration: none; font-size: 7pt;}\n"
	.".PaneLeft, .PaneForm, .PaneList {margin-top:0px; font-size: 8pt; font-family: Verdana, Helvetica, Arial, sans-serif; }\n"
	."td.ListTable {border-style: inset; border-bottom-width: 1px; border-top-width: 0px; border-left-width: 0px; border-right-width: 0px; padding-top: 0;}\n"
	."th.ListTable {border-style: inset; border-bottom-width: 1px; border-top-width: 0px; border-left-width: 0px; border-right-width: 0px;}\n"
	} if !exists($p{-style});
 $s->{-debug} && $s->{-debug} >2
 ? $s->{-cgi}->start_html(%p)

lib/CGI/Bus/tm.pm  view on Meta::CPAN

	: ()) ."\n")
}

sub qlowgl {	# query list option hyperlink widget
 my $s =shift;	# (self, ?(options), label, list name, param=>val,...)
 my $o =ref($_[0]) ? (shift @_) : undef;
 my $v =qloval($s,@_[1..$#_]);
 my $c =$v eq ($s->qparam(pxnme($s,-pxsw=>'LSO'))||'');
 $s->cgi->a({$o ? %$o : ()
	, -href=>qlourl($s,@_[1..$#_])
	, $c ? (-style=>'{ text-decoration: none; font-weight: bolder; }') : ()
			# font-style: italic;  font-weight: bolder;
#	, -onClick=>'{' .pxnme($s,-pxsw=>'LSO') .'.value="' # !!! read marking?
#		.do{	$v =~s/([\\"])/\\$1/g;
#			$v =~s/([\x00-\x1f])/sprintf("\\x%02x",ord($1))/eg;
# 			$v} .'"; ' 
#		.pxnme($s,-pxsw=>'LIST') .'.value="' .$_[1] .'"; '
#		.pxnme($s,-pxcb=>'cmdi') .'.value="-lst"; submit(); return(false)}'
	}, $_[0])
}

sub qloparse {	# query list option parse

lib/CGI/Bus/wg.pm  view on Meta::CPAN

 my $r ='';
 my $r1='';
 my $v =exists($a{-default}) ? $a{-default} : $s->qparam($a{-name});
    $v ='' if !defined($v);
 if ($a{-htmlopt}) {
	delete $a{-htmlopt};
	my $n =$a{-name};
#	$r1 .="<input type=\"submit\" name=\"${n}__b\" value=\"R\" "
#		."title=\"Rich/Text edit: ^Bold, ^Italic, ^Underline, ^Link, Enter/shift-Enter, ^(shift)T ident, ^Z undo, ^Y redo.\nSwitch to 'T'ext before saving!!!\" "
#		."style=\"font-style: italic;\" "
#			# ; font-weight: bold; font-family: fantasy
#		."onclick=\"{if(${n}__b.value=='R') {${n}__b.value='T'; ${n}__r.DocumentHTML=$n.value ? $n.value : ''; $n.style.display='none'; ${n}__r.style.display='inline'; ${n}__r.width='100%'; ${n}__r.height=250 }\n"
#		."else {var r; ${n}__b.value='R'; r=${n}__r.DocumentHTML.match(/&lt;BODY&gt;[\\s]*([\\s\\S]*)[\\s]*&lt;\\/BODY&gt;/); "
#		."$n.value=r ? r[1] : ${n}__r.DocumentHTML; ${n}__r.style.display='none'; $n.style.display='inline';};\n"
#		." return(false)}\" />\n"
#		."<object classid=\"clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A\" id=${n}__r height=\"100%\" width=\"250\" style=\"display: none;\" name=\"${n}__r\" title=\"DHTML Editing Component\"></object>\n"
#		#DHTML Edit Control for IE5, DHTML Editing Component, HTMLRichtextElement:
#		#http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaredcom/html/dhtmledit.asp
#		if $n && ($ENV{HTTP_USER_AGENT}||'') =~/MSIE/;
#	$r1 .="<input type=\"submit\" name=\"${n}__b\" value=\"R\" "
#		."title=\"Rich/Text edit: ^Bold, ^Italic, ^Underline, ^Link, Enter/shift-Enter, ^(shift)T ident, ^Z undo, ^Y redo.\nSwitch to 'T'ext before saving!!!\" "
#		."style=\"font-style: italic;\" "
#			# ; font-weight: bold; font-family: fantasy
#		."onclick=\"{if(${n}__b.value=='R') {$n.rows='1'; ${n}__b.value='T'; "
#		."\n var r; r =document.createElement('<object classid=&quot;clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A&quot; id=&quot;${n}__r&quot; height=&quot;250&quot; width=&quot;100%&quot; name=&quot;${n}__r&quot; title=&quot;DHTML Editing Component&quot ><...
#		."r.normalize; r.Refresh; r.DocumentHTML=$n.value ? $n.value : '';}\n"
#		."else {var r; ${n}__b.value='R'; r=${n}__r.DocumentHTML.match(/&lt;BODY&gt;[\\s]*([\\s\\S]*)[\\s]*&lt;\\/BODY&gt;/); "
#		."$n.value=r ? r[1] : ${n}__r.DocumentHTML; ${n}__r.removeNode(true); $n.rows='6'};\n"
#		." return(false)}\" />\n"
#		#DHTML Edit Control for IE5, DHTML Editing Component, HTMLRichtextElement:
#		#http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaredcom/html/dhtmledit.asp
#		if $n && ($ENV{HTTP_USER_AGENT}||'') =~/MSIE/;
	$r1 .="<input type=\"submit\" name=\"${n}__b\" value=\"R\" "



( run in 1.132 second using v1.01-cache-2.11-cpan-5dc5da66d9d )