Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add save as menu option#3289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
takluyver merged 7 commits intojupyter:masterfromMadhu94:add-save-as-menu-option
Jun 20, 2018
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Switch sessions instead of opening in new window
  • Loading branch information
@Madhu94
Madhu94 committedMay 12, 2018
commit9b18d079a44c69bc4582ee2bf6376d408b7e8469
15 changes: 13 additions & 2 deletionsnotebook/static/notebook/js/notebook.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2854,7 +2854,7 @@ define([
}
var that = this;
var current_dir = $('body').attr('data-notebook-path').split('/').slice(0, -1).join("/");
current_dir = current_dir?currend_dir + "/": "";
current_dir = current_dir?current_dir + "/": "";
var dialog_body = $('<div/>').append(
$('<p/>').addClass('save-message')
.text(i18n.msg._('Enter a notebook path relative to notebook dir'))
Expand DownExpand Up@@ -2896,7 +2896,12 @@ define([
};
return that.contents.save(nb_path, model)
.then(function(data) {
window.open(data.path, '_blank');
d.modal('hide');
that.notebook_name = data.name;
that.notebook_path = data.path;
that.session.rename_notebook(data.path);
that.events.trigger('notebook_renamed.Notebook', data);

},function(error) {
console.error(i18n.msg._(error.message || 'Unknown error saving notebook'));
});
Expand DownExpand Up@@ -2924,6 +2929,12 @@ define([
},
},
open : function () {
d.find('input[type="text"]').keydown(function (event) {
if (event.which === keyboard.keycodes.enter) {
d.find('.btn-primary').first().click();
return false;
}
});
d.find('input[type="text"]').focus().select();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This currently selects the path pre-filled in the input, which is not ideal. Can we make it put the cursor at the end of the input already there?

}
});
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp