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
669d0fb4
Commit
669d0fb4
authored
Jul 23, 2019
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_notebook: small fixing
parent
cf0731f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
bt5/erp5_notebook/SkinTemplateItem/portal_skins/erp5_notebook/gadget_jsmd_eval.js.js
...ateItem/portal_skins/erp5_notebook/gadget_jsmd_eval.js.js
+7
-6
No files found.
bt5/erp5_notebook/SkinTemplateItem/portal_skins/erp5_notebook/gadget_jsmd_eval.js.js
View file @
669d0fb4
...
...
@@ -80,9 +80,10 @@
function
pushNewCell
()
{
if
(
current_type
!==
undefined
)
{
option
=
current_header
.
slice
(
current_type
[
0
].
length
);
if
(
option
!
==
''
)
{
option
=
JSON
.
parse
(
option
)
;
if
(
option
=
==
''
)
{
option
=
'
{}
'
;
}
option
=
JSON
.
parse
(
option
);
cell_list
.
push
(
new
JSMDCell
(
current_type
[
1
],
current_text_list
,
option
));
...
...
@@ -263,12 +264,12 @@
});
}
function
executeCodeCell
(
line_list
,
language
)
{
if
(
language
===
'
py
'
)
{
function
executeCodeCell
(
line_list
,
option
)
{
if
(
option
.
language
===
'
py
'
)
{
console
.
log
(
line_list
);
console
.
log
(
"
We are processing Python code!!!
"
);
}
else
{
throw
new
Error
(
'
Unsupported code language:
'
+
language
);
throw
new
Error
(
'
Unsupported code language:
'
+
option
.
language
);
}
}
...
...
@@ -293,7 +294,7 @@
return
executeCssCell
(
cell
.
_line_list
);
}
if
(
cell
.
_type
===
'
code
'
)
{
return
executeCodeCell
(
cell
.
_line_list
,
cell
.
_option
.
language
);
return
executeCodeCell
(
cell
.
_line_list
,
cell
.
_option
);
}
return
executeUnknownCellType
(
cell
);
}
...
...
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