From 8c9cd0fad0c3b38193493c8a79b5927ae47fbdc6 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 25 Apr 2017 13:56:32 -0700 Subject: [PATCH] Custom social buttons; better testing functionality --- scripts/system/html/SnapshotReview.html | 18 ------------ scripts/system/html/css/SnapshotReview.css | 18 ++++++++++-- scripts/system/html/img/fb_logo.png | Bin 0 -> 1257 bytes scripts/system/html/img/twitter_logo.png | Bin 0 -> 552 bytes scripts/system/html/js/SnapshotReview.js | 32 +++++++++------------ 5 files changed, 29 insertions(+), 39 deletions(-) create mode 100644 scripts/system/html/img/fb_logo.png create mode 100644 scripts/system/html/img/twitter_logo.png diff --git a/scripts/system/html/SnapshotReview.html b/scripts/system/html/SnapshotReview.html index 400be4abdc..940adddd73 100644 --- a/scripts/system/html/SnapshotReview.html +++ b/scripts/system/html/SnapshotReview.html @@ -5,24 +5,6 @@ - diff --git a/scripts/system/html/css/SnapshotReview.css b/scripts/system/html/css/SnapshotReview.css index 859b4d8c90..0d1bd737e5 100644 --- a/scripts/system/html/css/SnapshotReview.css +++ b/scripts/system/html/css/SnapshotReview.css @@ -140,12 +140,26 @@ input[type=button].naked:active { width: 40%; margin-left: 10%; } -.externalShareControls { +.buttonShareControls { text-align: left; + height: 50px; + line-height: 50px; width: 40%; margin-right: 10%; } -.cancelShare { +.facebookButton { + background-image: url(../img/fb_logo.png); + width: 29px; + height: 29px; + display: inline-block; + margin-right: 8px; +} +.twitterButton { + background-image: url(../img/twitter_logo.png); + width: 29px; + height: 29px; + display: inline-block; + margin-right: 8px; } /* // END styling of share overlay diff --git a/scripts/system/html/img/fb_logo.png b/scripts/system/html/img/fb_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1de20bacd8fb5719db3291365576d6368a5ff510 GIT binary patch literal 1257 zcmbVMTWl0n7(QC5q@|jWMiwtH8D1>y?#%4$&dv;bo1NJ$YuM6kx44mqGMzcw9oo4# zGj*qp1_ML_4>k(n5-tsiiSfl4LTZe`R*D1>$y#dyO^uc(e5f=9v2sbxlwI(l;lY!f z8-82B4;>;C8A*8a< zC=xd10-F_5m0YG=h@eH=HdqWRl}f%6>C?>~j9?hX)$sehrd;q^1DY*5Ud`H2RS=*h znTla6x`w!lVz=IJM^LnCK{Ya&$HJObX_Ta^m?Ih(;lnXib$u-vw(Kl?QpU1qD>q<3 zEDJ5Y-;`h$7B*DLj%qwTkqb038Fs6w^eCFxC+JeY3N#1l72don)SDk?NqHgO}Q8y62gF;@OxAIXydJhLV(a5-nH`|JzDKU^9cYk%%SL;T8keAC>Dovm2? z*1frSCL1C3k&nJYi8fw*!=Cj^TVTe!(4sS$f09vJMZ5g`mMPB z)0@99?y9}F{f&crZ8^C*JwLkmKr;4sU6}j(R_xwCcYeA(h_ W+`9J^=-T9dKIvqe@Ofg#?tcLbL$|sB literal 0 HcmV?d00001 diff --git a/scripts/system/html/img/twitter_logo.png b/scripts/system/html/img/twitter_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..59fd027c2a59cffb4c4f353dbc0ddce2cc3e92d4 GIT binary patch literal 552 zcmV+@0@wYCP)ca5h;T6e`N!ZW%_7Fh zh-L^Db6)RjfuD}F`pZz7)+*=?1MeO>1_Vr(aX5V=K z@A6xs&1GO<5aVQ2;b%fmI~ZW%B^;rP%iP^h{_K772fv|vpZwYO5T_dK=KlZBP{N0|RFI72{;g)@5^- zWs&5@629+${-1W`*WByB{$NjC2*8N7-ZT_pc9Uh%6JeI*Vq|7y`0(@p?T`PCJpa4v q@gE|SAa-*p2ScsC7&Vu+<^lkzl%{SoyW=zf0000' + '
' + @@ -118,15 +116,14 @@ function createShareOverlay(parentID, isGif, shareURL, hifiShareButtonsDisabled) '
' + '' + '
' + - '' + + '' + '
' + - '
' + - '' + - '' + + '
' + + '' + + '' + '
' + '
'; shareOverlayContainer.appendChild(shareOverlay); - twttr.widgets.load(shareOverlay); return shareOverlayContainer; } @@ -167,6 +164,7 @@ function shareWithEveryone(selectedID, isGif) { })); } function shareButtonClicked(selectedID) { + selectedID = selectedID.id; // `selectedID` is passed as an HTML object to these functions; we just want the ID EventBridge.emitWebEvent(JSON.stringify({ type: "snapshot", action: "shareButtonClicked", @@ -209,16 +207,6 @@ function handleCaptureSetting(setting) { } window.onload = function () { - // TESTING FUNCTIONS START - // Uncomment and modify the lines below to test SnapshotReview in a browser. - //imageCount = 1; - //addImage({ localPath: 'C:/Users/Zach Fox/Desktop/hifi-snap-by-zfox-on-2017-04-20_14-59-12.gif' }); - //addImage({ localPath: 'C:/Users/Zach Fox/Desktop/hifi-snap-by-zfox-on-2017-04-24_10-49-20.jpg' }); - //document.getElementById('p0').appendChild(createShareOverlay('p0', false, '')); - //addImage({ localPath: 'http://lorempixel.com/553/255' }); - //addImage({localPath: 'c:/Users/howar/OneDrive/Pictures/hifi-snap-by--on-2016-07-27_12-58-43.jpg'}); - // TESTING FUNCTIONS END - openEventBridge(function () { // Set up a handler for receiving the data, and tell the .js we are ready to receive it. EventBridge.scriptEventReceived.connect(function (message) { @@ -301,3 +289,9 @@ function takeSnapshot() { action: "takeSnapshot" })); } + +function testInBrowser() { + imageCount = 1; + //addImage({ localPath: 'http://lorempixel.com/553/255' }); + addImage({ localPath: 'C:/Users/Zach Fox/Desktop/hifi-snap-by-zfox-on-2017-04-25_11-35-13.jpg' }, false, true, true, false); +}