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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc (+21 lines)
Line 0 Link Here
1
[% IF ( total_pages ) %]
2
<script type="text/javascript">
3
//<![CDATA[
4
function validate_goto_page(){
5
    var page = $('#goto_page').val();
6
    if(isNaN(page)) {
7
        alert(_("The page entered is not a number."));
8
        return false;
9
    }
10
    else if(page < 1 || page > [% total_pages %] ) {
11
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
12
        return false;
13
    }
14
    else {
15
        return true;
16
    }
17
}
18
//]]>
19
</script>
20
[% END %]
21
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt (-43 / +10 lines)
Lines 17-41 Link Here
17
        "aaSorting": [[ 1, "asc" ]],
17
        "aaSorting": [[ 1, "asc" ]],
18
        "bPaginate": false
18
        "bPaginate": false
19
    } ) );
19
    } ) );
20
21
    $("#CheckAll").click(function(){
22
        $(".checkboxed").checkCheckboxes();
23
        return false;
24
    });
25
    $("#CheckNone").click(function(){
26
        $(".checkboxed").unCheckCheckboxes();
27
        return false;
28
    });
29
30
    $("#closemenu").click(function(e){
31
        $(".linktools").hide();
32
        $("tr").removeClass("selected");
33
    });
34
    $("#resetZ3950Search").click(function(e) {
35
        e.preventDefault();
36
        $("form[name='f']").find("input[type=text]").val("");
37
    });
38
39
        /* Inline edit/delete links */
20
        /* Inline edit/delete links */
40
        $("td").click(function(event){
21
        $("td").click(function(event){
41
            var $tgt = $(event.target);
22
            var $tgt = $(event.target);
Lines 64-90 Link Here
64
        $("#dataPreviewLabel").html("");
45
        $("#dataPreviewLabel").html("");
65
        $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
46
        $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
66
    });
47
    });
67
});
68
69
[% IF ( total_pages ) %]
70
function validate_goto_page(){
71
    var page = $('#goto_page').val();
72
    if(isNaN(page)) {
73
        alert(_("The page entered is not a number."));
74
        return false;
75
    }
76
    else if(page < 1 || page > [% total_pages %] ) {
77
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
78
        return false;
79
    }
80
    else {
81
        return true;
82
    }
83
}
84
[% END %]
85
48
49
});
50
    var MSG_CHOOSE_Z3950 = _("Please choose at least one external target");
86
//]]>
51
//]]>
87
</script>
52
</script>
53
[% INCLUDE 'z3950_search.inc' %]
54
<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
88
<style type="text/css">
55
<style type="text/css">
89
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
56
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
90
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
57
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
Lines 128-142 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
128
                 [% END %]
95
                 [% END %]
129
              </select>
96
              </select>
130
              </li>
97
              </li>
98
              <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
131
         </ol>
99
         </ol>
132
        <p><a id="resetZ3950Search" href="#">Clear search form</a></p>
133
    </fieldset>
100
    </fieldset>
134
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
101
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
135
    <input type="hidden" name="basketno" value="[% basketno %]" />
102
    <input type="hidden" name="basketno" value="[% basketno %]" />
136
    <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
103
    <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
137
	    </div>
104
	    </div>
138
<div class="yui-u second">
105
<div class="yui-u second">
139
<h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#">Select all</a></span><span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></span></h2>
106
<h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span></h2>
140
    <div id="z3950_search_targets_acq">
107
    <div id="z3950_search_targets_acq">
141
    [% FOREACH serverloo IN serverloop %]
108
    [% FOREACH serverloo IN serverloop %]
142
        <p>
109
        <p>
Lines 153-159 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
153
  </div>
120
  </div>
154
</div>
121
</div>
155
122
156
    <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a></fieldset>
123
    <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a></fieldset>
157
</form>
124
</form>
158
125
159
126
Lines 233-245 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
233
        [% END %]
200
        [% END %]
234
201
235
        [% IF ( show_prevbutton ) %]
202
        [% IF ( show_prevbutton ) %]
236
            <input type="button" name="changepage_prev" value="Previous Page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" />
