Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
erp5
Commits
8c3a3154
Commit
8c3a3154
authored
Jul 22, 2019
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_notebook: Follow the nexedi JS coding style
parent
d45d5832
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
bt5/erp5_notebook/SkinTemplateItem/portal_skins/erp5_notebook/gadget_jsmd_eval.js.js
...ateItem/portal_skins/erp5_notebook/gadget_jsmd_eval.js.js
+10
-10
No files found.
bt5/erp5_notebook/SkinTemplateItem/portal_skins/erp5_notebook/gadget_jsmd_eval.js.js
View file @
8c3a3154
...
...
@@ -3,11 +3,11 @@
(
function
(
window
)
{
"
use strict
"
;
function
sideEffectDiv
(
side
EffectClass
,
reportSideE
ffect
)
{
function
sideEffectDiv
(
side
_effect_class
,
report_side_e
ffect
)
{
// appends a side effect div to the side effect area
var
div
=
document
.
createElement
(
"
div
"
);
div
.
setAttribute
(
"
class
"
,
side
EffectC
lass
);
if
(
report
SideE
ffect
===
undefined
)
{
div
.
setAttribute
(
"
class
"
,
side
_effect_c
lass
);
if
(
report
_side_e
ffect
===
undefined
)
{
div
.
setAttribute
(
"
style
"
,
"
display:
"
);
}
document
.
body
.
appendChild
(
div
);
...
...
@@ -17,19 +17,19 @@
var
IODide
=
function
createIODide
()
{
var
iodide
=
{
output
:
{
text
:
function
(
content
,
report
SideE
ffect
)
{
text
:
function
(
content
,
report
_side_e
ffect
)
{
var
i
,
div
,
line_list
;
console
.
log
(
content
);
line_list
=
content
.
toString
().
split
(
"
\n
"
);
for
(
i
=
0
;
i
<
line_list
.
length
;
i
+=
1
)
{
div
=
sideEffectDiv
(
"
side-effect-print
"
,
report
SideE
ffect
);
div
=
sideEffectDiv
(
"
side-effect-print
"
,
report
_side_e
ffect
);
div
.
textContent
=
line_list
[
i
];
}
},
element
:
function
(
node
Type
,
reportSideE
ffect
)
{
element
:
function
(
node
_type
,
report_side_e
ffect
)
{
var
div
,
node
;
div
=
sideEffectDiv
(
"
side-effect-element
"
,
report
SideE
ffect
);
node
=
document
.
createElement
(
node
T
ype
);
div
=
sideEffectDiv
(
"
side-effect-element
"
,
report
_side_e
ffect
);
node
=
document
.
createElement
(
node
_t
ype
);
div
.
append
(
node
);
return
node
;
}
...
...
@@ -479,7 +479,7 @@
});
}
function
loadPyodide
(
info
,
receive
I
nstance
)
{
function
loadPyodide
(
info
,
receive
_i
nstance
)
{
var
queue
=
new
RSVP
.
Queue
();
queue
.
push
(
function
()
{
return
ajax
({
...
...
@@ -491,7 +491,7 @@
return
WebAssembly
.
instantiate
(
evt
.
target
.
response
,
info
);
})
.
push
(
function
(
results
)
{
return
receive
I
nstance
(
results
.
instance
);
return
receive
_i
nstance
(
results
.
instance
);
})
.
push
(
undefined
,
function
(
error
)
{
console
.
log
(
error
);
...
...
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