From 6f2e7f5b835defe92501d60e6895206265321fe6 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 5 Jul 2017 12:39:15 -0700 Subject: [PATCH] Tweak the Snapshot 'Share' button to make its purpose more clear --- scripts/system/html/js/SnapshotReview.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/system/html/js/SnapshotReview.js b/scripts/system/html/js/SnapshotReview.js index a3d1923aa9..5ea1dd0963 100644 --- a/scripts/system/html/js/SnapshotReview.js +++ b/scripts/system/html/js/SnapshotReview.js @@ -20,7 +20,9 @@ var blastShareText = "Blast to my Connections", hifiShareText = "Share to Snaps Feed", hifiAlreadySharedText = "Already Shared to Snaps Feed", facebookShareText = "Share to Facebook", - twitterShareText = "Share to Twitter"; + twitterShareText = "Share to Twitter", + shareButtonLabelTextActive = "SHARE:", + shareButtonLabelTextInactive = "SHARE"; function fileExtensionMatches(filePath, extension) { return filePath.split('.').pop().toLowerCase() === extension; @@ -138,6 +140,8 @@ function selectImageToShare(selectedID, isSelected) { var imageContainer = document.getElementById(selectedID), image = document.getElementById(selectedID + 'img'), shareBar = document.getElementById(selectedID + "shareBar"), + showShareButtonsDots = document.getElementById(selectedID + "showShareButtonsDots"), + showShareButtonsLabel = document.getElementById(selectedID + "showShareButtonsLabel"), shareButtonsDiv = document.getElementById(selectedID + "shareButtonsDiv"), shareBarHelp = document.getElementById(selectedID + "shareBarHelp"), showShareButtonsButtonDiv = document.getElementById(selectedID + "showShareButtonsButtonDiv"), @@ -156,6 +160,9 @@ function selectImageToShare(selectedID, isSelected) { shareBar.style.backgroundColor = "rgba(0, 0, 0, 0.45)"; shareBar.style.pointerEvents = "initial"; + showShareButtonsDots.style.visibility = "hidden"; + showShareButtonsLabel.innerHTML = shareButtonLabelTextActive; + shareButtonsDiv.style.visibility = "visible"; shareBarHelp.style.visibility = "visible"; @@ -176,6 +183,9 @@ function selectImageToShare(selectedID, isSelected) { shareBar.style.backgroundColor = "rgba(0, 0, 0, 0.0)"; shareBar.style.pointerEvents = "none"; + showShareButtonsDots.style.visibility = "visible"; + showShareButtonsLabel.innerHTML = shareButtonLabelTextInactive; + shareButtonsDiv.style.visibility = "hidden"; shareBarHelp.style.visibility = "hidden"; } @@ -185,6 +195,7 @@ function createShareBar(parentID, isLoggedIn, canShare, isGif, blastButtonDisabl shareBarHelpID = parentID + "shareBarHelp", shareButtonsDivID = parentID + "shareButtonsDiv", showShareButtonsButtonDivID = parentID + "showShareButtonsButtonDiv", + showShareButtonsDotsID = parentID + "showShareButtonsDots", showShareButtonsLabelID = parentID + "showShareButtonsLabel", blastToConnectionsButtonID = parentID + "blastToConnectionsButton", shareWithEveryoneButtonID = parentID + "shareWithEveryoneButton", @@ -199,8 +210,8 @@ function createShareBar(parentID, isLoggedIn, canShare, isGif, blastButtonDisabl if (canShare) { shareBarInnerHTML = '' + '
' + - '' + - '' + + '' + + '' + '' + '
' + '' + @@ -217,7 +228,7 @@ function createShareBar(parentID, isLoggedIn, canShare, isGif, blastButtonDisabl document.getElementById(parentID + 'img').onclick = function () { selectImageToShare(parentID, true); }; } else { shareBarInnerHTML = '
' + - '' + + '' + '' + '' + '
' + @@ -230,7 +241,7 @@ function createShareBar(parentID, isLoggedIn, canShare, isGif, blastButtonDisabl } } else { shareBarInnerHTML = '
' + - '' + + '' + '' + '' + '
' +