From 6ed1a55eb9d888b17e6829bae4234d7449a63df5 Mon Sep 17 00:00:00 2001 From: Daniel Otykier Date: Thu, 31 Oct 2024 14:02:32 +0100 Subject: [PATCH] Only show DAX Optimizer banner on whats new page for pre-3.18 versions --- whats-new/3-17-1.html | 11 +++++++++++ whats-new/index.html | 25 +++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 whats-new/3-17-1.html diff --git a/whats-new/3-17-1.html b/whats-new/3-17-1.html new file mode 100644 index 0000000..0585404 --- /dev/null +++ b/whats-new/3-17-1.html @@ -0,0 +1,11 @@ +

Tabular Editor 3.17.0

+

This release: August 2024 (v. 3.17.0, release notes)

+ diff --git a/whats-new/index.html b/whats-new/index.html index 19726e5..4aa4a11 100644 --- a/whats-new/index.html +++ b/whats-new/index.html @@ -113,11 +113,11 @@
-
+
-

Coming soon: Free DAX Optimizer runs for Enterprise Edition customers

-

Sign up for a DAX Optimizer Account and check out this video for more information.

+

Important update: Free DAX Optimizer access for Enterprise Edition customers

+

Download the latest Tabular Editor 3 version, sign up for a DAX Optimizer Account, and check out this video for more information.

@@ -195,11 +195,28 @@

The Tabular Editor Team will be at the following conferences:

function init() { var version = getParameterByName("version"); - if(!version) version = "generic"; + if (!version) version = "generic"; + else if (is_3_18_orGreater(version)) { + deleteElementById("dax-optimizer-banner"); + } loadDivContent("/whats-new/" + urlify(version) + ".html", "version-specific-content"); applyStyle(); } + function is_3_18_orGreater(version) { + // Split the version string into an array of parts + const parts = version.split('.'); + // Check if the middle number meets or exceeds the threshold + return parseInt(parts[0], 10) >= 3 && parseInt(parts[1], 10) >= 18; + } + + function deleteElementById(tagId) { + var element = document.getElementById(tagId); + if (element) { + element.parentNode.removeChild(element); + } + } + function loadDivContent(url, divId) { // Create a new XMLHttpRequest object var xhr = new XMLHttpRequest();