203
            <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
237
        [% END %]
204
        [% END %]
238
        Page [% current_page %] / [% total_pages %]
205
        Page [% current_page %] / [% total_pages %]
239
        [% IF ( show_nextbutton ) %]
206
        [% IF ( show_nextbutton ) %]
240
            <input type="button" name="changepage_next" value="Next Page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" />
207
            <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
241
        [% END %]
208
        [% END %]
242
        <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" onclick="return validate_goto_page();" value="Go" />
209
        <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" />
243
    </form>
210
    </form>
244
211
245
    [% ELSE %]
212
    [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-55 / +13 lines)
Lines 6-31 Link Here
6
[% INCLUDE 'datatables.inc' %]
6
[% INCLUDE 'datatables.inc' %]
7
<script type="text/javascript">
7
<script type="text/javascript">
8
//<![CDATA[
8
//<![CDATA[
9
function Import(Breeding,AuthType,authid) {
10
    opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+authid;
11
    window.close();
12
    return false;
13
}
14
15
function closemenu(){
16
    $(".linktools").hide();
17
    $("tr").removeClass("selected");
18
}
19
9
20
$(document).ready(function(){
10
$(document).ready(function(){
21
    $("#CheckAll").click(function(){
11
22
        $(".checkboxed").checkCheckboxes();
23
        return false;
24
    });
25
    $("#CheckNone").click(function(){
26
        $(".checkboxed").unCheckCheckboxes();
27
        return false;
28
    });
29
    $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
12
    $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
30
        "sDom": 't',
13
        "sDom": 't',
31
        "aoColumnDefs": [
14
        "aoColumnDefs": [
Lines 50-66 $(document).ready(function(){ Link Here
50
                $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
33
                $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
51
            }
34
            }
52
        });
35
        });
53
    $("form[name='f']").submit(function(){
54
        if ($('input[type=checkbox]').filter(':checked').length == 0) {
55
            alert(_("Please choose at least one Z39.50 target"));
56
            return false;
57
        } else
58
            return true;
59
    });
60
    $("#resetZ3950Search").click(function(e) {
61
        e.preventDefault();
62
        $("form[name='f']").find("input[type=text]").val("");
63
    });
64
    $(".previewMARC").on("click", function(e){
36
    $(".previewMARC").on("click", function(e){
65
        e.preventDefault();
37
        e.preventDefault();
66
        var ltitle = $(this).text();
38
        var ltitle = $(this).text();
Lines 73-99 $(document).ready(function(){ Link Here
73
        $("#marcPreviewLabel").html("");
45
        $("#marcPreviewLabel").html("");
74
        $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
46
        $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
75
    });
47
    });
76
});
77
78
[% IF ( total_pages ) %]
79
function validate_goto_page(){
80
    var page = $('#goto_page').val();
81
    if(isNaN(page)) {
82
        alert(_("The page entered is not a number."));
83
        return false;
84
    }
85
    else if(page < 1 || page > [% total_pages %] ) {
86
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
87
        return false;
88
    }
89
    else {
90
        return true;
91
    }
92
}
93
[% END %]
94
48
49
});
50
    var MSG_CHOOSE_Z3950 = _("Please choose at least one external target");
95
//]]>
51
//]]>
96
</script>
52
</script>
53
[% INCLUDE 'z3950_search.inc' %]
54
<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
97
<style type="text/css">
55
<style type="text/css">
98
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
56
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
99
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
57
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
Lines 139-150 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
139
                    <li><label for="subjectsubdiv">Subject sub-division: </label> <input type="text" id="subjectsubdiv" name="subjectsubdiv" value="" /></li>
97
                    <li><label for="subjectsubdiv">Subject sub-division: </label> <input type="text" id="subjectsubdiv" name="subjectsubdiv" value="" /></li>
140
                    <li><label for="title">Title (any): </label> <input type="text" id="title"  name="title" value="[% title | html %]" /></li>
98
                    <li><label for="title">Title (any): </label> <input type="text" id="title"  name="title" value="[% title | html %]" /></li>
141
                    <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle | html %]" /></li>
