1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/Mixins/backbone.marionette.region.mixin.js

21 lines
530 B
JavaScript
Raw Normal View History

2013-05-15 05:07:14 +03:00
"use strict";
(function () {
var _originalRegionClose = Marionette.Region.prototype.close;
Marionette.Region.prototype.open = function (view) {
var self = this;
this.$el.fadeOut(200, function () {
_originalRegionClose.apply(this, arguments);
self.$el.html(view.el);
self.$el.fadeIn(150);
});
};
Marionette.Region.prototype.close = function () {
//do nothing. we close the region as part of open so we can chain the animation
};
}());