notificationarea.js
29 lines
| 869 B
| application/javascript
|
JavascriptLexer
Thomas Kluyver
|
r19017 | define([ | ||
Thomas Kluyver
|
r19055 | 'base/js/notificationarea' | ||
], function(notificationarea) { | ||||
Thomas Kluyver
|
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
|
r20149 | var savew = this.new_notification_widget('save'); | ||
Thomas Kluyver
|
r19017 | |||
Bussonnier Matthias
|
r20149 | this.events.on("file_saved.Editor", function() { | ||
savew.set_message("File saved", 2000); | ||||
Thomas Kluyver
|
r19017 | }); | ||
}; | ||||
return {EditorNotificationArea: EditorNotificationArea}; | ||||
}); | ||||