From 5928ffc693b1ba1478a5e7e6573af601120b2f88 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Tue, 14 May 2013 19:07:14 -0700 Subject: [PATCH] animate I say! --- UI/Content/base.less | 4 ++++ UI/Index.html | 1 + UI/Mixins/backbone.marionette.region.mixin.js | 20 +++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 UI/Mixins/backbone.marionette.region.mixin.js diff --git a/UI/Content/base.less b/UI/Content/base.less index 63446cdf0..ce5ff5c37 100644 --- a/UI/Content/base.less +++ b/UI/Content/base.less @@ -79,6 +79,10 @@ html { margin-bottom: 30px; } +.page-container { + min-height: 600px; +} + button::-moz-focus-inner, a::-moz-focus-inner { border: 0; } diff --git a/UI/Index.html b/UI/Index.html index 96b565b08..cae35c5a2 100644 --- a/UI/Index.html +++ b/UI/Index.html @@ -103,6 +103,7 @@ + diff --git a/UI/Mixins/backbone.marionette.region.mixin.js b/UI/Mixins/backbone.marionette.region.mixin.js new file mode 100644 index 000000000..9a5f330d1 --- /dev/null +++ b/UI/Mixins/backbone.marionette.region.mixin.js @@ -0,0 +1,20 @@ +"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 + }; +}());