View | Details | Raw Unified | Return to bug 10480
Collapse All | Expand All

(-)a/cataloguing/value_builder/barcode.pl (-43 lines)
Lines 29-60 use Algorithm::CheckDigits; Link Here
29
29
30
my $DEBUG = 0;
30
my $DEBUG = 0;
31
31
32
=head1
33
34
plugin_parameters : other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
#   my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
    return "";
41
}
42
43
=head1
44
45
plugin_javascript : the javascript function called when the user enters the subfield.
46
contain 3 javascript functions :
47
* one called when the field is entered (OnFocus). Named FocusXXX
48
* one called when the field is leaved (onBlur). Named BlurXXX
49
* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
50
51
returns :
52
* XXX
53
* a variable containing the 3 scripts.
54
the 3 scripts are inserted after the <input> in the html code
55
56
=cut
57
58
sub plugin_javascript {
32
sub plugin_javascript {
59
	my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
	my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
60
	my $function_name= "barcode".(int(rand(100000))+1);
34
	my $function_name= "barcode".(int(rand(100000))+1);
Lines 121-130 END_OF_JS Link Here
121
<script type="text/javascript">
95
<script type="text/javascript">
122
//<![CDATA[
96
//<![CDATA[
123
97
124
function Blur$function_name(index) {
125
    //barcode validation might go here
126
}
127
128
function Focus$function_name(subfield_managed, id, force) {
98
function Focus$function_name(subfield_managed, id, force) {
129
$scr
99
$scr
130
    return 0;
100
    return 0;
Lines 138-153 function Clic$function_name(id) { Link Here
138
END_OF_JS
108
END_OF_JS
139
    return ($function_name, $js);
109
    return ($function_name, $js);
140
}
110
}
141
142
=head1
143
144
plugin: useless here
145
146
=cut
147
148
sub plugin {
149
    # my ($input) = @_;
150
    return "";
151
}
152
153
1;
(-)a/cataloguing/value_builder/barcode_manual.pl (-47 lines)
Lines 27-58 require C4::Dates; Link Here
27
27
28
my $DEBUG = 0;
28
my $DEBUG = 0;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
sub plugin_parameters {
37
#   my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
    return "";
39
}
40
41
=head1
42
43
plugin_javascript : the javascript function called when the user enters the subfield.
44
contain 3 javascript functions :
45
* one called when the field is entered (OnFocus). Named FocusXXX
46
* one called when the field is leaved (onBlur). Named BlurXXX
47
* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
48
49
returns :
50
* XXX
51
* a variable containing the 3 scripts.
52
the 3 scripts are inserted after the <input> in the html code
53
54
=cut
55
56
sub plugin_javascript {
30
sub plugin_javascript {
57
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
58
    my $function_name= "barcode".(int(rand(100000))+1);
32
    my $function_name= "barcode".(int(rand(100000))+1);
Lines 100-113 END_OF_JS Link Here
100
    <script type="text/javascript">
74
    <script type="text/javascript">
101
        //<![CDATA[
75
        //<![CDATA[
102
76
103
        function Blur$function_name(index) {
104
            //barcode validation might go here
105
        }
106
107
    function Focus$function_name(subfield_managed, id, force) {
108
        return 0;
109
    }
110
111
    function Clic$function_name(id) {
77
    function Clic$function_name(id) {
112
        $scr
78
        $scr
113
            return 0;
79
            return 0;
Lines 117-132 END_OF_JS Link Here
117
END_OF_JS
83
END_OF_JS
118
        return ($function_name, $js);
84
        return ($function_name, $js);
119
}
85
}
120
121
=head1
122
123
plugin: useless here
124
125
=cut
126
127
sub plugin {
128
# my ($input) = @_;
129
    return "";
130
}
131
132
1;
(-)a/cataloguing/value_builder/callnumber-KU.pl (-13 lines)
Lines 39-59 CCC QW - returns first unused number CCC QWxx starting with CCC QW01 Link Here
39
39
40
=cut
40
=cut
41
41
42
sub plugin_parameters {
43
}
44
45
sub plugin_javascript {
42
sub plugin_javascript {
46
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
    my $res="
44
    my $res="
48
    <script type='text/javascript'>
45
    <script type='text/javascript'>
49
        function Focus$field_number() {
50
            return 1;
51
        }
52
53
        function Blur$field_number() {
54
                return 1;
55
        }
56
57
        function Clic$field_number() {
46
        function Clic$field_number() {
58
                var code = document.getElementById('$field_number');
47
                var code = document.getElementById('$field_number');
59
                var url = '../cataloguing/plugin_launcher.pl?plugin_name=callnumber-KU.pl&code=' + code.value;
48
                var url = '../cataloguing/plugin_launcher.pl?plugin_name=callnumber-KU.pl&code=' + code.value;
Lines 128-132 sub plugin { Link Here
128
    );
117
    );
129
    output_html_with_http_headers $input, $cookie, $template->output;
118
    output_html_with_http_headers $input, $cookie, $template->output;
130
}
119
}
131
132
1;
(-)a/cataloguing/value_builder/callnumber.pl (-12 lines)
Lines 36-52 In this case, a callnumber has this form : "PREFIX 0009678570". Link Here
36
36
37
=cut
37
=cut
38
38
39
sub plugin_parameters {
40
}
41
42
sub plugin_javascript {
39
sub plugin_javascript {
43
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
40
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
44
    my $res="
41
    my $res="
45
    <script type='text/javascript'>
42
    <script type='text/javascript'>
46
        function Focus$field_number() {
47
            return 1;
48
        }
49
50
        function Blur$field_number() {
43
        function Blur$field_number() {
51
                var code = document.getElementById('$field_number');
44
                var code = document.getElementById('$field_number');
52
                var url = '../cataloguing/plugin_launcher.pl?plugin_name=callnumber.pl&code=' + code.value;
45
                var url = '../cataloguing/plugin_launcher.pl?plugin_name=callnumber.pl&code=' + code.value;
Lines 58-66 sub plugin_javascript { Link Here
58
                return 1;
51
                return 1;
59
        }
52
        }
60
53
61
        function Clic$field_number() {
62
            return 1;
63
        }
64
    </script>
54
    </script>
65
    ";
55
    ";
66
56
Lines 114-118 sub plugin { Link Here
114
    }
104
    }
115
    output_html_with_http_headers $input, $cookie, $template->output;
105
    output_html_with_http_headers $input, $cookie, $template->output;
116
}
106
}
117
118
1;
(-)a/cataloguing/value_builder/dateaccessioned.pl (-43 lines)
Lines 21-52 use Modern::Perl; Link Here
21
21
22
no warnings 'redefine';
22
no warnings 'redefine';
23
23
24
=head1
25
26
plugin_parameters : useless here
27
28
=cut
29
30
sub plugin_parameters {
31
	# my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
32
	return "";
33
}
34
35
=head1
36
37
plugin_javascript : the javascript function called when the user enters the subfield.
38
contain 3 javascript functions :
39
* one called when the   field  is entered (OnFocus) named FocusXXX
40
* one called when the   field  is  left   (onBlur ) named BlurXXX
41
* one called when the ... link is clicked (onClick) named ClicXXX
42
43
returns :
44
* XXX
45
* a variable containing the 3 scripts.
46
the 3 scripts are inserted after the <input> in the html code
47
48
=cut
49
50
sub plugin_javascript {
24
sub plugin_javascript {
51
	# my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
25
	# my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
52
	my $function_name = "dateaccessioned".(int(rand(100000))+1);
26
	my $function_name = "dateaccessioned".(int(rand(100000))+1);
Lines 62-71 sub plugin_javascript { Link Here
62
//  
36
//  
63
// from: cataloguing/value_builder/dateaccessioned.pl
37
// from: cataloguing/value_builder/dateaccessioned.pl
64
38
65
function Blur$function_name(index) {
66
    //date validation could go here
67
}
68
69
function Focus$function_name(subfield_managed, id, force) {
39
function Focus$function_name(subfield_managed, id, force) {
70
    //var summary = "";
40
    //var summary = "";
71
    //for (i=0 ; i<document.f.field_value.length ; i++) {
41
    //for (i=0 ; i<document.f.field_value.length ; i++) {
Lines 92-107 function set_to_today(id, force) { Link Here
92
END_OF_JS
62
END_OF_JS
93
	return ($function_name, $res);
63
	return ($function_name, $res);
94
}
64
}
95
96
=head1
97
98
plugin: useless here.
99
100
=cut
101
102
sub plugin {
103
#    my ($input) = @_;
104
    return "";
105
}
106
107
1;
(-)a/cataloguing/value_builder/labs_theses.pl (-15 lines)
Lines 29-39 use C4::Output; Link Here
29
29
30
use C4::Koha;
30
use C4::Koha;
31
31
32
sub plugin_parameters {
33
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
34
return "";
35
}
36
37
sub plugin_javascript {
32
sub plugin_javascript {
38
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
39
my $function_name= "328".(int(rand(100000))+1);
34
my $function_name= "328".(int(rand(100000))+1);
Lines 41-54 my $res=" Link Here
41
<script type=\"text/javascript\">
36
<script type=\"text/javascript\">
42
//<![CDATA[
37
//<![CDATA[
43
38
44
function Focus$function_name(subfield_managed) {
45
return 1;
46
}
47
48
function Blur$function_name(subfield_managed) {
49
	return 1;
50
}
51
52
function Clic$function_name(i) {
39
function Clic$function_name(i) {
53
	defaultvalue=document.f.field_value[i].value;
40
	defaultvalue=document.f.field_value[i].value;
54
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=labs_theses.pl&cat_auth=LABTHE&index=\"+i+\"&result=\"+defaultvalue,\"tag_editor\",'width=700,height=700,toolbar=false,scrollbars=yes');
41
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=labs_theses.pl&cat_auth=LABTHE&index=\"+i+\"&result=\"+defaultvalue,\"tag_editor\",'width=700,height=700,toolbar=false,scrollbars=yes');
Lines 184-188 sub plugin { Link Here
184
	}
171
	}
185
	output_html_with_http_headers $query, $cookie, $template->output ;
172
	output_html_with_http_headers $query, $cookie, $template->output ;
186
}
173
}
187
188
1;
(-)a/cataloguing/value_builder/macles.pl (-22 lines)
Lines 31-47 use vars qw( $authorised_values_sth); Link Here
31
use vars qw( $is_a_modif );
31
use vars qw( $is_a_modif );
32
use utf8;
32
use utf8;
33
33
34
=head1
35
36
plugin_parameters : other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
42
return "";
43
}
44
45
sub plugin_javascript {
34
sub plugin_javascript {
46
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
35
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
my $function_name= "macles".(int(rand(100000))+1);
36
my $function_name= "macles".(int(rand(100000))+1);
Lines 49-62 my $res=" Link Here
49
<script type=\"text/javascript\">
38
<script type=\"text/javascript\">
50
//<![CDATA[
39
//<![CDATA[
51
40
52
function Focus$function_name(subfield_managed) {
53
return 1;
54
}
55
56
function Blur$function_name(subfield_managed) {
57
	return 1;
58
}
59
60
function Clic$function_name(i) {
41
function Clic$function_name(i) {
61
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=macles.pl&index=\"+i,\"MACLES\",',toolbar=false,scrollbars=yes');
42
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=macles.pl&index=\"+i,\"MACLES\",',toolbar=false,scrollbars=yes');
62
43
Lines 202-207 my ($input) = @_; Link Here
202
	$template->param("index"=>$index);
183
	$template->param("index"=>$index);
203
	output_html_with_http_headers $input, $cookie, $template->output;
184
	output_html_with_http_headers $input, $cookie, $template->output;
204
}
185
}
205
1;
206
207
(-)a/cataloguing/value_builder/marc21_field_003.pl (-44 lines)
Lines 22-53 use strict; Link Here
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
use C4::Context;
23
use C4::Context;
24
24
25
=head1
26
27
plugin_parameters : other parameters added when the plugin is called by the dopop function
28
29
=cut
30
31
sub plugin_parameters {
32
    # my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
33
    return "";
34
}
35
36
=head1
37
38
plugin_javascript : the javascript function called when the user enters the subfield.
39
contain 3 javascript functions :
40
* one called when the field is entered (OnFocus). Named FocusXXX
41
* one called when the field is leaved (onBlur). Named BlurXXX
42
* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
43
44
returns :
45
* XXX
46
* a variable containing the 3 scripts.
47
the 3 scripts are inserted after the <input> in the html code
48
49
=cut
50
51
sub plugin_javascript {
25
sub plugin_javascript {
52
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
26
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
53
    my $function_name= $field_number;
27
    my $function_name= $field_number;
Lines 58-88 sub plugin_javascript { Link Here
58
<script type=\"text/javascript\">
32
<script type=\"text/javascript\">
59
//<![CDATA[
33
//<![CDATA[
60
34
61
function Blur$function_name(index) {
62
//need this?
63
}
64
65
function Focus$function_name(subfield_managed) {
35
function Focus$function_name(subfield_managed) {
66
    document.getElementById(\"$field_number\").value='$org';
36
    document.getElementById(\"$field_number\").value='$org';
67
    return 0;
37
    return 0;
68
}
38
}
69
39
70
function Clic$function_name(subfield_managed) {
71
}
72
//]]>
40
//]]>
73
</script>
41
</script>
74
";
42
";
75
    return ($function_name,$res);
43
    return ($function_name,$res);
76
}
44
}
77
78
=head1
79
80
plugin : the true value_builded. The screen that is open in the popup window.
81
82
=cut
83
84
sub plugin {
85
    return "";
86
}
87
88
1;
(-)a/cataloguing/value_builder/marc21_field_005.pl (-44 lines)
Lines 21-52 use strict; Link Here
21
#use warnings; FIXME - Bug 2505
21
#use warnings; FIXME - Bug 2505
22
#use C4::Context;
22
#use C4::Context;
23
23
24
=head1
25
26
plugin_parameters : other parameters added when the plugin is called by the dopop function
27
28
=cut
29
30
sub plugin_parameters {
31
    # my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
32
    return "";
33
}
34
35
=head1
36
37
plugin_javascript : the javascript function called when the user enters the subfield.
38
contain 3 javascript functions :
39
* one called when the field is entered (OnFocus). Named FocusXXX
40
* one called when the field is leaved (onBlur). Named BlurXXX
41
* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
42
43
returns :
44
* XXX
45
* a variable containing the 3 scripts.
46
the 3 scripts are inserted after the <input> in the html code
47
48
=cut
49
50
sub plugin_javascript {
24
sub plugin_javascript {
51
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
25
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
52
    my $function_name= $field_number;
26
    my $function_name= $field_number;
Lines 59-89 sub plugin_javascript { Link Here
59
<script type=\"text/javascript\">
33
<script type=\"text/javascript\">
60
//<![CDATA[
34
//<![CDATA[
61
35
62
function Blur$function_name(index) {
63
//need this?
64
}
65
66
function Focus$function_name(subfield_managed) {
36
function Focus$function_name(subfield_managed) {
67
    document.getElementById(\"$field_number\").value='$date';
37
    document.getElementById(\"$field_number\").value='$date';
68
    return 0;
38
    return 0;
69
}
39
}
70
40
71
function Clic$function_name(subfield_managed) {
72
}
73
//]]>
41
//]]>
74
</script>
42
</script>
75
";
43
";
76
    return ($function_name,$res);
44
    return ($function_name,$res);
77
}
45
}
78
79
=head1
80
81
plugin : the true value_builded. The screen that is open in the popup window.
82
83
=cut
84
85
sub plugin {
86
    return "";
87
}
88
89
1;
(-)a/cataloguing/value_builder/marc21_field_006.pl (-15 lines)
Lines 34-44 plugin_parameters : other parameters added when the plugin is called by the dopo Link Here
34
34
35
=cut
35
=cut
36
36
37
sub plugin_parameters {
38
    my ($dbh, $record, $tagslib, $i, $tabloop) = @_;
39
    return "";
40
}
41
42
sub plugin_javascript {
37
sub plugin_javascript {
43
    my ($dbh, $record, $tagslib, $field_number, $tabloop) = @_;
38
    my ($dbh, $record, $tagslib, $field_number, $tabloop) = @_;
44
    my $function_name = $field_number;
39
    my $function_name = $field_number;
Lines 46-59 sub plugin_javascript { Link Here
46
<script type=\"text/javascript\">
41
<script type=\"text/javascript\">
47
//<![CDATA[
42
//<![CDATA[
48
43
49
function Focus$function_name(subfield_managed) {
50
return 1;
51
}
52
53
function Blur$function_name(subfield_managed) {
54
	return 1;
55
}
56
57
function Clic$function_name(i) {
44
function Clic$function_name(i) {
58
	defaultvalue=document.getElementById(\"$field_number\").value;
45
	defaultvalue=document.getElementById(\"$field_number\").value;
59
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_006.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
46
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_006.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 106-110 sub plugin { Link Here
106
    );
93
    );
107
    output_html_with_http_headers $input, $cookie, $template->output;
94
    output_html_with_http_headers $input, $cookie, $template->output;
108
}
95
}
109
110
1;
(-)a/cataloguing/value_builder/marc21_field_007.pl (-15 lines)
Lines 33-43 plugin_parameters : other parameters added when the plugin is called by the dopo Link Here
33
33
34
=cut
34
=cut
35
35
36
sub plugin_parameters {
37
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
return "";
39
}
40
41
sub plugin_javascript {
36
sub plugin_javascript {
42
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
37
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
my $function_name= $field_number;
38
my $function_name= $field_number;
Lines 45-58 my $res=" Link Here
45
<script type=\"text/javascript\">
40
<script type=\"text/javascript\">
46
//<![CDATA[
41
//<![CDATA[
47
42
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
43
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
44
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_007.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
45
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_007.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 160-164 my ($template, $loggedinuser, $cookie) Link Here
160
					);
147
					);
161
        output_html_with_http_headers $input, $cookie, $template->output;
148
        output_html_with_http_headers $input, $cookie, $template->output;
162
}
149
}
163
164
1;
(-)a/cataloguing/value_builder/marc21_field_008.pl (-11 lines)
Lines 41-51 $year += 1900; Link Here
41
$mon  += 1;
41
$mon  += 1;
42
my $dateentered = substr($year, 2, 2) . sprintf("%0.2d", $mon) . sprintf("%0.2d", $mday);
42
my $dateentered = substr($year, 2, 2) . sprintf("%0.2d", $mon) . sprintf("%0.2d", $mday);
43
43
44
sub plugin_parameters {
45
    my ($dbh, $record, $tagslib, $i, $tabloop) = @_;
46
    return "";
47
}
48
49
sub plugin_javascript {
44
sub plugin_javascript {
50
    my $lang = C4::Context->preference('DefaultLanguageField008' );
45
    my $lang = C4::Context->preference('DefaultLanguageField008' );
51
    $lang = "eng" unless $lang;
46
    $lang = "eng" unless $lang;
Lines 66-75 function Focus$function_name(subfield_managed) { Link Here
66
    return 1;
61
    return 1;
67
}
62
}
68
63
69
function Blur$function_name(subfield_managed) {
70
	return 1;
71
}
72
73
function Clic$function_name(i) {
64
function Clic$function_name(i) {
74
	defaultvalue=document.getElementById(\"$field_number\").value;
65
	defaultvalue=document.getElementById(\"$field_number\").value;
75
    //Retrieve full leader string and pass it to the 008 tag editor
66
    //Retrieve full leader string and pass it to the 008 tag editor
Lines 182-186 sub plugin { Link Here
182
    );
173
    );
183
    output_html_with_http_headers $input, $cookie, $template->output;
174
    output_html_with_http_headers $input, $cookie, $template->output;
184
}
175
}
185
186
1;
(-)a/cataloguing/value_builder/marc21_field_008_authorities.pl (-11 lines)
Lines 43-53 $year +=1900; $mon +=1; Link Here
43
my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$mday);
43
my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$mday);
44
my $defaultval = Field008();
44
my $defaultval = Field008();
45
45
46
sub plugin_parameters {
47
    my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
48
    return "";
49
}
50
51
sub plugin_javascript {
46
sub plugin_javascript {
52
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
53
    my $function_name= $field_number;
48
    my $function_name= $field_number;
Lines 67-76 function Focus$function_name(subfield_managed) { Link Here
67
    return 1;
62
    return 1;
68
}
63
}
69
64
70
function Blur$function_name(subfield_managed) {
71
    return 1;
72
}
73
74
function Clic$function_name(i) {
65
function Clic$function_name(i) {
75
    var authtype=document.forms['f'].elements['authtypecode'].value;
66
    var authtype=document.forms['f'].elements['authtypecode'].value;
76
    defaultvalue=document.getElementById(\"$field_number\").value;
67
    defaultvalue=document.getElementById(\"$field_number\").value;
Lines 130-134 sub Field008 { Link Here
130
  }
121
  }
131
  return substr($pref,0,34);  #ignore remainder
122
  return substr($pref,0,34);  #ignore remainder
132
}
123
}
133
134
1;
(-)a/cataloguing/value_builder/marc21_field_040c.pl (-44 lines)
Lines 22-53 use strict; Link Here
22
use C4::Context;
22
use C4::Context;
23
# use MARC::Record;
23
# use MARC::Record;
24
24
25
=head1 plugin_parameters
26
27
plugin_parameters : other parameters added when the plugin is called by the dopop function
28
29
=cut
30
31
sub plugin_parameters {
32
    # my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
33
    return "";
34
}
35
36
=head1 plugin_javascript
37
38
plugin_javascript : the javascript function called when the user enters the subfield.
39
contain 3 javascript functions :
40
* one called when the field is entered (OnFocus). Named FocusXXX
41
* one called when the field is leaved (onBlur). Named BlurXXX
42
* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
43
44
returns :
45
* XXX
46
* a variable containing the 3 scripts.
47
the 3 scripts are inserted after the <input> in the html code
48
49
=cut
50
51
sub plugin_javascript {
25
sub plugin_javascript {
52
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
26
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
53
    my $function_name= $field_number;
27
    my $function_name= $field_number;
Lines 58-88 sub plugin_javascript { Link Here
58
<script type=\"text/javascript\">
32
<script type=\"text/javascript\">
59
//<![CDATA[
33
//<![CDATA[
60
34
61
function Blur$function_name(index) {
62
//need this?
63
}
64
65
function Focus$function_name(subfield_managed) {
35
function Focus$function_name(subfield_managed) {
66
    document.getElementById(\"$field_number\").value='$org';
36
    document.getElementById(\"$field_number\").value='$org';
67
    return 0;
37
    return 0;
68
}
38
}
69
39
70
function Clic$function_name(subfield_managed) {
71
}
72
//]]>
40
//]]>
73
</script>
41
</script>
74
";
42
";
75
    return ($function_name,$res);
43
    return ($function_name,$res);
76
}
44
}
77
78
=head1 plugin
79
80
plugin : the true value_builded. The screen that is open in the popup window.
81
82
=cut
83
84
sub plugin {
85
    return "";
86
}
87
88
1;
(-)a/cataloguing/value_builder/marc21_field_040d.pl (-40 lines)
Lines 29-56 plugin_parameters : other parameters added when the plugin is called by the dopo Link Here
29
29
30
=cut
30
=cut
31
31
32
sub plugin_parameters {
33
    # my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
34
    return "";
35
}
36
37
=head1 FUNCTIONS
38
39
=head2 plugin_javascript
40
41
The javascript function called when the user enters the subfield.
42
contain 3 javascript functions :
43
 * one called when the field is entered (OnFocus). Named FocusXXX
44
 * one called when the field is leaved (onBlur). Named BlurXXX
45
 * one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
46
47
returns :
48
 * XXX
49
 * a variable containing the 3 scripts.
50
the 3 scripts are inserted after the <input> in the html code
51
52
=cut
53
54
sub plugin_javascript {
32
sub plugin_javascript {
55
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
56
    my $function_name = $field_number;
34
    my $function_name = $field_number;
Lines 61-91 sub plugin_javascript { Link Here
61
<script type=\"text/javascript\">
39
<script type=\"text/javascript\">
62
//<![CDATA[
40
//<![CDATA[
63
41
64
function Blur$function_name(index) {
65
//need this?
66
}
67
68
function Focus$function_name(subfield_managed) {
42
function Focus$function_name(subfield_managed) {
69
    document.getElementById(\"$field_number\").value='$org';
43
    document.getElementById(\"$field_number\").value='$org';
70
    return 0;
44
    return 0;
71
}
45
}
72
46
73
function Clic$function_name(subfield_managed) {
74
}
75
//]]>
47
//]]>
76
</script>
48
</script>
77
";
49
";
78
return ($function_name,$res);
50
return ($function_name,$res);
79
}
51
}
80
81
=head2 plugin
82
83
the true value_builded. The screen that is open in the popup window.
84
85
=cut
86
87
sub plugin {
88
    return "";
89
}
90
91
1;
(-)a/cataloguing/value_builder/marc21_field_245h.pl (-46 lines)
Lines 22-54 use strict; Link Here
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
use C4::Context;
23
use C4::Context;
24
24
25
=head1 FUNCTIONS
26
27
=head2 plugin_parameters
28
29
other parameters added when the plugin is called by the dopop function
30
31
=cut
32
33
sub plugin_parameters {
34
    return "";
35
}
36
37
=head2 plugin_javascript
38
39
Thee javascript function called when the user enters the subfield.
40
contain 3 javascript functions :
41
 * one called when the field is entered (OnFocus). Named FocusXXX
42
 * one called when the field is leaved (onBlur). Named BlurXXX
43
 * one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
44
45
returns :
46
 * XXX
47
 * a variable containing the 3 scripts.
48
the 3 scripts are inserted after the <input> in the html code
49
50
=cut
51
52
sub plugin_javascript {
25
sub plugin_javascript {
53
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
26
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
54
    my $function_name = $field_number;
27
    my $function_name = $field_number;
Lines 68-94 function Blur$function_name(index) { Link Here
68
    return 0;
41
    return 0;
69
}
42
}
70
43
71
function Focus$function_name(subfield_managed) {
72
  // Do Nothing
73
}
74
75
function Clic$function_name(subfield_managed) {
76
  // Do Nothing
77
}
78
//]]>
44
//]]>
79
</script>
45
</script>
80
";
46
";
81
return ($function_name,$res);
47
return ($function_name,$res);
82
}
48
}
83
84
=head2 plugin
85
86
The true value_builded. The screen that is open in the popup window.
87
88
=cut
89
90
sub plugin {
91
    return "";
92
}
93
94
1;
(-)a/cataloguing/value_builder/marc21_leader.pl (-17 lines)
Lines 27-43 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
sub plugin_parameters {
37
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
return "";
39
}
40
41
sub plugin_javascript {
30
sub plugin_javascript {
42
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
my $function_name= $field_number;
32
my $function_name= $field_number;
Lines 52-61 function Focus$function_name(subfield_managed) { Link Here
52
    return 1;
41
    return 1;
53
}
42
}
54
43
55
function Blur$function_name(subfield_managed) {
56
	return 1;
57
}
58
59
function Clic$function_name(i) {
44
function Clic$function_name(i) {
60
	defaultvalue=document.getElementById(\"$field_number\").value;
45
	defaultvalue=document.getElementById(\"$field_number\").value;
61
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
46
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 104-108 my ($template, $loggedinuser, $cookie) Link Here
104
					);
89
					);
105
        output_html_with_http_headers $input, $cookie, $template->output;
90
        output_html_with_http_headers $input, $cookie, $template->output;
106
}
91
}
107
108
1;
(-)a/cataloguing/value_builder/marc21_leader_authorities.pl (-17 lines)
Lines 27-43 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
sub plugin_parameters {
37
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
return "";
39
}
40
41
sub plugin_javascript {
30
sub plugin_javascript {
42
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
my $function_name= $field_number;
32
my $function_name= $field_number;
Lines 52-61 function Focus$function_name(subfield_managed) { Link Here
52
    return 1;
41
    return 1;
53
}
42
}
54
43
55
function Blur$function_name(subfield_managed) {
56
	return 1;
57
}
58
59
function Clic$function_name(i) {
44
function Clic$function_name(i) {
60
	defaultvalue=document.getElementById(\"$field_number\").value;
45
	defaultvalue=document.getElementById(\"$field_number\").value;
61
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader_authorities.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
46
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader_authorities.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 102-106 my ($template, $loggedinuser, $cookie) Link Here
102
					);
87
					);
103
        output_html_with_http_headers $input, $cookie, $template->output;
88
        output_html_with_http_headers $input, $cookie, $template->output;
104
}
89
}
105
106
1;
(-)a/cataloguing/value_builder/marc21_leader_book.pl (-21 lines)
Lines 27-43 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
sub plugin_parameters {
37
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
return "";
39
}
40
41
sub plugin_javascript {
30
sub plugin_javascript {
42
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
my $function_name= $field_number;
32
my $function_name= $field_number;
Lines 45-58 my $res=" Link Here
45
<script type=\"text/javascript\">
34
<script type=\"text/javascript\">
46
//<![CDATA[
35
//<![CDATA[
47
36
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
37
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 102-106 my ($template, $loggedinuser, $cookie) Link Here
102
					);
83
					);
103
        output_html_with_http_headers $input, $cookie, $template->output;
84
        output_html_with_http_headers $input, $cookie, $template->output;
104
}
85
}
105
106
1;
(-)a/cataloguing/value_builder/marc21_leader_computerfile.pl (-23 lines)
Lines 27-45 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
Lines 47-60 my $res=" Link Here
47
<script type=\"text/javascript\">
34
<script type=\"text/javascript\">
48
//<![CDATA[
35
//<![CDATA[
49
36
50
function Focus$function_name(subfield_managed) {
51
return 1;
52
}
53
54
function Blur$function_name(subfield_managed) {
55
	return 1;
56
}
57
58
function Clic$function_name(i) {
37
function Clic$function_name(i) {
59
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
60
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=$field_number&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 104-108 my ($template, $loggedinuser, $cookie) Link Here
104
					);
83
					);
105
        output_html_with_http_headers $input, $cookie, $template->output;
84
        output_html_with_http_headers $input, $cookie, $template->output;
106
}
85
}
107
108
1;
(-)a/cataloguing/value_builder/marc21_leader_video.pl (-21 lines)
Lines 27-43 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
sub plugin_parameters {
37
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
return "";
39
}
40
41
sub plugin_javascript {
30
sub plugin_javascript {
42
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
my $function_name= $field_number;
32
my $function_name= $field_number;
Lines 45-58 my $res=" Link Here
45
<script type=\"text/javascript\">
34
<script type=\"text/javascript\">
46
//<![CDATA[
35
//<![CDATA[
47
36
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
37
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=\"+i+\"&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=\"+i+\"&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 102-106 my ($template, $loggedinuser, $cookie) Link Here
102
					);
83
					);
103
        output_html_with_http_headers $input, $cookie, $template->output;
84
        output_html_with_http_headers $input, $cookie, $template->output;
104
}
85
}
105
106
1;
(-)a/cataloguing/value_builder/marc21_linking_section.pl (-15 lines)
Lines 33-56 use MARC::Record; Link Here
33
use C4::Branch;
33
use C4::Branch;
34
use C4::ItemType;
34
use C4::ItemType;
35
35
36
sub plugin_parameters {
37
 my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
38
     return "";
39
}
40
41
sub plugin_javascript {
36
sub plugin_javascript {
42
  my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
37
  my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
43
  my $function_name = $field_number;
38
  my $function_name = $field_number;
44
     my $res           = "
39
     my $res           = "
45
  <script type='text/javascript'>
40
  <script type='text/javascript'>
46
                function Focus$function_name(subfield_managed) {
47
                       return 1;
48
              }
49
50
             function Blur$function_name(subfield_managed) {
51
                        return 1;
52
              }
53
54
             function Clic$function_name(i) {
41
             function Clic$function_name(i) {
55
                       defaultvalue=document.getElementById(\"$field_number\").value;
42
                       defaultvalue=document.getElementById(\"$field_number\").value;
56
                 window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=marc21_linking_section.pl&index=\" + i + \"&result=\"+defaultvalue,\"marc21_field_7\"+i+\"\",'width=900,height=700,toolbar=false,scrollbars=yes');
43
                 window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=marc21_linking_section.pl&index=\" + i + \"&result=\"+defaultvalue,\"marc21_field_7\"+i+\"\",'width=900,height=700,toolbar=false,scrollbars=yes');
Lines 345-349 sub plugin { Link Here
345
     }
332
     }
346
      output_html_with_http_headers $query, $cookie, $template->output;
333
      output_html_with_http_headers $query, $cookie, $template->output;
347
}
334
}
348
349
1;
(-)a/cataloguing/value_builder/normarc_field_007.pl (-21 lines)
Lines 25-41 use C4::Context; Link Here
25
use C4::Search;
25
use C4::Search;
26
use C4::Output;
26
use C4::Output;
27
27
28
=head1
29
30
plugin_parameters : other parameters added when the plugin is called by the dopop function
31
32
=cut
33
34
sub plugin_parameters {
35
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
36
return "";
37
}
38
39
sub plugin_javascript {
28
sub plugin_javascript {
40
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
29
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
41
my $function_name= $field_number;
30
my $function_name= $field_number;
Lines 43-56 my $res=" Link Here
43
<script type=\"text/javascript\">
32
<script type=\"text/javascript\">
44
//<![CDATA[
33
//<![CDATA[
45
34
46
function Focus$function_name(subfield_managed) {
47
return 1;
48
}
49
50
function Blur$function_name(subfield_managed) {
51
	return 1;
52
}
53
54
function Clic$function_name(i) {
35
function Clic$function_name(i) {
55
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
56
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=normarc_field_007.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=normarc_field_007.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 158-162 my ($template, $loggedinuser, $cookie) Link Here
158
					);
139
					);
159
        output_html_with_http_headers $input, $cookie, $template->output;
140
        output_html_with_http_headers $input, $cookie, $template->output;
160
}
141
}
161
162
1;
(-)a/cataloguing/value_builder/normarc_field_008.pl (-19 lines)
Lines 25-38 use C4::Context; Link Here
25
use C4::Search;
25
use C4::Search;
26
use C4::Output;
26
use C4::Output;
27
27
28
=head1 FUNCTIONS
29
30
=head2 plugin_parameters
31
32
Other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
# find today's date
28
# find today's date
37
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
29
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
38
30
Lines 40-50 $year += 1900; Link Here
40
$mon  += 1;
32
$mon  += 1;
41
my $dateentered = substr($year, 2, 2) . sprintf("%0.2d", $mon) . sprintf("%0.2d", $mday);
33
my $dateentered = substr($year, 2, 2) . sprintf("%0.2d", $mon) . sprintf("%0.2d", $mday);
42
34
43
sub plugin_parameters {
44
    my ($dbh, $record, $tagslib, $i, $tabloop) = @_;
45
    return "";
46
}
47
48
sub plugin_javascript {
35
sub plugin_javascript {
49
    my $lang = C4::Context->preference('DefaultLanguageField008' );
36
    my $lang = C4::Context->preference('DefaultLanguageField008' );
50
    $lang = "eng" unless $lang;
37
    $lang = "eng" unless $lang;
Lines 65-74 function Focus$function_name(subfield_managed) { Link Here
65
    return 1;
52
    return 1;
66
}
53
}
67
54
68
function Blur$function_name(subfield_managed) {
69
	return 1;
70
}
71
72
function Clic$function_name(i) {
55
function Clic$function_name(i) {
73
	defaultvalue=document.getElementById(\"$field_number\").value;
56
	defaultvalue=document.getElementById(\"$field_number\").value;
74
	defaultvalue=defaultvalue.replace(/ /g, \"+\");
57
	defaultvalue=defaultvalue.replace(/ /g, \"+\");
Lines 188-192 sub plugin { Link Here
188
    );
171
    );
189
    output_html_with_http_headers $input, $cookie, $template->output;
172
    output_html_with_http_headers $input, $cookie, $template->output;
190
}
173
}
191
192
1;
(-)a/cataloguing/value_builder/normarc_leader.pl (-16 lines)
Lines 26-41 use C4::Context; Link Here
26
use C4::Search;
26
use C4::Search;
27
use C4::Output;
27
use C4::Output;
28
28
29
=head1
30
31
plugin_parameters : other parameters added when the plugin is called by the dopop function
32
33
=cut
34
sub plugin_parameters {
35
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
36
return "";
37
}
38
39
sub plugin_javascript {
29
sub plugin_javascript {
40
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
41
my $function_name= $field_number;
31
my $function_name= $field_number;
Lines 50-59 function Focus$function_name(subfield_managed) { Link Here
50
    return 1;
40
    return 1;
51
}
41
}
52
42
53
function Blur$function_name(subfield_managed) {
54
	return 1;
55
}
56
57
function Clic$function_name(i) {
43
function Clic$function_name(i) {
58
	defaultvalue=document.getElementById(\"$field_number\").value;
44
	defaultvalue=document.getElementById(\"$field_number\").value;
59
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=normarc_leader.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
45
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=normarc_leader.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
Lines 102-106 my ($template, $loggedinuser, $cookie) Link Here
102
					);
88
					);
103
        output_html_with_http_headers $input, $cookie, $template->output;
89
        output_html_with_http_headers $input, $cookie, $template->output;
104
}
90
}
105
106
1;
(-)a/cataloguing/value_builder/stocknumber.pl (-43 lines)
Lines 21-52 use strict; Link Here
21
use warnings;
21
use warnings;
22
use C4::Context;
22
use C4::Context;
23
23
24
=head1 plugin_parameters
25
26
other parameters added when the plugin is called by the dopop function
27
28
=cut
29
30
sub plugin_parameters {
31
#   my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
32
    return "";
33
}
34
35
=head1 plugin_javascript
36
37
The javascript function called when the user enters the subfield.
38
contain 3 javascript functions :
39
* one called when the field is entered (OnFocus). Named FocusXXX
40
* one called when the field is leaved (onBlur). Named BlurXXX
41
* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
42
43
returns :
44
* XXX
45
* a variable containing the 3 scripts.
46
the 3 scripts are inserted after the <input> in the html code
47
48
=cut
49
50
sub plugin_javascript {
24
sub plugin_javascript {
51
	my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
25
	my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
52
	my $function_name= "inventory".(int(rand(100000))+1);
26
	my $function_name= "inventory".(int(rand(100000))+1);
Lines 70-79 END_OF_JS Link Here
70
<script type="text/javascript">
44
<script type="text/javascript">
71
//<![CDATA[
45
//<![CDATA[
72
46
73
function Blur$function_name(index) {
74
    //barcode validation might go here
75
}
76
77
function Focus$function_name(subfield_managed, id, force) {
47
function Focus$function_name(subfield_managed, id, force) {
78
$scr
48
$scr
79
    return 0;
49
    return 0;
Lines 87-102 function Clic$function_name(id) { Link Here
87
END_OF_JS
57
END_OF_JS
88
    return ($function_name, $js);
58
    return ($function_name, $js);
89
}
59
}
90
91
=head1
92
93
plugin: useless here
94
95
=cut
96
97
sub plugin {
98
    # my ($input) = @_;
99
    return "";
100
}
101
102
1;
(-)a/cataloguing/value_builder/stocknumberAV.pl (-13 lines)
Lines 36-56 In this case, a stocknumber has this form : "PREFIX 0009678570". Link Here
36
36
37
=cut
37
=cut
38
38
39
sub plugin_parameters {
40
}
41
42
sub plugin_javascript {
39
sub plugin_javascript {
43
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
40
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
44
    my $res = qq{
41
    my $res = qq{
45
    <script type='text/javascript'>
42
    <script type='text/javascript'>
46
        function Focus$field_number() {
47
            return 1;
48
        }
49
50
        function Blur$field_number() {
51
                return 1;
52
        }
53
54
        function Clic$field_number() {
43
        function Clic$field_number() {
55
                var code = document.getElementById('$field_number');
44
                var code = document.getElementById('$field_number');
56
                \$.ajax({
45
                \$.ajax({
Lines 109-113 sub plugin { Link Here
109
98
110
    output_html_with_http_headers $input, $cookie, $template->output;
99
    output_html_with_http_headers $input, $cookie, $template->output;
111
}
100
}
112
113
1;
(-)a/cataloguing/value_builder/stocknumberam123.pl (-12 lines)
Lines 37-53 In this case, a stocknumber has this form : "PREFIX 0009678570". Link Here
37
37
38
=cut
38
=cut
39
39
40
sub plugin_parameters {
41
}
42
43
sub plugin_javascript {
40
sub plugin_javascript {
44
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
41
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
    my $res="
42
    my $res="
46
    <script type='text/javascript'>
43
    <script type='text/javascript'>
47
        function Focus$field_number() {
48
            return 1;
49
        }
50
51
        function Blur$field_number() {
44
        function Blur$field_number() {
52
                var code = document.getElementById('$field_number');
45
                var code = document.getElementById('$field_number');
53
                var url = '../cataloguing/plugin_launcher.pl?plugin_name=stocknumberam123.pl&code=' + code.value;
46
                var url = '../cataloguing/plugin_launcher.pl?plugin_name=stocknumberam123.pl&code=' + code.value;
Lines 59-67 sub plugin_javascript { Link Here
59
                return 1;
52
                return 1;
60
        }
53
        }
61
54
62
        function Clic$field_number() {
63
            return 1;
64
        }
65
    </script>
55
    </script>
66
    ";
56
    ";
67
57
Lines 110-114 sub plugin { Link Here
110
    }
100
    }
111
    output_html_with_http_headers $input, $cookie, $template->output;
101
    output_html_with_http_headers $input, $cookie, $template->output;
112
}
102
}
113
114
1;
(-)a/cataloguing/value_builder/unimarc_field_010.pl (-21 lines)
Lines 25-51 use CGI qw ( -utf8 ); Link Here
25
use C4::Context;
25
use C4::Context;
26
26
27
27
28
=head1 FUNCTIONS
29
30
=head2 plugin_parameters
31
32
other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
sub plugin_parameters {
37
    my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
    return "";
39
}
40
41
sub plugin_javascript {
28
sub plugin_javascript {
42
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
29
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
    my $res="
30
    my $res="
44
    <script type='text/javascript'>
31
    <script type='text/javascript'>
45
        function Focus$field_number() {
46
            return 1;
47
        }
48
49
        function Blur$field_number() {
32
        function Blur$field_number() {
50
                var isbn = document.getElementById('$field_number');
33
                var isbn = document.getElementById('$field_number');
51
                var url = '../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_010.pl&isbn=' + isbn.value;
34
                var url = '../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_010.pl&isbn=' + isbn.value;
Lines 63-71 sub plugin_javascript { Link Here
63
                return 1;
46
                return 1;
64
        }
47
        }
65
48
66
        function Clic$field_number() {
67
            return 1;
68
        }
69
    </script>
49
    </script>
70
    ";
50
    ";
71
51
Lines 149-152 sub plugin { Link Here
149
    }
129
    }
150
    output_html_with_http_headers $input, $cookie, $template->output;
130
    output_html_with_http_headers $input, $cookie, $template->output;
151
}
131
}
152
1;
(-)a/cataloguing/value_builder/unimarc_field_100.pl (-23 lines)
Lines 28-58 use C4::Context; Link Here
28
use C4::Output;
28
use C4::Output;
29
29
30
30
31
=head1 FUNCTIONS
32
33
=head2 plugin_parameters
34
35
Other parameters added when the plugin is called by the dopop function
36
37
=cut
38
39
sub plugin_parameters {
40
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
41
    return "";
42
}
43
44
sub plugin_javascript {
31
sub plugin_javascript {
45
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
46
    my $res           = "
33
    my $res           = "
47
        <script type='text/javascript'>
34
        <script type='text/javascript'>
48
            function Focus$field_number() {
49
                return 1;
50
            }
51
52
            function Blur$field_number() {
53
                return 1;
54
            }
55
56
            function Clic$field_number(i) {
35
            function Clic$field_number(i) {
57
                var defaultvalue;
36
                var defaultvalue;
58
                try {
37
                try {
Lines 133-137 sub plugin { Link Here
133
    );
112
    );
134
    output_html_with_http_headers $input, $cookie, $template->output;
113
    output_html_with_http_headers $input, $cookie, $template->output;
135
}
114
}
136
137
1;
(-)a/cataloguing/value_builder/unimarc_field_100_authorities.pl (-23 lines)
Lines 26-56 use C4::Context; Link Here
26
use C4::Output;
26
use C4::Output;
27
27
28
28
29
=head1 FUNCTIONS
30
31
=head2 plugin_parameters
32
33
Other parameters added when the plugin is called by the dopop function
34
35
=cut
36
37
sub plugin_parameters {
38
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
39
    return "";
40
}
41
42
sub plugin_javascript {
29
sub plugin_javascript {
43
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
30
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
44
    my $res           = "
31
    my $res           = "
45
        <script type='text/javascript'>
32
        <script type='text/javascript'>
46
            function Focus$field_number() {
47
                return 1;
48
            }
49
50
            function Blur$field_number() {
51
                return 1;
52
            }
53
54
            function Clic$field_number(i) {
33
            function Clic$field_number(i) {
55
                var defaultvalue;
34
                var defaultvalue;
56
                try {
35
                try {
Lines 118-122 sub plugin { Link Here
118
    );
97
    );
119
    output_html_with_http_headers $input, $cookie, $template->output;
98
    output_html_with_http_headers $input, $cookie, $template->output;
120
}
99
}
121
122
1;
(-)a/cataloguing/value_builder/unimarc_field_105.pl (-23 lines)
Lines 29-59 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
    my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
42
    return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
    my $res="
34
    my $res="
48
    <script type='text/javascript'>
35
    <script type='text/javascript'>
49
        function Focus$field_number() {
50
            return 1;
51
        }
52
53
        function Blur$field_number() {
54
                return 1;
55
        }
56
57
        function Clic$field_number() {
36
        function Clic$field_number() {
58
                defaultvalue=document.getElementById(\"$field_number\").value;
37
                defaultvalue=document.getElementById(\"$field_number\").value;
59
                window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_105.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_105\",'width=1200,height=400,toolbar=false,scrollbars=yes');
38
                window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_105.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_105\",'width=1200,height=400,toolbar=false,scrollbars=yes');
Lines 114-118 sub plugin { Link Here
114
        );
93
        );
115
        output_html_with_http_headers $input, $cookie, $template->output;
94
        output_html_with_http_headers $input, $cookie, $template->output;
116
}
95
}
117
118
1;
(-)a/cataloguing/value_builder/unimarc_field_106.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= "106".(int(rand(100000))+1);
32
my $function_name= "106".(int(rand(100000))+1);
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$field_number() {
49
return 1;
50
}
51
52
function Blur$field_number() {
53
	return 1;
54
}
55
56
function Clic$field_number() {
35
function Clic$field_number() {
57
        defaultvalue=document.getElementById(\"$field_number\").value;
36
        defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_106.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_106\",'width=500,height=400,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_106.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_106\",'width=500,height=400,toolbar=false,scrollbars=yes');
Lines 83-87 my ($template, $loggedinuser, $cookie) Link Here
83
 );
62
 );
84
        output_html_with_http_headers $input, $cookie, $template->output;
63
        output_html_with_http_headers $input, $cookie, $template->output;
85
}
64
}
86
87
1;
(-)a/cataloguing/value_builder/unimarc_field_110.pl (-23 lines)
Lines 29-59 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
    my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
42
    return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
    my $res="
34
    my $res="
48
    <script type='text/javascript'>
35
    <script type='text/javascript'>
49
    function Focus$field_number() {
50
        return 1;
51
    }
52
53
    function Blur$field_number() {
54
            return 1;
55
    }
56
57
    function Clic$field_number() {
36
    function Clic$field_number() {
58
            defaultvalue=document.getElementById(\"$field_number\").value;
37
            defaultvalue=document.getElementById(\"$field_number\").value;
59
            window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_110.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_110\",'width=700,height=600,toolbar=false,scrollbars=yes');
38
            window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_110.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_110\",'width=700,height=600,toolbar=false,scrollbars=yes');
Lines 103-107 my ($template, $loggedinuser, $cookie) Link Here
103
 );
82
 );
104
        output_html_with_http_headers $input, $cookie, $template->output;
83
        output_html_with_http_headers $input, $cookie, $template->output;
105
}
84
}
106
107
1;
(-)a/cataloguing/value_builder/unimarc_field_115a.pl (-23 lines)
Lines 29-59 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
42
    return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
33
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
47
    my $res = "
34
    my $res = "
48
    <script type=\"text/javascript\">
35
    <script type=\"text/javascript\">
49
    function Focus$field_number() {
50
        return 1;
51
    }
52
53
    function Blur$field_number() {
54
        return 1;
55
    }
56
57
    function Clic$field_number(i) {
36
    function Clic$field_number(i) {
58
        var defaultvalue;
37
        var defaultvalue;
59
        try {
38
        try {
Lines 132-136 sub plugin { Link Here
132
111
133
    output_html_with_http_headers $input, $cookie, $template->output;
112
    output_html_with_http_headers $input, $cookie, $template->output;
134
}
113
}
135
136
1;
(-)a/cataloguing/value_builder/unimarc_field_115b.pl (-23 lines)
Lines 29-59 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
42
    return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
33
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
47
    my $res = "
34
    my $res = "
48
<script type=\"text/javascript\">
35
<script type=\"text/javascript\">
49
function Focus$field_number(subfield_managed) {
50
    return 1;
51
}
52
53
function Blur$field_number(subfield_managed) {
54
	return 1;
55
}
56
57
function Clic$field_number() {
36
function Clic$field_number() {
58
	defaultvalue=document.getElementById(\"$field_number\").value;
37
	defaultvalue=document.getElementById(\"$field_number\").value;
59
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_115b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_115b\",'width=1200,height=600,toolbar=false,scrollbars=yes');
38
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_115b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_115b\",'width=1200,height=600,toolbar=false,scrollbars=yes');
Lines 111-115 sub plugin { Link Here
111
    );
90
    );
112
    output_html_with_http_headers $input, $cookie, $template->output;
91
    output_html_with_http_headers $input, $cookie, $template->output;
113
}
92
}
114
115
1;
(-)a/cataloguing/value_builder/unimarc_field_116.pl (-23 lines)
Lines 29-59 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
42
    return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
33
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
47
    my $res = "
34
    my $res = "
48
<script>
35
<script>
49
function Focus$field_number(subfield_managed) {
50
    return 1;
51
}
52
53
function Blur$field_number(subfield_managed) {
54
    return 1;
55
}
56
57
function Clic$field_number(i) {
36
function Clic$field_number(i) {
58
	defaultvalue=document.getElementById(\"$field_number\").value;
37
	defaultvalue=document.getElementById(\"$field_number\").value;
59
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_116.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_116\",'width=1200,height=600,toolbar=false,scrollbars=yes');
38
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_116.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_116\",'width=1200,height=600,toolbar=false,scrollbars=yes');
Lines 113-117 sub plugin { Link Here
113
    );
92
    );
114
    output_html_with_http_headers $input, $cookie, $template->output;
93
    output_html_with_http_headers $input, $cookie, $template->output;
115
}
94
}
116
117
1;
(-)a/cataloguing/value_builder/unimarc_field_117.pl (-23 lines)
Lines 29-59 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
42
return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
my $res="
34
my $res="
48
<script>
35
<script>
49
function Focus$field_number(subfield_managed) {
50
return 1;
51
}
52
53
function Blur$field_number(subfield_managed) {
54
	return 1;
55
}
56
57
function Clic$field_number(i) {
36
function Clic$field_number(i) {
58
	defaultvalue=document.getElementById(\"$field_number\").value;
37
	defaultvalue=document.getElementById(\"$field_number\").value;
59
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_117.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_117\",'width=600,height=225,toolbar=false,scrollbars=yes');
38
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_117.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_117\",'width=600,height=225,toolbar=false,scrollbars=yes');
Lines 96-100 my ($template, $loggedinuser, $cookie) Link Here
96
 );
75
 );
97
        output_html_with_http_headers $input, $cookie, $template->output;
76
        output_html_with_http_headers $input, $cookie, $template->output;
98
}
77
}
99
100
1;
(-)a/cataloguing/value_builder/unimarc_field_120.pl (-23 lines)
Lines 29-60 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
42
return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
my $function_name=$field_number;
34
my $function_name=$field_number;
48
my $res="
35
my $res="
49
<script>
36
<script>
50
function Focus$function_name(subfield_managed) {
51
return 1;
52
}
53
54
function Blur$function_name(subfield_managed) {
55
	return 1;
56
}
57
58
function Clic$function_name(i) {
37
function Clic$function_name(i) {
59
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
60
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_120.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_120\",'width=1200,height=750,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_120.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_120\",'width=1200,height=750,toolbar=false,scrollbars=yes');
Lines 106-110 my ($template, $loggedinuser, $cookie) Link Here
106
							"f10$f10" => 1);
85
							"f10$f10" => 1);
107
        output_html_with_http_headers $input, $cookie, $template->output;
86
        output_html_with_http_headers $input, $cookie, $template->output;
108
}
87
}
109
110
1;
(-)a/cataloguing/value_builder/unimarc_field_121a.pl (-23 lines)
Lines 29-60 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
42
return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
my $function_name= $field_number;
34
my $function_name= $field_number;
48
my $res="
35
my $res="
49
<script>
36
<script>
50
function Focus$function_name(subfield_managed) {
51
return 1;
52
}
53
54
function Blur$function_name(subfield_managed) {
55
	return 1;
56
}
57
58
function Clic$function_name(i) {
37
function Clic$function_name(i) {
59
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
60
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_121a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_121a\",'width=1210,height=750,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_121a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_121a\",'width=1210,height=750,toolbar=false,scrollbars=yes');
Lines 102-106 my ($template, $loggedinuser, $cookie) Link Here
102
			 "f8$f8" => $f8);
81
			 "f8$f8" => $f8);
103
        output_html_with_http_headers $input, $cookie, $template->output;
82
        output_html_with_http_headers $input, $cookie, $template->output;
104
}
83
}
105
106
1;
(-)a/cataloguing/value_builder/unimarc_field_121b.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_121b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_121b\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_121b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_121b\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 96-100 my ($template, $loggedinuser, $cookie) Link Here
96
							"f7$f7" => 1);
75
							"f7$f7" => 1);
97
        output_html_with_http_headers $input, $cookie, $template->output;
76
        output_html_with_http_headers $input, $cookie, $template->output;
98
}
77
}
99
100
1;
(-)a/cataloguing/value_builder/unimarc_field_122.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_122.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_122\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_122.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_122\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 92-96 my ($template, $loggedinuser, $cookie) Link Here
92
			 f5 => $f5);
71
			 f5 => $f5);
93
        output_html_with_http_headers $input, $cookie, $template->output;
72
        output_html_with_http_headers $input, $cookie, $template->output;
94
}
73
}
95
96
1;
(-)a/cataloguing/value_builder/unimarc_field_123a.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
    return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
    return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 84-88 my ($template, $loggedinuser, $cookie) Link Here
84
			 "f1$f1" => $f1);
63
			 "f1$f1" => $f1);
85
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
86
}
65
}
87
88
1;
(-)a/cataloguing/value_builder/unimarc_field_123d.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 90-94 my ($template, $loggedinuser, $cookie) Link Here
90
			 f4 => $f4);
69
			 f4 => $f4);
91
        output_html_with_http_headers $input, $cookie, $template->output;
70
        output_html_with_http_headers $input, $cookie, $template->output;
92
}
71
}
93
94
1;
(-)a/cataloguing/value_builder/unimarc_field_123e.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 90-94 my ($template, $loggedinuser, $cookie) Link Here
90
			 f4 => $f4);
69
			 f4 => $f4);
91
        output_html_with_http_headers $input, $cookie, $template->output;
70
        output_html_with_http_headers $input, $cookie, $template->output;
92
}
71
}
93
94
1;
(-)a/cataloguing/value_builder/unimarc_field_123f.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 91-95 my ($template, $loggedinuser, $cookie) Link Here
91
			 f4 => $f4);
70
			 f4 => $f4);
92
        output_html_with_http_headers $input, $cookie, $template->output;
71
        output_html_with_http_headers $input, $cookie, $template->output;
93
}
72
}
94
95
1;
(-)a/cataloguing/value_builder/unimarc_field_123g.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 90-94 my ($template, $loggedinuser, $cookie) Link Here
90
			 f4 => $f4);
69
			 f4 => $f4);
91
        output_html_with_http_headers $input, $cookie, $template->output;
70
        output_html_with_http_headers $input, $cookie, $template->output;
92
}
71
}
93
94
1;
(-)a/cataloguing/value_builder/unimarc_field_123i.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123i.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123i\",'width=800,height=400,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123i.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123i\",'width=800,height=400,toolbar=false,scrollbars=yes');
Lines 90-94 my ($template, $loggedinuser, $cookie) Link Here
90
			 f4 => $f4);
69
			 f4 => $f4);
91
        output_html_with_http_headers $input, $cookie, $template->output;
70
        output_html_with_http_headers $input, $cookie, $template->output;
92
}
71
}
93
94
1;
(-)a/cataloguing/value_builder/unimarc_field_123j.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
	my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
	return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
    <script>
34
    <script>
48
        function Focus$function_name(subfield_managed) {
49
        	return 1;
50
        }
51
52
        function Blur$function_name(subfield_managed) {
53
        	return 1;
54
        }
55
56
        function Clic$function_name(i) {
35
        function Clic$function_name(i) {
57
        	defaultvalue=document.getElementById(\"$field_number\").value;
36
        	defaultvalue=document.getElementById(\"$field_number\").value;
58
        	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123j.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123j\",'width=800,height=400,toolbar=false,scrollbars=yes');
37
        	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_123j.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_123j\",'width=800,height=400,toolbar=false,scrollbars=yes');
Lines 94-98 sub plugin { Link Here
94
			 f4 => $f4);
73
			 f4 => $f4);
95
        output_html_with_http_headers $input, $cookie, $template->output;
74
        output_html_with_http_headers $input, $cookie, $template->output;
96
}
75
}
97
98
1;
(-)a/cataloguing/value_builder/unimarc_field_124.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_100.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_100\",'width=500,height=400,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_100.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_100\",'width=500,height=400,toolbar=false,scrollbars=yes');
Lines 90-94 my ($template, $loggedinuser, $cookie) Link Here
90
							f4 => $f4);
69
							f4 => $f4);
91
        output_html_with_http_headers $input, $cookie, $template->output;
70
        output_html_with_http_headers $input, $cookie, $template->output;
92
}
71
}
93
94
1;
(-)a/cataloguing/value_builder/unimarc_field_124a.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_124a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_124a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 86-90 my ($input) = @_; Link Here
86
			 "f1$f1" => 1);
65
			 "f1$f1" => 1);
87
        output_html_with_http_headers $input, $cookie, $template->output;
66
        output_html_with_http_headers $input, $cookie, $template->output;
88
}
67
}
89
90
1;
(-)a/cataloguing/value_builder/unimarc_field_124b.pl (-20 lines)
Lines 27-55 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
sub plugin_parameters {
36
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
37
return "";
38
}
39
40
sub plugin_javascript {
30
sub plugin_javascript {
41
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
42
my $function_name= $field_number;
32
my $function_name= $field_number;
43
my $res="
33
my $res="
44
<script>
34
<script>
45
function Focus$function_name(subfield_managed) {
46
return 1;
47
}
48
49
function Blur$function_name(subfield_managed) {
50
	return 1;
51
}
52
53
function Clic$function_name(i) {
35
function Clic$function_name(i) {
54
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
55
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_124b\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_124b\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 81-85 my ($template, $loggedinuser, $cookie) Link Here
81
			 "f1$f1" => 1);
63
			 "f1$f1" => 1);
82
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
83
}
65
}
84
85
1;
(-)a/cataloguing/value_builder/unimarc_field_124c.pl (-21 lines)
Lines 27-56 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
sub plugin_parameters {
37
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
return "";
39
}
40
41
sub plugin_javascript {
30
sub plugin_javascript {
42
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
my $function_name= $field_number;
32
my $function_name= $field_number;
44
my $res="
33
my $res="
45
<script>
34
<script>
46
function Focus$function_name(subfield_managed) {
47
return 1;
48
}
49
50
function Blur$function_name(subfield_managed) {
51
	return 1;
52
}
53
54
function Clic$function_name(i) {
35
function Clic$function_name(i) {
55
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
56
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124c.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc_field_124c\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124c.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc_field_124c\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 82-86 my ($template, $loggedinuser, $cookie) Link Here
82
			 "f1$f1" => 1);
63
			 "f1$f1" => 1);
83
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
84
}
65
}
85
86
1;
(-)a/cataloguing/value_builder/unimarc_field_124d.pl (-20 lines)
Lines 27-55 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
sub plugin_parameters {
36
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
37
return "";
38
}
39
40
sub plugin_javascript {
30
sub plugin_javascript {
41
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
42
my $function_name= $field_number;
32
my $function_name= $field_number;
43
my $res="
33
my $res="
44
<script>
34
<script>
45
function Focus$function_name(subfield_managed) {
46
return 1;
47
}
48
49
function Blur$function_name(subfield_managed) {
50
	return 1;
51
}
52
53
function Clic$function_name(i) {
35
function Clic$function_name(i) {
54
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
55
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124d.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc_field_124d\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124d.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc_field_124d\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 81-85 my ($template, $loggedinuser, $cookie) Link Here
81
			 "f1$f1" => 1);
63
			 "f1$f1" => 1);
82
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
83
}
65
}
84
85
1;
(-)a/cataloguing/value_builder/unimarc_field_124e.pl (-20 lines)
Lines 27-55 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
sub plugin_parameters {
36
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
37
return "";
38
}
39
40
sub plugin_javascript {
30
sub plugin_javascript {
41
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
42
my $function_name= $field_number;
32
my $function_name= $field_number;
43
my $res="
33
my $res="
44
<script>
34
<script>
45
function Focus$function_name(subfield_managed) {
46
return 1;
47
}
48
49
function Blur$function_name(subfield_managed) {
50
	return 1;
51
}
52
53
function Clic$function_name(i) {
35
function Clic$function_name(i) {
54
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
55
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124e.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc_field_124e\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124e.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc_field_124e\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 81-85 my ($template, $loggedinuser, $cookie) Link Here
81
			 "f1$f1" => 1);
63
			 "f1$f1" => 1);
82
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
83
}
65
}
84
85
1;
(-)a/cataloguing/value_builder/unimarc_field_124f.pl (-20 lines)
Lines 27-55 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
sub plugin_parameters {
36
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
37
return "";
38
}
39
40
sub plugin_javascript {
30
sub plugin_javascript {
41
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
42
my $function_name= $field_number;
32
my $function_name= $field_number;
43
my $res="
33
my $res="
44
<script>
34
<script>
45
function Focus$function_name(subfield_managed) {
46
return 1;
47
}
48
49
function Blur$function_name(subfield_managed) {
50
	return 1;
51
}
52
53
function Clic$function_name(i) {
35
function Clic$function_name(i) {
54
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
55
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124f.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_124f\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124f.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_124f\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 81-85 my ($template, $loggedinuser, $cookie) Link Here
81
			 "f1$f1" => 1);
63
			 "f1$f1" => 1);
82
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
83
}
65
}
84
85
1;
(-)a/cataloguing/value_builder/unimarc_field_124g.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_124g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_124g.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_124g\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 84-88 my ($template, $loggedinuser, $cookie) Link Here
84
			 "f1$f1" => 1);
63
			 "f1$f1" => 1);
85
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
86
}
65
}
87
88
1;
(-)a/cataloguing/value_builder/unimarc_field_125.pl (-15 lines)
Lines 33-56 plugin_parameters : other parameters added when the plugin is called by the dopo Link Here
33
33
34
=cut
34
=cut
35
35
36
sub plugin_parameters {
37
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
return "";
39
}
40
41
sub plugin_javascript {
36
sub plugin_javascript {
42
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
37
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
my $function_name= $field_number;
38
my $function_name= $field_number;
44
my $res="
39
my $res="
45
<script>
40
<script>
46
function Focus$function_name(subfield_managed) {
47
return 1;
48
}
49
50
function Blur$function_name(subfield_managed) {
51
	return 1;
52
}
53
54
function Clic$function_name(i) {
41
function Clic$function_name(i) {
55
	defaultvalue=document.getElementById(\"$field_number\").value;
42
	defaultvalue=document.getElementById(\"$field_number\").value;
56
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_100.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_100\",'width=500,height=400,toolbar=false,scrollbars=yes');
43
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_100.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_100\",'width=500,height=400,toolbar=false,scrollbars=yes');
Lines 88-92 my ($template, $loggedinuser, $cookie) Link Here
88
							f4 => $f4);
75
							f4 => $f4);
89
        output_html_with_http_headers $input, $cookie, $template->output;
76
        output_html_with_http_headers $input, $cookie, $template->output;
90
}
77
}
91
92
1;
(-)a/cataloguing/value_builder/unimarc_field_125a.pl (-20 lines)
Lines 27-55 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
sub plugin_parameters {
36
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
37
return "";
38
}
39
40
sub plugin_javascript {
30
sub plugin_javascript {
41
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
42
my $function_name= $field_number;
32
my $function_name= $field_number;
43
my $res="
33
my $res="
44
    <script>
34
    <script>
45
    function Focus$function_name(subfield_managed) {
46
    	return 1;
47
    }
48
49
    function Blur$function_name(subfield_managed) {
50
    	return 1;
51
    }
52
53
    function Clic$function_name(i) {
35
    function Clic$function_name(i) {
54
    	defaultvalue=document.getElementById(\"$field_number\").value;
36
    	defaultvalue=document.getElementById(\"$field_number\").value;
55
    	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_125a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_125a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
    	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_125a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_125a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 82-86 my ($template, $loggedinuser, $cookie) Link Here
82
			 "f1$f1" => 1,"f2$f2" => 1);
64
			 "f1$f1" => 1,"f2$f2" => 1);
83
        output_html_with_http_headers $input, $cookie, $template->output;
65
        output_html_with_http_headers $input, $cookie, $template->output;
84
}
66
}
85
86
1;
(-)a/cataloguing/value_builder/unimarc_field_125b.pl (-20 lines)
Lines 29-57 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1
33
34
plugin_parameters : other parameters added when the plugin is called by the dopop function
35
36
=cut
37
sub plugin_parameters {
38
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
39
return "";
40
}
41
42
sub plugin_javascript {
32
sub plugin_javascript {
43
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
44
my $function_name= $field_number;
34
my $function_name= $field_number;
45
my $res="
35
my $res="
46
<script>
36
<script>
47
function Focus$function_name(subfield_managed) {
48
return 1;
49
}
50
51
function Blur$function_name(subfield_managed) {
52
	return 1;
53
}
54
55
function Clic$function_name(i) {
37
function Clic$function_name(i) {
56
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
57
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_125b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_125b\",'width=1000,height=375,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_125b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_125b\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 85-89 my ($template, $loggedinuser, $cookie) Link Here
85
			 "f1$f1" => 1);
67
			 "f1$f1" => 1);
86
        output_html_with_http_headers $input, $cookie, $template->output;
68
        output_html_with_http_headers $input, $cookie, $template->output;
87
}
69
}
88
89
1;
(-)a/cataloguing/value_builder/unimarc_field_126.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_100.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_100\",'width=500,height=400,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_100.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_100\",'width=500,height=400,toolbar=false,scrollbars=yes');
Lines 90-94 my ($template, $loggedinuser, $cookie) Link Here
90
							f4 => $f4);
69
							f4 => $f4);
91
        output_html_with_http_headers $input, $cookie, $template->output;
70
        output_html_with_http_headers $input, $cookie, $template->output;
92
}
71
}
93
94
1;
(-)a/cataloguing/value_builder/unimarc_field_126a.pl (-20 lines)
Lines 29-57 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1
33
34
plugin_parameters : other parameters added when the plugin is called by the dopop function
35
36
=cut
37
sub plugin_parameters {
38
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
39
return "";
40
}
41
42
sub plugin_javascript {
32
sub plugin_javascript {
43
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
44
my $function_name= $field_number;
34
my $function_name= $field_number;
45
my $res="
35
my $res="
46
<script>
36
<script>
47
function Focus$function_name(subfield_managed) {
48
return 1;
49
}
50
51
function Blur$function_name(subfield_managed) {
52
	return 1;
53
}
54
55
function Clic$function_name(i) {
37
function Clic$function_name(i) {
56
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
57
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_126a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_126a\",'width=1000,height=575,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_126a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_126a\",'width=1000,height=575,toolbar=false,scrollbars=yes');
Lines 114-118 my ($template, $loggedinuser, $cookie) Link Here
114
);
96
);
115
        output_html_with_http_headers $input, $cookie, $template->output;
97
        output_html_with_http_headers $input, $cookie, $template->output;
116
}
98
}
117
118
1;
(-)a/cataloguing/value_builder/unimarc_field_126b.pl (-21 lines)
Lines 27-56 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 DECRIPTION
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
36
sub plugin_parameters {
37
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
38
return "";
39
}
40
41
sub plugin_javascript {
30
sub plugin_javascript {
42
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
43
my $function_name= $field_number;
32
my $function_name= $field_number;
44
my $res="
33
my $res="
45
<script>
34
<script>
46
function Focus$function_name(subfield_managed) {
47
return 1;
48
}
49
50
function Blur$function_name(subfield_managed) {
51
	return 1;
52
}
53
54
function Clic$function_name(i) {
35
function Clic$function_name(i) {
55
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
56
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_126b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_126b\",'width=1000,height=575,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_126b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_126b\",'width=1000,height=575,toolbar=false,scrollbars=yes');
Lines 87-91 my ($template, $loggedinuser, $cookie) Link Here
87
);
68
);
88
        output_html_with_http_headers $input, $cookie, $template->output;
69
        output_html_with_http_headers $input, $cookie, $template->output;
89
}
70
}
90
91
1;
(-)a/cataloguing/value_builder/unimarc_field_127.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_127.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_127\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_127.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_127\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 88-92 my ($template, $loggedinuser, $cookie) Link Here
88
			 f3 => $f3);
67
			 f3 => $f3);
89
        output_html_with_http_headers $input, $cookie, $template->output;
68
        output_html_with_http_headers $input, $cookie, $template->output;
90
}
69
}
91
92
1;
(-)a/cataloguing/value_builder/unimarc_field_128a.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_128a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_128a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_128a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_128a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 84-88 my ($template, $loggedinuser, $cookie) Link Here
84
			 "f1$f1" => 1);
63
			 "f1$f1" => 1);
85
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
86
}
65
}
87
88
1;
(-)a/cataloguing/value_builder/unimarc_field_128b.pl (-20 lines)
Lines 29-57 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1
33
34
plugin_parameters : other parameters added when the plugin is called by the dopop function
35
36
=cut
37
sub plugin_parameters {
38
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
39
return "";
40
}
41
42
sub plugin_javascript {
32
sub plugin_javascript {
43
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
44
my $function_name= $field_number;
34
my $function_name= $field_number;
45
my $res="
35
my $res="
46
<script>
36
<script>
47
function Focus$function_name(subfield_managed) {
48
return 1;
49
}
50
51
function Blur$function_name(subfield_managed) {
52
	return 1;
53
}
54
55
function Clic$function_name(i) {
37
function Clic$function_name(i) {
56
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
57
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_128b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_128b\",'width=1000,height=375,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_128b.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_128b\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 85-89 my ($template, $loggedinuser, $cookie) Link Here
85
			 "f1$f1" => 1);
67
			 "f1$f1" => 1);
86
        output_html_with_http_headers $input, $cookie, $template->output;
68
        output_html_with_http_headers $input, $cookie, $template->output;
87
}
69
}
88
89
1;
(-)a/cataloguing/value_builder/unimarc_field_128c.pl (-23 lines)
Lines 27-58 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1 FUNCTIONS
31
32
=head2 plugin_parameters
33
34
Other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
30
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
32
my $function_name= $field_number;
46
my $res="
33
my $res="
47
<script>
34
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
35
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_128c.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_128c\",'width=1000,height=375,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_128c.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_128c\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 84-88 my ($template, $loggedinuser, $cookie) Link Here
84
			 "f1$f1" => 1);
