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
UI changes
  • Loading branch information
@Madhu94
Madhu94 committedMay 12, 2018
commitee79a7f505b3e8a6e6efb311f77f771ac6eeb0e0
15 changes: 11 additions & 4 deletionsnotebook/static/notebook/js/notebook.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2853,14 +2853,21 @@ define([
this.save_notebook();
}
var that = this;
var current_dir = $('body').attr('data-notebook-path').split('/').slice(0, -1).join("/");
current_dir = current_dir? currend_dir + "/": "";
var dialog_body = $('<div/>').append(
$("<p/>").addClass("save-message")
$('<p/>').addClass('save-message')
.text(i18n.msg._('Enter a notebook path relative to notebook dir'))
).append(
$("<br/>")
$('<br/>')
).append($('<label />').attr('for', 'save-as-dialog')
.html('<i class="fa fa-home"></i>')
).append(
$('<input/>').attr('type','text').attr('size','25')
Copy link
Member

Choose a reason for hiding this comment

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

This input area doesn't show up well for me. I think you're missing theform-control class that the rename dialog uses:

$('<input/>').attr('type','text').attr('size','25').addClass('form-control')

Also, I hope we can get rid of the inline styling a couple of lines below.

.addClass('form-control').attr('placeholder', that.notebook_name)
.attr('value', current_dir)
.css({'display': 'inline-block', 'margin-left': '0.5em'})
.attr('id', 'save-as-dialog')
.addClass('form-inline')
);

var d = dialog.modal({
Expand DownExpand Up@@ -2889,7 +2896,7 @@ define([
};
return that.contents.save(nb_path, model)
.then(function(data) {
window.open(data.path, '_self');
window.open(data.path, '_blank');
},function(error) {
console.error(i18n.msg._(error.message || 'Unknown error saving notebook'));
});
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp