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
1581a4c7
Commit
1581a4c7
authored
Sep 28, 2015
by
chriseth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14 from chriseth/multipleErrors
Report multiple errors.
parents
dccf58af
33ff32c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
index.html
index.html
+12
-5
No files found.
index.html
View file @
1581a4c7
...
@@ -263,8 +263,8 @@ input[readonly] {
...
@@ -263,8 +263,8 @@ input[readonly] {
<div
class=
"info"
>
<div
class=
"info"
>
<p>
Version:
<span
id=
"version"
>
(loading)
</span><br/>
<p>
Version:
<span
id=
"version"
>
(loading)
</span><br/>
Change to:
<select
id=
"versionSelector"
></select><br/>
Change to:
<select
id=
"versionSelector"
></select><br/>
Execution environment does not connect to any node, everyhing is local and in memory only.
<br/>
Execution environment does not connect to any node, everyhing is local and in memory only.
<br/>
<code>
tx.origin =
<span
id=
"txorigin"
/></code></p>
<code>
tx.origin =
<span
id=
"txorigin"
/></code></p>
</div>
</div>
<div
id=
"optimizeBox"
>
<div
id=
"optimizeBox"
>
<input
id=
"editorWrap"
type=
"checkbox"
><label
for=
"editorWrap"
>
Text Wrap
</label>
<input
id=
"editorWrap"
type=
"checkbox"
><label
for=
"editorWrap"
>
Text Wrap
</label>
...
@@ -384,9 +384,12 @@ input[readonly] {
...
@@ -384,9 +384,12 @@ input[readonly] {
var
compileJSON
;
var
compileJSON
;
var
previousInput
=
''
;
var
previousInput
=
''
;
var
sourceAnnotations
=
[];
var
compile
=
function
()
{
var
compile
=
function
()
{
editor
.
getSession
().
clearAnnotations
();
editor
.
getSession
().
clearAnnotations
();
sourceAnnotations
=
[];
editor
.
getSession
().
removeMarker
(
errMarkerId
);
editor
.
getSession
().
removeMarker
(
errMarkerId
);
$
(
'#output'
).
empty
();
var
input
=
editor
.
getValue
();
var
input
=
editor
.
getValue
();
var
optimize
=
document
.
querySelector
(
'#optimize'
).
checked
;
var
optimize
=
document
.
querySelector
(
'#optimize'
).
checked
;
try
{
try
{
...
@@ -397,6 +400,10 @@ input[readonly] {
...
@@ -397,6 +400,10 @@ input[readonly] {
}
}
if
(
data
[
'error'
]
!==
undefined
)
if
(
data
[
'error'
]
!==
undefined
)
renderError
(
data
[
'error'
]);
renderError
(
data
[
'error'
]);
if
(
data
[
'errors'
]
!=
undefined
)
$
.
each
(
data
[
'errors'
],
function
(
i
,
err
)
{
renderError
(
err
);
});
else
else
renderContracts
(
data
,
input
);
renderContracts
(
data
,
input
);
...
@@ -433,18 +440,18 @@ input[readonly] {
...
@@ -433,18 +440,18 @@ input[readonly] {
var
renderError
=
function
(
message
)
{
var
renderError
=
function
(
message
)
{
$
(
'#output'
)
$
(
'#output'
)
.
empty
()
.
append
(
$
(
'<pre class="error"></pre>'
).
text
(
message
));
.
append
(
$
(
'<pre class="error"></pre>'
).
text
(
message
));
var
err
=
message
.
match
(
/^:
([
0-9
]
*
)
:
([
0-9
]
*
)
/
)
var
err
=
message
.
match
(
/^:
([
0-9
]
*
)
:
([
0-9
]
*
)
/
)
if
(
err
&&
err
.
length
)
{
if
(
err
&&
err
.
length
)
{
var
errLine
=
parseInt
(
err
[
1
],
10
)
-
1
;
var
errLine
=
parseInt
(
err
[
1
],
10
)
-
1
;
var
errCol
=
err
[
2
]
?
parseInt
(
err
[
2
],
10
)
:
0
;
var
errCol
=
err
[
2
]
?
parseInt
(
err
[
2
],
10
)
:
0
;
editor
.
getSession
().
setAnnotations
([
{
sourceAnnotations
[
sourceAnnotations
.
length
]
=
{
row
:
errLine
,
row
:
errLine
,
column
:
errCol
,
column
:
errCol
,
text
:
message
,
text
:
message
,
type
:
"error"
type
:
"error"
}]);
};
editor
.
getSession
().
setAnnotations
(
sourceAnnotations
);
}
}
};
};
...
...
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