Add popups animation

This commit is contained in:
RainLoop Team 2013-12-28 18:11:19 +04:00
parent f690ee1532
commit fd2c2346a8
23 changed files with 100 additions and 88 deletions

View file

@ -110,15 +110,12 @@ ko.bindingHandlers.modal = {
'show': ko.utils.unwrapObservable(fValueAccessor())
}).on('hidden', function () {
fValueAccessor()(false);
}).on('shown', function () {
Utils.windowResize();
});
},
'update': function (oElement, fValueAccessor) {
var bValue = ko.utils.unwrapObservable(fValueAccessor());
$(oElement).modal(bValue ? 'show' : 'hide');
_.delay(function () {
$(oElement).toggleClass('popup-active', bValue);
}, 1);
$(oElement).modal(ko.utils.unwrapObservable(fValueAccessor()) ? 'show' : 'hide');
}
};