added facet "Count non-blank records/column" to menu All

This commit is contained in:
Felix Lohmeier 2019-03-08 20:26:18 +01:00
parent 229b049f23
commit 2db567ab0f
2 changed files with 19 additions and 0 deletions

View File

@ -584,6 +584,8 @@
"core-views/blank-rows": "Blank Rows",
"core-views/count-non-blank-values": "Count non-blank values/column",
"core-views/non-blank-values": "Non-blank values per column",
"core-views/count-non-blank-records": "Count non-blank records/column",
"core-views/non-blank-records": "Non-blank records per column",
"core-views/edit-rows": "Edit rows",
"core-views/star-rows": "Star rows",
"core-views/unstar-rows": "Unstar rows",

View File

@ -684,6 +684,23 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
}
);
}
},
{
label: $.i18n('core-views/count-non-blank-records'),
id: "core/count-non-blank-records",
click: function() {
ui.browsingEngine.addFacet(
"list",
{
"name" : $.i18n('core-views/non-blank-records'),
"columnName" : "",
"expression" : "filter(row.columnNames,cn,isNonBlank(if(row.record.fromRowIndex==row.index,row.record.cells[cn].value.join(\"\"),null)))"
},
{
"scroll" : false
}
);
}
}
]
},