notificationarea.js 869 B

1234567891011121314151617181920212223242526272829
  1. define([
  2. 'base/js/notificationarea'
  3. ], function(notificationarea) {
  4. "use strict";
  5. var NotificationArea = notificationarea.NotificationArea;
  6. var EditorNotificationArea = function(selector, options) {
  7. NotificationArea.apply(this, [selector, options]);
  8. }
  9. EditorNotificationArea.prototype = Object.create(NotificationArea.prototype);
  10. /**
  11. * Initialize the default set of notification widgets.
  12. *
  13. * @method init_notification_widgets
  14. */
  15. EditorNotificationArea.prototype.init_notification_widgets = function () {
  16. var that = this;
  17. var savew = this.new_notification_widget('save');
  18. this.events.on("file_saved.Editor", function() {
  19. savew.set_message("File saved", 2000);
  20. });
  21. };
  22. return {EditorNotificationArea: EditorNotificationArea};
  23. });