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

(-)a/cataloguing/z3950_auth_search.pl (+3 lines)
Lines 42-47 my $subjectsubdiv = $input->param('subjectsubdiv'); Link Here
42
my $srchany       = $input->param('srchany');
42
my $srchany       = $input->param('srchany');
43
my $op            = $input->param('op')||'';
43
my $op            = $input->param('op')||'';
44
my $page            = $input->param('current_page') || 1;
44
my $page            = $input->param('current_page') || 1;
45
my $index =$input->param('index');
45
$page = $input->param('goto_page') if $input->param('changepage_goto');
46
$page = $input->param('goto_page') if $input->param('changepage_goto');
46
47
47
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
48
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
Lines 63-68 $template->param( Link Here
63
    subjectsubdiv   => $subjectsubdiv,
64
    subjectsubdiv   => $subjectsubdiv,
64
    srchany      => $srchany,
65
    srchany      => $srchany,
65
    authid => $authid,
66
    authid => $authid,
67
    index => $index,
66
);
68
);
67
69
68
if ( $op ne "do_search" ) {
70
if ( $op ne "do_search" ) {
Lines 72-77 if ( $op ne "do_search" ) { Link Here
72
    $template->param(
74
    $template->param(
73
        serverloop   => $serverloop,
75
        serverloop   => $serverloop,
74
        opsearch     => "search",
76
        opsearch     => "search",
77
        index        => $index,
75
    );
78
    );
76
    output_html_with_http_headers $input, $cookie, $template->output;
79
    output_html_with_http_headers $input, $cookie, $template->output;
77
    exit;
80
    exit;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-1 / +2 lines)
Lines 22-29 Link Here
22
        $("#z3950submit").click(function(){
22
        $("#z3950submit").click(function(){
23
            if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
23
            if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
24
                var strQuery = GetZ3950Terms();
24
                var strQuery = GetZ3950Terms();
25
                var index = "&index=[% index %]";
25
                if(strQuery){
26
                if(strQuery){
26
                    window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid | html %]"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
27
                    window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid | html %]"+strQuery+index,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
27
                }
28
                }
28
            }
29
            }
29
            return false;
30
            return false;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (+6 lines)
Lines 177-182 function addCreateAuthorityButton(tag_subfield_line, heading, tag_index) { Link Here
177
    tag_subfield_line.append(elem);
177
    tag_subfield_line.append(elem);
178
    var tag_subfield_line_a = $('.subfield_line[id^=subfield' + heading.tag + 'a]').eq(tag_index);
178
    var tag_subfield_line_a = $('.subfield_line[id^=subfield' + heading.tag + 'a]').eq(tag_index);
179
    var subfield_a = tag_subfield_line_a.children('.input_marceditor').eq(0);
179
    var subfield_a = tag_subfield_line_a.children('.input_marceditor').eq(0);
180
    var index = subfield_a.attr('id');
180
    elem.click(function() {
181
    elem.click(function() {
181
        var popup = window.open("", "new_auth_popup",'fullscreen,toolbar=false,scrollbars=yes');
182
        var popup = window.open("", "new_auth_popup",'fullscreen,toolbar=false,scrollbars=yes');
182
        if(popup !== null) {
183
        if(popup !== null) {
Lines 202-207 function addCreateAuthorityButton(tag_subfield_line, heading, tag_index) { Link Here
202
                name: 'tagbiblio',
203
                name: 'tagbiblio',
203
                value: heading.tag
204
                value: heading.tag
204
            }));
205
            }));
206
            form.append($('<input>').attr({
207
                type: 'hidden',
208
                name: 'index',
209
                value: index
210
            }));
205
            $('.tag[id^=tag_' + heading.tag + '_]').eq(tag_index).find(':input').each(function(){
211
            $('.tag[id^=tag_' + heading.tag + '_]').eq(tag_index).find(':input').each(function(){
206
                form.append($('<input>').attr({
212
                form.append($('<input>').attr({
207
                    type: 'hidden',
213
                    type: 'hidden',
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-1 / +2 lines)
Lines 21-26 Link Here
21
        <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
21
        <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
22
        <input type="hidden" name="op" id="op" value="do_search" />
22
        <input type="hidden" name="op" id="op" value="do_search" />
23
        <input type="hidden" name="authid" value="[% authid | html %]" />
23
        <input type="hidden" name="authid" value="[% authid | html %]" />
24
        <input type="hidden" name="index" value="[% index %]" />
24
            <div class="row">
25
            <div class="row">
25
            <div class="col-xs-6">
26
            <div class="col-xs-6">
26
                <fieldset class="rows">
27
                <fieldset class="rows">
Lines 94-100 Link Here
94
                    </a>
95
                    </a>
95
                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% breeding_loo.breedingid | html %]">
96
                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% breeding_loo.breedingid | html %]">
96
                        <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | html %]" class="previewMARC"><i class="fa fa-eye"></i> MARC preview</a></li>
97
                        <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | html %]" class="previewMARC"><i class="fa fa-eye"></i> MARC preview</a></li>
97
                        <li><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid | html %]" data-heading_code="[% breeding_loo.heading_code | html %]" data-authid="[% breeding_loo.authid | html %]"><i class="fa fa-download"></i> Import</a></li>
98
                        <li><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid | html %]" data-heading_code="[% breeding_loo.heading_code | html %]" data-authid="[% breeding_loo.authid | html %]" data-index="[% index %]" ><i class="fa fa-download"></i> Import</a></li>
98
                    </ul>
99
                    </ul>
99
                </div>
100
                </div>
100
            </td>
101
            </td>
(-)a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js (-4 / +4 lines)
Lines 1-10 Link Here
1
//z3950_search.js for Authorities, Bib records and Acquisitions module
1
//z3950_search.js for Authorities, Bib records and Acquisitions module
2
function Import(Breeding, recordid, AuthType, FrameworkCode) {
2
function Import(Breeding, recordid, AuthType, FrameworkCode, index) {
3
3
4
    if ( AuthType == false ) {
4
    if ( AuthType == false ) {
5
        opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+recordid+"&z3950=1&frameworkcode="+FrameworkCode+"&breedingid="+Breeding;
5
        opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+recordid+"&z3950=1&frameworkcode="+FrameworkCode+"&breedingid="+Breeding;
6
    } else {
6
    } else {
7
        opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid;
7
        opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid+"&index="+index;
8
    }
8
    }
9
    window.close();
9
    window.close();
10
    return false;
10
    return false;
Lines 87-96 $( document ).ready( function() { Link Here
87
        var data_authid = $( this ).data( "authid" );
87
        var data_authid = $( this ).data( "authid" );
88
        var data_biblionumber = $( this ).data( "biblionumber" );
88
        var data_biblionumber = $( this ).data( "biblionumber" );
89
        var data_frameworkcode = $( this ).data( "frameworkcode" );
89
        var data_frameworkcode = $( this ).data( "frameworkcode" );
90
        var data_index = $( this ).data( "index" ); 
90
        if ( data_headingcode == undefined ) {
91
        if ( data_headingcode == undefined ) {
91
            Import( data_breedingid, data_biblionumber, false , data_frameworkcode );
92
            Import( data_breedingid, data_biblionumber, false , data_frameworkcode );
92
        } else {
93
        } else {
93
            Import( data_breedingid, data_authid, data_headingcode );
94
            Import( data_breedingid, data_authid, data_headingcodei, "", data_index );
94
        }
95
        }
95
        return false;
96
        return false;
96
    });
97
    });
97
- 

Return to bug 11299