Skip to content

Commit

Permalink
Check ICC announcement is shown
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksptang committed Nov 25, 2024
1 parent 06fa2a2 commit 97d395f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions step-web/src/main/webapp/js/step_ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,11 @@
var stepUsageCountStorageOrCookie = step.util.localStorageGetItem("step.usageCount");
var stepUsageCount = parseInt(stepUsageCountStorageOrCookie, 10);
if (isNaN(stepUsageCount)) stepUsageCount = 0;
var stepICCAnnounceStorageOrCookie = step.util.localStorageGetItem("step.showICCAnnounce");
var stepICCAnnounceCount = parseInt(stepICCAnnounceStorageOrCookie, 10);
if (isNaN(stepICCAnnounceCount)) stepICCAnnounceCount = 0;
var urlVars = $.getUrlVars();
if ((urlVars.indexOf("skipwelcome") > -1) || (urlVars.indexOf("clickvocab") > -1) || (stepUsageCount > 30) ||
if ( (((urlVars.indexOf("skipwelcome") > -1) || (urlVars.indexOf("clickvocab") > -1) || (stepUsageCount > 30)) && (stepICCAnnounceCount > 0)) ||
(step.touchDevice && !step.touchWideDevice) ) { // phones do not have the width to display the Welcome to STEP panel
step.util.showOrHideTutorial('true'); // URL has skipwelcome
if (urlVars.indexOf("clickvocab") > -1) {
Expand All @@ -342,7 +345,8 @@
}
stepUsageCount ++;
step.util.localStorageSetItem("step.usageCount", stepUsageCount);

stepICCAnnounceCount ++;
step.util.localStorageSetItem("step.showICCAnnounce", stepICCAnnounceCount);
$("#stepDisclaimer").popover();
}

Expand Down

0 comments on commit 97d395f

Please sign in to comment.