##// END OF EJS Templates
re-hook notification area for editor....
re-hook notification area for editor. - re-order element to be the same as in notebook, - rename events correctly. - Add event on savign to show that save is in progress, that get dismissed on file save Closes #7569

File last commit:

r20149:1bf09c8a
r20149:1bf09c8a
Show More
notificationarea.js
32 lines | 988 B | application/javascript | JavascriptLexer
/ IPython / html / static / edit / js / notificationarea.js
Thomas Kluyver
Use NotificationArea in the text editor
r19017 define([
Thomas Kluyver
Remove unused imports in editor notificationarea
r19055 'base/js/notificationarea'
], function(notificationarea) {
Thomas Kluyver
Use NotificationArea in the text editor
r19017 "use strict";
var NotificationArea = notificationarea.NotificationArea;
var EditorNotificationArea = function(selector, options) {
NotificationArea.apply(this, [selector, options]);
}
EditorNotificationArea.prototype = Object.create(NotificationArea.prototype);
/**
* Initialize the default set of notification widgets.
*
* @method init_notification_widgets
*/
EditorNotificationArea.prototype.init_notification_widgets = function () {
var that = this;
Bussonnier Matthias
re-hook notification area for editor....
r20149 var savew = this.new_notification_widget('save');
Thomas Kluyver
Use NotificationArea in the text editor
r19017
Bussonnier Matthias
re-hook notification area for editor....
r20149 this.events.on("file_saving.Editor", function() {
savew.set_message("Saving File...");
});
this.events.on("file_saved.Editor", function() {
savew.set_message("File saved", 2000);
Thomas Kluyver
Use NotificationArea in the text editor
r19017 });
};
return {EditorNotificationArea: EditorNotificationArea};
});