Show More
@@ -1,34 +1,29 | |||||
1 | define([ |
|
1 | define([ | |
2 |
'base/js/n |
|
2 | 'base/js/notificationarea' | |
3 | 'jquery', |
|
3 | ], function(notificationarea) { | |
4 | 'base/js/utils', |
|
|||
5 | 'base/js/dialog', |
|
|||
6 | 'base/js/notificationarea', |
|
|||
7 | 'moment' |
|
|||
8 | ], function(IPython, $, utils, dialog, notificationarea, moment) { |
|
|||
9 | "use strict"; |
|
4 | "use strict"; | |
10 | var NotificationArea = notificationarea.NotificationArea; |
|
5 | var NotificationArea = notificationarea.NotificationArea; | |
11 |
|
6 | |||
12 | var EditorNotificationArea = function(selector, options) { |
|
7 | var EditorNotificationArea = function(selector, options) { | |
13 | NotificationArea.apply(this, [selector, options]); |
|
8 | NotificationArea.apply(this, [selector, options]); | |
14 | } |
|
9 | } | |
15 |
|
10 | |||
16 | EditorNotificationArea.prototype = Object.create(NotificationArea.prototype); |
|
11 | EditorNotificationArea.prototype = Object.create(NotificationArea.prototype); | |
17 |
|
12 | |||
18 | /** |
|
13 | /** | |
19 | * Initialize the default set of notification widgets. |
|
14 | * Initialize the default set of notification widgets. | |
20 | * |
|
15 | * | |
21 | * @method init_notification_widgets |
|
16 | * @method init_notification_widgets | |
22 | */ |
|
17 | */ | |
23 | EditorNotificationArea.prototype.init_notification_widgets = function () { |
|
18 | EditorNotificationArea.prototype.init_notification_widgets = function () { | |
24 | var that = this; |
|
19 | var that = this; | |
25 | var enw = this.new_notification_widget('editor'); |
|
20 | var enw = this.new_notification_widget('editor'); | |
26 |
|
21 | |||
27 | this.events.on("save_succeeded.TextEditor", function() { |
|
22 | this.events.on("save_succeeded.TextEditor", function() { | |
28 | enw.set_message("File saved", 2000); |
|
23 | enw.set_message("File saved", 2000); | |
29 | }); |
|
24 | }); | |
30 | }; |
|
25 | }; | |
31 |
|
26 | |||
32 |
|
27 | |||
33 | return {EditorNotificationArea: EditorNotificationArea}; |
|
28 | return {EditorNotificationArea: EditorNotificationArea}; | |
34 | }); |
|
29 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now