diff --git a/src/vendor/css/custom.css b/src/vendor/css/custom.css
index 64f84bd..510bb15 100644
--- a/src/vendor/css/custom.css
+++ b/src/vendor/css/custom.css
@@ -1,10 +1,12 @@
/* IDeal */
html,
-body { height: 100% }
+body {
+ height: 100%;
+ background-color: #f5f5f5;
+}
body { padding-top: 54px }
-body { background-color: #f5f5f5 }
@media (min-width: 992px) {
body { padding-top: 56px }
}
@@ -39,6 +41,8 @@ img {
.textBold { font-weight: bold }
.cursorAsPointer { cursor:pointer }
+
+
#userPage { display: none; }
#partnerPage { display: none; }
#favoritePage { display: none; }
diff --git a/src/vendor/document/RGPD_EN.docx b/src/vendor/document/RGPD_EN.docx
new file mode 100644
index 0000000..2da5a3c
Binary files /dev/null and b/src/vendor/document/RGPD_EN.docx differ
diff --git a/src/vendor/document/RGPD_EN.pdf b/src/vendor/document/RGPD_EN.pdf
new file mode 100644
index 0000000..749a2e3
Binary files /dev/null and b/src/vendor/document/RGPD_EN.pdf differ
diff --git a/src/vendor/document/RGPD_FR.docx b/src/vendor/document/RGPD_FR.docx
new file mode 100644
index 0000000..b9c966a
Binary files /dev/null and b/src/vendor/document/RGPD_FR.docx differ
diff --git a/src/vendor/document/RGPD_FR.pdf b/src/vendor/document/RGPD_FR.pdf
new file mode 100644
index 0000000..2895e1f
Binary files /dev/null and b/src/vendor/document/RGPD_FR.pdf differ
diff --git a/src/vendor/img/background.jpg b/src/vendor/img/background.jpg
new file mode 100644
index 0000000..9e163ad
Binary files /dev/null and b/src/vendor/img/background.jpg differ
diff --git a/src/vendor/img/ideal-logo-HD.png b/src/vendor/img/ideal-logo-HD.png
new file mode 100644
index 0000000..96817fe
Binary files /dev/null and b/src/vendor/img/ideal-logo-HD.png differ
diff --git a/src/vendor/img/ideal-logo.png b/src/vendor/img/ideal-logo.png
new file mode 100644
index 0000000..58af0bf
Binary files /dev/null and b/src/vendor/img/ideal-logo.png differ
diff --git a/src/vendor/js/authentification.js b/src/vendor/js/authentification.js
index 4362f76..262e180 100644
--- a/src/vendor/js/authentification.js
+++ b/src/vendor/js/authentification.js
@@ -37,7 +37,7 @@ function oauthSignIn() {
}
function checkLoginPwd (mail, pwd){
- var url = "http://localhost:8888/user"
+ var url = urlServer + "user"
var checkLogin = false;
$.support.cors = true;
@@ -67,7 +67,7 @@ function checkLoginPwd (mail, pwd){
function getToken(id, mail, pwd){
//var signin = function() {
- var tokenUrl = "http://localhost:8888/oauth2/token";
+ var tokenUrl = urlServer + "oauth2/token";
var params = {"grant_type":"password",
"client_id":id,
diff --git a/src/vendor/js/custom.js b/src/vendor/js/custom.js
index 91b67f5..85f19a1 100644
--- a/src/vendor/js/custom.js
+++ b/src/vendor/js/custom.js
@@ -1,13 +1,16 @@
var divArray = ['#articlePage', '#userPage', '#favoritePage', '#partnerPage', '#administrationPage', '#addOfferPage']; //Don't forget add DIV in custom.css
+var urlServer = "http://78.192.12.79:18080";
+var urlArticle = urlServer + "/article";
+var urlUser = urlServer + "/user";
$(function(){
/*$('#inputConfirmPasswordSignUp').change(function() {
var aBool = isValidatePassword();
});*/
- initArticleJson("http://localhost:8888/article");
- initTableUserJson("http://localhost:8888/user");
- initTableArticleJson("http://localhost:8888/article");
+ initArticleJson();
+ initTableUserJson();
+ initTableArticleJson();
$('#goUser').click(function() {
@@ -47,9 +50,35 @@ $(function(){
alert("J'ai terminé la function");
});
+ $('#btnAddOffer').click(function() {
+ alert("Je lance la function");
+ //alert($("#articleName").val(), $("#articleDescription").val(), $("#articlePrice").val());
+ addArticle($("#articleName").val(), $("#articleDescription").val(), $("#articlePrice").val());
+ alert("J'ai terminé la function");
+ });
+
});
+function addArticle(articleName, description, price) {
+ console.log(articleName);
+ console.log(description);
+ console.log(parseFloat(price));
+ price = parseFloat(price);
+ $.support.cors = true;
+ $.ajax(
+ {
+ contentType: 'application/json',
+ type: 'post',
+ dataType: 'json',
+ data: JSON.stringify ({name : 'Test', img : 0, description : 'Testons', price : 100.5}),
+ url: urlArticle,
+ error: (xhr, status, error) => { alert("ERROR");/* var errorMessage = xhr.responseJSON.message */ }
+
+ }).done((json) => { alert("OKK");/*S'exécute en cas de succès de la requête*/ });
+}
+//application/json
+//contentType: 'application/json',
function showDiv(arrayOfDiv, idDiv) {
for (var id in arrayOfDiv) {
if (arrayOfDiv[id] === idDiv) { $(arrayOfDiv[id]).show(); }
@@ -85,10 +114,10 @@ function isValidPassword() {
return false;
}
-function initArticleJson(url){
+function initArticleJson(){
$.support.cors = true;
$.getJSON(
- url,
+ urlArticle,
function(data){
if (data.length > 1) {
$.each(data, function (key, val) {
@@ -99,10 +128,10 @@ function initArticleJson(url){
);
}
-function initTableUserJson(url){
+function initTableUserJson(){
$.support.cors = true;
$.getJSON(
- url,
+ urlUser,
function(data){
if (data.length > 1) {
//alert(data.length);
@@ -115,10 +144,10 @@ function initTableUserJson(url){
);
}
-function initTableArticleJson(url){
+function initTableArticleJson(){
$.support.cors = true;
$.getJSON(
- url,
+ urlArticle,
function(data){
if (data.length > 1) {
$.each(data, function (key, val) {
diff --git a/src/vendor/js/translate.js b/src/vendor/js/translate.js
index 5102ec7..8ed0b17 100644
--- a/src/vendor/js/translate.js
+++ b/src/vendor/js/translate.js
@@ -54,7 +54,11 @@ i18next.init({
"tradAddOffer" : "Add offer",
"tradAdministration" : "Administration",
"tradAdd" : "Add",
- "tradUpdate" : "Update"
+ "tradUpdate" : "Update",
+ "tradArticleName" : "Article name",
+ "tradTermsOfUse" : "By checking this box you accept the",
+ "tradGetPersoData" : "Get my personal data",
+ "tradDeletePersoData" : "Delete my account and my personal data"
}
},
"fr-FR": {
@@ -92,7 +96,11 @@ i18next.init({
"tradAddOffer" : "Ajouter une offre",
"tradAdministration" : "Administration",
"tradAdd" : "Ajouter",
- "tradUpdate" : "Mise à jour"
+ "tradUpdate" : "Mise à jour",
+ "tradArticleName" : "Nom de l'article",
+ "tradTermsOfUse" : "En cochant cette case vous acceptez le",
+ "tradGetPersoData" : "Récupérer mes données personnels",
+ "tradDeletePersoData" : "Supprimer mon compte ainsi que mes données personnels"
}
}
}
@@ -133,7 +141,10 @@ function updateContent() {
$('.tradAdministration').text(i18next.t('tradAdministration'));
$('.tradAdd').text(i18next.t('tradAdd'));
$('.tradUpdate').text(i18next.t('tradUpdate'));
-
+ $('.tradArticleName').text(i18next.t('tradArticleName'));
+ $('.tradTermsOfUse').text(i18next.t('tradTermsOfUse'));
+ $('.tradGetPersoData').text(i18next.t('tradGetPersoData'));
+ $('.tradDeletePersoData').text(i18next.t('tradDeletePersoData'));
}
function changeLng(lng) {