diff --git a/assets/js/feature-callouts.js b/assets/js/feature-callouts.js index a77015e6e..28cf585bb 100644 --- a/assets/js/feature-callouts.js +++ b/assets/js/feature-callouts.js @@ -2,8 +2,7 @@ This feature is designed to callout new features added to the documentation CSS is required for the callout bubble to determine look and position, but the element must have the `callout` class and a unique id. - Callouts are treated as notifications and use the notification cookie API in - assets/js/cookies.js. + Callouts are treated as notifications and use the LocalStorage notification API. */ import $ from 'jquery'; @@ -14,19 +13,11 @@ function getCalloutID(el) { return $(el).attr('id'); } -// Hide a callout and update the cookie with the viewed callout -function hideCallout(calloutID) { - if (!LocalStorageAPI.notificationIsRead(calloutID)) { - LocalStorageAPI.setNotificationAsRead(calloutID, 'callout'); - $(`#${calloutID}`).fadeOut(200); - } -} - // Show the url feature callouts on page load export default function FeatureCallout({ component }) { const calloutID = getCalloutID($(component)); - if (LocalStorageAPI.notificationIsRead(calloutID, 'callout')) { + if (!LocalStorageAPI.notificationIsRead(calloutID, 'callout')) { $(`#${calloutID}.feature-callout`) .fadeIn(300) .removeClass('start-position'); diff --git a/assets/js/flux-group-keys.js b/assets/js/flux-group-keys.js index 18432cca1..9842bdb6f 100644 --- a/assets/js/flux-group-keys.js +++ b/assets/js/flux-group-keys.js @@ -240,8 +240,8 @@ function toggleCheckbox(element) { } // Build example group function -function buildGroupExample() { - var columnCollection = getChecked() +function buildGroupExample($component) { + var columnCollection = getChecked($component) .map((i) => '"' + i + '"') .join(', '); $('pre#group-by-example')[0].innerHTML =