99
                    <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle | html %]" /></li>
100
                    <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
142
                </ol>
101
                </ol>
143
                <p><a id="resetZ3950Search" href="#">Clear search form</a></p>
144
                </fieldset>
102
                </fieldset>
145
            </div>
103
            </div>
146
            <div class="yui-g">
104
            <div class="yui-g">
147
                <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#">Select all</a></span><span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></span></h2>
105
                <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span></h2>
148
                <div id="z3950_search_targets_auth">
106
                <div id="z3950_search_targets_auth">
149
                [% FOREACH serverloo IN serverloop %]
107
                [% FOREACH serverloo IN serverloop %]
150
                    <p>
108
                    <p>
Lines 158-164 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
158
                [% END %]
116
                [% END %]
159
                </div>
117
                </div>
160
            </div>
118
            </div>
161
        <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset>
119
        <fieldset class="action"><input type="submit"  class="submit" value="Search"/> <a class="cancel close" href="#">Cancel</a></fieldset>
162
        </form>
120
        </form>
163
[% ELSE %]
121
[% ELSE %]
164
    <h2>Results for Authority Records</h2>
122
    <h2>Results for Authority Records</h2>
Lines 174-184 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
174
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
132
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
175
        [% IF ( breeding_loo.breedingid ) %]
133
        [% IF ( breeding_loo.breedingid ) %]
176
        <tr id="row[% breeding_loo.breedingid %]">
134
        <tr id="row[% breeding_loo.breedingid %]">
177
            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">Preview MARC</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],'[% breeding_loo.heading_code %]','[% breeding_loo.authid %]'); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
135
            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">Preview MARC</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td>
178
            <td>[% breeding_loo.heading %]</td>
136
            <td>[% breeding_loo.heading %]</td>
179
            <td>[% breeding_loo.heading_code %]</td>
137
            <td>[% breeding_loo.heading_code %]</td>
180
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">MARC</a></td>
138
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">MARC</a></td>
181
            <td><a href="#" onclick="Import([% breeding_loo.breedingid %],'[% breeding_loo.heading_code %]','[% breeding_loo.authid %]'); return false">Import</a></td>
139
            <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]">Import</a></td>
182
        </tr>
140
        </tr>
183
        [% END %]
141
        [% END %]
184
    [% END %]</tbody>
142
    [% END %]</tbody>
Lines 215-227 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
215
        [% END %]
173
        [% END %]
216
174
217
        [% IF ( show_prevbutton ) %]
175
        [% IF ( show_prevbutton ) %]
218
            <input type="button" name="changepage_prev" value="Previous page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" />
176
            <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
219
        [% END %]
177
        [% END %]
220
        Page [% current_page %] / [% total_pages %]
178
        Page [% current_page %] / [% total_pages %]
221
        [% IF ( show_nextbutton ) %]
179
        [% IF ( show_nextbutton ) %]
222
            <input type="button" name="changepage_next" value="Next page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" />
180
            <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
223
        [% END %]
181
        [% END %]
224
        <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" onclick="return validate_goto_page();" value="Go" />
182
        <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" />
225
    </form>
183
    </form>
