Lines 32-65
use C4::Koha;
Link Here
|
32 |
|
32 |
|
33 |
###TODO To rewrite in order to use SearchAuthorities |
33 |
###TODO To rewrite in order to use SearchAuthorities |
34 |
|
34 |
|
35 |
=head1 FUNCTIONS |
|
|
36 |
|
37 |
=head2 plugin_parameters |
38 |
|
39 |
Other parameters added when the plugin is called by the dopop function |
40 |
|
41 |
=cut |
42 |
|
43 |
sub plugin_parameters { |
44 |
my ($dbh,$record,$tagslib,$i,$tabloop) = @_; |
45 |
return ""; |
46 |
} |
47 |
|
48 |
=head2 plugin_javascript |
49 |
|
50 |
The javascript function called when the user enters the subfield. |
51 |
contain 3 javascript functions : |
52 |
* one called when the field is entered (OnFocus). Named FocusXXX |
53 |
* one called when the field is leaved (onBlur). Named BlurXXX |
54 |
* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX |
55 |
|
56 |
returns : |
57 |
* XXX |
58 |
* a variable containing the 3 scripts. |
59 |
the 3 scripts are inserted after the <input> in the html code |
60 |
|
61 |
=cut |
62 |
|
63 |
sub plugin_javascript { |
35 |
sub plugin_javascript { |
64 |
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; |
36 |
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; |
65 |
my $function_name= $field_number; |
37 |
my $function_name= $field_number; |
Lines 73-86
my $function_name= $field_number;
Link Here
|
73 |
|
45 |
|
74 |
my $res = " |
46 |
my $res = " |
75 |
<script type=\"text/javascript\"> |
47 |
<script type=\"text/javascript\"> |
76 |
function Focus$function_name(index) { |
|
|
77 |
|
78 |
} |
79 |
|
80 |
function Blur$function_name(subfield_managed) { |
81 |
return 1; |
82 |
} |
83 |
|
84 |
function Clic$function_name(subfield_managed) { |
48 |
function Clic$function_name(subfield_managed) { |
85 |
defaultvalue=escape(document.getElementById(\"$field_number\").value); |
49 |
defaultvalue=escape(document.getElementById(\"$field_number\").value); |
86 |
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&index=\"+subfield_managed,\"unimarc_225a\",'width=500,height=600,toolbar=false,scrollbars=yes'); |
50 |
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&index=\"+subfield_managed,\"unimarc_225a\",'width=500,height=600,toolbar=false,scrollbars=yes'); |
Lines 90-101
function Clic$function_name(subfield_managed) {
Link Here
|
90 |
return ($function_name,$res); |
54 |
return ($function_name,$res); |
91 |
} |
55 |
} |
92 |
|
56 |
|
93 |
=head2 plugin |
|
|
94 |
|
95 |
The true value_builded. The screen that is open in the popup window. |
96 |
|
97 |
=cut |
98 |
|
99 |
sub plugin { |
57 |
sub plugin { |
100 |
my ($input) = @_; |
58 |
my ($input) = @_; |
101 |
my $query=new CGI; |
59 |
my $query=new CGI; |
Lines 234-238
my ($input) = @_;
Link Here
|
234 |
# Print the page |
192 |
# Print the page |
235 |
output_html_with_http_headers $query, $cookie, $template->output; |
193 |
output_html_with_http_headers $query, $cookie, $template->output; |
236 |
} |
194 |
} |
237 |
|
|
|
238 |
1; |