Show More
@@ -390,7 +390,7 define(["widgets/js/manager", | |||||
390 | this.model.save_changes(this.callbacks()); |
|
390 | this.model.save_changes(this.callbacks()); | |
391 | }, |
|
391 | }, | |
392 |
|
392 | |||
393 |
|
|
393 | after_displayed: function (callback, context) { | |
394 | // Calls the callback right away is the view is already displayed |
|
394 | // Calls the callback right away is the view is already displayed | |
395 | // otherwise, register the callback to the 'displayed' event. |
|
395 | // otherwise, register the callback to the 'displayed' event. | |
396 | if (this.is_displayed) { |
|
396 | if (this.is_displayed) { |
@@ -38,7 +38,7 define([ | |||||
38 | this.$el.append(view.$el); |
|
38 | this.$el.append(view.$el); | |
39 |
|
39 | |||
40 | // Trigger the displayed event once this view is displayed. |
|
40 | // Trigger the displayed event once this view is displayed. | |
41 |
this. |
|
41 | this.after_displayed(function() { | |
42 | view.trigger('displayed'); |
|
42 | view.trigger('displayed'); | |
43 | }); |
|
43 | }); | |
44 | }, |
|
44 | }, | |
@@ -230,7 +230,7 define([ | |||||
230 | this.$body.append(view.$el); |
|
230 | this.$body.append(view.$el); | |
231 |
|
231 | |||
232 | // Trigger the displayed event once this view is displayed. |
|
232 | // Trigger the displayed event once this view is displayed. | |
233 |
this. |
|
233 | this.after_displayed(function() { | |
234 | view.trigger('displayed'); |
|
234 | view.trigger('displayed'); | |
235 | }); |
|
235 | }); | |
236 | }, |
|
236 | }, |
General Comments 0
You need to be logged in to leave comments.
Login now