[FIX] compute the correct offset to adjust view

the jquery method length() compute the height of its element, even if
it is diplay:none.  But in our case, we want the offset to be zero if
there is no visible view_manager_header.  (for example, general settings
in settings menu)
This commit is contained in:
Géry Debongnie
2014-05-30 15:10:18 +02:00
parent 3bfdcfd443
commit c522fe6add
+1 -1
View File
@@ -649,7 +649,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
// divs).
adjust_view_top: function () {
if (this.$view_manager_header.length) {
var height = this.$view_manager_header.height() + 1;
var height = this.$view_manager_header[0].offsetHeight + 1;
this.$view_manager_header.next().css('top', height + 'px');
}
},