Several good changes

* Add vote validation before submitting
* Show 'Saved Vote' after vote saved, fade out message
* Increase flash message size
* Randomize order of games in voting list (Issue #5)
* Embiggen ScreenShots on Click
This commit is contained in:
Brian Buller 2017-07-09 19:18:03 -05:00
parent 262c855643
commit 2fe197b99d
6 changed files with 204 additions and 98 deletions

176
assets.go
View File

@ -202,28 +202,28 @@ Y8Pj6dAeZ3gBzLZbhMnSW8r0f78+9y+zlDVuQ3ZNXD8zD+/mGzZjDfK53gEAAP//D/6XxHkAAAA=
"/assets/css/gjvote.css": { "/assets/css/gjvote.css": {
local: "assets/css/gjvote.css", local: "assets/css/gjvote.css",
size: 3784, size: 3812,
modtime: 1499536516, modtime: 1499642341,
compressed: ` compressed: `
H4sIAAAAAAAA/6xX62rrOBD+36cQhIUWVsbpaU4bF8pCT/sesqXYQ2TJSHKSdum7L7rYsWy5e2GhP2Jp H4sIAAAAAAAA/6xX7WrrOBP+36sQhBdO4ZWxe5rTxoWy0NPeh2wp9lBZMpKcpF1674s+7Fi23F2Whf6o
Lt/MfDOjNqbl6M8bhFoQuGFQN6ZA2zz/7fnm6+amlPTD3VaSS1WgzePj4/OaMHGShl0MpqySihiQokBC R/PxzOiZGaU1HUd/3iDUgcAtg6Y1JSry/H9PN183N5WkH+60llyqEu0eHh6etpSJ0zTsYjBltVTEgBQl
CubuKZyySgrDhHGSHaEURF2g7a67pK2OjktOquNopSH84EycgZqmQLuAIGsYoUz5eIiqQWDODqZAub/u ElIwd07hlNVSGCaM0+wJpSCaEhX7/pL2OgWuOKnfJy8t4Ufn4gzUtCXaBwRZywhlyudDVAMCc3Y0Jcr9
FLRExRHl+eMTe4zucVk7kZJUx1rJXlCckAbR9SY7AGdxNNmOtSj7yVoLn4LuOPkoEAgOguGSSxsHQqVU ca+gIyrOKM8fHtlDdI6rxqlUpH5vlBwExQltEP1gsiNwFmeT7VmHsl+ss/Ap6J6TjxKB4CAYrri0eSBU
lKkCbbsL0pIDRZuqqvzNBeuGUHm2WpoZlDupH90FbS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dfVozu864v5ly0ZwLVFl500NdM623/d3dHcjx8K2/6BfVdsZXQulaMSYQERT96MglcOvn3j5U
6XJv/hOXPx+sQ384ofnT/w/jrwAAAP//9ey+zsgOAAA= b8OL4uTnhnWtJMcWVY84qRjPRpn7CkHXS/OfhPx1bwN64Yzjj/89jL8CAAD//w9iOV3kDgAA
`, `,
}, },
@ -318,22 +318,26 @@ H4sIAAAAAAAA/0rOzyvOz0nVy8lP11DydA5RcE/MTfVKzFVwTMnNzFPStOYCBAAA//8imS6KIgAAAA==
"/assets/js/gjvote.js": { "/assets/js/gjvote.js": {
local: "assets/js/gjvote.js", local: "assets/js/gjvote.js",
size: 2455, size: 3235,
modtime: 1498145831, modtime: 1499642977,
compressed: ` compressed: `
H4sIAAAAAAAA/6RWT0/jOhC/51OMysGJChF6lye1L0Lv8ZB2JUArwW21hzSeNqO6djd20o2g331lO0nT H4sIAAAAAAAA/6xWUW/jNgx+z68gcg+y0dRwDxgGxPMdttsdNqC9Dbi+DXtQLDoWokieJadntPnvg2TZ
0rRFywGI5/cnnhl7Mi9lZkhJMGqxEPgvX5H8lkoUYQRvAQBXWblCaeKfJRb1CwrMjCpCdrVCWbIozkSq cRI7abH1oa3Fj/wokiKZ1zIzXEkwar0W+DPbcvknlSiCEJ5nADtawRZlDSkwldVblCb6p8aq+YYCM6Oq
9SNpE3uBkOXEOUoWTYNtEAQdX8kl1lxtJCTQmoZYGW+DlYHE/X5/hw1JrjYxVijNNACo0gJIP+gsXaNl gLyzchImMwCeB/YjygTV+p5rE2VKGsqlDkjBGUNJwtYuTJsTtFG1+eBUURoSRto0AqMtrdZc3mNuUnL3
p0KjXad5OFpiPQKS0ClBH2oN4iXWkCQw8qsj63CwPIqs3BZQaBwWuVccLeOvvz3cv0ELbN0/5tGDt0HQ Q1x+J4kzdMJY4Vbt8MBnQXtAofH/II7HSSljJ4yz/Ww266mU3GDD1JOEFLqQB7gzbTBwZyB1v19e4IlL
5VrnavOkeCpCtbYL2pPtPld2GZJd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zRDKusLbVgXIzVT0bsi48HDXlkRLmm0iwbVBiVXQ
3l7DrR/e3bzKiaOfV382qIZfqPlo+Ow0a7qNXULsD449nrtvfUr/p+r8lrr02+TlJDDcseM5Fdq4grQ3 P59nqRguV0YuwE2uJXGJJ/tFD5kqDg/oH9i19tSqn3SolZHewN63Jof2E3zHNV9xwU1j4+K+BLpJ7qet
cy9Y4EpV2JTrKKf9VvgdAAD//3s8PKeXCQAA ziolxKMK4gXEYXI0rwrOsJ1X/21QTTvkF4e3TjNfbeQ1isPBcaTn+m0b0l/57vqV+vDb4BVcYHDQjnJe
aeMS0nXmgbBdzHy6RnXOd4WCSibwi6C6eECt6RoHScjt8YXFlGrOMHKofj11X6P7aU4Zl+vDfqrRPPIt
qtoEOWX4R22GbizgfRzHIx6PYN/qcuushauSZnbnc063lWOPuGn6FcICUpjPQ3ju4HeJewCZkloJjIRa
B+SLu53n37Z+Ld2Tp1k4NPYB4rEI9F2+H5kjTrkeRTO4hTi6657zaED8U13A3TCIY9lOZv8GAAD//yHs
yEqjDAAA
`, `,
}, },
@ -12178,56 +12182,58 @@ AAD//1puW/YhAwAA
"/templates/public-voting.html": { "/templates/public-voting.html": {
local: "templates/public-voting.html", local: "templates/public-voting.html",
size: 10440, size: 10658,
modtime: 1499536431, modtime: 1499568691,
compressed: ` compressed: `
H4sIAAAAAAAA/+xa34/bNvJ/379iqm9QebFruym+uIdde4H8uB85tCmQbHI4BEFBm2OLCUUKFGXHZ/h/ H4sIAAAAAAAA/+xaX4/bNhJ/308x9QWVF7u2k/ZwD7u2gWRzf3JoUyDZ9HAIgoK2xhYTihRIyo5r+Lsf
PwxJSZQt7Tq5XtGH60Mja4bD4WdmPhyRu9+DWIHSFib3mBeSWXzJLJvcI8tLOBwuAGZcbO5ea1izHEvI hqQkypZ2nVyv6MP1obE0w+HwNzM/jsjd74GvQCoL43vMC8EsvmSWje+R5QYOhwuAaco389cK1ixHAxnb
2AZhgahgaZBZ5LMpyS8A9ntAWWI7CJaS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vOtwgVVzqjqpTyoJraOi1Tpu+o6uWOi0PW/+LTEg+csYb J66ubNgRz7nOpMbgwbOXGhJ7zpmQ7TwNOu4n6s/KByx6972+0+0xXH2BXkMS3acdPY6sWq8FjlbUpx3L
aLk6H1qn+xC07tP4LHBzwbnEB9H1s52BLs0a40tfto8h7Ix/E8Lxd/Mgxs58izHKrwDZKR/thHM/YSvu wtVbPJUrk3/c//gDzCA5vl5lmgiiLMIN64/Ue70rkoZPBTcWJepwtC7dibgz7KsON0gVl7gz7YSy4Bpq
D4LvU8+LgGSn2Y3GaNNx40H43dVwQN5/VzwKu7P6OO4wumxxP/2UGsbd2Y8bBsu7RHnSj9d/NNZDlW5T eq3SpuvoqqFOm4at/y7jIh064zW0qTwfWqf7ELTu0/gscHOepgIfRNfPdga6NGuML33ZPoawM/5VCMff
iP5MJA08ecyGgz3+f8qH/bcA7vuM8/NTyisPplQQH839bRnUqeBg+MEc6v+DnLReZ8EMy8umP/JZ5O0O zb0YO/MNxii+AGSnfLQTzvyEjbg7CL5PPS8Cgp1mN2qtdMuNB+F319wBef9d8SjszurjuMPwssH99FOq
ZdFpBnojg9kVNu5elEKqnWaa1z7NtNm0vkn+dwAAAP//YbS+bcgoAAA= H3dnP24YbNomypN+vPpzuA6qdJtC9AcwSeDJYzbs7fH/Wz7svgVw32dpen5KeeXelArio7m/LoNaFRwM
P5hD3X9qlFTrLJhmuan7I59F3m5fFp1moDfSm11h4+5EKaTaaaZ57dNMm06qK+f/BAAA///tTMTxoikA
AA==
`, `,
}, },

View File

@ -136,6 +136,10 @@ img.thumbnail {
margin-bottom: 5px; margin-bottom: 5px;
} }
.large {
font-size: 18px;
}
.big-space { .big-space {
margin: 10px; margin: 10px;
} }
@ -216,6 +220,22 @@ table tfoot {
text-align: center; text-align: center;
} }
div#embiggenedScreenShot {
cursor: pointer;
background-color: #FFF;
}
div.fullscreen {
height: 100%;
width: 100%;
position: absolute;
top: 0px;
left: 0px;
text-align: center;
margin: auto auto;
z-index:1001;
}
@media (min-width: 40em) { @media (min-width: 40em) {
#menu { #menu {
width: 150px; width: 150px;
@ -244,7 +264,7 @@ table tfoot {
} }
aside.flash { aside.flash {
margin-left: 150px; font-size: 24px;
} }
aside.flash.error { aside.flash.error {

View File

@ -1,5 +1,12 @@
function toggleAdminPanel() { function toggleAdminPanel() {
document.querySelector('#menu').classList.toggle('hidden'); var menu = document.querySelector('#menu');
if(menu.classList.contains('hidden')) {
document.querySelector('#layout>.content').style.marginLeft='150px';
menu.classList.remove('hidden');
} else {
document.querySelector('#layout>.content').style.marginLeft='0';
menu.classList.add('hidden');
}
} }
@ -64,3 +71,35 @@ function hideModal() {
buttonsDiv.removeChild(buttonsDiv.firstChild); buttonsDiv.removeChild(buttonsDiv.firstChild);
} }
} }
function setFlashMessage(msg, cls) {
var flash = document.querySelector('aside.flash');
flash.innerText = msg;
for(var i = 0; i < cls.length; i++) {
flash.classList.add(cls[i]);
}
flash.classList.remove('hidden');
flash.style.opacity=1;
handleFlashMessage();
}
function handleFlashMessage() {
var flash = document.querySelector('aside.flash');
if(flash.classList.contains('fading')) {
setTimeout(fadeOutFlashMessage, 1000);
}
}
function fadeOutFlashMessage() {
var flash = document.querySelector('aside');
var opac = flash.style.opacity;
if(opac == "") { opac = 1; }
if(opac > 0) {
setTimeout(function() {
flash.style.opacity = opac - 0.01;
fadeOutFlashMessage();
}, 10);
}
}
handleFlashMessage();