226
184
227
<p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="hidden" name="authid" value="[% authid %]" /><input type="submit" value="Try another search"/></form></p>
185
<p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="hidden" name="authid" value="[% authid %]" /><input type="submit" value="Try another search"/></form></p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt (-55 / +12 lines)
Lines 6-31 Link Here
6
[% INCLUDE 'datatables.inc' %]
6
[% INCLUDE 'datatables.inc' %]
7
<script type="text/javascript">
7
<script type="text/javascript">
8
//<![CDATA[
8
//<![CDATA[
9
function Import(GetThisOne,biblionumber) {
10
    opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+biblionumber+"&z3950=1&frameworkcode=[% frameworkcode %]&breedingid="+GetThisOne;
11
    window.close();
12
    return false;
13
}
14
15
function closemenu(){
16
    $(".linktools").hide();
17
    $("tr").removeClass("selected");
18
}
19
9
20
$(document).ready(function(){
10
$(document).ready(function(){
21
    $("#CheckAll").click(function(){
11
22
        $(".checkboxed").checkCheckboxes();
23
        return false;
24
    });
25
    $("#CheckNone").click(function(){
26
        $(".checkboxed").unCheckCheckboxes();
27
        return false;
28
    });
29
    $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
12
    $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
30
        "sDom": 't',
13
        "sDom": 't',
31
        "aoColumnDefs": [
14
        "aoColumnDefs": [
Lines 51-67 $(document).ready(function(){ Link Here
51
                $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
34
                $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
52
            }
35
            }
53
        });
36
        });
54
    $("form[name='f']").submit(function(){
55
        if ($('input[type=checkbox]').filter(':checked').length == 0) {
56
            alert(_("Please choose at least one external target"));
57
            return false;
58
        } else
59
            return true;
60
    });
61
    $("#resetZ3950Search").click(function(e) {
62
        e.preventDefault();
63
       $("form[name='f']").find("input[type=text]").val("");
64
    });
65
    $(".previewData").on("click", function(e){
37
    $(".previewData").on("click", function(e){
66
        e.preventDefault();
38
        e.preventDefault();
67
        var ltitle = $(this).text();
39
        var ltitle = $(this).text();
Lines 76-101 $(document).ready(function(){ Link Here
76
    });
48
    });
77
49
78
});
50
});
79
51
    var MSG_CHOOSE_Z3950 = _("Please choose at least one external target");
80
[% IF ( total_pages ) %]
81
function validate_goto_page(){
82
    var page = $('#goto_page').val();
83
    if(isNaN(page)) {
84
        alert(_("The page entered is not a number."));
85
        return false;
86
    }
87
    else if(page < 1 || page > [% total_pages %] ) {
88
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
89
        return false;
90
    }
91
    else {
92
        return true;
93
    }
94
}
95
[% END %]
96
97
//]]>
52
//]]>
98
</script>
53
</script>
54
[% INCLUDE 'z3950_search.inc' %]
55
<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
99
<style type="text/css">
56
<style type="text/css">
100
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
57
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
101
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
58
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
Lines 135-147 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
135
        <li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
92
        <li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
136
        <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
93
        <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
137
        <li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li>
94
        <li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li>
95
        <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
138
        </ol>
96
        </ol>
139
    <p><a id="resetZ3950Search" href="#">Clear search form</a></p>
140
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
97
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
141
    <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
98
    <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
142
    </div>
99
    </div>
143
    <div class="yui-g">
100
    <div class="yui-g">
144
      <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#">Select all</a></span><span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></span></h2>
101
      <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span></h2>
145
      <div id="z3950_search_targets">
102
      <div id="z3950_search_targets">
146
    [% FOREACH serverloo IN serverloop %]
103
    [% FOREACH serverloo IN serverloop %]
147
        <p> 
104
        <p> 
Lines 156-162 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
156
    [% END %]
113
    [% END %]
157
      </div>
114
      </div>
158
    </div>
115
    </div>
159
    <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset>
116
    <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset>
160
    </form>
117
    </form>
161
118
162
119
Lines 206-212 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
206
        [% IF ( breeding_loo.breedingid ) %]
163
        [% IF ( breeding_loo.breedingid ) %]
207
164
208
	    <tr id="row[% breeding_loo.breedingid %]">
165
	    <tr id="row[% breeding_loo.breedingid %]">
209
            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
166
            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td>
210
            <td>[% breeding_loo.title |html %]</td>
167
            <td>[% breeding_loo.title |html %]</td>
211
            <td>[% breeding_loo.author %]</td>
168
            <td>[% breeding_loo.author %]</td>
212
            <td>[% breeding_loo.date %]</td>
169
            <td>[% breeding_loo.date %]</td>
Lines 215-221 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
215
            <td>[% breeding_loo.lccn %]</td>
172
            <td>[% breeding_loo.lccn %]</td>
216
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td>
173
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td>
217
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Card</a></td>
174
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Card</a></td>
218
            <td><a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a></td> 
175
            <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode %]">Import</a></td>
219
        </tr>
