Index: pickup.msn
===================================================================
--- pickup.msn (revision 817)
+++ pickup.msn (revision 818)
@@ -10,6 +10,7 @@
|
@@ -41,15 +42,11 @@
}
function lookfor_<% $name %>() {
- var id = document.getElementById('<% $name %>_value').value;
+ var $doc = $('#<% $name %>_docname');
+ var id = $doc.data('id');
+ var Class = $doc.data('class');
if (id) {
-% if ( exists $prop->{lookup_opts}{class} ) {
- var Class = '<% $prop->{lookup_opts}{class} %>';
var Uri = 'document.html?id=' + id + '&class=' + Class;
-% } elsif ( exists $prop->{lookup_opts}{table} ) {
- var Class = '<% $prop->{lookup_opts}{table} %>';
- var Uri = 'document.html?id=' + id + '&table=' + Class;
-% }
var Width = screen.width;
var Height = screen.height;
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');
@@ -79,10 +76,12 @@
<%args>
+
$object
$name => undef
$check => undef
$prop => {}
+
%args>
<%init>
@@ -94,7 +93,11 @@
}
$lookup_string = '/contenido/find_document.html?nf='.$name.'_docname&vf='.$name.'_value';
while ( my ($param, $value) = each %{ $prop->{lookup_opts} } ) {
- $lookup_string .= '&'.$param.'='.$value;
+ if ( ref $value eq 'ARRAY' ) {
+ $lookup_string .= '&'.join('&', map{ $param.'='.$_ } @$value);
+ } else {
+ $lookup_string .= '&'.$param.'='.$value;
+ }
}
} else {
$error = 'Похоже неверное описание lookup_opts в документе';
|