Show warnings correctly.

pull/1/head
chriseth 9 years ago
parent 602faa7f08
commit 09159dfa20
  1. 5
      index.html
  2. 13
      stylesheets/browser-solidity.css

@ -392,8 +392,9 @@ THE SOFTWARE.
var detailsOpen = {};
var renderError = function(message) {
var type = message.match(/^[0-9:]* Warning: /) ? 'warning' : 'error';
$('#output')
.append($('<pre class="error"></pre>').text(message));
.append($('<pre class="' + type + '"></pre>').text(message));
var err = message.match(/^:([0-9]*):([0-9]*)/)
if (err && err.length) {
var errLine = parseInt(err[1], 10) - 1;
@ -402,7 +403,7 @@ THE SOFTWARE.
row: errLine,
column: errCol,
text: message,
type: "error"
type: type
};
editor.getSession().setAnnotations(sourceAnnotations);
}

@ -213,12 +213,6 @@ body {
float: right;
}
.solError {
position: absolute;
background-color: rgba(255, 0, 0, 0.2);
z-index:40;
}
.error {
background-color: rgba(255, 0, 0, 0.5);
border-radius: 0;
@ -226,6 +220,13 @@ body {
border: 1px solid #D00909;
}
.warning {
background-color: rgba(210, 202, 36, 0.5);
border-radius: 0;
word-wrap: break-word;
border: 1px solid #D00909;
}
#ghostbar {
width: 1px;
background-color: red;

Loading…
Cancel
Save