js/css style

This commit is contained in:
Valentin Samir 2016-08-03 01:48:31 +02:00
parent f4882c3057
commit 170c557190
2 changed files with 15 additions and 11 deletions

View file

@ -1,22 +1,26 @@
function createCookie(name, value, days) {
if (days) {
var date = new Date();
function createCookie(name, value, days){
var expires;
var date;
if(days){
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
expires = "; expires="+date.toGMTString();
}
else{
expires = "";
}
else var expires = "";
document.cookie = name + "=" + value + expires + "; path=/";
}
function readCookie(name) {
function readCookie(name){
var nameEQ = name + "=";
var ca = document.cookie.split(";");
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==" "){
while (c.charAt(0) === " "){
c = c.substring(1,c.length);
}
if (c.indexOf(nameEQ) == 0){
if (c.indexOf(nameEQ) === 0){
return c.substring(nameEQ.length,c.length);
}
}
@ -31,7 +35,7 @@ function alert_version(last_version){
jQuery(function( $ ){
$("#alert-version").click(function( e ){
e.preventDefault();
createCookie("cas-alert-version", last_version, 10*365)
createCookie("cas-alert-version", last_version, 10*365);
});
if(readCookie("cas-alert-version") === last_version){
$("#alert-version").parent().hide();

View file

@ -3,7 +3,7 @@ html, body {
}
body {
padding-top: 40px;
padding-bottom: 0px;
padding-bottom: 0;
background-color: #eee;
}
@ -47,7 +47,7 @@ body {
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: auto;
height: 100%;
/* Negative indent footer by it's height */
margin: 0 auto -40px;