@@ -2853,14 +2853,21 @@ define([
2853
2853
this . save_notebook ( ) ;
2854
2854
}
2855
2855
var that = this ;
2856
+ var current_dir = $ ( 'body' ) . attr ( 'data-notebook-path' ) . split ( '/' ) . slice ( 0 , - 1 ) . join ( "/" ) ;
2857
+ current_dir = current_dir ? currend_dir + "/" : "" ;
2856
2858
var dialog_body = $ ( '<div/>' ) . append (
2857
- $ ( " <p/>" ) . addClass ( " save-message" )
2859
+ $ ( ' <p/>' ) . addClass ( ' save-message' )
2858
2860
. text ( i18n . msg . _ ( 'Enter a notebook path relative to notebook dir' ) )
2859
2861
) . append (
2860
- $ ( "<br/>" )
2862
+ $ ( '<br/>' )
2863
+ ) . append ( $ ( '<label />' ) . attr ( 'for' , 'save-as-dialog' )
2864
+ . html ( '<i class="fa fa-home"></i>' )
2861
2865
) . append (
2862
2866
$ ( '<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' )
2864
2871
) ;
2865
2872
2866
2873
var d = dialog . modal ( {
@@ -2889,7 +2896,7 @@ define([
2889
2896
} ;
2890
2897
return that . contents . save ( nb_path , model )
2891
2898
. then ( function ( data ) {
2892
- window . open ( data . path , '_self ' ) ;
2899
+ window . open ( data . path , '_blank ' ) ;
2893
2900
} , function ( error ) {
2894
2901
console . error ( i18n . msg . _ ( error . message || 'Unknown error saving notebook' ) ) ;
2895
2902
} ) ;
0 commit comments