mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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",
|
propertyID: "lastEdited",
|
||||||
initialWidth: 0.38,
|
initialWidth: 0.38,
|
||||||
defaultSortOrder: DESCENDING_SORT,
|
defaultSortOrder: DESCENDING_SORT,
|
||||||
},
|
},
|
||||||
|
urlWithPath: {
|
||||||
|
columnHeader: "URL",
|
||||||
|
dropdownLabel: "URL",
|
||||||
|
propertyID: "urlWithPath",
|
||||||
|
initialWidth: 0.54,
|
||||||
|
initiallyShown: false,
|
||||||
|
defaultSortOrder: ASCENDING_SORT,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const FILTER_TYPES = [
|
const FILTER_TYPES = [
|
||||||
|
@ -935,13 +943,14 @@ function loaded() {
|
||||||
entityData.forEach(function(entity) {
|
entityData.forEach(function(entity) {
|
||||||
let type = entity.type;
|
let type = entity.type;
|
||||||
let filename = getFilename(entity.url);
|
let filename = getFilename(entity.url);
|
||||||
|
|
||||||
let entityData = {
|
let entityData = {
|
||||||
id: entity.id,
|
id: entity.id,
|
||||||
name: entity.name,
|
name: entity.name,
|
||||||
type: type,
|
type: type,
|
||||||
url: entity.certificateID === "" ? filename : "<i>" + CERTIFIED_PLACEHOLDER + "</i>",
|
url: entity.certificateID === "" ? filename : "<i>" + CERTIFIED_PLACEHOLDER + "</i>",
|
||||||
fullUrl: entity.certificateID === "" ? filename : CERTIFIED_PLACEHOLDER,
|
fullUrl: entity.certificateID === "" ? filename : CERTIFIED_PLACEHOLDER,
|
||||||
|
urlWithPath: entity.certificateID === "" ? entity.url : "<i>" + CERTIFIED_PLACEHOLDER + "</i>",
|
||||||
locked: entity.locked,
|
locked: entity.locked,
|
||||||
visible: entity.visible,
|
visible: entity.visible,
|
||||||
certificateID: entity.certificateID,
|
certificateID: entity.certificateID,
|
||||||
|
@ -981,11 +990,13 @@ function loaded() {
|
||||||
let searchFilter = searchTerm === '' || (e.name.toLowerCase().indexOf(searchTerm) > -1 ||
|
let searchFilter = searchTerm === '' || (e.name.toLowerCase().indexOf(searchTerm) > -1 ||
|
||||||
e.type.toLowerCase().indexOf(searchTerm) > -1 ||
|
e.type.toLowerCase().indexOf(searchTerm) > -1 ||
|
||||||
e.fullUrl.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);
|
e.id.toLowerCase().indexOf(searchTerm) > -1);
|
||||||
return typeFilter && searchFilter;
|
return typeFilter && searchFilter;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
PROFILE("sort", function() {
|
PROFILE("sort", function() {
|
||||||
let isAscendingSort = currentSortOrder === ASCENDING_SORT;
|
let isAscendingSort = currentSortOrder === ASCENDING_SORT;
|
||||||
let isDefaultSort = currentSortOrder === COLUMNS[currentSortColumnID].defaultSortOrder;
|
let isDefaultSort = currentSortOrder === COLUMNS[currentSortColumnID].defaultSortOrder;
|
||||||
|
|
Loading…
Reference in a new issue