Initial commit with existing project
This commit is contained in:
75
js/ajoutBeneficiaire.js
Normal file
75
js/ajoutBeneficiaire.js
Normal file
@@ -0,0 +1,75 @@
|
||||
// JavaScript source code
|
||||
$(function () {
|
||||
var errorClass = 'has-error';
|
||||
var warningClass = 'has-warning';
|
||||
var successClass = 'has-success';
|
||||
|
||||
var NomInput = $('#Nom');
|
||||
var PrenomInput = $('#Prenom');
|
||||
var DdnInput = $('#DDN');
|
||||
var dateRGX = /^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)dd$/;
|
||||
var hommeRadio = $('#homme');
|
||||
var femmeRadio = $('#femme');
|
||||
var courriel = $('#email');
|
||||
var emailRGX = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$/;
|
||||
var APE = $('input[name="APE"]:checked').val();
|
||||
|
||||
var phoneRGX = /[0-9-()+]{3,20}/;
|
||||
|
||||
var submitButton = $('#submitButton');
|
||||
var updateButton = $('#updateButton');
|
||||
|
||||
// Show and hide
|
||||
$('#APE-0').on('change', function () {
|
||||
$('#IdentifiantPE').parent().parent().hide(400);
|
||||
$('#passPE').parent().parent().hide(400);
|
||||
});
|
||||
$('#APE-1').on('change', function () {
|
||||
$('#IdentifiantPE').parent().parent().show(400);
|
||||
$('#passPE').parent().parent().show(400);
|
||||
})
|
||||
|
||||
$('#AAdresse-0').on('change', {vsb : false}, function (e) {
|
||||
$('label[for="Adresse"]').parent().hide(400);
|
||||
$('label[for="NatureAdresse"]').parent().hide(400);
|
||||
$('label[for="AdressePrioritaire"]').parent().hide(400);
|
||||
});
|
||||
$('#AAdresse-1').on('change', function () {
|
||||
$('label[for="Adresse"]').parent().show(400);
|
||||
$('label[for="NatureAdresse"]').parent().show(400);
|
||||
$('label[for="AdressePrioritaire"]').parent().show(400);
|
||||
});
|
||||
|
||||
// Submit verification
|
||||
submitButton.click(function () {
|
||||
if (!emailRGX.test(courriel)) {
|
||||
courriel.parent().parent().addClass(errorClass);
|
||||
}
|
||||
|
||||
if (NomInput.val() === '') {
|
||||
NomInput.parent().parent().addClass(errorClass);
|
||||
}
|
||||
|
||||
if (PrenomInput.val() === '') {
|
||||
PrenomInput.parent().parent().addClass(errorClass);
|
||||
}
|
||||
|
||||
if (DdnInput.val() === '') {
|
||||
DdnInput.parent().parent().parent().addClass(errorClass);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
NomInput.on('input propertychange paste', function () {
|
||||
NomInput.parent().parent().removeClass(errorClass);
|
||||
});
|
||||
|
||||
PrenomInput.on('input propertychange paste', function () {
|
||||
PrenomInput.parent().parent().removeClass(errorClass);
|
||||
});
|
||||
|
||||
DdnInput.on('input propertychange paste', function () {
|
||||
DdnInput.parent().parent().parent().removeClass(errorClass);
|
||||
});
|
||||
});
|
19
js/beneficiaireProfil.js
Normal file
19
js/beneficiaireProfil.js
Normal file
@@ -0,0 +1,19 @@
|
||||
// JavaScript source code
|
||||
$(function () {
|
||||
|
||||
//init
|
||||
$('#AddVisitForm').hide(); // Hidden on load
|
||||
//$('#today').
|
||||
|
||||
//show and hide
|
||||
$('#ShowAddVisitForm').on('click', function () {
|
||||
$('#AddVisitForm').show(400);
|
||||
$('#ShowAddVisitForm').parent().parent().hide(400);
|
||||
});
|
||||
|
||||
$('#HideAddVisitForm').on('click', function () {
|
||||
$('#ShowAddVisitForm').parent().parent().show(400);
|
||||
$('#AddVisitForm').hide(400);
|
||||
})
|
||||
|
||||
});
|
25
js/connexion.js
Normal file
25
js/connexion.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// JavaScript source code
|
||||
$(function () {
|
||||
var usernameInput = $('#usernameInput');
|
||||
var passwordInput = $('#passwordInput');
|
||||
var submitButton = $('#submit');
|
||||
|
||||
submitButton.click(function () {
|
||||
if (usernameInput.val() === '') {
|
||||
usernameInput.parent().parent().addClass('has-warning');
|
||||
}
|
||||
|
||||
if (passwordInput.val() === '') {
|
||||
passwordInput.parent().parent().addClass('has-warning');
|
||||
}
|
||||
});
|
||||
|
||||
usernameInput.on('input propertychange paste', function () {
|
||||
usernameInput.parent().parent().removeClass('has-warning');
|
||||
});
|
||||
|
||||
passwordInput.on('input propertychange paste', function () {
|
||||
passwordInput.parent().parent().removeClass('has-warning');
|
||||
});
|
||||
|
||||
});
|
28
js/index.js
Normal file
28
js/index.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// JavaScript source code
|
||||
$(function () {
|
||||
var beneficiaireInput = $('#beneficiaireInput');
|
||||
var beneficiaireSearch = $('#beneficiaireSearch');
|
||||
var benevoleInput = $('#benevoleInput');
|
||||
var benevoleSearch = $('#benevoleSearch');
|
||||
|
||||
beneficiaireSearch.click(function () {
|
||||
if (beneficiaireInput.val() === '') {
|
||||
beneficiaireInput.parent().addClass('has-warning');
|
||||
}
|
||||
});
|
||||
|
||||
beneficiaireInput.on('input propertychange paste', function () {
|
||||
beneficiaireInput.parent().removeClass('has-warning');
|
||||
});
|
||||
|
||||
benevoleSearch.click(function () {
|
||||
if (benevoleInput.val() === '') {
|
||||
benevoleInput.parent().addClass('has-warning');
|
||||
}
|
||||
});
|
||||
|
||||
benevoleInput.on('input propertychange paste', function () {
|
||||
benevoleInput.parent().removeClass('has-warning');
|
||||
});
|
||||
|
||||
});
|
1
js/listeBeneficiaire.js
Normal file
1
js/listeBeneficiaire.js
Normal file
@@ -0,0 +1 @@
|
||||
// JavaScript source code
|
27
js/shared.js
Normal file
27
js/shared.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// JavaScript source code
|
||||
$(function () {
|
||||
var headerSearchInput = $('#headerSearchInput');
|
||||
var headerSearchButton = $('#headerSearchButton');
|
||||
|
||||
headerSearchButton.click(function () {
|
||||
if (headerSearchInput.val() === '') {
|
||||
headerSearchInput.parent().addClass('has-warning');
|
||||
}
|
||||
});
|
||||
|
||||
headerSearchInput.on('input propertychange paste', function () {
|
||||
headerSearchInput.parent().removeClass('has-warning');
|
||||
});
|
||||
|
||||
// col-xs header and footer overflow fix
|
||||
// Handle Resize event and set body paddings with header and footer heights.
|
||||
$(window).resize(function () {
|
||||
var headerHeight = $('body > header:first-of-type > nav:first-of-type').outerHeight(true) + 'px';
|
||||
$('body').css('padding-top', headerHeight);
|
||||
|
||||
var footerHeight = $('body > footer:last-of-type').outerHeight(true) + 'px';
|
||||
$('body').css('padding-bottom', footerHeight);
|
||||
});
|
||||
|
||||
|
||||
});
|
2320
js/vendor/bootstrap.js
vendored
Normal file
2320
js/vendor/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
js/vendor/bootstrap.min.js
vendored
Normal file
7
js/vendor/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9831
js/vendor/jquery-2.2.0.js
vendored
Normal file
9831
js/vendor/jquery-2.2.0.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
js/vendor/modernizr-2.8.3-respond-1.4.2.min.js
vendored
Normal file
11
js/vendor/modernizr-2.8.3-respond-1.4.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
js/vendor/npm.js
vendored
Normal file
13
js/vendor/npm.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
Reference in New Issue
Block a user