initial commit after server failure

This commit is contained in:
Léo
2017-12-20 21:49:11 +01:00
commit a14390f8f5
109 changed files with 27898 additions and 0 deletions

40
views/js/d.avatar.js Executable file
View File

@@ -0,0 +1,40 @@
$(window).ready(function() {
$("#deleteavatar").click(function() {
$("aside").removeClass("avatar").addClass("noavatar");
$("#deleteavatar").hide();
$("#avatarcheckbox").prop("checked", false);
$('#avatarfile').val('');
});
$("#uploadavatar").click(function() {
$('#avatarfile').trigger('click');
});
$("#avatarfile").change(function () {
if($("#avatarfile").val == '') {
$("#avatarcheckbox").prop("checked", false);
$("aside").removeClass("avatar").addClass("noavatar");
$("#deleteavatar").hide();
}
else {
$("#avatarcheckbox").prop("checked", true);
$("aside").removeClass("noavatar").addClass("avatar");
$("#deleteavatar").show();
readURL(this);
}
});
});
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#profileavatar').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}$

22
views/js/d.captcha.js Executable file
View File

@@ -0,0 +1,22 @@
var time = 9;
$(window).ready(function() {
var interval = setInterval(function() {
if (time > 0) {
$("#captchahidden").val(time);
$("#captchasec").html(time+" s");
time--;
}
else {
time--;
$("#captchahidden").val(time);
$("#captchatext").remove();
$("#captchasubmit").removeAttr('disabled');
$("#captchasubmit").css("display", "block");
time--;
$("#captchahidden").val(time);
clearInterval(interval);
}
}, 1000);
});

81
views/js/d.header.js Executable file
View File

@@ -0,0 +1,81 @@
var small = 2;
function reduce() {
$( "header" ).animate({
height: "45px"
}, 100, function() {
// Animation complete.
});
$( "header #logo img" ).animate({
height: "34px"
}, 100, function() {
// Animation complete.
});
$( "header #logo" ).animate({
paddingTop: "3px"
}, 100, function() {
// Animation complete.
});
$( "header li.on-bar" ).animate({
height: "45px"
}, 100, function() {
// Animation complete.
});
$( "header a.on-bar" ).animate({
paddingTop: "15px",
paddingBottom: "5px"
}, 100, function() {
// Animation complete.
});
}
function enlarge() {
$( "header" ).animate({
height: "65px"
}, 100, function() {
// Animation complete.
});
$( "header #logo img" ).animate({
height: "44px"
}, 100, function() {
// Animation complete.
});
$( "header #logo" ).animate({
paddingTop: "8px"
}, 100, function() {
// Animation complete.
});
$( "header li.on-bar" ).animate({
height: "65px"
}, 100, function() {
// Animation complete.
});
$( "header a.on-bar" ).animate({
paddingTop: "25px",
paddingBottom: "15px"
}, 100, function() {
// Animation complete.
});
}
$(window).scroll(function() {
var position = $(window).scrollTop();
if (position>80 && small!=1) {
small = 1;
reduce();
}
else if (position<=80 && small!=0) {
small = 0;
enlarge();
}
});
$(window).ready(function() {
$( "#logo" ).hover(
function() {
$("#kabanologotext").show(100);
}, function() {
$("#kabanologotext").hide(100);
}
)
});

64
views/js/d.map.js Executable file
View File

@@ -0,0 +1,64 @@
var mymap;
$( document ).ready(function() {
// Differents layers for the map
var osmfr = L.tileLayer('//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {maxZoom: 20, attribution: 'Maps © <a href="http://www.openstreetmap.fr">OpenSreetMap France</a>, Data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>'});
var wikimedia = L.tileLayer('//maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png', {maxZoom: 18, attribution: 'Maps © <a href="http://wikimedia.org">Wikimedia</a>, Data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>'});
// Base layers
var baseLayers = {
"OSM France": osmfr,
"OSM Wikimedia": wikimedia,
};
mymap = L.map('mapid', {
zoomControl: false,
layers: [wikimedia],
}).setView([47.018, 3.142], 6);
$("#map-credits").html(wikimedia.getAttribution());
L.control.scale({
position: "bottomleft",
imperial: false
}).addTo(mymap);
var credits = L.easyButton('fa-info',
function(control, mymap){
$("footer").hide();
$("#footer-credits").show();
$("#footer-legend").hide();
}, 'Credits');
var legend = L.easyButton('fa-question',
function(control, mymap){
$("footer").hide();
$("#footer-credits").hide();
$("#footer-legend").show();
}, 'Legend');
L.easyBar([ credits, legend, ], {position: "bottomleft"}).addTo(mymap);
L.control.fullscreen({
position: "bottomleft"
}).addTo(mymap);
L.control.zoom({
zoomOutText: "<i class=\"fa fa-minus\" aria-hidden=\"true\"></i>",
zoomInText: "<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>",
position: "bottomleft"
}).addTo(mymap);
L.control.layers(baseLayers,null,{
position: "bottomright"
}).addTo(mymap);
mymap.removeControl(mymap.attributionControl);
$(".close-link").click(function() {
$("footer").show();
$("#footer-credits").hide();
$("#footer-legend").hide();
});
mymap.on('baselayerchange', function(e) {
$("#map-credits").html(e.layer.getAttribution());
});
});