@@ -2848,10 +2848,6 @@ define([
2848
2848
} ;
2849
2849
2850
2850
Notebook . prototype . save_notebook_as = function ( ) {
2851
- // If current notebook has some changes, save them, or the copied notebook won't have them.
2852
- if ( this . writable && this . dirty ) {
2853
- this . save_notebook ( ) ;
2854
- }
2855
2851
var that = this ;
2856
2852
var current_dir = $ ( 'body' ) . attr ( 'data-notebook-path' ) . split ( '/' ) . slice ( 0 , - 1 ) . join ( "/" ) ;
2857
2853
current_dir = current_dir ? current_dir + "/" : "" ;
@@ -2860,14 +2856,9 @@ define([
2860
2856
. text ( i18n . msg . _ ( 'Enter a notebook path relative to notebook dir' ) )
2861
2857
) . append (
2862
2858
$ ( '<br/>' )
2863
- ) . append ( $ ( '<label />' ) . attr ( 'for' , 'save-as-dialog' )
2864
- . html ( '<i class="fa fa-home"></i>' )
2865
2859
) . append (
2866
2860
$ ( '<input/>' ) . attr ( 'type' , 'text' ) . attr ( 'size' , '25' )
2867
- . attr ( 'value' , current_dir )
2868
- . css ( { 'display' : 'inline-block' , 'margin-left' : '0.5em' } )
2869
- . attr ( 'id' , 'save-as-dialog' )
2870
- . addClass ( 'form-inline' )
2861
+ . addClass ( 'form-control' )
2871
2862
) ;
2872
2863
2873
2864
var d = dialog . modal ( {
@@ -2935,7 +2926,7 @@ define([
2935
2926
return false ;
2936
2927
}
2937
2928
} ) ;
2938
- d . find ( 'input[type="text"]' ) . focus ( ) . select ( ) ;
2929
+ d . find ( 'input[type="text"]' ) . val ( current_dir ) . focus ( ) ;
2939
2930
}
2940
2931
} ) ;
2941
2932
}
0 commit comments