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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc (+28 lines)
Line 0 Link Here
1
<script type="text/javascript">
2
//<![CDATA[
3
4
    var MSG_CHOOSE_Z3950 = _("Please choose at least one external target");
5
6
[% IF ( total_pages ) %]
7
    var interface = "[% interface %]";
8
    var theme = "[% theme %]";
9
    var MSG_LOADING = _("Loading");
10
11
function validate_goto_page(){
12
    var page = $('#goto_page').val();
13
    if(isNaN(page)) {
14
        alert(_("The page entered is not a number."));
15
        return false;
16
    }
17
    else if(page < 1 || page > [% total_pages %] ) {
18
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
19
        return false;
20
    }
21
    else {
22
        return true;
23
    }
24
}
25
[% END %]
26
27
//]]>
28
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt (-54 / +9 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 52-90 Link Here
52
                $(".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);
53
            }
34
            }
54
        });
35
        });
55
    $(".previewData").on("click", function(e){
56
        e.preventDefault();
57
        var ltitle = $(this).text();
58
        var page = $(this).attr("href");
59
        $("#dataPreviewLabel").text(ltitle);
60
        $("#dataPreview .modal-body").load(page + " div");
61
        $('#dataPreview').modal({show:true});
62
    });
63
    $("#dataPreview").on("hidden", function(){
64
        $("#dataPreviewLabel").html("");
65
        $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
66
    });
67
});
68
36
69
[% IF ( total_pages ) %]
37
});
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
38
86
//]]>
39
//]]>
87
</script>
40
</script>
41
[% INCLUDE 'z3950_search.inc' %]
42
<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
88
<style type="text/css">
43
<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;}
44
.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;}
45
.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 %]
83
                 [% END %]
129
              </select>
84
              </select>
130
              </li>
85
              </li>
86
              <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
131
         </ol>
87
         </ol>
132
        <p><a id="resetZ3950Search" href="#">Clear search form</a></p>
133
    </fieldset>
88
    </fieldset>
134
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
89
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
135
    <input type="hidden" name="basketno" value="[% basketno %]" />
90
    <input type="hidden" name="basketno" value="[% basketno %]" />
136
    <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
91
    <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
137
	    </div>
92
	    </div>
138
<div class="yui-u second">
93
<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>
94
<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">
95
    <div id="z3950_search_targets_acq">
141
    [% FOREACH serverloo IN serverloop %]
96
    [% FOREACH serverloo IN serverloop %]
142
        <p>
97
        <p>
Lines 153-159 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
153
  </div>
108
  </div>
154
</div>
109
</div>
155
110
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>
111
    <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>
112
</form>
158
113
159
114
Lines 233-245 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
233
        [% END %]
188
        [% END %]
234
189
235
        [% IF ( show_prevbutton ) %]
190
        [% IF ( show_prevbutton ) %]
236
            <input type="button" name="changepage_prev" value="Previous Page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" />
191
            <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
237
        [% END %]
192
        [% END %]
238
        Page [% current_page %] / [% total_pages %]
193
        Page [% current_page %] / [% total_pages %]
239
        [% IF ( show_nextbutton ) %]
194
        [% IF ( show_nextbutton ) %]
240
            <input type="button" name="changepage_next" value="Next Page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" />
195
            <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
241
        [% END %]
196
        [% 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" />
197
        <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>
198
    </form>
244
199
245
    [% ELSE %]
200
    [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-66 / +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(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-99 $(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){
65
        e.preventDefault();
66
        var ltitle = $(this).text();
67
        var page = $(this).attr("href");
68
        $("#marcPreviewLabel").text(ltitle);
69
        $("#marcPreview .modal-body").load(page + " pre");
70
        $('#marcPreview').modal({show:true});
71
    });
72
    $("#marcPreview").on("hidden", function(){
73
        $("#marcPreviewLabel").html("");
74
        $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
75
    });
76
});
77
36
78
[% IF ( total_pages ) %]
37
});
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
38
95
//]]>
39
//]]>
96
</script>
40
</script>
41
[% INCLUDE 'z3950_search.inc' %]
42
<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
97
<style type="text/css">
43
<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;}
44
.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;}
45
.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>
85
                    <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>
