-
pickup.msn
385 386 43 43 function lookfor_<% $name %>() { 44 44 var id = document.getElementById('<% $name %>_value').value; 45 45 if (id) { 46 var Class = '<% $prop->{lookup_opts}->{class} %>'; 46 % if ( exists $prop->{lookup_opts}{class} ) { 47 var Class = '<% $prop->{lookup_opts}{class} %>'; 47 48 var Uri = 'document.html?id=' + id + '&class=' + Class; 49 % } elsif ( exists $prop->{lookup_opts}{table} ) { 50 var Class = '<% $prop->{lookup_opts}{table} %>'; 51 var Uri = 'document.html?id=' + id + '&table=' + Class; 52 % } 48 53 var Width = screen.width; 49 54 var Height = screen.height; 50 55 window.open(Uri,'Interface','width='+Width+',height='+Height+',top=0,left=0,location=1,menubar=1,resizable=0,scrollbars=1,status=1,titlebar=1,toolbar=1,directories=1,hotkeys=1'); … … 83 88 84 89 my ($error, $doc, $lookup_string); 85 90 86 if ($prop && ref($prop) && ref($prop->{lookup_opts}) eq 'HASH' && exists $prop->{lookup_opts}->{class}) { 91 if ($prop && ref($prop) && exists $prop->{lookup_opts} && ref $prop->{lookup_opts} eq 'HASH' ) { 87 92 if ( $check ) { 88 93 $doc = $keeper->get_document_by_id ( $check, %{$prop->{lookup_opts}} ); 89 94 } 90 95 $lookup_string = '/contenido/find_document.html?nf='.$name.'_docname&vf='.$name.'_value'; 91 if ( exists $prop->{lookup_opts} && ref $prop->{lookup_opts} eq 'HASH' ) { 92 while ( my ($param, $value) = each %{ $prop->{lookup_opts} } ) { 93 $lookup_string .= '&'.$param.'='.$value; 94 } 96 while ( my ($param, $value) = each %{ $prop->{lookup_opts} } ) { 97 $lookup_string .= '&'.$param.'='.$value; 95 98 } 96 99 } else { 97 100 $error = 'Похоже неверное описание lookup_opts в документе';