diff --git a/IPython/html/static/edit/js/editor.js b/IPython/html/static/edit/js/editor.js index 481507c..d84fef8 100644 --- a/IPython/html/static/edit/js/editor.js +++ b/IPython/html/static/edit/js/editor.js @@ -162,6 +162,7 @@ function($, var that = this; // record change generation for isClean this.generation = this.codemirror.changeGeneration(); + that.events.trigger("file_saving.Editor"); return this.contents.save(this.file_path, model).then(function(data) { that.events.trigger("file_saved.Editor", data); }); diff --git a/IPython/html/static/edit/js/main.js b/IPython/html/static/edit/js/main.js index b7f234a..351a093 100644 --- a/IPython/html/static/edit/js/main.js +++ b/IPython/html/static/edit/js/main.js @@ -64,6 +64,7 @@ require([ '#notification_area', { events: events, }); + editor.notification_area = notification_area; notification_area.init_notification_widgets(); utils.load_extensions_from_config(config); diff --git a/IPython/html/static/edit/js/notificationarea.js b/IPython/html/static/edit/js/notificationarea.js index fd98ebf..73f7077 100644 --- a/IPython/html/static/edit/js/notificationarea.js +++ b/IPython/html/static/edit/js/notificationarea.js @@ -17,10 +17,10 @@ define([ */ EditorNotificationArea.prototype.init_notification_widgets = function () { var that = this; - var enw = this.new_notification_widget('editor'); + var savew = this.new_notification_widget('save'); - this.events.on("save_succeeded.TextEditor", function() { - enw.set_message("File saved", 2000); + this.events.on("file_saved.Editor", function() { + savew.set_message("File saved", 2000); }); }; diff --git a/IPython/html/static/edit/less/edit.less b/IPython/html/static/edit/less/edit.less index 2413fdc..c136ed4 100644 --- a/IPython/html/static/edit/less/edit.less +++ b/IPython/html/static/edit/less/edit.less @@ -5,6 +5,11 @@ padding: 0px 5px; } +#current-mode{ + padding-left: 5px; + padding-right: 5px; +} + #texteditor-backdrop { padding-top: @page-header-padding; padding-bottom: @page-header-padding; diff --git a/IPython/html/static/edit/less/menubar.less b/IPython/html/static/edit/less/menubar.less index ae21c34..c314f31 100644 --- a/IPython/html/static/edit/less/menubar.less +++ b/IPython/html/static/edit/less/menubar.less @@ -13,10 +13,6 @@ max-height: 20em; } -#current-mode { - margin-right: @padding-large-horizontal; -} - .edit_app { #header { .box-shadow(@global-shadow); diff --git a/IPython/html/static/notebook/less/notificationarea.less b/IPython/html/static/notebook/less/notificationarea.less index 7bdacaa..3c3d3ed 100644 --- a/IPython/html/static/notebook/less/notificationarea.less +++ b/IPython/html/static/notebook/less/notificationarea.less @@ -4,19 +4,19 @@ } .indicator_area { + .pull-right(); color: @navbar-default-link-color; margin-left: 5px; margin-right: 5px; width: 11px; z-index: 10; text-align: center; + width: auto; + border-left: 1px solid; } #kernel_indicator { - .pull-right(); .indicator_area(); - width: auto; - border-left: 1px solid; .kernel_indicator_name { padding-left: 5px; diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index f4ac526..c75a86e 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -8855,9 +8855,6 @@ ul#new-menu { overflow: auto; max-height: 20em; } -#current-mode { - margin-right: 16px; -} .edit_app #header { -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); @@ -8872,6 +8869,10 @@ ul#new-menu { display: table; padding: 0px 5px; } +#current-mode { + padding-left: 5px; + padding-right: 5px; +} #texteditor-backdrop { padding-top: 20px; padding-bottom: 20px; @@ -10519,12 +10520,16 @@ ul#help_menu li a i { z-index: 10; } .indicator_area { + float: right !important; + float: right; color: #777777; margin-left: 5px; margin-right: 5px; width: 11px; z-index: 10; text-align: center; + width: auto; + border-left: 1px solid; } #kernel_indicator { float: right !important; @@ -10551,6 +10556,8 @@ ul#help_menu li a i { width: 11px; z-index: 10; text-align: center; + width: auto; + border-left: 1px solid; } .edit_mode .modal_indicator:before { display: inline-block; diff --git a/IPython/html/templates/edit.html b/IPython/html/templates/edit.html index a34e2c4..24c679c 100644 --- a/IPython/html/templates/edit.html +++ b/IPython/html/templates/edit.html @@ -31,6 +31,9 @@ data-file-path="{{file_path}}" diff --git a/IPython/html/templates/notebook.html b/IPython/html/templates/notebook.html index d41065a..280a3b0 100644 --- a/IPython/html/templates/notebook.html +++ b/IPython/html/templates/notebook.html @@ -58,7 +58,7 @@ data-notebook-path="{{notebook_path}}" Menu -