From 4bdc0b6fb3c292766f321fc1d78040a881082cba Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Fri, 8 Mar 2019 20:22:36 +0100 Subject: [PATCH] added facet by blank to menu All --- .../modules/core/langs/translation-en.json | 1 + .../scripts/views/data-table/data-table-view.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/main/webapp/modules/core/langs/translation-en.json b/main/webapp/modules/core/langs/translation-en.json index 2cd4c0cf2..d653d7b11 100644 --- a/main/webapp/modules/core/langs/translation-en.json +++ b/main/webapp/modules/core/langs/translation-en.json @@ -581,6 +581,7 @@ "core-views/starred-rows": "Starred Rows", "core-views/facet-flag": "Facet by flag", "core-views/flagged-rows": "Flagged Rows", + "core-views/blank-rows": "Blank Rows", "core-views/edit-rows": "Edit rows", "core-views/star-rows": "Star rows", "core-views/unstar-rows": "Unstar rows", diff --git a/main/webapp/modules/core/scripts/views/data-table/data-table-view.js b/main/webapp/modules/core/scripts/views/data-table/data-table-view.js index 27bbed432..eed0ab1d3 100644 --- a/main/webapp/modules/core/scripts/views/data-table/data-table-view.js +++ b/main/webapp/modules/core/scripts/views/data-table/data-table-view.js @@ -650,6 +650,23 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) { } ); } + }, + { + label: $.i18n('core-views/facet-blank'), + id: "core/facet-by-blank", + click: function() { + ui.browsingEngine.addFacet( + "list", + { + "name" : $.i18n('core-views/blank-rows'), + "columnName" : "", + "expression" : "(filter(row.columnNames,cn,isNonBlank(cells[cn].value)).length()>0).toString()" + }, + { + "scroll" : false + } + ); + } } ] },