From 2311b6ef8ff4fac98c6738a8ae59539a4f27225c Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Thu, 8 Jun 2017 14:12:46 +0000 Subject: [PATCH] SSDM-5148 : Several table fixes SVN: 38287 --- .../1/as/webapps/eln-lims/html/css/style.css | 105 ------------------ .../eln-lims/html/lib/grid/js/Grid.html | 1 - .../webapps/eln-lims/html/lib/grid/js/Grid.js | 16 ++- 3 files changed, 14 insertions(+), 108 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/css/style.css b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/css/style.css index a211afa2e80..6cb795d003f 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/css/style.css +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/css/style.css @@ -18,17 +18,6 @@ * General Overrides */ -.table { - table-layout:fixed; -} - -.table td { -/* white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; */ - word-wrap: break-word; -} - .form-group { margin-bottom: 5px; } @@ -378,100 +367,6 @@ body, border : none; } -/* - * Inspector - */ -.inspectorsContainer { - width:100%; - margin-top: 20px; - margin-left: 20px; -} - -.inspectorsContainer div { - float:left; -} - -.inspectorLabel { - white-space: nowrap; -} -.inspectorLineBreak { - word-wrap: break-word; - overflow: hidden; - overflow-x: auto; - width:300px; -} - -div.inspectorWhiteFont { - color: white !important; -} - -div.inspector { - width: 500px; - text-decoration: none; - color: #000; - display: block; - overflow: hidden; - padding: 20px; - border-radius: 10px; -} - -div.inspector > .table th, -div.inspector > .table td { - border-top: none; - line-height: 12px; -} - -.inspectorExtra { - margin-left: 0px !important; -} - -.inspectorExtra svg { - margin-left: auto; - margin-right: auto; -} - -.property { - font-size: 12px; - font-weight: normal; -} - -.properties { - padding-top:10px; - width: 100%; -} - -.properties td:nth-child(odd) { - /* background-color:#DDDDDD; */ - width:25%; -} - -.properties td:nth-child(even) { - /* background-color:#fbfbfb; */ - width:75%; -} - -.inspectorToolbar { -opacity: 0.5; -} - -.inspectorToolbar:hover { -opacity: 0.8; -} - -.downloads { - color: black; - background-color:#DDDDDD;; -} - -table.downloads { - font-family: "Trebuchet MS", sans-serif; - font-size: 14px; - table-layout: fixed; - border-collapse: collapse; - margin: 0px; - padding: 0px; -} - /* * Inspector - Glow Effect */ diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.html b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.html index a35a29f9f69..615bccb7176 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.html +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.html @@ -85,7 +85,6 @@ <li data-value="10"><a href="#">10</a></li> <li data-value="20"><a href="#">20</a></li> <li data-value="50"><a href="#">50</a></li> - <li data-value="100"><a href="#">100</a></li> </ul> <input class="hidden hidden-field" name="itemsPerPage" readonly="readonly" aria-hidden="true" type="text" /> </div> diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js index a45a3099c76..6a4f71479b6 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js @@ -418,16 +418,28 @@ $.extend(Grid.prototype, { var columns = []; var columnsModel = {}; + var maxColumns = 15; + var enabledColumns = 0; _this.getAllColumns().forEach(function(column) { var checkBoxForColumn = _this.panel.find(".columnDropdown").find("[value='" + column.property + "']"); var isChecked = (checkBoxForColumn.length === 1 && checkBoxForColumn[0] && checkBoxForColumn[0].checked)?true:false; if(column.showByDefault || isChecked) { - columns.push(column); - columnsModel[column.property] = true; + if(enabledColumns > maxColumns) { + // Ignore + } else { + columns.push(column); + columnsModel[column.property] = true; + enabledColumns++; + } } + }); + if(enabledColumns > maxColumns) { + Util.showError("Only the first " + maxColumns + " selected columns will be shown.", function(){}, true); + } + if(this.onChangeState) { if(this.tableSettings.columns) { for(key in columnsModel) { -- GitLab