From 9334baba00c63d4c3b1ef037199ee7c6987dc7c5 Mon Sep 17 00:00:00 2001 From: Pete Date: Wed, 7 Jun 2023 12:45:08 -0500 Subject: [PATCH] Rename download-content to get-ubuntu-content --- static/js/src/navigation.js | 20 +------------------- static/js/src/tabbed-content.js | 1 - templates/download/amd-xilinx/index.html | 1 - templates/templates/_navigation.html | 3 +-- webapp/context.py | 1 - 5 files changed, 2 insertions(+), 24 deletions(-) diff --git a/static/js/src/navigation.js b/static/js/src/navigation.js index 80ee9ff3a87..e8bf588bf44 100644 --- a/static/js/src/navigation.js +++ b/static/js/src/navigation.js @@ -203,7 +203,7 @@ addGANavEvents("#canonical-login", "www.ubuntu.com-nav-0-login"); addGANavEvents("#enterprise-content", "www.ubuntu.com-nav-1-enterprise"); addGANavEvents("#developer-content", "www.ubuntu.com-nav-1-developer"); addGANavEvents("#community-content", "www.ubuntu.com-nav-1-community"); -addGANavEvents("#download-content", "www.ubuntu.com-nav-1-download"); +addGANavEvents("#get-ubuntun-content", "www.ubuntu.com-nav-1-get-ubuntu"); addGANavEvents(".p-navigation--secondary", "www.ubuntu.com-nav-2"); addGANavEvents(".p-contextual-footer", "www.ubuntu.com-footer-contextual"); addGANavEvents(".p-footer__nav", "www.ubuntu.com-nav-footer-0"); @@ -420,21 +420,3 @@ if (accountContainer) { ); }); } - -// TEMP FIX - PETE F 15.05.23 -// UPDATES 'UBUNTU ADVANTAGE' TO 'UBUNTU PRO' IN THE MEGANAV UNTIL -// WE MERGE THE NEW MEGANAV -function replaceUbuntuAdvantage() { - const globalNav = document.querySelector("#canonical-global-nav"); - const targetElementsArray = globalNav.querySelectorAll( - "[href='https://ubuntu.com/support']" - ); - targetElementsArray.forEach(function (element) { - if (element.children.length) { - element.querySelector("h4").innerText = "Ubuntu Pro ›"; - } else { - element.innerText = "Ubuntu Pro"; - } - }); -} -replaceUbuntuAdvantage(); diff --git a/static/js/src/tabbed-content.js b/static/js/src/tabbed-content.js index e67cc7fd873..77fb1432c4a 100644 --- a/static/js/src/tabbed-content.js +++ b/static/js/src/tabbed-content.js @@ -105,7 +105,6 @@ @param {Array} tabs an array of tabs within a container */ const setActiveTab = (tab, tabs) => { - console.log('tab', tab); tabs.forEach((tabElement) => { var tabContent = document.querySelectorAll( "#" + tabElement.getAttribute("aria-controls") diff --git a/templates/download/amd-xilinx/index.html b/templates/download/amd-xilinx/index.html index 28d42525ece..0962892a6a1 100644 --- a/templates/download/amd-xilinx/index.html +++ b/templates/download/amd-xilinx/index.html @@ -58,5 +58,4 @@

Install Ubuntu on
AMD-Xilinx

- {% endblock content %} diff --git a/templates/templates/_navigation.html b/templates/templates/_navigation.html index 3662e5185fc..3364f3c104a 100644 --- a/templates/templates/_navigation.html +++ b/templates/templates/_navigation.html @@ -76,7 +76,7 @@ - + {% if not(hide_subnav == True) %} {% if breadcrumbs and breadcrumbs.children or breadcrumbs.grandchildren %} @@ -196,7 +196,6 @@ const triggerEl = event.target; const container = document.getElementById(id); const mobileContainer = document.getElementById(id+"-mobile"); - if (container.innerHTML === "") { const req = new XMLHttpRequest(); req.open('GET', url); diff --git a/webapp/context.py b/webapp/context.py index f7a8a76d146..7153398a21f 100644 --- a/webapp/context.py +++ b/webapp/context.py @@ -47,7 +47,6 @@ def get_meganav(section): """ Set "meganav_section" as global template variable """ - sections = {} meganav_sections = copy.deepcopy(meganav)