|
Lines 208-213
Link Here
|
| 208 |
window.scrollTo(0, getScrollto($li.attr("id"), "toolbar")); |
208 |
window.scrollTo(0, getScrollto($li.attr("id"), "toolbar")); |
| 209 |
}); |
209 |
}); |
| 210 |
|
210 |
|
|
|
211 |
$("body").on("click", ".nonxml-resolve", function(e){ |
| 212 |
e.preventDefault(); |
| 213 |
var errorId = $(this).data("error-id"); |
| 214 |
var biblioId = $(this).data("biblio-id"); |
| 215 |
var $item = $("#nonxml-error-" + errorId); |
| 216 |
$.ajax({ |
| 217 |
url: "/api/v1/biblios/" + biblioId + "/metadata/errors/" + errorId, |
| 218 |
method: "DELETE", |
| 219 |
success: function(){ |
| 220 |
$item.remove(); |
| 221 |
if ( $("#nonxml-error-list li").length === 0 ) { |
| 222 |
$("#nonxml-errors-notice").remove(); |
| 223 |
} |
| 224 |
}, |
| 225 |
error: function(){ |
| 226 |
alert( _("Failed to mark error as resolved. Please try again.") ); |
| 227 |
} |
| 228 |
}); |
| 229 |
}); |
| 230 |
|
| 211 |
}); |
231 |
}); |
| 212 |
|
232 |
|
| 213 |
function selectTab( tablink ){ |
233 |
function selectTab( tablink ){ |
|
Lines 817-825
Link Here
|
| 817 |
<div class="alert alert-warning" id="nonxml-errors-notice"> |
837 |
<div class="alert alert-warning" id="nonxml-errors-notice"> |
| 818 |
<h2>Data quality warnings</h2> |
838 |
<h2>Data quality warnings</h2> |
| 819 |
<p><strong>Non-XML characters were automatically stripped from this record when it was last saved. Please review the affected fields and correct or confirm the data.</strong></p> |
839 |
<p><strong>Non-XML characters were automatically stripped from this record when it was last saved. Please review the affected fields and correct or confirm the data.</strong></p> |
| 820 |
<ul> |
840 |
<ul id="nonxml-error-list"> |
| 821 |
[% FOREACH err IN existing_nonxml_errors %] |
841 |
[% FOREACH err IN existing_nonxml_errors %] |
| 822 |
<li> |
842 |
<li id="nonxml-error-[% err.id | html %]"> |
| 823 |
[% IF err.tag %] |
843 |
[% IF err.tag %] |
| 824 |
<a class="nonxml-linkfield btn btn-link" href="#" data-tag="[% err.tag | html %]" [% IF err.subfield %]data-subfield="[% err.subfield | html %]"[% END %]> |
844 |
<a class="nonxml-linkfield btn btn-link" href="#" data-tag="[% err.tag | html %]" [% IF err.subfield %]data-subfield="[% err.subfield | html %]"[% END %]> |
| 825 |
<i class="fa fa-arrow-right" aria-hidden="true"></i> |
845 |
<i class="fa fa-arrow-right" aria-hidden="true"></i> |
|
Lines 827-832
Link Here
|
| 827 |
</a> |
847 |
</a> |
| 828 |
[% END %] |
848 |
[% END %] |
| 829 |
<code>[% err.message | html %]</code> |
849 |
<code>[% err.message | html %]</code> |
|
|
850 |
<button class="nonxml-resolve btn btn-default btn-xs" data-error-id="[% err.id | html %]" data-biblio-id="[% biblionumber | html %]"> Mark resolved </button> |
| 830 |
</li> |
851 |
</li> |
| 831 |
[% END %] |
852 |
[% END %] |
| 832 |
</ul> |
853 |
</ul> |
| 833 |
- |
|
|