summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/utils/animations.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-03 22:55:50 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-03 22:55:50 +0100
commitf3916e73422ace95299fda88a752a18ec642b102 (patch)
treecea71de3ed4cb63ba94122f9158a0adc809ce9d8 /module/web/static/js/utils/animations.js
parenthttp auth for the api (diff)
downloadpyload-f3916e73422ace95299fda88a752a18ec642b102.tar.xz
more responsive file listing, scales for smaller screen sizes
Diffstat (limited to 'module/web/static/js/utils/animations.js')
-rw-r--r--module/web/static/js/utils/animations.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/module/web/static/js/utils/animations.js b/module/web/static/js/utils/animations.js
index ea06669b3..3350dd6ae 100644
--- a/module/web/static/js/utils/animations.js
+++ b/module/web/static/js/utils/animations.js
@@ -65,14 +65,25 @@ define(['jquery', 'underscore', 'transit'], function(jQuery, _) {
};
// TODO: carry arguments, optional height argument
- jQuery.fn.slideOut = function() {
+
+ // reset arguments, sets overflow hidden
+ jQuery.fn.slideOut = function(reset) {
var o = jQuery(this[0]);
- o.animate({height: o.data('height'), opacity: 'show'});
+ o.animate({height: o.data('height'), opacity: 'show'}, function() {
+ // reset css attributes;
+ if (reset) {
+ this.css('overflow', '');
+ this.css('height', '');
+ }
+ });
return this;
};
- jQuery.fn.slideIn = function() {
+ jQuery.fn.slideIn = function(reset) {
var o = jQuery(this[0]);
+ if (reset) {
+ o.css('overflow', 'hidden');
+ }
o.animate({height: 0, opacity: 'hide'});
return this;
};