mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 04:12:09 +02:00
Added a new column URL
Added a new column URL (full path & filename) Searchable only if visible Requested from Issue #977
This commit is contained in:
parent
55753abf51
commit
6ffb848596
1 changed files with 14 additions and 3 deletions
|
@ -155,7 +155,15 @@ const COLUMNS = {
|
|||
propertyID: "lastEdited",
|
||||
initialWidth: 0.38,
|
||||
defaultSortOrder: DESCENDING_SORT,
|
||||
},
|
||||
},
|
||||
urlWithPath: {
|
||||
columnHeader: "URL",
|
||||
dropdownLabel: "URL",
|
||||
propertyID: "urlWithPath",
|
||||
initialWidth: 0.54,
|
||||
initiallyShown: false,
|
||||
defaultSortOrder: ASCENDING_SORT,
|
||||
},
|
||||
};
|
||||
|
||||
const FILTER_TYPES = [
|
||||
|
@ -935,13 +943,14 @@ function loaded() {
|
|||
entityData.forEach(function(entity) {
|
||||
let type = entity.type;
|
||||
let filename = getFilename(entity.url);
|
||||
|
||||
|
||||
let entityData = {
|
||||
id: entity.id,
|
||||
name: entity.name,
|
||||
type: type,
|
||||
url: entity.certificateID === "" ? filename : "<i>" + CERTIFIED_PLACEHOLDER + "</i>",
|
||||
fullUrl: entity.certificateID === "" ? filename : CERTIFIED_PLACEHOLDER,
|
||||
urlWithPath: entity.certificateID === "" ? entity.url : "<i>" + CERTIFIED_PLACEHOLDER + "</i>",
|
||||
locked: entity.locked,
|
||||
visible: entity.visible,
|
||||
certificateID: entity.certificateID,
|
||||
|
@ -981,11 +990,13 @@ function loaded() {
|
|||
let searchFilter = searchTerm === '' || (e.name.toLowerCase().indexOf(searchTerm) > -1 ||
|
||||
e.type.toLowerCase().indexOf(searchTerm) > -1 ||
|
||||
e.fullUrl.toLowerCase().indexOf(searchTerm) > -1 ||
|
||||
(e.urlWithPath.toLowerCase().indexOf(searchTerm) > -1 &&
|
||||
columnsByID["urlWithPath"].elTh.style.visibility === "visible")||
|
||||
e.id.toLowerCase().indexOf(searchTerm) > -1);
|
||||
return typeFilter && searchFilter;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
PROFILE("sort", function() {
|
||||
let isAscendingSort = currentSortOrder === ASCENDING_SORT;
|
||||
let isDefaultSort = currentSortOrder === COLUMNS[currentSortColumnID].defaultSortOrder;
|
||||
|
|
Loading…
Reference in a new issue