Lines 127-182
Link Here
|
127 |
Sticky.hcSticky('refresh'); |
127 |
Sticky.hcSticky('refresh'); |
128 |
}); |
128 |
}); |
129 |
|
129 |
|
130 |
$('#preview').click(function (){ |
130 |
$("#preview").click(function () { |
131 |
var content="<h3>Authority #: [% authid %]</h3><hr>"; |
131 |
var content = "<h3>Authority #: [% authid | html %]</h3><hr>"; |
132 |
content+="<div style='color:#004d99;'>"; |
132 |
content += "<div style=\"color:#004d99;\">"; |
133 |
var line=1; |
133 |
var line = 1; |
134 |
var has_input=0; |
134 |
var has_input = 0; |
135 |
var sf_has_input=0; |
135 |
var sf_has_input = 0; |
136 |
$("#authoritytabs").find("[id^=tag_]").each(function(){ |
136 |
$("#authoritytabs").find("[id^=tag_]").each(function () { |
137 |
//check if tag has content |
137 |
//check if tag has content |
138 |
has_input=0; |
138 |
has_input = 0; |
139 |
$(this).find(".input_marceditor").each(function(){ |
139 |
$(this).find(".input_marceditor").each(function () { |
140 |
if($(this).val()) has_input=1; |
140 |
if ($(this).val()) has_input = 1; |
141 |
}); |
141 |
}); |
142 |
|
142 |
|
143 |
if(has_input){ |
143 |
if (has_input) { |
144 |
line=1; |
144 |
line = 1; |
145 |
//tag |
145 |
//tag |
146 |
var $tag = $(this).find(".tagnum").text(); |
146 |
var $tag = $(this).find(".tagnum").text(); |
147 |
content += $tag.replace("*",") +" "; |
147 |
content += $tag.replace("*", "") + " "; |
148 |
//indicators |
148 |
//indicators |
149 |
$(this).find(".indicator").each(function(){ |
149 |
$(this).find(".indicator").each(function () { |
150 |
if( $(this).val() ) content += $(this).val(); |
150 |
if ($(this).val()) content += $(this).val(); |
151 |
else content += "_"; |
151 |
else content += "_"; |
152 |
}); |
152 |
}); |
153 |
content += " "; |
153 |
content += " "; |
154 |
//subfields |
154 |
//subfields |
155 |
$(this).find(".subfield_line").each(function(){ |
155 |
$(this).find(".subfield_line").each(function () { |
156 |
//check if subfield has content |
156 |
//check if subfield has content |
157 |
sf_has_input=0; |
157 |
sf_has_input = 0; |
158 |
$(this).find(".input_marceditor").each(function(){ |
158 |
$(this).find(".input_marceditor").each(function () { |
159 |
if($(this).val()) sf_has_input=1; |
159 |
if ($(this).val()) sf_has_input = 1; |
160 |
}); |
|
|
161 |
if(sf_has_input){ |
162 |
if(line>1) content += " "; |
163 |
//code |
164 |
$(this).find(".subfieldcode").each(function(){ |
165 |
$(this).find(".flat").each(function(){ |
166 |
if($(this).val()!="00") |
167 |
content += "\$"+$(this).val()+" "; |
168 |
}); |
169 |
}); |
170 |
//value |
171 |
$(this).find(".input_marceditor").each(function(){ |
172 |
content += "<span style='color:#000;'>"+$(this).val()+"</span>"; |
173 |
}); |
160 |
}); |
174 |
content+="</br>"; |
161 |
if (sf_has_input) { |
175 |
line+=1; |
162 |
if (line > 1) content += " "; |
176 |
} |
163 |
//code |
|
|
164 |
$(this).find(".subfieldcode").each(function () { |
165 |
$(this).find(".flat").each(function () { |
166 |
if ($(this).val() != "00") |
167 |
content += "\$" + $(this).val() + " "; |
168 |
}); |
169 |
}); |
170 |
//value |
171 |
$(this).find(".input_marceditor").each(function () { |
172 |
content += "<span style=\"color:#000;\">" + $(this).val() + "</span>"; |
173 |
}); |
174 |
content += "</br>"; |
175 |
line += 1; |
176 |
} |
177 |
}); |
177 |
} |
178 |
} |
178 |
}); |
179 |
}); |
179 |
}); |
180 |
$("#auloadpreview").html( content ); |
|
|
181 |
$("#auEditPreview").modal(); |
182 |
}); |
180 |
}); |
183 |
}); |
181 |
|
184 |
|
182 |
function selectTab( tablink ){ |
185 |
function selectTab( tablink ){ |
Lines 421-427
Link Here
|
421 |
}); |
424 |
}); |
422 |
</script> |
425 |
</script> |
423 |
[% Asset.css("css/addbiblio.css") | $raw %] |
426 |
[% Asset.css("css/addbiblio.css") | $raw %] |
424 |
|
427 |
<style> |
|
|
428 |
#auloadpreview { font-family: monospace; } |
429 |
</style> |
425 |
</head> |
430 |
</head> |
426 |
<body id="auth_authorities" class="auth"> |
431 |
<body id="auth_authorities" class="auth"> |
427 |
|
432 |
|
428 |
- |
|
|