summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/utils/animations.js
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/static/js/utils/animations.js')
-rw-r--r--module/web/static/js/utils/animations.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/module/web/static/js/utils/animations.js b/module/web/static/js/utils/animations.js
index 798f69358..789359e0c 100644
--- a/module/web/static/js/utils/animations.js
+++ b/module/web/static/js/utils/animations.js
@@ -38,7 +38,7 @@ define(['jquery', 'underscore', 'transit'], function(jQuery, _) {
if (animation === true)
element.fadeIn();
- element.calculateHeight();
+// element.calculateHeight();
return this;
};
@@ -61,6 +61,7 @@ define(['jquery', 'underscore', 'transit'], function(jQuery, _) {
return this;
};
+ // TODO: carry arguments, optional height argument
jQuery.fn.slideOut = function() {
var o = jQuery(this[0]);
o.animate({height: o.data('height'), opacity: 'show'});
@@ -73,6 +74,15 @@ define(['jquery', 'underscore', 'transit'], function(jQuery, _) {
return this;
};
+ jQuery.fn.initTooltips = function(placement) {
+ placement || (placement = 'top');
+
+ var o = jQuery(this[0]);
+ o.find('[data-toggle="tooltip"]').tooltip({delay: {show: 500, hide: 100}, placement: placement});
+
+ return this;
+ };
+
jQuery.fn._transit = jQuery.fn.transit;
// Overriding transit plugin to support hide and show