Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
717c7e92
Commit
717c7e92
authored
Oct 06, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
render contract if only warnings, and make dismissable
parent
a85a9e84
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
12 deletions
+48
-12
index.html
index.html
+22
-6
browser-solidity.css
stylesheets/browser-solidity.css
+26
-6
No files found.
index.html
View file @
717c7e92
...
@@ -334,14 +334,21 @@ THE SOFTWARE.
...
@@ -334,14 +334,21 @@ THE SOFTWARE.
renderError
(
"Uncaught JavaScript Exception:
\
n"
+
exception
);
renderError
(
"Uncaught JavaScript Exception:
\
n"
+
exception
);
return
;
return
;
}
}
if
(
data
[
'error'
]
!==
undefined
)
var
noFatalErrors
=
true
;
// ie warnings are ok
if
(
data
[
'error'
]
!==
undefined
)
{
renderError
(
data
[
'error'
]);
renderError
(
data
[
'error'
]);
if
(
data
[
'errors'
]
!=
undefined
)
if
(
errortype
(
data
[
'error'
])
!==
'warning'
)
noFatalErrors
=
false
;
}
if
(
data
[
'errors'
]
!=
undefined
)
{
$
.
each
(
data
[
'errors'
],
function
(
i
,
err
)
{
$
.
each
(
data
[
'errors'
],
function
(
i
,
err
)
{
renderError
(
err
);
renderError
(
err
);
if
(
errortype
(
err
)
!==
'warning'
)
noFatalErrors
=
false
;
});
});
else
}
renderContracts
(
data
,
input
);
if
(
noFatalErrors
)
renderContracts
(
data
,
input
);
}
}
...
@@ -394,9 +401,13 @@ THE SOFTWARE.
...
@@ -394,9 +401,13 @@ THE SOFTWARE.
// ----------------- compiler output renderer ----------------------
// ----------------- compiler output renderer ----------------------
var
detailsOpen
=
{};
var
detailsOpen
=
{};
function
errortype
(
message
)
{
return
message
.
match
(
/^
[
0-9:
]
* Warning: /
)
?
'warning'
:
'error'
;
}
var
renderError
=
function
(
message
)
{
var
renderError
=
function
(
message
)
{
var
type
=
message
.
match
(
/^
[
0-9:
]
* Warning: /
)
?
'warning'
:
'error'
;
var
type
=
errortype
(
message
)
;
var
$error
=
$
(
'<
pre class="'
+
type
+
'"></pre>'
).
text
(
message
);
var
$error
=
$
(
'<
div class="'
+
type
+
'"><pre>'
+
message
+
'</pre><div class="close">x</div></div>'
);
$
(
'#output'
).
append
(
$error
);
$
(
'#output'
).
append
(
$error
);
var
err
=
message
.
match
(
/^:
([
0-9
]
*
)
:
([
0-9
]
*
)
/
);
var
err
=
message
.
match
(
/^:
([
0-9
]
*
)
:
([
0-9
]
*
)
/
);
if
(
err
&&
err
.
length
)
{
if
(
err
&&
err
.
length
)
{
...
@@ -413,6 +424,11 @@ THE SOFTWARE.
...
@@ -413,6 +424,11 @@ THE SOFTWARE.
editor
.
focus
();
editor
.
focus
();
editor
.
gotoLine
(
errLine
+
1
,
errCol
-
1
,
true
);
editor
.
gotoLine
(
errLine
+
1
,
errCol
-
1
,
true
);
});
});
$error
.
find
(
'.close'
).
click
(
function
(
ev
){
ev
.
preventDefault
();
$error
.
remove
();
return
false
;
});
}
}
};
};
...
...
stylesheets/browser-solidity.css
View file @
717c7e92
...
@@ -185,20 +185,40 @@ body {
...
@@ -185,20 +185,40 @@ body {
margin-bottom
:
1em
;
margin-bottom
:
1em
;
}
}
.error
{
background-color
:
rgba
(
255
,
0
,
0
,
0.5
);
.error
,
.warning
{
border-radius
:
0
;
border-radius
:
0
;
word-wrap
:
break-word
;
word-wrap
:
break-word
;
border
:
1px
solid
#D00909
;
cursor
:
pointer
;
cursor
:
pointer
;
position
:
relative
;
margin
:
0.25em
;
}
.error
pre
,
.warning
pre
{
background-color
:
transparent
;
margin
:
0
;
font-size
:
10px
;
}
.error
.close
,
.warning
.close
{
font-weight
:
bold
;
position
:
absolute
;
top
:
0
;
right
:
0
;
padding
:
0.5em
;
}
.error
{
background-color
:
rgba
(
255
,
0
,
0
,
0.5
);
border
:
1px
solid
#D00909
;
}
}
.warning
{
.warning
{
background-color
:
rgba
(
210
,
202
,
36
,
0.5
);
background-color
:
rgba
(
210
,
202
,
36
,
0.5
);
border-radius
:
0
;
word-wrap
:
break-word
;
border
:
1px
solid
#BBB427
;
border
:
1px
solid
#BBB427
;
cursor
:
pointer
;
}
}
#ghostbar
{
#ghostbar
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment