Skip to content

Commit ee79a7f

Browse files
committed
UI changes
1 parent fd25ae1 commit ee79a7f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

notebook/static/notebook/js/notebook.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,14 +2853,21 @@ define([
28532853
this.save_notebook();
28542854
}
28552855
var that = this;
2856+
var current_dir = $('body').attr('data-notebook-path').split('/').slice(0, -1).join("/");
2857+
current_dir = current_dir? currend_dir + "/": "";
28562858
var dialog_body = $('<div/>').append(
2857-
$("<p/>").addClass("save-message")
2859+
$('<p/>').addClass('save-message')
28582860
.text(i18n.msg._('Enter a notebook path relative to notebook dir'))
28592861
).append(
2860-
$("<br/>")
2862+
$('<br/>')
2863+
).append($('<label />').attr('for', 'save-as-dialog')
2864+
.html('<i class="fa fa-home"></i>')
28612865
).append(
28622866
$('<input/>').attr('type','text').attr('size','25')
2863-
.addClass('form-control').attr('placeholder', that.notebook_name)
2867+
.attr('value', current_dir)
2868+
.css({'display': 'inline-block', 'margin-left': '0.5em'})
2869+
.attr('id', 'save-as-dialog')
2870+
.addClass('form-inline')
28642871
);
28652872

28662873
var d = dialog.modal({
@@ -2889,7 +2896,7 @@ define([
28892896
};
28902897
return that.contents.save(nb_path, model)
28912898
.then(function(data) {
2892-
window.open(data.path, '_self');
2899+
window.open(data.path, '_blank');
28932900
},function(error) {
28942901
console.error(i18n.msg._(error.message || 'Unknown error saving notebook'));
28952902
});

0 commit comments

Comments
 (0)