Lines 21-26
$(document).ready(function() {
Link Here
|
21 |
$("input[id^='hidden-']").each(function() { |
21 |
$("input[id^='hidden-']").each(function() { |
22 |
populateHiddenCheckboxes($(this).attr('id').split('-')[1]); |
22 |
populateHiddenCheckboxes($(this).attr('id').split('-')[1]); |
23 |
}); |
23 |
}); |
|
|
24 |
|
24 |
}); |
25 |
}); |
25 |
|
26 |
|
26 |
/*function displayMoreConstraint(numlayer){ |
27 |
/*function displayMoreConstraint(numlayer){ |
Lines 38-50
$(document).ready(function() {
Link Here
|
38 |
function setHiddenValue() { |
39 |
function setHiddenValue() { |
39 |
|
40 |
|
40 |
var tab = $(this).attr('id').split('_')[2]; |
41 |
var tab = $(this).attr('id').split('_')[2]; |
|
|
42 |
var flagged_checked = $("#hidden_flagged_" + tab).is(':checked'); |
41 |
var opac_checked = $("#hidden_opac_" + tab).is(':checked'); |
43 |
var opac_checked = $("#hidden_opac_" + tab).is(':checked'); |
42 |
var intranet_checked = $("#hidden_intranet_" + tab).is(':checked'); |
44 |
var intranet_checked = $("#hidden_intranet_" + tab).is(':checked'); |
43 |
var editor_checked = $("#hidden_editor_" + tab).is(':checked'); |
45 |
var editor_checked = $("#hidden_editor_" + tab).is(':checked'); |
44 |
var collapsed_checked = $("#hidden_collapsed_" + tab).is(':checked'); |
46 |
var collapsed_checked = $("#hidden_collapsed_" + tab).is(':checked'); |
45 |
var hidden_value = ""; |
47 |
var hidden_value = ""; |
46 |
|
48 |
|
47 |
if ( opac_checked && ! intranet_checked && ! editor_checked && collapsed_checked ) { |
49 |
$(function() { |
|
|
50 |
enable_cb(); |
51 |
$("#hidden_flagged_" + tab).click(enable_cb()); |
52 |
}); |
53 |
|
54 |
function enable_cb() { |
55 |
if ($("#hidden_flagged_" + tab).is(':checked')) { |
56 |
$('.inclusive_' + tab).attr('disabled',true).removeAttr('checked'); |
57 |
} |
58 |
else { |
59 |
$('.inclusive_' + tab).removeAttr('disabled'); |
60 |
} |
61 |
} |
62 |
|
63 |
if ( flagged_checked ) { |
64 |
hidden_value='-8'; |
65 |
} else if ( opac_checked && ! intranet_checked && ! editor_checked && collapsed_checked ) { |
48 |
hidden_value='-7'; |
66 |
hidden_value='-7'; |
49 |
} else if ( opac_checked && intranet_checked && ! editor_checked && ! collapsed_checked) { |
67 |
} else if ( opac_checked && intranet_checked && ! editor_checked && ! collapsed_checked) { |
50 |
hidden_value='-6'; |
68 |
hidden_value='-6'; |
Lines 79-84
function setHiddenValue() {
Link Here
|
79 |
} |
97 |
} |
80 |
|
98 |
|
81 |
$('#hidden-' + tab).val(hidden_value); |
99 |
$('#hidden-' + tab).val(hidden_value); |
|
|
100 |
|
82 |
} |
101 |
} |
83 |
|
102 |
|
84 |
function populateHiddenCheckboxes(tab) { |
103 |
function populateHiddenCheckboxes(tab) { |
Lines 89-96
function populateHiddenCheckboxes(tab) {
Link Here
|
89 |
var intranet_checked = false; |
108 |
var intranet_checked = false; |
90 |
var editor_checked = false; |
109 |
var editor_checked = false; |
91 |
var collapsed_checked = false; |
110 |
var collapsed_checked = false; |
|
|
111 |
var flagged_checked = false; |
92 |
|
112 |
|
93 |
if ( hidden_value == '-7') { |
113 |
|
|
|
114 |
|
115 |
if ( hidden_value == '-8' ) { |
116 |
flagged_checked = true; |
117 |
} else if ( hidden_value == '-7') { |
94 |
opac_checked = true; |
118 |
opac_checked = true; |
95 |
collapsed_checked = true; |
119 |
collapsed_checked = true; |
96 |
} else if ( hidden_value == '-6' ) { |
120 |
} else if ( hidden_value == '-6' ) { |
Lines 139-148
function populateHiddenCheckboxes(tab) {
Link Here
|
139 |
collapsed_checked = true; |
163 |
collapsed_checked = true; |
140 |
} // else if ( hidden_value == '8') { skip } |
164 |
} // else if ( hidden_value == '8') { skip } |
141 |
|
165 |
|
|
|
166 |
|
142 |
$("#hidden_opac_" + tab).attr('checked',opac_checked); |
167 |
$("#hidden_opac_" + tab).attr('checked',opac_checked); |
143 |
$("#hidden_intranet_" + tab).attr('checked',intranet_checked); |
168 |
$("#hidden_intranet_" + tab).attr('checked',intranet_checked); |
144 |
$("#hidden_editor_" + tab).attr('checked',editor_checked); |
169 |
$("#hidden_editor_" + tab).attr('checked',editor_checked); |
145 |
$("#hidden_collapsed_" + tab).attr('checked',collapsed_checked); |
170 |
$("#hidden_collapsed_" + tab).attr('checked',collapsed_checked); |
|
|
171 |
|
172 |
|
146 |
} |
173 |
} |
147 |
|
174 |
|
148 |
//]]> |
175 |
//]]> |
Lines 228-237
function populateHiddenCheckboxes(tab) {
Link Here
|
228 |
<li><label for="maxlength[% loo.row %]">Max length:</label><input type="text" id="maxlength[% loo.row %]" name="maxlength" value="[% loo.maxlength %]" size="4" /> (see online help)</li> |
255 |
<li><label for="maxlength[% loo.row %]">Max length:</label><input type="text" id="maxlength[% loo.row %]" name="maxlength" value="[% loo.maxlength %]" size="4" /> (see online help)</li> |
229 |
<li><input type="hidden" id="hidden-[% loo.row %]" name="hidden" value="[% loo.hidden %]" /> |
256 |
<li><input type="hidden" id="hidden-[% loo.row %]" name="hidden" value="[% loo.hidden %]" /> |
230 |
<label for="hidden[% loo.row %]">Visibility: </label> |
257 |
<label for="hidden[% loo.row %]">Visibility: </label> |
231 |
<input class="radio" type="checkbox" id="hidden_opac_[% loo.row %]" name="hidden_opac_[% loo.row %]"/> OPAC |
258 |
<input type="checkbox" id="hidden_opac_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_opac_[% loo.row %]"/> OPAC |
232 |
<input type="checkbox" id="hidden_intranet_[% loo.row %]" name="hidden_intranet_[% loo.row %]"/> Intranet |
259 |
<input type="checkbox" id="hidden_intranet_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_intranet_[% loo.row %]"/> Intranet |
233 |
<input type="checkbox" id="hidden_editor_[% loo.row %]" name="hidden_editor_[% loo.row %]"/> Editor |
260 |
<input type="checkbox" id="hidden_editor_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_editor_[% loo.row %]"/> Editor |
234 |
<input type="checkbox" id="hidden_collapsed_[% loo.row %]" name="hidden_collapsed_[% loo.row %]"/> Collapsed |
261 |
<input type="checkbox" id="hidden_collapsed_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_collapsed_[% loo.row %]"/> Collapsed |
|
|
262 |
<input type="checkbox" id="hidden_flagged_[% loo.row %]" name="flagged_[% loo.row %]"/> Flagged |
235 |
</li> |
263 |
</li> |
236 |
<li><label for="isurl[% loo.row %]">Is a URL:</label>[% loo.isurl %] (if checked, it means that the subfield is a URL and can be clicked)</li> |
264 |
<li><label for="isurl[% loo.row %]">Is a URL:</label>[% loo.isurl %] (if checked, it means that the subfield is a URL and can be clicked)</li> |
237 |
<li><label for="link[% loo.row %]">Link:</label><input type="text" id="link[% loo.row %]" name="link" value="[% loo.link %]" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li> |
265 |
<li><label for="link[% loo.row %]">Link:</label><input type="text" id="link[% loo.row %]" name="link" value="[% loo.link %]" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li> |