Skip to content

Commit

Permalink
Update entries in the Jupytext menu on hover
Browse files Browse the repository at this point in the history
Fix #248
  • Loading branch information
mwouts committed Jun 13, 2019
1 parent 6de45d8 commit 5a75c6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Release History
**BugFixes**

- The Jupytext Menu in Jupyter Notebook is now compatible with ``jupyter_nbextensions_configurator`` (#178)

- Entries in the Jupytext menu are updated when the menu is hovered on (#248)

1.1.6 (2019-06-11)
++++++++++++++++++++++
Expand Down
8 changes: 7 additions & 1 deletion jupytext/nbextension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ define([
checkAutosave();
}

function updateJupytextMenu() {
checkSelectedJupytextFormat();
checkAutosave();
}

function jupytext_pair(formats, text) {
return $('<li/>').append($('<a/>')
.attr('id', 'jupytext_pair_' + formats.replace(':', '_').replace(',', '_'))
Expand All @@ -102,7 +107,8 @@ define([
.attr('data-toggle', 'dropdown')
.attr('aria-expanded', 'false')
.text('Jupytext')
.attr('title', 'Jupyter notebooks as Markdown documents, Julia, Python or R scripts');
.attr('title', 'Jupyter notebooks as Markdown documents, Julia, Python or R scripts')
.on('mouseover', updateJupytextMenu);

var JupytextActions = $('<ul/>')
.attr('id', 'jupytext_actions')
Expand Down

0 comments on commit 5a75c6e

Please sign in to comment.