|
Lines 248-254
Link Here
|
| 248 |
<div class="span3"> |
248 |
<div class="span3"> |
| 249 |
<fieldset> |
249 |
<fieldset> |
| 250 |
<legend>Audience</legend> |
250 |
<legend>Audience</legend> |
| 251 |
<select name="limit" class="subtype"> |
251 |
<select id="subtype_audience" name="limit" class="subtype"> |
| 252 |
<option value="" selected="selected" class="menuheader">Any audience</option> |
252 |
<option value="" selected="selected" class="menuheader">Any audience</option> |
| 253 |
<option value="aud:a">Preschool</option> |
253 |
<option value="aud:a">Preschool</option> |
| 254 |
<option value="aud:b">Primary</option> |
254 |
<option value="aud:b">Primary</option> |
|
Lines 265-271
Link Here
|
| 265 |
<div class="span3"> |
265 |
<div class="span3"> |
| 266 |
<fieldset> |
266 |
<fieldset> |
| 267 |
<legend>Content</legend> |
267 |
<legend>Content</legend> |
| 268 |
<select name="limit" class="subtype"> |
268 |
<select id="subtype_content" name="limit" class="subtype"> |
| 269 |
<option value="" selected="selected" class="menuheader">Any content</option> |
269 |
<option value="" selected="selected" class="menuheader">Any content</option> |
| 270 |
<option value="fic:1">Fiction</option> |
270 |
<option value="fic:1">Fiction</option> |
| 271 |
<option value="fic:0">Non fiction</option> |
271 |
<option value="fic:0">Non fiction</option> |
|
Lines 279-285
Link Here
|
| 279 |
<div class="span3"> |
279 |
<div class="span3"> |
| 280 |
<fieldset> |
280 |
<fieldset> |
| 281 |
<legend>Format</legend> |
281 |
<legend>Format</legend> |
| 282 |
<select name="limit" class="subtype"> |
282 |
<select id="subtype_format" name="limit" class="subtype"> |
| 283 |
<option value="" selected="selected" class="menuheader">Any format</option> |
283 |
<option value="" selected="selected" class="menuheader">Any format</option> |
| 284 |
<option value="l-format:ta">Regular print</option> |
284 |
<option value="l-format:ta">Regular print</option> |
| 285 |
<option value="l-format:tb">Large print</option> |
285 |
<option value="l-format:tb">Large print</option> |
|
Lines 298-304
Link Here
|
| 298 |
<div class="span3"> |
298 |
<div class="span3"> |
| 299 |
<fieldset> |
299 |
<fieldset> |
| 300 |
<legend>Additional content types for books/printed materials</legend> |
300 |
<legend>Additional content types for books/printed materials</legend> |
| 301 |
<select name="limit" class="subtype"> |
301 |
<select id="subtype_additional" name="limit" class="subtype"> |
| 302 |
<option value="">Any</option> |
302 |
<option value="">Any</option> |
| 303 |
<option value="ctype:a">Abstracts/summaries</option> |
303 |
<option value="ctype:a">Abstracts/summaries</option> |
| 304 |
<option value="ctype:b">Bibliographies</option> |
304 |
<option value="ctype:b">Bibliographies</option> |
|
Lines 372-381
Link Here
|
| 372 |
[% END %] |
372 |
[% END %] |
| 373 |
|
373 |
|
| 374 |
[% BLOCK jsinclude %] |
374 |
[% BLOCK jsinclude %] |
|
|
375 |
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.deserialize.min.js"></script> |
| 376 |
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.cookie.min.js"></script> |
| 375 |
<script type="text/javascript">//<![CDATA[ |
377 |
<script type="text/javascript">//<![CDATA[ |
| 376 |
$(document).ready(function() { |
378 |
$(document).ready(function() { |
| 377 |
$('#advsearches').tabs(); |
379 |
$('#advsearches').tabs(); |
|
|
380 |
jQuery.cookie.json = true; |
| 381 |
//$('#advsearches > ul').tabs(); |
| 382 |
|
| 383 |
[% IF ( ReturnToSearch ) %] |
| 384 |
if (form_serialized = jQuery.cookie("form_serialized")) { |
| 385 |
$('#advsearch form').deserialize(form_serialized); |
| 386 |
} |
| 387 |
if (form_serialized_limits = jQuery.cookie("form_serialized_limits")) { |
| 388 |
$('#language-limit') .val(form_serialized_limits[0]); |
| 389 |
$('#branchloop') .val(form_serialized_limits[1]); |
| 390 |
$('#subtype_audience') .val(form_serialized_limits[2]); |
| 391 |
$('#subtype_content') .val(form_serialized_limits[3]); |
| 392 |
$('#subtype_format') .val(form_serialized_limits[4]); |
| 393 |
$('#subtype_additional') .val(form_serialized_limits[5]); |
| 394 |
$('#locloop') .val(form_serialized_limits[6]); |
| 395 |
} |
| 396 |
[% ELSE %] |
| 397 |
//Clear all form cookies |
| 398 |
jQuery.removeCookie("form_serialized", { path: '/'}); |
| 399 |
jQuery.removeCookie("form_serialized_itype", { path: '/'}); |
| 400 |
jQuery.removeCookie("form_serialized_limits", { path: '/'}); |
| 401 |
jQuery.removeCookie("num_paragraph", { path: '/'}); |
| 402 |
jQuery.removeCookie("search_path_code", { path: '/'}); |
| 403 |
[% END %] |
| 404 |
$('#advsearch form').submit(function() { |
| 405 |
form_serialized = $(this).serialize(); |
| 406 |
jQuery.cookie("form_serialized", form_serialized,{ path: '/'}); |
| 407 |
form_serialized_limits = [ |
| 408 |
$('#language-limit').val(), $('#branchloop').val(), |
| 409 |
$('#subtype_audience').val(), $('#subtype_content').val(), |
| 410 |
$('#subtype_format').val(), $('#subtype_additional').val(), |
| 411 |
$('#locloop').val() |
| 412 |
]; |
| 413 |
jQuery.cookie("form_serialized_limits", form_serialized_limits,{ path: '/'}); |
| 414 |
[% IF ( expanded_options ) %] |
| 415 |
var numPar = $("#booleansearch fieldset p").size(); |
| 416 |
if (numPar > [% search_boxes_count %]){ |
| 417 |
jQuery.cookie("num_paragraph", numPar,{ path: '/'}); |
| 418 |
}else{ |
| 419 |
jQuery.cookie("num_paragraph", null,{ path: '/'}); |
| 420 |
} |
| 421 |
jQuery.cookie("search_path_code", 'exs',{ path: '/'}); |
| 422 |
[% ELSE %] |
| 423 |
jQuery.cookie("search_path_code", 'ads',{ path: '/'}); |
| 424 |
jQuery.cookie("num_paragraph", null,{ path: '/'}); |
| 425 |
[% END %] |
| 378 |
}); |
426 |
}); |
|
|
427 |
|
| 428 |
}); |
| 379 |
/* This function allows to display a new field to search. |
429 |
/* This function allows to display a new field to search. |
| 380 |
*/ |
430 |
*/ |
| 381 |
$(document).on("click", '.ButtonPlus', function(e) { |
431 |
$(document).on("click", '.ButtonPlus', function(e) { |