Skip to content

Commit a91a6e8

Browse files
authored
Merge pull request EverexIO#110 from evseevnntmp/feature/error-message-style
styles for error message with details
2 parents 6eff7ec + 3d4a232 commit a91a6e8

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

css/ethplorer.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,23 @@ tr.paginationFooter td ul.pagination {
8282
padding-left: 0px;
8383
}
8484

85+
#error-with-details h3 {
86+
margin: 0;
87+
padding-top: 7px;
88+
padding-bottom: 15px;
89+
}
90+
91+
.ethplorer-panel {
92+
display: inline-block;
93+
background: #1c1c1c;
94+
color: #dedede;
95+
border-radius: 5px;
96+
padding: 15px;
97+
font-size: 16px;
98+
}
99+
85100
#error-info {
86-
padding-top: 5px;
87-
color: #eee;
101+
margin: 0 auto;
88102
}
89103

90104
.navbar-inverse {

index.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
require dirname(__FILE__) . '/service/lib/ethplorer.php';
1919
$es = Ethplorer::db(array());
2020

21-
$codeVersion = isset($aConfig['codeVersion']) ? $aConfig['codeVersion'] : "212";
21+
$codeVersion = isset($aConfig['codeVersion']) ? $aConfig['codeVersion'] : "213";
2222

2323
$error = TRUE;
2424
$header = "";
@@ -215,7 +215,13 @@
215215
<div id="error" class="content-page text-center">
216216
<h1 class="text-danger"></h1>
217217
<h3 id="error-reason" class="text-danger"></h3>
218-
<p id="error-info"></p>
218+
</div>
219+
220+
<div id="error-with-details" class="content-page text-center">
221+
<div class="ethplorer-panel">
222+
<h3 class="text-danger error-title"></h3>
223+
<div class="error-details"></div>
224+
</div>
219225
</div>
220226

221227
<div>

js/ethplorer.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,15 @@ Ethplorer = {
279279
error: function(message, addationalInfo = ''){
280280
Ethplorer.hideLoader();
281281
$('.content-page').hide();
282-
$('#error-reason').text(message);
283282
if (addationalInfo.length) {
284-
$('#error-info').html(addationalInfo);
283+
$('#error-with-details').show();
284+
$('#error').hide();
285+
$('#error-with-details .error-title').text(message);
286+
$('#error-with-details .error-details').html(addationalInfo);
287+
} else {
288+
$('#error').show();
289+
$('#error-with-details').hide();
290+
$('#error-reason').text(message);
285291
}
286292
$('#error').show();
287293
$('#ethplorer-path').hide();

0 commit comments

Comments
 (0)