Repository: incubator-zeppelin Updated Branches: refs/heads/master f99bb8397 -> 1dd84d0d2
ZEPPELIN-518 ] always top fixed column title for table ### What is this PR for? if you express a lot of table Row of Zeppelin, when the Column Title have to scroll down, it is invisible and inconvenient. So, I have to change the Zeppelin Table Column Title was modified to always display. ### What type of PR is it? Improvement ### Todos - [x] implement Fixed Column Title for table - [x] Browser Test - [x] Safari (9.0.2(11601.3.9) - [x] Firefox (43.0) - [x] Chrome (47.0.2526.106 (64-bit) ### Is there a relevant Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-518 ### How should this be tested? step 1. many rows table print. example query) ``` python %pyspark TABLE = "%table Header1\tHeader2\tHeader3\tHeader4\n" for x in range(1,101): TABLE += str(x) + "" if (x%4) == 0: TABLE += "\n" else: TABLE += "\t" z.put("table_context", TABLE) ``` ``` scala %spark println(z.get("table_context")) ``` step 2. Scroll the mouse over the Table. ### Screenshots (if appropriate) Animated Gif.  ### Questions: How tables are expressed in browsers that do not support this feature? - As before Header mouse scrolling moves along. Author: CloverHearts <[email protected]> Closes #554 from cloverhearts/enhanced/floating_table_header and squashes the following commits: 53a0b09 [CloverHearts] unused table header to margin 31px 4864da7 [CloverHearts] change for - variable name 38d70b4 [CloverHearts] Support Firefox ba7ca8e [CloverHearts] Fixed Table Header Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/1dd84d0d Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/1dd84d0d Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/1dd84d0d Branch: refs/heads/master Commit: 1dd84d0d252c2a390927f63b8fddac2beb92e435 Parents: f99bb83 Author: CloverHearts <[email protected]> Authored: Sun Dec 20 11:10:06 2015 -0800 Committer: Damien CORNEAU <[email protected]> Committed: Mon Dec 21 10:02:14 2015 +0900 ---------------------------------------------------------------------- .../src/app/notebook/paragraph/paragraph.controller.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/1dd84d0d/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index c7c4de3..8eafa6f 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -942,14 +942,18 @@ angular.module('zeppelinWebApp') var renderTable = function() { var html = ''; - html += '<table class="table table-hover table-condensed">'; + + html += '<table class="table table-hover table-condensed" style="top: 0; position: absolute;">'; html += ' <thead>'; html += ' <tr style="background-color: #F6F6F6; font-weight: bold;">'; - for (var c in $scope.paragraph.result.columnNames) { - html += '<th>'+$scope.paragraph.result.columnNames[c].name+'</th>'; + for (var titleIndex in $scope.paragraph.result.columnNames) { + html += '<th>'+$scope.paragraph.result.columnNames[titleIndex].name+'</th>'; } html += ' </tr>'; html += ' </thead>'; + html += '</table>'; + + html += '<table class="table table-hover table-condensed" style="margin-top: 31px;">'; for (var r in $scope.paragraph.result.msgTable) { var row = $scope.paragraph.result.msgTable[r];