View File

@ -261,6 +261,7 @@ func InitPageData(w http.ResponseWriter, req *http.Request) *pageData {
if p.FlashClass == "" { if p.FlashClass == "" {
p.FlashClass = "hidden" p.FlashClass = "hidden"
} }
fmt.Println("Flash Message: " + p.FlashMessage + " (" + p.FlashClass + ")")
// Build the menu // Build the menu
if p.LoggedIn { if p.LoggedIn {

View File

@ -1,6 +1,8 @@
package main package main
import ( import (
"fmt"
"math/rand"
"net/http" "net/http"
"strings" "strings"
"time" "time"
@ -12,10 +14,10 @@ func initPublicPage(w http.ResponseWriter, req *http.Request) *pageData {
} }
func handleMain(w http.ResponseWriter, req *http.Request) { func handleMain(w http.ResponseWriter, req *http.Request) {
page := initPublicPage(w, req)
page.SubTitle = ""
switch dbGetPublicSiteMode() { switch dbGetPublicSiteMode() {
case SiteModeWaiting: case SiteModeWaiting:
page := initPublicPage(w, req)
page.SubTitle = ""
page.show("public-waiting.html", w) page.show("public-waiting.html", w)
case SiteModeVoting: case SiteModeVoting:
loadVotingPage(w, req) loadVotingPage(w, req)
@ -29,7 +31,17 @@ func loadVotingPage(w http.ResponseWriter, req *http.Request) {
Timestamp string Timestamp string
} }
vpd := new(votingPageData) vpd := new(votingPageData)
vpd.Teams = dbGetAllTeams() tms := dbGetAllTeams()
// Randomize the team list
rand.Seed(time.Now().Unix())
for len(tms) > 0 {
i := rand.Intn(len(tms))
fmt.Println("Chose Team: " + tms[i].Name)
vpd.Teams = append(vpd.Teams, tms[i])
tms = append(tms[:i], tms[i+1:]...)
}
vpd.Timestamp = time.Now().Format(time.RFC3339) vpd.Timestamp = time.Now().Format(time.RFC3339)
page.TemplateData = vpd page.TemplateData = vpd
page.show("public-voting.html", w) page.show("public-voting.html", w)
@ -60,5 +72,6 @@ func handlePublicSaveVote(w http.ResponseWriter, req *http.Request) {
if newVote, err := dbGetVote(page.ClientId, timestamp); err == nil { if newVote, err := dbGetVote(page.ClientId, timestamp); err == nil {
site.Votes = append(site.Votes, *newVote) site.Votes = append(site.Votes, *newVote)
} }
page.session.setFlashMessage("Vote Saved!", "success large fading")
redirect("/", w, req) redirect("/", w, req)
} }

View File

@ -50,7 +50,7 @@
</table> </table>
</div> </div>
<div class="content half"> <div class="content half">
<form action="/vote"> <form action="/vote" onsubmit="return validateVote();">
<input id="uservote" type="hidden" name="uservote" value="" /> <input id="uservote" type="hidden" name="uservote" value="" />
<input id="timestamp" type="hidden" name="timestamp" value="{{.TemplateData.Timestamp}}" /> <input id="timestamp" type="hidden" name="timestamp" value="{{.TemplateData.Timestamp}}" />
<button class="pure-button pure-button-primary space-vertical pull-right" type="submit">Submit Vote!</button> <button class="pure-button pure-button-primary space-vertical pull-right" type="submit">Submit Vote!</button>
@ -62,13 +62,14 @@
<label class="control-label">Click to view original size</label> <label class="control-label">Click to view original size</label>
<div class="center-all horizontal-scroll thumbnail-container" id="thumbnail-container"> <div class="center-all horizontal-scroll thumbnail-container" id="thumbnail-container">
{{ range $imgi, $imgv := $v.Game.Screenshots }} {{ range $imgi, $imgv := $v.Game.Screenshots }}
<a href="javascript:embiggenScreenshot(this.getElementsByTagName('img')[0]);"> <a href="javascript:embiggenScreenshot('{{$imgv.UUID}}');">
<img data-teamid="{{ $v.UUID }}" data-ssid="{{ $imgv.UUID }}" class="thumbnail" alt="{{ $imgv.Description }}" src="data:image/png;base64,{{ $imgv.Image }}" /> <img id="{{ $imgv.UUID }}" data-teamid="{{ $v.UUID }}" data-ssid="{{ $imgv.UUID }}" class="thumbnail" alt="{{ $imgv.Description }}" src="data:image/png;base64,{{ $imgv.Image }}" />
</a> </a>
{{ end }} {{ end }}
</div> </div>
</div> </div>
{{ end }} {{ end }}
<div id="embiggenedScreenShot" class="hidden fullscreen" onclick="javascript:document.getElementById('embiggenedScreenShot').classList.add('hidden');"></div>
{{ end }} {{ end }}
<script> <script>
var teamNames = { }; var teamNames = { };
@ -89,11 +90,34 @@ function showScreenshots(tmuuid) {
click: hideModal click: hideModal
}] }]
}); });
} }
function embiggenScreenshot(img) { function embiggenScreenshot(img) {
var ss = document.getElementById(img);
if(ss == null) {
// Couldn't find the screenshot... Error
setFlashMessage('Error viewing that screenshot, sorry...', ['error','fading']);
return;
}
var container = document.getElementById('embiggenedScreenShot');
var clone = ss.cloneNode(true);
clone.classList.remove('thumbnail');
while(container.hasChildNodes()) {
container.removeChild(container.firstChild);
}
var clickToCloseMsg = document.createElement('div');
clickToCloseMsg.innerText = "Click Image to Close";
container.appendChild(clickToCloseMsg);
container.appendChild(clone);
container.classList.remove('hidden');
}
function validateVote() {
var isValid = (getRanked().length > 0);
if(!isValid) {
setFlashMessage('You must choose at least one game.', ['error','fading']);
}
return (getRanked().length > 0);
} }
function updateView() { function updateView() {
@ -243,9 +267,12 @@ function getRanked() {
// 'tbl' should be either 'ranked' or 'unranked' // 'tbl' should be either 'ranked' or 'unranked'
function gameTableToArray(tbl) { function gameTableToArray(tbl) {
var ret = []; var ret = [];
snack.wrap('#'+tbl+'-table>tbody>tr').each(function(ele, idx) { var trs = snack.wrap('#'+tbl+'-table>tbody>tr')
if(trs[0].length > 0) {
trs.each(function(ele, idx) {
ret = ret.concat(getTeamObj(ele.dataset.teamid)); ret = ret.concat(getTeamObj(ele.dataset.teamid));
}); });
}
return ret; return ret;
} }