Skip to content

Commit d53795f

Browse files
author
Derick Bailey
committed
build v1.0.0-beta2
1 parent d041422 commit d53795f

8 files changed

+16
-28
lines changed

lib/amd/backbone.marionette.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -1032,11 +1032,8 @@
10321032
view.render();
10331033
this.open(view);
10341034

1035-
if (view.onShow) { view.onShow(); }
1036-
view.trigger("show");
1037-
1038-
if (this.onShow) { this.onShow(view); }
1039-
this.trigger("view:show", view);
1035+
Marionette.triggerMethod.call(view, "show");
1036+
Marionette.triggerMethod.call(this, "show");
10401037

10411038
this.currentView = view;
10421039
},
@@ -1066,7 +1063,7 @@
10661063
if (!view || view.isClosed){ return; }
10671064

10681065
if (view.close) { view.close(); }
1069-
this.trigger("view:closed", view);
1066+
Marionette.triggerMethod.call(this, "close");
10701067

10711068
delete this.currentView;
10721069
},

lib/amd/backbone.marionette.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/backbone.marionette.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -1016,11 +1016,8 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {
10161016
view.render();
10171017
this.open(view);
10181018

1019-
if (view.onShow) { view.onShow(); }
1020-
view.trigger("show");
1021-
1022-
if (this.onShow) { this.onShow(view); }
1023-
this.trigger("view:show", view);
1019+
Marionette.triggerMethod.call(view, "show");
1020+
Marionette.triggerMethod.call(this, "show");
10241021

10251022
this.currentView = view;
10261023
},
@@ -1050,7 +1047,7 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {
10501047
if (!view || view.isClosed){ return; }
10511048

10521049
if (view.close) { view.close(); }
1053-
this.trigger("view:closed", view);
1050+
Marionette.triggerMethod.call(this, "close");
10541051

10551052
delete this.currentView;
10561053
},

lib/backbone.marionette.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/amd/backbone.marionette.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -807,11 +807,8 @@
807807
view.render();
808808
this.open(view);
809809

810-
if (view.onShow) { view.onShow(); }
811-
view.trigger("show");
812-
813-
if (this.onShow) { this.onShow(view); }
814-
this.trigger("view:show", view);
810+
Marionette.triggerMethod.call(view, "show");
811+
Marionette.triggerMethod.call(this, "show");
815812

816813
this.currentView = view;
817814
},
@@ -841,7 +838,7 @@
841838
if (!view || view.isClosed){ return; }
842839

843840
if (view.close) { view.close(); }
844-
this.trigger("view:closed", view);
841+
Marionette.triggerMethod.call(this, "close");
845842

846843
delete this.currentView;
847844
},

lib/core/amd/backbone.marionette.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/backbone.marionette.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -789,11 +789,8 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {
789789
view.render();
790790
this.open(view);
791791

792-
if (view.onShow) { view.onShow(); }
793-
view.trigger("show");
794-
795-
if (this.onShow) { this.onShow(view); }
796-
this.trigger("view:show", view);
792+
Marionette.triggerMethod.call(view, "show");
793+
Marionette.triggerMethod.call(this, "show");
797794

798795
this.currentView = view;
799796
},
@@ -823,7 +820,7 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {
823820
if (!view || view.isClosed){ return; }
824821

825822
if (view.close) { view.close(); }
826-
this.trigger("view:closed", view);
823+
Marionette.triggerMethod.call(this, "close");
827824

828825
delete this.currentView;
829826
},

lib/core/marionette.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)