projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 5539-better-docker
[arvados.git]
/
apps
/
workbench
/
app
/
assets
/
javascripts
/
sizing.js
diff --git
a/apps/workbench/app/assets/javascripts/sizing.js
b/apps/workbench/app/assets/javascripts/sizing.js
index 55d2301387c90aa703d59ead3fa1d552c36014b5..2341628fa76ff195196583a740d19354e5e95285 100644
(file)
--- a/
apps/workbench/app/assets/javascripts/sizing.js
+++ b/
apps/workbench/app/assets/javascripts/sizing.js
@@
-11,20
+11,21
@@
function graph_zoom(divId, svgId, scale) {
}
function smart_scroll_fixup(s) {
}
function smart_scroll_fixup(s) {
- //console.log(s);
+
if (s != null && s.type == 'shown.bs.tab') {
s = [s.target];
}
else {
s = $(".smart-scroll");
}
if (s != null && s.type == 'shown.bs.tab') {
s = [s.target];
}
else {
s = $(".smart-scroll");
}
- //console.log(s);
-
for (var i = 0; i < s.length; i++
) {
- a =
s[i]
;
- var h = window.innerHeight - a.
getBoundingClientRect().top - 20
;
+
+
s.each(function(i, a
) {
+ a =
$(a)
;
+ var h = window.innerHeight - a.
offset().top - a.attr("data-smart-scroll-padding-bottom")
;
height = String(h) + "px";
height = String(h) + "px";
- a.
style.height = height
;
- }
+ a.
css('max-height', height)
;
+ }
);
}
}
-$(window).on('load resize scroll', smart_scroll_fixup);
+$(window).on('load ready resize scroll ajax:complete', smart_scroll_fixup);
+$(document).on('shown.bs.tab', 'ul.nav-tabs > li > a', smart_scroll_fixup);