Lines 18-23
Link Here
|
18 |
[% IF op == 'list' %] |
18 |
[% IF op == 'list' %] |
19 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
19 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
20 |
[% END %] |
20 |
[% END %] |
|
|
21 |
|
22 |
<script type="text/javascript"> |
23 |
//<![CDATA[ |
24 |
[% IF ( add_form ) %] |
25 |
$(document).ready(function(){ |
26 |
// Update selects for syntax, encoding and recordtype |
27 |
[% IF server %] |
28 |
$("#syntax").val('[% server.syntax %]'); |
29 |
$("#encoding").val('[% server.encoding %]'); |
30 |
$("#recordtype").val('[% server.recordtype %]'); |
31 |
[% END %] |
32 |
// Disable recordtype (and default to bib) for non-Z3950 servers until auth is supported |
33 |
[% UNLESS (server.servertype||type) == 'zed' %] |
34 |
$("#recordtype").prop('disabled',true); |
35 |
[% END %] |
36 |
$( "#serverentry" ).validate({ |
37 |
rules: { |
38 |
servername: { required: true }, |
39 |
host: { required: true }, |
40 |
port: { |
41 |
required: true, |
42 |
number: true |
43 |
}, |
44 |
db: { required: true }, |
45 |
rank: { number: true }, |
46 |
timeout: { number: true } |
47 |
} |
48 |
}); |
49 |
$("#serverentry").submit(function( event ) { |
50 |
// first test if show_sru_fields exists |
51 |
if( $('#show_sru_fields').length && $('#show_sru_fields').val()=='' && !confirm( _("No SRU search field mappings have been defined. This means that all field searches will go through the whole record. Continue?"))) { |
52 |
return false; |
53 |
} |
54 |
// copy show_sru_fields to hidden counterpart |
55 |
$('#sru_fields').val( $('#show_sru_fields').val() ); |
56 |
// enable recordtype to include field in post |
57 |
$('#recordtype').prop('disabled',false); |
58 |
}); |
59 |
$("#servername").on("blur",function(){ |
60 |
toUC(this); |
61 |
}); |
62 |
$("#modify_sru_fields").on("click",function(){ |
63 |
ModMapping(); |
64 |
}); |
65 |
}); |
66 |
function ModMapping () { |
67 |
var map= $('#show_sru_fields').val(); |
68 |
window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map,'popup','width=800,height=400,resizable=yes,toolbar=false,scrollbars=yes,top'); |
69 |
} |
70 |
[% ELSE %] |
71 |
$(document).ready(function() { |
72 |
$("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, { |
73 |
"aoColumnDefs": [ |
74 |
{ "aTargets": [-1], "bSortable": false, "bSearchable": false }, |
75 |
], |
76 |
"sPaginationType": "four_button" |
77 |
})); |
78 |
$(".delete").on("click",function(e){ |
79 |
var servername = $(this).data("servername"); |
80 |
if( confirm( _("Are you sure you want to delete server %s?").format(servername) ) ) { |
81 |
return true; |
82 |
} else { |
83 |
e.preventDefault(); |
84 |
} |
85 |
}); |
86 |
}); |
87 |
[% END %] |
88 |
//]]> |
89 |
</script> |
90 |
|
21 |
</head> |
91 |
</head> |
22 |
|
92 |
|
23 |
<body id="admin_z3950servers" class="admin"> |
93 |
<body id="admin_z3950servers" class="admin"> |
Lines 83-91
Link Here
|
83 |
</li> |
153 |
</li> |
84 |
<li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" /> |
154 |
<li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" /> |
85 |
</li> |
155 |
</li> |
|
|
156 |
[% IF (server.servertype||type) == 'zed' %] |
86 |
<li><label for="attributes">Attributes (additional PQF attributes added to each query): </label><input type="text" name="attributes" id="attributes" size="30" value="[% server.attributes %]" /> |
157 |
<li><label for="attributes">Attributes (additional PQF attributes added to each query): </label><input type="text" name="attributes" id="attributes" size="30" value="[% server.attributes %]" /> |
87 |
</li> |
158 |
</li> |
88 |
|
159 |
[% END %] |
89 |
|
160 |
|
90 |
<li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label> |
161 |
<li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label> |
91 |
<select name="syntax" id="syntax"> |
162 |
<select name="syntax" id="syntax"> |
92 |
- |
|
|