Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Basthon
Basthon Notebook
Commits
33188eb0
Commit
33188eb0
authored
Oct 13, 2020
by
Romain Casati
Browse files
Support of new notebook opening via menubar.
parent
573e5416
Pipeline
#345986
passed with stages
in 5 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
notebook/basthon/gui.js
View file @
33188eb0
...
...
@@ -4,13 +4,18 @@
* Callback for Basthon loading.
*/
function
onLoad
()
{
/* loading content from query string or from local storage */
const
notebook
=
Jupyter
.
notebook
;
// avoiding notebook loading failure.
if
(
!
notebook
)
{
location
.
reload
();
}
if
(
!
notebook
.
loadFromQS
()
)
{
/*
loading content from query string or from local storage.
if global variale basthonEmptyNotebook is set to true,
we open a new notebook
(see kernelselector.js).
*/
if
(
!
window
.
basthonEmptyNotebook
&&
!
notebook
.
loadFromQS
()
)
{
notebook
.
loadFromStorage
();
}
...
...
notebook/static/notebook/js/kernelselector.js
View file @
33188eb0
...
...
@@ -303,6 +303,15 @@ define([
KernelSelector
.
prototype
.
new_notebook
=
function
(
kernel_name
)
{
/*
opening new notebook and setting basthonEmptyNotebook
global variale to true to force empty notebook
(see Basthons's gui.js).
*/
var
w
=
window
.
open
(
window
.
location
.
href
);
w
.
basthonEmptyNotebook
=
true
;
return
w
;
var
w
=
window
.
open
(
''
,
IPython
.
_target
);
// Create a new notebook in the same path as the current
// notebook's path.
...
...
Write
Preview
Supports
Markdown
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