@@ -2885,20 +2885,23 @@ define([
2885
2885
'type' : 'notebook' ,
2886
2886
'content' : that . toJSON ( ) ,
2887
2887
'name' : nb_name
2888
- } ;
2888
+ } ;
2889
2889
return that . contents . save ( nb_path , model )
2890
2890
. then ( function ( data ) {
2891
2891
d . modal ( 'hide' ) ;
2892
2892
that . notebook_name = data . name ;
2893
2893
that . notebook_path = data . path ;
2894
2894
that . session . rename_notebook ( data . path ) ;
2895
2895
that . events . trigger ( 'notebook_renamed.Notebook' , data ) ;
2896
-
2897
- } , function ( error ) {
2898
- const msg = i18n . msg . _ ( error . message || 'Unknown error saving notebook' ) ;
2899
- $ ( '.save-message' ) . html ( `<span style='color:red;'>${ msg } </span>` ) ;
2896
+ } , function ( error ) {
2897
+ var msg = i18n . msg . _ ( error . message || 'Unknown error saving notebook' ) ;
2898
+ $ ( ".save-message" ) . html (
2899
+ $ ( "<span>" )
2900
+ . attr ( "style" , "color:red;" )
2901
+ . text ( msg )
2902
+ ) ;
2900
2903
} ) ;
2901
- }
2904
+ } ;
2902
2905
that . contents . get ( nb_path , { type : 'notebook' , content : false } ) . then ( function ( data ) {
2903
2906
var warning_body = $ ( '<div/>' ) . append (
2904
2907
$ ( "<p/>" ) . text ( i18n . msg . _ ( 'Notebook with that name exists.' ) ) ) ;
@@ -2916,7 +2919,7 @@ define([
2916
2919
} ) ;
2917
2920
} , function ( err ) {
2918
2921
return save_thunk ( ) ;
2919
- } )
2922
+ } ) ;
2920
2923
return false ;
2921
2924
}
2922
2925
} ,
@@ -2931,7 +2934,7 @@ define([
2931
2934
d . find ( 'input[type="text"]' ) . val ( current_dir ) . focus ( ) ;
2932
2935
}
2933
2936
} ) ;
2934
- }
2937
+ } ;
2935
2938
2936
2939
/**
2937
2940
* Update the autosave interval based on the duration of the last save.
@@ -3473,4 +3476,4 @@ define([
3473
3476
} ;
3474
3477
3475
3478
return { Notebook : Notebook } ;
3476
- } ) ;
3479
+ } ) ;
0 commit comments