176
        </tr>
220
        [% END %]
177
        [% END %]
221
    [% END %]</tbody>
178
    [% END %]</tbody>
Lines 253-265 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
253
        [% END %]
210
        [% END %]
254
211
255
        [% IF ( show_prevbutton ) %]
212
        [% IF ( show_prevbutton ) %]
256
            <input type="button" name="changepage_prev" value="Previous Page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" />
213
            <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
257
        [% END %]
214
        [% END %]
258
        Page [% current_page %] / [% total_pages %]
215
        Page [% current_page %] / [% total_pages %]
259
        [% IF ( show_nextbutton ) %]
216
        [% IF ( show_nextbutton ) %]
260
            <input type="button" name="changepage_next" value="Next Page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" />
217
            <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
261
        [% END %]
218
        [% END %]
262
        <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" onclick="return validate_goto_page();" value="Go" />
219
        <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" />
263
    </form>
220
    </form>
264
221
265
    [% ELSE %]
222
    [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js (-1 / +75 lines)
Line 0 Link Here
0
- 
1
//z3950_search.js for Authorities, Bib records and Acquisitions module
2
function Import(Breeding, recordid, AuthType, FrameworkCode) {
3
4
    if ( AuthType == false ) {
5
        opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+recordid+"&z3950=1&frameworkcode="+FrameworkCode+"&breedingid="+Breeding;
6
    } else {
7
        opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid;
8
    }
9
    window.close();
10
    return false;
11
12
}
13
14
$( document ).ready( function() {
15
16
    $( "#CheckAll" ).click( function() {
17
        $( ".checkboxed" ).checkCheckboxes();
18
        return false;
19
    });
20
    $( "#CheckNone" ).click( function() {
21
        $( ".checkboxed" ).unCheckCheckboxes();
22
        return false;
23
    });
24
    $( "#close_menu" ).on( "click", function(e) {
25
        e.preventDefault();
26
        $( ".linktools" ).hide();
27
        $( "tr" ).removeClass( "selected" );
28
        return false;
29
    });
30
    $( ".submit" ).on( "click", function() {
31
        $( "body" ).css( "cursor", "wait" );
32
    });
33
    $( "[name='changepage_prev']" ).on( "click", function() {
34
        var data_current_page_prev = $( this ).data( "currentpage" );
35
        $( '#current_page' ).val( data_current_page_prev - 1 );
36
        $( '#page_form' ).submit();
37
    });
38
    $( "[name='changepage_next']" ).on( "click", function() {
39
        var data_current_page_next = $( this ).data( "currentpage" );
40
        $( '#current_page' ).val( data_current_page_next + 1 );
41
        $( '#page_form' ).submit();
42
    });
43
    $( "[name='changepage_goto']" ).on( "click", function() {
44
        return validate_goto_page();
45
    });
46
    $( "#resetZ3950Search" ).click( function(e) {
47
        e.preventDefault();
48
        $( "form[name='f']" ).find( "input[type=text]" ).val( "" );
49
    });
50
    $( "form[name='f']" ).submit( function() {
51
        if ( $( 'input[type=checkbox]' ).filter( ':checked' ).length == 0 ) {
52
            alert( MSG_CHOOSE_Z3950 );
53
            $( "body" ).css( "cursor", "default" );
54
            return false;
55
        } else {
56
            return true;
57
        }
58
    });
59
    $( ".import_record" ).on( "click", function(e) {
60
        e.preventDefault();
61
        var data_breedingid = $( this ).data( "breedingid" );
62
        var data_headingcode = $( this ).data( "heading_code" );
63
        var data_authid = $( this ).data( "authid" );
64
        var data_biblionumber = $( this ).data( "biblionumber" );
65
        var data_frameworkcode = $( this ).data( "frameworkcode" );
66
        if ( data_headingcode == undefined ) {
67
            Import( data_breedingid, data_biblionumber, false , data_frameworkcode );
68
        } else {
69
            Import( data_breedingid, data_authid, data_headingcode );
70
        }
71
        return false;
72
    });
73
74
});
75

Return to bug 16812