63
			 "f1$f1" => 1);
85
        output_html_with_http_headers $input, $cookie, $template->output;
64
        output_html_with_http_headers $input, $cookie, $template->output;
86
}
65
}
87
88
1;
(-)a/cataloguing/value_builder/unimarc_field_130.pl (-21 lines)
Lines 29-58 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1
33
34
plugin_parameters : other parameters added when the plugin is called by the dopop function
35
36
=cut
37
38
sub plugin_parameters {
39
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
40
return "";
41
}
42
43
sub plugin_javascript {
32
sub plugin_javascript {
44
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
45
my $function_name= $field_number;
34
my $function_name= $field_number;
46
my $res="
35
my $res="
47
<script>
36
<script>
48
function Focus$function_name(subfield_managed) {
49
return 1;
50
}
51
52
function Blur$function_name(subfield_managed) {
53
	return 1;
54
}
55
56
function Clic$function_name(i) {
37
function Clic$function_name(i) {
57
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
58
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_130.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_130\",'width=1000,height=375,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_130.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_130\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 105-109 my ($template, $loggedinuser, $cookie) Link Here
105
);
86
);
106
        output_html_with_http_headers $input, $cookie, $template->output;
87
        output_html_with_http_headers $input, $cookie, $template->output;
107
}
88
}
108
109
1;
(-)a/cataloguing/value_builder/unimarc_field_135a.pl (-23 lines)
Lines 29-60 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
42
return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
my $function_name= $field_number;
34
my $function_name= $field_number;
48
my $res="
35
my $res="
49
<script>
36
<script>
50
function Focus$function_name(subfield_managed) {
51
return 1;
52
}
53
54
function Blur$function_name(subfield_managed) {
55
	return 1;
56
}
57
58
function Clic$function_name(i) {
37
function Clic$function_name(i) {
59
 	defaultvalue=document.getElementById(\"$field_number\").value;
38
 	defaultvalue=document.getElementById(\"$field_number\").value;
60
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_135a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_135a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_135a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_135a\",'width=1000,height=375,toolbar=false,scrollbars=yes');
Lines 107-111 my ($template, $loggedinuser, $cookie) Link Here
107
);
86
);
108
        output_html_with_http_headers $input, $cookie, $template->output;
87
        output_html_with_http_headers $input, $cookie, $template->output;
109
}
88
}
110
111
1;
(-)a/cataloguing/value_builder/unimarc_field_140.pl (-23 lines)
Lines 29-60 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
42
return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
47
my $function_name= $field_number;
34
my $function_name= $field_number;
48
my $res="
35
my $res="
49
<script>
36
<script>
50
function Focus$function_name(subfield_managed) {
51
return 1;
52
}
53
54
function Blur$function_name(subfield_managed) {
55
	return 1;
56
}
57
58
function Clic$function_name(i) {
37
function Clic$function_name(i) {
59
	defaultvalue=document.getElementById(\"$field_number\").value;
38
	defaultvalue=document.getElementById(\"$field_number\").value;
60
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_140.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_140\",'width=1000,height=575,toolbar=false,scrollbars=yes');
39
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_140.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_140\",'width=1000,height=575,toolbar=false,scrollbars=yes');
Lines 131-135 my ($template, $loggedinuser, $cookie) Link Here
131
);
110
);
132
        output_html_with_http_headers $input, $cookie, $template->output;
111
        output_html_with_http_headers $input, $cookie, $template->output;
133
}
112
}
134
135
1;
(-)a/cataloguing/value_builder/unimarc_field_141.pl (-20 lines)
Lines 27-55 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output;
29
29
30
=head1
31
32
plugin_parameters : other parameters added when the plugin is called by the dopop function
33
34
=cut
35
sub plugin_parameters {
36
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
37
return "";
38
}
39
40
sub plugin_javascript {
30
sub plugin_javascript {
41
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
42
my $function_name= $field_number;
32
my $function_name= $field_number;
43
my $res="
33
my $res="
44
<script>
34
<script>
45
function Focus$function_name(subfield_managed) {
46
return 1;
47
}
48
49
function Blur$function_name(subfield_managed) {
50
	return 1;
51
}
52
53
function Clic$function_name(i) {
35
function Clic$function_name(i) {
54
	defaultvalue=document.getElementById(\"$field_number\").value;
36
	defaultvalue=document.getElementById(\"$field_number\").value;
55
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_141.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_141\",'width=1000,height=575,toolbar=false,scrollbars=yes');
37
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_141.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_141\",'width=1000,height=575,toolbar=false,scrollbars=yes');
Lines 97-101 my ($template, $loggedinuser, $cookie) Link Here
97
);
79
);
98
        output_html_with_http_headers $input, $cookie, $template->output;
80
        output_html_with_http_headers $input, $cookie, $template->output;
99
}
81
}
100
101
1;
(-)a/cataloguing/value_builder/unimarc_field_210c.pl (-44 lines)
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;
(-)a/cataloguing/value_builder/unimarc_field_210c_bis.pl (-21 lines)
Lines 48-78 use C4::Context; Link Here
48
use C4::AuthoritiesMarc;
48
use C4::AuthoritiesMarc;
49
use C4::Output;
49
use C4::Output;
50
50
51
=head1 FUNCTIONS
52
53
=head2 plugin_parameters
54
55
plugin_parameters : other parameters added when the plugin is called by the dopop function
56
57
=cut
58
59
sub plugin_parameters {
60
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
61
    return "";
62
}
63
64
sub plugin_javascript {
51
sub plugin_javascript {
65
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
52
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
66
    my $function_name = $field_number;
53
    my $function_name = $field_number;
67
    my $res           = "
54
    my $res           = "
68
    <script type=\"text/javascript\">
55
    <script type=\"text/javascript\">
69
        function Focus$function_name(subfield_managed) {
70
            return 1;
71
        }
72
    
56
    
73
        function Blur$function_name(subfield_managed) {
74
            return 1;
75
        }
76
    
57
    
77
        function Clic$function_name(index) {
58
        function Clic$function_name(index) {
78
            window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c_bis.pl&index=\"+index,\"unimarc210c\",'width=500,height=400,toolbar=false,scrollbars=no');
59
            window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c_bis.pl&index=\"+index,\"unimarc210c\",'width=500,height=400,toolbar=false,scrollbars=no');
Lines 105-109 sub plugin { Link Here
105
    );
86
    );
106
    output_html_with_http_headers $input, $cookie, $template->output;
87
    output_html_with_http_headers $input, $cookie, $template->output;
107
}
88
}
108
109
1;
(-)a/cataloguing/value_builder/unimarc_field_225a.pl (-13 lines)
Lines 54-76 plugin_parameters : other parameters added when the plugin is called by the dopo Link Here
54
54
55
=cut
55
=cut
56
56
57
sub plugin_parameters {
58
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
59
    return "";
60
}
61
62
sub plugin_javascript {
57
sub plugin_javascript {
63
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
58
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
64
    my $function_name = $field_number;
59
    my $function_name = $field_number;
65
    my $res = "
60
    my $res = "
66
    <script type=\"text/javascript\">
61
    <script type=\"text/javascript\">
67
        function Focus$function_name(subfield_managed) {
68
            return 1;
69
        }
70
    
62
    
71
        function Blur$function_name(subfield_managed) {
72
            return 1;
73
        }
74
    
63
    
75
        function Clic$function_name(index) {
64
        function Clic$function_name(index) {
76
        // find the 010a value and the 210c. it will be used in the popup to find possibles collections
65
        // find the 010a value and the 210c. it will be used in the popup to find possibles collections
Lines 154-158 sub plugin { Link Here
154
    );
143
    );
155
    output_html_with_http_headers $input, $cookie, $template->output;
144
    output_html_with_http_headers $input, $cookie, $template->output;
156
}
145
}
157
158
1;
(-)a/cataloguing/value_builder/unimarc_field_4XX.pl (-15 lines)
Lines 34-57 use MARC::Record; Link Here
34
use C4::Branch;    # GetBranches
34
use C4::Branch;    # GetBranches
35
use C4::ItemType;
35
use C4::ItemType;
36
36
37
sub plugin_parameters {
38
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
39
    return "";
40
}
41
42
sub plugin_javascript {
37
sub plugin_javascript {
43
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
38
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
44
    my $function_name = $field_number;
39
    my $function_name = $field_number;
45
    my $res           = "
40
    my $res           = "
46
    <script type='text/javascript'>
41
    <script type='text/javascript'>
47
        function Focus$function_name(subfield_managed) {
48
            return 1;
49
        }
50
51
        function Blur$function_name(subfield_managed) {
52
            return 1;
53
        }
54
55
        function Clic$function_name(i) {
42
        function Clic$function_name(i) {
56
            defaultvalue=document.getElementById(\"$field_number\").value;
43
            defaultvalue=document.getElementById(\"$field_number\").value;
57
            window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&index=\" + i + \"&result=\"+defaultvalue,\"unimarc_field_4\"+i+\"\",'width=900,height=700,toolbar=false,scrollbars=yes');
44
            window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&index=\" + i + \"&result=\"+defaultvalue,\"unimarc_field_4\"+i+\"\",'width=900,height=700,toolbar=false,scrollbars=yes');
Lines 505-509 sub plugin { Link Here
505
    }
492
    }
506
    output_html_with_http_headers $query, $cookie, $template->output;
493
    output_html_with_http_headers $query, $cookie, $template->output;
507
}
494
}
508
509
1;
(-)a/cataloguing/value_builder/unimarc_field_686a.pl (-10 lines)
Lines 47-60 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; Link Here
47
my $function_name= $field_number;
47
my $function_name= $field_number;
48
my $res  = "
48
my $res  = "
49
<script>
49
<script>
50
function Focus$function_name(index) {
51
	return 1;
52
}
53
54
function Blur$function_name(subfield_managed) {
55
	return 1;
56
}
57
58
function Clic$function_name(subfield_managed) {
50
function Clic$function_name(subfield_managed) {
59
	defaultvalue=document.getElementById(\"$field_number\").value;
51
	defaultvalue=document.getElementById(\"$field_number\").value;
60
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_686a.pl&result=\"+defaultvalue+\"&index=$field_number\",\"value_builder\",'width=700,height=600,toolbar=false,scrollbars=yes');
52
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_686a.pl&result=\"+defaultvalue+\"&index=$field_number\",\"value_builder\",'width=700,height=600,toolbar=false,scrollbars=yes');
Lines 91-95 my ($input) = @_; Link Here
91
							);
83
							);
92
        output_html_with_http_headers $input, $cookie, $template->output;
84
        output_html_with_http_headers $input, $cookie, $template->output;
93
}
85
}
94
95
1;
(-)a/cataloguing/value_builder/unimarc_field_700-4.pl (-15 lines)
Lines 44-67 This plug-in deals with unimarc field 700-4 ( Link Here
44
44
45
=cut
45
=cut
46
46
47
sub plugin_parameters {
48
my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
49
return "";
50
}
51
52
sub plugin_javascript {
47
sub plugin_javascript {
53
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
48
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
54
my $function_name= $field_number;
49
my $function_name= $field_number;
55
my $res  = "
50
my $res  = "
56
<script>
51
<script>
57
function Focus$function_name(index) {
58
	return 1;
59
}
60
61
function Blur$function_name(subfield_managed) {
62
	return 1;
63
}
64
65
function Clic$function_name(subfield_managed) {
52
function Clic$function_name(subfield_managed) {
66
	defaultvalue=document.getElementById(\"$field_number\").value;
53
	defaultvalue=document.getElementById(\"$field_number\").value;
67
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_700-4.pl&result=\"+defaultvalue+\"&index=$field_number\",\"value_builder\",'width=500,height=400,toolbar=false,scrollbars=yes');
54
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_700-4.pl&result=\"+defaultvalue+\"&index=$field_number\",\"value_builder\",'width=500,height=400,toolbar=false,scrollbars=yes');
Lines 99-103 my ($input) = @_; Link Here
99
							);
86
							);
100
        output_html_with_http_headers $input, $cookie, $template->output;
87
        output_html_with_http_headers $input, $cookie, $template->output;
101
}
88
}
102
103
1;
(-)a/cataloguing/value_builder/unimarc_leader.pl (-20 lines)
Lines 29-56 use C4::Context; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output;
31
31
32
=head1 FUNCTIONS
33
34
=head2 plugin_parameters
35
36
Other parameters added when the plugin is called by the dopop function
37
38
=cut
39
40
sub plugin_parameters {
41
    my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
42
    return "";
43
}
44
45
sub plugin_javascript {
32
sub plugin_javascript {
46
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
33
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
47
    my $function_name = $field_number;
34
    my $function_name = $field_number;
48
    my $res           = "
35
    my $res           = "
49
<script>
36
<script>
50
function Focus$function_name(subfield_managed) {
51
return 1;
52
}
53
54
function Blur$function_name(subfield_managed) {
37
function Blur$function_name(subfield_managed) {
55
	var leader_length = document.getElementById(\"$field_number\").value.length;
38
	var leader_length = document.getElementById(\"$field_number\").value.length;
56
    if (leader_length != 24 && leader_length !=0) {
39
    if (leader_length != 24 && leader_length !=0) {
Lines 110-114 sub plugin { Link Here
110
    );
93
    );
111
    output_html_with_http_headers $input, $cookie, $template->output;
94
    output_html_with_http_headers $input, $cookie, $template->output;
112
}
95
}
113
114
1;
115
- 

Return to bug 10480