86
                    <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>
87
                    <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle | html %]" /></li>
88
                    <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
142
                </ol>
89
                </ol>
143
                <p><a id="resetZ3950Search" href="#">Clear search form</a></p>
144
                </fieldset>
90
                </fieldset>
145
            </div>
91
            </div>
146
            <div class="yui-g">
92
            <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>
93
                <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">
94
                <div id="z3950_search_targets_auth">
149
                [% FOREACH serverloo IN serverloop %]
95
                [% FOREACH serverloo IN serverloop %]
150
                    <p>
96
                    <p>
Lines 158-164 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
158
                [% END %]
104
                [% END %]
159
                </div>
105
                </div>
160
            </div>
106
            </div>
161
        <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset>
107
        <fieldset class="action"><input type="submit"  class="submit" value="Search"/> <a class="cancel close" href="#">Cancel</a></fieldset>
162
        </form>
108
        </form>
163
[% ELSE %]
109
[% ELSE %]
164
    <h2>Results for Authority Records</h2>
110
    <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 %]
120
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
175
        [% IF ( breeding_loo.breedingid ) %]
121
        [% IF ( breeding_loo.breedingid ) %]
176
        <tr id="row[% breeding_loo.breedingid %]">
122
        <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>
123
            <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>
124
            <td>[% breeding_loo.heading %]</td>
179
            <td>[% breeding_loo.heading_code %]</td>
125
            <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>
126
            <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>
127
            <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>
128
        </tr>
183
        [% END %]
129
        [% END %]
184
    [% END %]</tbody>
130
    [% END %]</tbody>
Lines 215-227 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
215
        [% END %]
161
        [% END %]
216
162
217
        [% IF ( show_prevbutton ) %]
163
        [% IF ( show_prevbutton ) %]
218
            <input type="button" name="changepage_prev" value="Previous page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" />
164
            <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
219
        [% END %]
165
        [% END %]
220
        Page [% current_page %] / [% total_pages %]
166
        Page [% current_page %] / [% total_pages %]
221
        [% IF ( show_nextbutton ) %]
167
        [% IF ( show_nextbutton ) %]
222
            <input type="button" name="changepage_next" value="Next page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" />
168
            <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
223
        [% END %]
169
        [% 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" />
170
        <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>
171
    </form>
226
172
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>
173
<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 (-66 / +11 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-101 $(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){
66
        e.preventDefault();
67
        var ltitle = $(this).text();
68
        var page = $(this).attr("href");
69
        $("#dataPreviewLabel").text(ltitle);
70
        $("#dataPreview .modal-body").load(page + " div");
71
        $('#dataPreview').modal({show:true});
72
    });
73
    $("#dataPreview").on("hidden", function(){
74
        $("#dataPreviewLabel").html("");
75
        $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
76
    });
77
37
78
});
38
});
79
39
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
//]]>
40
//]]>
98
</script>
41
</script>
42
[% INCLUDE 'z3950_search.inc' %]
43
<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
99
<style type="text/css">
44
<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;}
45
.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;}
46
.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>
80
        <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>
81
        <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>
82
        <li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li>
83
        <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
138
        </ol>
84
        </ol>
139
    <p><a id="resetZ3950Search" href="#">Clear search form</a></p>
140
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
85
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
141
    <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
86
    <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
142
    </div>
87
    </div>
143
    <div class="yui-g">
88
    <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>
89
      <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">
90
      <div id="z3950_search_targets">
146
    [% FOREACH serverloo IN serverloop %]
91
    [% FOREACH serverloo IN serverloop %]
147
        <p> 
92
        <p> 
Lines 156-162 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
156
    [% END %]
101
    [% END %]
157
      </div>
102
      </div>
