Merge pull request #1979 from felixlohmeier/all-menu-new-facets
Add custom text facet recipes from the wiki to "All" menu
This commit is contained in:
commit
76162cfed1
@ -581,6 +581,9 @@
|
||||
"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/non-blank-values": "Non-blank values per 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",
|
||||
|
@ -650,6 +650,57 @@ 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
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: $.i18n('core-views/non-blank-values'),
|
||||
id: "core/non-blank-values",
|
||||
click: function() {
|
||||
ui.browsingEngine.addFacet(
|
||||
"list",
|
||||
{
|
||||
"name" : $.i18n('core-views/non-blank-values'),
|
||||
"columnName" : "",
|
||||
"expression" : "filter(row.columnNames,cn,isNonBlank(cells[cn].value))"
|
||||
},
|
||||
{
|
||||
"scroll" : false
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: $.i18n('core-views/non-blank-records'),
|
||||
id: "core/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
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user