slight animation for the sidebar for better feedback what happens

This commit is contained in:
Jan-Christoph Borchardt 2016-07-29 12:08:12 +02:00
parent 41d044cf89
commit fe8d13c935
1 changed files with 6 additions and 3 deletions

View File

@ -27,9 +27,9 @@
*/ */
exports.Apps.showAppSidebar = function($el) { exports.Apps.showAppSidebar = function($el) {
var $appSidebar = $el || $('#app-sidebar'); var $appSidebar = $el || $('#app-sidebar');
$appSidebar.removeClass('disappear'); $appSidebar.removeClass('disappear')
.show('slide', { direction: 'right' }, 200);
$('#app-content').addClass('with-app-sidebar').trigger(new $.Event('appresized')); $('#app-content').addClass('with-app-sidebar').trigger(new $.Event('appresized'));
}; };
/** /**
@ -40,7 +40,10 @@
*/ */
exports.Apps.hideAppSidebar = function($el) { exports.Apps.hideAppSidebar = function($el) {
var $appSidebar = $el || $('#app-sidebar'); var $appSidebar = $el || $('#app-sidebar');
$appSidebar.addClass('disappear'); $appSidebar.hide('slide', { direction: 'right' }, 100,
function() {
$appSidebar.addClass('disappear');
});
$('#app-content').removeClass('with-app-sidebar').trigger(new $.Event('appresized')); $('#app-content').removeClass('with-app-sidebar').trigger(new $.Event('appresized'));
}; };