Jonas Kress (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340502 )

Change subject: Fixed header and table scrollbar in embed mode
......................................................................

Fixed header and table scrollbar in embed mode

https://tinyurl.com/gm3b5ge

Bug: T158038
Change-Id: I77e46f9d061595b9e34c43972a89228231ad42c1
---
M wikibase/queryService/ui/resultBrowser/TableResultBrowser.js
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/02/340502/1

diff --git a/wikibase/queryService/ui/resultBrowser/TableResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/TableResultBrowser.js
index e66fd21..adc2ef9 100644
--- a/wikibase/queryService/ui/resultBrowser/TableResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/TableResultBrowser.js
@@ -138,6 +138,7 @@
                                };
                        } ),
                        data: this.rows,
+                       height: this._getHeight( $element ),
                        mobileResponsive: true,
                        search: showPagination,
                        pagination: showPagination,
@@ -152,6 +153,12 @@
                } );
        };
 
+       SELF.prototype._getHeight = function( $element ) {
+               //When embed mode ( no editor above result ) set fixed height 
-> fixed headers
+               return $element.offset().top > 100 ? null : $( window 
).height();
+       };
+
+
        /**
         * Checks whether the browser can draw the given result
         *

-- 
To view, visit https://gerrit.wikimedia.org/r/340502
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77e46f9d061595b9e34c43972a89228231ad42c1
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to