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