Move the invalid document markup to a separate HTML template.
Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
cffc63a29e
commit
3e13d5ae1f
@@ -49,15 +49,10 @@ MayanImage.intialize = function () {
|
||||
});
|
||||
}
|
||||
|
||||
MayanImage.templateInvalidDocument = $('#template-invalid-document').html();
|
||||
|
||||
MayanImage.prototype.onImageError = function () {
|
||||
this.element.parent().parent().html('\
|
||||
<div class="fa-3x">\
|
||||
<span class="fa-layers fa-fw">\
|
||||
<i class="far fa-file"></i>\
|
||||
<i class="fa-inverse fas fa-times text-danger" data-fa-transform="shrink-6"></i>\
|
||||
</span>\
|
||||
</div>\
|
||||
')
|
||||
this.element.parent().parent().html(MayanImage.templateInvalidDocument);
|
||||
|
||||
// Remove border to indicate non interactive image
|
||||
this.element.removeClass('thin_border');
|
||||
|
||||
@@ -117,6 +117,26 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script id="template-invalid-document" type="text/x-template">
|
||||
<div class="text-center" style="border: height: 100%;">
|
||||
<div class="fa-3x">
|
||||
<span class="fa-layers fa-fw">
|
||||
<i class="far fa-file text-primary"></i>
|
||||
<i class="fa-inverse fas fa-times text-danger" data-fa-transform="shrink-6"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script id="template-error" type="text/x-template">
|
||||
<div class="content">
|
||||
<h2 class="title">{% blocktrans %}Server communication error{% endblocktrans %}</h2>
|
||||
<div class="inner">
|
||||
<p>{% blocktrans %}Check you network connection and try again in a few moments.{% endblocktrans %}</p>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<div class="fa-3x">
|
||||
<span class="fa-layers fa-fw">
|
||||
<i class="far fa-file"></i>
|
||||
<i class="fa-inverse fas fa-question text-danger" data-fa-transform="shrink-6"></i>
|
||||
</span>
|
||||
</div>
|
||||
Reference in New Issue
Block a user