158
    </div>
103
    </div>
159
    <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset>
104
    <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset>
160
    </form>
105
    </form>
161
106
162
107
Lines 206-212 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
206
        [% IF ( breeding_loo.breedingid ) %]
151
        [% IF ( breeding_loo.breedingid ) %]
207
152
208
	    <tr id="row[% breeding_loo.breedingid %]">
153
	    <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>
154
            <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>
155
            <td>[% breeding_loo.title |html %]</td>
211
            <td>[% breeding_loo.author %]</td>
156
            <td>[% breeding_loo.author %]</td>
212
            <td>[% breeding_loo.date %]</td>
157
            <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>
160
            <td>[% breeding_loo.lccn %]</td>
216
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td>
161
            <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>
162
            <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> 
163
            <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode %]">Import</a></td>
219
        </tr>
164
        </tr>
220
        [% END %]
165
        [% END %]
221
    [% END %]</tbody>
166
    [% END %]</tbody>
Lines 253-265 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
253
        [% END %]
198
        [% END %]
254
199
255
        [% IF ( show_prevbutton ) %]
200
        [% IF ( show_prevbutton ) %]
256
            <input type="button" name="changepage_prev" value="Previous Page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" />
201
            <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
257
        [% END %]
202
        [% END %]
258
        Page [% current_page %] / [% total_pages %]
203
        Page [% current_page %] / [% total_pages %]
259
        [% IF ( show_nextbutton ) %]
204
        [% IF ( show_nextbutton ) %]
260
            <input type="button" name="changepage_next" value="Next Page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" />
205
            <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
261
        [% END %]
206
        [% 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" />
207
        <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>
208
    </form>
264
209
265
    [% ELSE %]
210
    [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js (-1 / +98 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
    $( ".previewMARC" ).on( "click", function(e) {
60
        e.preventDefault();
61
        var ltitle = $( this ).text();
62
        var page = $( this ).attr( "href" );
63
        $( "#marcPreviewLabel" ).text( ltitle );
64
        $( "#marcPreview .modal-body" ).load( page + " pre" );
65
        $( '#marcPreview' ).modal( {show:true} );
66
    });
67
    $( "#marcPreview" ).on( "hidden", function() {
68
        $( "#marcPreviewLabel" ).html( "" );
69
        $( "#marcPreview .modal-body" ).html( "<div id='loading'><img src='" + interface + "/" + theme + "/img/loading-small.gif' alt='' /> " + MSG_LOADING + "</div>" );
70
    });
71
    $( ".previewData" ).on( "click", function(e) {
72
        e.preventDefault();
73
        var ltitle = $( this ).text();
74
        var page = $( this ).attr( "href" );
75
        $( "#dataPreviewLabel" ).text( ltitle );
76
        $( "#dataPreview .modal-body" ).load( page + " div" );
77
        $( '#dataPreview' ).modal( {show:true} );
78
    });
79
    $( "#dataPreview" ).on( "hidden", function() {
80
        $( "#dataPreviewLabel" ).html( "" );
81
        $( "#dataPreview .modal-body" ).html( "<div id='loading'><img src='" + interface + "/" + theme + "/img/loading-small.gif' alt='' /> " + MSG_LOADING + "</div>" );
82
    });
83
    $( ".import_record" ).on( "click", function(e) {
84
        e.preventDefault();
85
        var data_breedingid = $( this ).data( "breedingid" );
86
        var data_headingcode = $( this ).data( "heading_code" );
87
        var data_authid = $( this ).data( "authid" );
88
        var data_biblionumber = $( this ).data( "biblionumber" );
89
        var data_frameworkcode = $( this ).data( "frameworkcode" );
90
        if ( data_headingcode == undefined ) {
91
            Import( data_breedingid, data_biblionumber, false , data_frameworkcode );
92
        } else {
93
            Import( data_breedingid, data_authid, data_headingcode );
94
        }
95
        return false;
96
    });
97
98
});

Return to bug 16812