Lines 289-305
Link Here
|
289 |
[%# FIXME Should not we filter the libraries displayed? %] |
289 |
[%# FIXME Should not we filter the libraries displayed? %] |
290 |
[% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1 ) %] |
290 |
[% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1 ) %] |
291 |
</select></p> |
291 |
</select></p> |
292 |
<!-- <input type="hidden" name="limit" value="branch: MAIN" /> --> |
|
|
293 |
[% IF search_groups %] |
292 |
[% IF search_groups %] |
294 |
<p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. --> |
293 |
<p>OR</p> |
295 |
|
294 |
|
296 |
<p> |
295 |
<p> |
297 |
<label for="categoryloop">Groups of libraries: </label> |
296 |
<label for="categoryloop">Groups of libraries: </label> |
298 |
<select name="multibranchlimit" id="categoryloop"> |
297 |
<select name="limit" id="categoryloop"> |
299 |
<option value=""> -- none -- </option> |
298 |
<option value=""> -- none -- </option> |
300 |
[% FOREACH sg IN search_groups %] |
299 |
[% FOREACH sg IN search_groups %] |
301 |
[% UNLESS sg.branchcode %] |
300 |
[% UNLESS sg.branchcode %] |
302 |
<option value="[% sg.id | html %]">[% sg.title | html %]</option> |
301 |
<option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option> |
303 |
[% END %] |
302 |
[% END %] |
304 |
[% END %] |
303 |
[% END %] |
305 |
</select> |
304 |
</select> |
Lines 338-343
Link Here
|
338 |
dad.appendChild(line.cloneNode(true)); |
337 |
dad.appendChild(line.cloneNode(true)); |
339 |
line.removeChild(ButtonPlus); |
338 |
line.removeChild(ButtonPlus); |
340 |
} |
339 |
} |
|
|
340 |
function branch_limit() { |
341 |
if( $("#branchloop").val() != "" ){ |
342 |
$("#categoryloop").val("").prop('disabled',true); |
343 |
} else { |
344 |
$("#categoryloop").prop('disabled',false); |
345 |
} |
346 |
if ( $("#categoryloop").val() != "" ){ |
347 |
$("#branchloop").val("").prop('disabled',true); |
348 |
} else { |
349 |
$("#branchloop").prop('disabled',false); |
350 |
} |
351 |
} |
352 |
|
341 |
var Sticky; |
353 |
var Sticky; |
342 |
$(document).ready(function() { |
354 |
$(document).ready(function() { |
343 |
$("input[name=q]:eq(0)").focus(); |
355 |
$("input[name=q]:eq(0)").focus(); |
Lines 347-358
Link Here
|
347 |
stickTo: ".main", |
359 |
stickTo: ".main", |
348 |
stickyClass: "floating" |
360 |
stickyClass: "floating" |
349 |
}); |
361 |
}); |
350 |
$("#branchloop").on("change",function(){ |
362 |
branch_limit(); |
351 |
if( this.value != ""){ |
363 |
$("#branchloop,#categoryloop").on("change",function(){ |
352 |
document.getElementById("categoryloop").disabled=true; |
364 |
branch_limit(); |
353 |
} else { |
|
|
354 |
document.getElementById("categoryloop").disabled=false; |
355 |
} |
356 |
}); |
365 |
}); |
357 |
|
366 |
|
358 |
[% IF searchid %] |
367 |
[% IF searchid %] |