|
Lines 306-311
function placeHold () {
Link Here
|
| 306 |
return false; |
306 |
return false; |
| 307 |
} |
307 |
} |
| 308 |
} |
308 |
} |
|
|
309 |
|
| 310 |
function AdjustPerms() { |
| 311 |
var category = $("#category").val(); |
| 312 |
var count_perms = $("#allow_changes_from option").length; |
| 313 |
|
| 314 |
// If we move to Private, remove Anyone if we did not have shares |
| 315 |
// Note: the number of shares is not tested real-time (just template var) |
| 316 |
if( category == 1 ) { |
| 317 |
[% IF !shelf.is_shared %] |
| 318 |
$("#allow_changes_from option[value='2']").remove(); |
| 319 |
[% END %] |
| 320 |
} |
| 321 |
// But if we move to Public, we may need to add it (again) |
| 322 |
else if( category == 2 && count_perms == 2 ) { |
| 323 |
$("#allow_changes_from").append( $('<option>', { |
| 324 |
value: 2, |
| 325 |
text: _("Anyone seeing this list"), |
| 326 |
})); |
| 327 |
} |
| 328 |
} |
| 309 |
//]]> |
329 |
//]]> |
| 310 |
</script> |
330 |
</script> |
| 311 |
</head> |
331 |
</head> |
|
Lines 557-563
function placeHold () {
Link Here
|
| 557 |
[% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] |
577 |
[% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] |
| 558 |
</select></li> |
578 |
</select></li> |
| 559 |
<li><label for="category">Category: </label> |
579 |
<li><label for="category">Category: </label> |
| 560 |
<select id="category" name="category"> |
580 |
<select id="category" name="category" onchange="AdjustPerms()"> |
| 561 |
[% IF shelf.is_private %] |
581 |
[% IF shelf.is_private %] |
| 562 |
<option value="1" selected="selected">Private</option> |
582 |
<option value="1" selected="selected">Private</option> |
| 563 |
[% ELSE %] |
583 |
[% ELSE %] |