Added errorBar on error

This commit is contained in:
Kasper Rynning-Tønnesen
2015-02-06 12:51:45 +01:00
parent c12f471be0
commit 86c61f021c
4 changed files with 15 additions and 2 deletions

View File

@@ -11,6 +11,8 @@
<?php include("php/header.php"); ?>
</head>
<body>
<div id="sBar">Success</div>
<div id="eBar">Error: Wrong Admin Password</div>
<div class="bgimage" id="bgimage"></div>
<div class="top vcent centered">
<div id="change" class="small">

View File

@@ -113,7 +113,8 @@ function vote(id, vote){
if(serverAns == "wrong")
{
alert("Wrong adminpassword!");
//alert("Wrong adminpassword!");
$("#eBar").addClass("opacityFull");
}else{
if(vote=="pos" && serverAns != "many"){ $("."+id).addClass("success");}
else{ $("."+id).addClass("fadeerror");}
@@ -123,6 +124,7 @@ function vote(id, vote){
setTimeout(function(){
$("."+id).removeClass("success");
$("."+id).removeClass("fadeerror");
$("#eBar").removeClass("opacityFull");
},1500);
}

View File

@@ -200,8 +200,9 @@ function submit(id,title,type){
if(serverAns == "wrong")
{
alert("Wrong adminpassword");
//alert("Wrong adminpassword");
$("#search").addClass("error");
$("#eBar").addClass("opacityFull");
}else{
$("#search").addClass("success");
}
@@ -211,6 +212,7 @@ function submit(id,title,type){
setTimeout(function(){
$("#search").removeClass("success");
$("#search").removeClass("error");
$("#eBar").removeClass("opacityFull");
},1500);
updateList();
event.stopPropagation();

View File

@@ -104,6 +104,11 @@ input[type="radio"]{display: none;}
#search{padding-left:50px;background: url(search2.png)no-repeat 10px 50%;background-color: rgba(255,255,255,0.2);background-size:2%;transition: box-shadow 0.5s;}
#search:focus{ box-shadow: 0px 0px 10px 0.5px #000;}
#eBar, #sBar{font-family: 'Open Sans', sans-serif; font-weight: 300; color:white;position:absolute;width:100%;height:30px;z-index: 9001;text-align: center;font-size:23px; opacity: 0;transition:opacity 0.5s linear;}
#eBar{background-color:rgb(229, 30, 30);}
#sBar{background-color:rgb(77, 178, 36);}
.opacityFull{opacity: 1 !important;}
@-webkit-keyframes fadein{from {opacity:0;}to{opacity:1;}}@keyframes fadein{from{opacity:0;}to{opacity:1;}}@-moz-keyframes fadein{from{opacity:0;}to{opacity:1;}}@-o-keyframes fadein{from{opacity:0;}to{opacity:1;}}
@-webkit-keyframes fadecol{from {background-color:rgba(0,255,0,0.4);}to{background-color: rgba(255,255,255,0);}}@keyframes fadecol{background-color: rgba(0,255,0,0.4);}to{background-color: rgba(255,255,255,0);}}@-moz-keyframes fadecol{from{background-color: rgba(0,255,0,0.4);}to{background-color: rgba(255,255,255,0);}}@-o-keyframes fadecol{background-color: rgba(0,255,0,0.4);}to{background-color: rgba(255,255,255,0);}
@-webkit-keyframes fadered{from {background-color:rgba(255,0,0,0.4);}to{background-color: rgba(255,255,255,0);}}@keyframes fadered{background-color: rgba(255,0,0,0.4);}to{background-color: rgba(255,255,255,0);}}@-moz-keyframes fadered{from{background-color: rgba(255,0,0,0.4);}to{background-color: rgba(255,255,255,0);}}@-o-keyframes fadered{background-color: rgba(255,0,0,0.4);}to{background-color: rgba(255,255,255,0);}
@@ -182,10 +187,12 @@ input[type="radio"]{display: none;}
#channels{font-size:60px;width:99%;}
.channel{font-size:40px;}
.channel:hover{color:grey !important;}
.votes{background-color: rgba(0,0,0,0.5);}
#loading{display:initial;display: table-cell;vertical-align: bottom;width: 50%;position: absolute;/*left:25%;*/top: 50%;left: 50%;transform: translate(-50%, -50%);}
/*#results{background-color: white;}
#title, .result_info{color:#000 !important;}*/
/*.blurT{-webkit-filter: blur(0px);}*/
#eBar, #sBar{font-size:40px; height:50px;}
}
@media only screen and (min-width: 1000px) {