-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #468 from mitre-attack/develop
Update website to 4.0.6
- Loading branch information
Showing
115 changed files
with
39,429 additions
and
803 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.10.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// this function filters table rows based on the selection | ||
function filter_row(selected) { | ||
let col_index = 3 | ||
const rows = document.querySelectorAll("#ds-table tbody tr"); | ||
let count = 0; | ||
rows.forEach((row) => { | ||
let row_count = 0 | ||
let row_visited = false; | ||
let row_data = row.querySelector("td:nth-child(" + col_index + ")").innerHTML | ||
for(let i = 0; i<selected.length; i++){ | ||
let filter_value = selected[i]; | ||
let display_row = true; | ||
if (row_data.indexOf(filter_value) == -1 && !row_visited) { | ||
display_row = false; | ||
} | ||
if (display_row) { | ||
row.style.display = "table-row"; | ||
row_visited = "true"; | ||
row_count = row_count + 1; | ||
} else { | ||
row.style.display = "none" | ||
} | ||
} | ||
if(row_count > 0){ | ||
count = count + 1; | ||
} | ||
}) | ||
let filter_count = document.querySelector(".table-object-count") | ||
filter_count.innerHTML = `Data Sources: ${count}` | ||
} | ||
|
||
$(document).ready(function() { | ||
let arrow_up = document.getElementById("arrow-up-0"); | ||
let arrow_down = document.getElementById("arrow-down-0"); | ||
arrow_down.style.display = "inline-block"; | ||
arrow_up.style.display = "none"; | ||
arrow_up = document.getElementById("arrow-up-1"); | ||
arrow_down = document.getElementById("arrow-down-1"); | ||
arrow_down.style.display = "inline-block"; | ||
arrow_up.style.display = "none"; | ||
showDomain(); | ||
}); | ||
|
||
// this function determines which domain options were checked | ||
function showDomain() { | ||
let selected = []; | ||
if($("#filterMenu input:checked").length <= 0){ | ||
$('#filterMenu input:checkbox').each(function() { | ||
selected.push($(this).attr('id')); | ||
$(this).prop("checked", "true"); | ||
}); | ||
} | ||
else{ | ||
$('#filterMenu input:checked').each(function() { | ||
selected.push($(this).attr('id')); | ||
|
||
}); | ||
} | ||
filter_row(selected); | ||
} | ||
|
||
// this function sorts the table based on either ID or Name | ||
function sortTable(col_no) { | ||
let table = document.getElementById("ds-table"); | ||
let direction = "asc"; | ||
let table_switching = true; | ||
let asc_direction = false; | ||
let arrow_up = document.getElementById("arrow-up-"+col_no); | ||
let arrow_down = document.getElementById("arrow-down-"+col_no); | ||
arrow_down.style.display = "inline-block"; | ||
arrow_up.style.display = "none"; | ||
let rows = table.rows; | ||
while (table_switching) { | ||
table_switching = false; | ||
if (direction == "desc"){ | ||
for (let i = 1; i <= (rows.length - 1); i++) { | ||
for (let j = 1; j <= (rows.length - i - 1); j++) { | ||
let x = rows[j].getElementsByTagName("TD")[col_no]; | ||
let y = rows[j + 1].getElementsByTagName("TD")[col_no]; | ||
if(x.innerText.toLowerCase() < y.innerText.toLowerCase()){ | ||
rows[j].parentNode.insertBefore(rows[j + 1], rows[j]); | ||
} | ||
} | ||
} | ||
arrow_up.style.display = "inline-block"; | ||
arrow_down.style.display = "none"; | ||
} | ||
else{ | ||
for (let i = 1; i <= (rows.length - 1); i++) { | ||
for (let j = 1; j <= (rows.length - i - 1); j++) { | ||
let x = rows[j].getElementsByTagName("TD")[col_no]; | ||
let y = rows[j + 1].getElementsByTagName("TD")[col_no]; | ||
if(x.innerText.toLowerCase() > y.innerText.toLowerCase()){ | ||
rows[j].parentNode.insertBefore(rows[j + 1], rows[j]); | ||
asc_direction = true; | ||
} | ||
} | ||
} | ||
} | ||
if (direction == "asc" && !asc_direction) { | ||
direction = "desc"; | ||
table_switching = true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// This code is for creating a collapsable sidebar for the mobile view | ||
let mediaQuery = window.matchMedia('(max-width: 47.9875rem)') | ||
|
||
function mobileSidenav(e) { | ||
if (e.matches) { | ||
$('#sidebar-collapse').collapse('hide') | ||
} | ||
else{ | ||
$('#sidebar-collapse').collapse('show') | ||
} | ||
} | ||
$(document).ready(function() { | ||
mobileSidenav(mediaQuery) | ||
}); | ||
|
||
mediaQuery.addEventListener('change', mobileSidenav) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
let mod_name = window.location.pathname.split("/") | ||
let mod_entry = "/" + mod_name[1] + "/sidebar-" + mod_name[1] | ||
if (mod_name.includes('contact')){ | ||
mod_entry = "/" + "resources/sidebar-resources" | ||
} | ||
$("#sidebars").load(mod_entry, function() { | ||
let navElements = document.querySelectorAll('.sidenav-head > a'); | ||
let winlocation; | ||
navElements.forEach(function(element){ | ||
if(!element.href.includes('changelog.html')){ | ||
if(!window.location.href.endsWith("/")){ | ||
winlocation = window.location.href + "/"; | ||
} | ||
else{ | ||
winlocation = window.location.href | ||
} | ||
if(!element.href.endsWith("/")){ | ||
element.href = element.href + "/"; | ||
} | ||
} | ||
else{ | ||
winlocation = window.location.href | ||
} | ||
if(element.href == winlocation){ | ||
$(element.parentNode).addClass("active") | ||
}}); | ||
|
||
//This code is for creating a collapsable sidebar for the mobile view | ||
let mediaQuery = window.matchMedia('(max-width: 47.9875rem)') | ||
function mobileSidenav(e) { | ||
if (e.matches) { | ||
$('#sidebar-collapse').collapse('hide') | ||
} | ||
else{ | ||
$('#sidebar-collapse').collapse('show') | ||
} | ||
} | ||
$(document).ready(function() { | ||
mobileSidenav(mediaQuery) | ||
let sidenav = $(".sidenav-list"); | ||
let sidenav_active_elements = $(".sidenav .active"); | ||
if (sidenav_active_elements.length > 0) setTimeout(() => { //setTimeout gives bootstrap time to execute first | ||
let offsetValue = sidenav_active_elements[0].offsetTop; | ||
if (offsetValue <= 0){ | ||
offsetValue = sidenav_active_elements[sidenav_active_elements.length - 1].offsetTop; | ||
} | ||
sidenav[0].scrollTop = offsetValue - 60; | ||
}); | ||
}); | ||
|
||
mediaQuery.addEventListener('change', mobileSidenav) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.