Adaptation script d'intégration au site segal.bzh
This commit is contained in:
parent
d40f5e9d2d
commit
a76ea60192
@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
@ -43,52 +43,52 @@ var initialise = function () { return __awaiter(void 0, void 0, void 0, function
|
|||||||
case 0:
|
case 0:
|
||||||
_a.trys.push([0, 2, , 3]);
|
_a.trys.push([0, 2, , 3]);
|
||||||
converter = new FreeDatas2HTML("CSV");
|
converter = new FreeDatas2HTML("CSV");
|
||||||
converter.parser.setRemoteSource({ url: "https://www.segal.bzh/data/medias/partenaires/partenaires.csv" });
|
converter.parser.setRemoteSource({ url: "http://localhost:8080/datas/partenaires.csv" });
|
||||||
return [4, converter.run()];
|
return [4, converter.run()];
|
||||||
case 1:
|
case 1:
|
||||||
_a.sent();
|
_a.sent();
|
||||||
renderSettings = {
|
renderSettings = {
|
||||||
allBegining: "<ul class=\"ulpartenairelvl1\">",
|
allBegining: "<ul class=\"ulpartenairelvl1\">",
|
||||||
allEnding: "</ul>",
|
allEnding: "</ul>",
|
||||||
datasLinesDisplaying: "<li><h3>##0##</h3><ul class=\"ulpartenairelvl2\"><li>##1##</li>##2##<li>Lieu(x) d'exercice : ##4####5##.</li>##6####7####8##</ul></li>"
|
datasLinesDisplaying: "<li><h3>##0##</h3><ul class=\"ulpartenairelvl2\"><li>##1##</li>##2##<li>Lieu(x) d'exercice : ##4####5##</li>##6####7####8##</ul></li>"
|
||||||
};
|
};
|
||||||
rendName2HTML = function (values) {
|
rendName2HTML = function (values) {
|
||||||
if (values["Fiche partenaire"] !== undefined && values["Fiche partenaire"].trim() !== "")
|
if (values["Fiche partenaire"] !== undefined && values["Fiche partenaire"].trim() !== "")
|
||||||
return "<a href=\"" + values['Fiche partenaire'].trim() + "\" title=\"Fiche partenaire de " + values["Nom commercial"].trim() + "\">" + values["Nom commercial"].trim() + "</a>";
|
return "<a href=\"".concat(values['Fiche partenaire'].trim(), "\" title=\"Fiche partenaire de ").concat(values["Nom commercial"].trim(), "\">").concat(values["Nom commercial"].trim(), "</a>");
|
||||||
else
|
else
|
||||||
return values["Nom commercial"].trim();
|
return values["Nom commercial"].trim();
|
||||||
};
|
};
|
||||||
rendSSDomaine2HTML = function (values) {
|
rendSSDomaine2HTML = function (values) {
|
||||||
if (values["Sous activités"] !== undefined && values["Sous activités"].trim() !== "")
|
if (values["Sous activités"] !== undefined && values["Sous activités"].trim() !== "")
|
||||||
return "<li>" + values["Sous activités"].trim() + "</li>";
|
return "<li>".concat(values["Sous activités"].trim(), "</li>");
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
rendLieuxVente2HTML = function (values) {
|
rendLieuxVente2HTML = function (values) {
|
||||||
if (values["Ville (si adresse pertinente)"] !== undefined && values["Ville (si adresse pertinente)"].trim() !== "")
|
if (values["Ville (si adresse pertinente)"] !== undefined && values["Ville (si adresse pertinente)"].trim() !== "")
|
||||||
return values["Adresse (si pertinente)"].trim() + ", " + values["Ville (si adresse pertinente)"].trim();
|
return "".concat(values["Adresse (si pertinente)"].trim(), ", ").concat(values["Ville (si adresse pertinente)"].trim(), ". ");
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
rendTel2HTML = function (values) {
|
rendTel2HTML = function (values) {
|
||||||
if (values["Téléphone"].trim() !== "")
|
if (values["Téléphone"].trim() !== "")
|
||||||
return "<li>✆ <a href=\"tel:" + values['Téléphone'].trim() + "\" title=\"Appelez " + values['Nom commercial'].trim() + "\">" + values['Téléphone'].trim() + "</a></li>";
|
return "<li>✆ <a href=\"tel:".concat(values['Téléphone'].trim(), "\" title=\"Appelez ").concat(values['Nom commercial'].trim(), "\">").concat(values['Téléphone'].trim(), "</a></li>");
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
rendEmail2HTML = function (values) {
|
rendEmail2HTML = function (values) {
|
||||||
if (values["Courriel"].trim() !== "")
|
if (values["Courriel"].trim() !== "")
|
||||||
return "<li>📧 <a href=\"mailto:" + values['Courriel'].trim() + "?subject=Le segal\">Courriel</a></li>";
|
return "<li>📧 <a href=\"mailto:".concat(values['Courriel'].trim(), "?subject=Le segal\">Courriel</a></li>");
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
rendSite2HTML = function (values) {
|
rendSite2HTML = function (values) {
|
||||||
if (values["www"].trim() !== "")
|
if (values["www"].trim() !== "")
|
||||||
return "<li><a href=\"" + values['www'].trim() + "\" target=\"_blank\" rel='noopener'>Sa page internet</a></li>";
|
return "<li><a href=\"".concat(values['www'].trim(), "\" target=\"_blank\" rel='noopener'>Sa page internet</a></li>");
|
||||||
else if (values["FB"].trim() !== "")
|
else if (values["FB"].trim() !== "")
|
||||||
return "<li><a href=\"" + values['FB'].trim() + "\" target=\"_blank\" rel='noopener'>Sa page facebook</a></li>";
|
return "<li><a href=\"".concat(values['FB'].trim(), "\" target=\"_blank\" rel='noopener'>Sa page facebook</a></li>");
|
||||||
else if (values["IG"].trim() !== "")
|
else if (values["IG"].trim() !== "")
|
||||||
return "<li><a href=\"" + values['IG'].trim() + "\" target=\"_blank\" rel='noopener'>Sa page instagram</a></li>";
|
return "<li><a href=\"".concat(values['IG'].trim(), "\" target=\"_blank\" rel='noopener'>Sa page instagram</a></li>");
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
|
@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
@ -84,28 +84,28 @@ var FreeDatas2HTML = (function () {
|
|||||||
set: function (elt) {
|
set: function (elt) {
|
||||||
this._datasViewElt = FreeDatas2HTML.checkInDOMById(elt);
|
this._datasViewElt = FreeDatas2HTML.checkInDOMById(elt);
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(FreeDatas2HTML.prototype, "datas", {
|
Object.defineProperty(FreeDatas2HTML.prototype, "datas", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._datas;
|
return this._datas;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(FreeDatas2HTML.prototype, "fields", {
|
Object.defineProperty(FreeDatas2HTML.prototype, "fields", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._fields;
|
return this._fields;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(FreeDatas2HTML.prototype, "nbDatasValid", {
|
Object.defineProperty(FreeDatas2HTML.prototype, "nbDatasValid", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._nbDatasValid;
|
return this._nbDatasValid;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(FreeDatas2HTML.prototype, "fields2Rend", {
|
Object.defineProperty(FreeDatas2HTML.prototype, "fields2Rend", {
|
||||||
@ -126,14 +126,14 @@ var FreeDatas2HTML = (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(FreeDatas2HTML.prototype, "datas2Rend", {
|
Object.defineProperty(FreeDatas2HTML.prototype, "datas2Rend", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._datas2Rend;
|
return this._datas2Rend;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
FreeDatas2HTML.prototype.getSortingFunctionForField = function (datasFieldNb) {
|
FreeDatas2HTML.prototype.getSortingFunctionForField = function (datasFieldNb) {
|
||||||
@ -216,7 +216,7 @@ var FreeDatas2HTML = (function () {
|
|||||||
this._datasSortingFunctions.push(checkedFunction);
|
this._datasSortingFunctions.push(checkedFunction);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
FreeDatas2HTML.prototype.refreshView = function (paginationSelected) {
|
FreeDatas2HTML.prototype.refreshView = function (paginationSelected) {
|
||||||
|
@ -26,7 +26,7 @@ var Pagination = (function () {
|
|||||||
}
|
}
|
||||||
this._selectedValue = value;
|
this._selectedValue = value;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(Pagination.prototype, "options", {
|
Object.defineProperty(Pagination.prototype, "options", {
|
||||||
@ -55,14 +55,14 @@ var Pagination = (function () {
|
|||||||
}
|
}
|
||||||
this._options = options;
|
this._options = options;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(Pagination.prototype, "pages", {
|
Object.defineProperty(Pagination.prototype, "pages", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._pages;
|
return this._pages;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Pagination.prototype.options2HTML = function () {
|
Pagination.prototype.options2HTML = function () {
|
||||||
|
@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
@ -71,7 +71,7 @@ var ParserForCSV = (function () {
|
|||||||
get: function () {
|
get: function () {
|
||||||
return this._datasRemoteSource;
|
return this._datasRemoteSource;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForCSV.prototype, "datas2Parse", {
|
Object.defineProperty(ParserForCSV.prototype, "datas2Parse", {
|
||||||
@ -84,21 +84,21 @@ var ParserForCSV = (function () {
|
|||||||
else
|
else
|
||||||
this._datas2Parse = datas.trim();
|
this._datas2Parse = datas.trim();
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForCSV.prototype, "parseResults", {
|
Object.defineProperty(ParserForCSV.prototype, "parseResults", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._parseResults;
|
return this._parseResults;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForCSV.prototype, "privateOptions", {
|
Object.defineProperty(ParserForCSV.prototype, "privateOptions", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._privateOptions;
|
return this._privateOptions;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
ParserForCSV.prototype.parse = function () {
|
ParserForCSV.prototype.parse = function () {
|
||||||
|
@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
@ -55,14 +55,14 @@ var ParserForHTML = (function () {
|
|||||||
get: function () {
|
get: function () {
|
||||||
return this._datasRemoteSource;
|
return this._datasRemoteSource;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForHTML.prototype, "document2Parse", {
|
Object.defineProperty(ParserForHTML.prototype, "document2Parse", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._document2Parse;
|
return this._document2Parse;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForHTML.prototype, "fieldsSelector", {
|
Object.defineProperty(ParserForHTML.prototype, "fieldsSelector", {
|
||||||
@ -75,7 +75,7 @@ var ParserForHTML = (function () {
|
|||||||
else
|
else
|
||||||
this._fieldsSelector = selector.trim();
|
this._fieldsSelector = selector.trim();
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForHTML.prototype, "rowsSelector", {
|
Object.defineProperty(ParserForHTML.prototype, "rowsSelector", {
|
||||||
@ -88,7 +88,7 @@ var ParserForHTML = (function () {
|
|||||||
else
|
else
|
||||||
this._rowsSelector = selector.trim();
|
this._rowsSelector = selector.trim();
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForHTML.prototype, "datasSelector", {
|
Object.defineProperty(ParserForHTML.prototype, "datasSelector", {
|
||||||
@ -101,14 +101,14 @@ var ParserForHTML = (function () {
|
|||||||
else
|
else
|
||||||
this._datasSelector = selector.trim();
|
this._datasSelector = selector.trim();
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForHTML.prototype, "parseResults", {
|
Object.defineProperty(ParserForHTML.prototype, "parseResults", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._parseResults;
|
return this._parseResults;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
ParserForHTML.prototype.parse = function () {
|
ParserForHTML.prototype.parse = function () {
|
||||||
|
@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
@ -52,7 +52,7 @@ var ParserForJSON = (function () {
|
|||||||
get: function () {
|
get: function () {
|
||||||
return this._datasRemoteSource;
|
return this._datasRemoteSource;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForJSON.prototype, "datas2Parse", {
|
Object.defineProperty(ParserForJSON.prototype, "datas2Parse", {
|
||||||
@ -65,14 +65,14 @@ var ParserForJSON = (function () {
|
|||||||
else
|
else
|
||||||
this._datas2Parse = datas.trim();
|
this._datas2Parse = datas.trim();
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(ParserForJSON.prototype, "parseResults", {
|
Object.defineProperty(ParserForJSON.prototype, "parseResults", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._parseResults;
|
return this._parseResults;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
ParserForJSON.prototype.parse = function () {
|
ParserForJSON.prototype.parse = function () {
|
||||||
|
@ -32,7 +32,7 @@ var RemoteSource = (function () {
|
|||||||
this._url = url.trim();
|
this._url = url.trim();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(RemoteSource.prototype, "headers", {
|
Object.defineProperty(RemoteSource.prototype, "headers", {
|
||||||
@ -50,7 +50,7 @@ var RemoteSource = (function () {
|
|||||||
this._headers.push({ key: header.key, value: header.value.trim() });
|
this._headers.push({ key: header.key, value: header.value.trim() });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(RemoteSource.prototype, "withCredentials", {
|
Object.defineProperty(RemoteSource.prototype, "withCredentials", {
|
||||||
@ -60,7 +60,7 @@ var RemoteSource = (function () {
|
|||||||
set: function (credentials) {
|
set: function (credentials) {
|
||||||
this._withCredentials = credentials;
|
this._withCredentials = credentials;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
RemoteSource.prototype.getFetchSettings = function () {
|
RemoteSource.prototype.getFetchSettings = function () {
|
||||||
|
@ -16,7 +16,7 @@ var Render = (function () {
|
|||||||
else
|
else
|
||||||
this._fields = fields;
|
this._fields = fields;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Render.prototype.rend2HTML = function () {
|
Render.prototype.rend2HTML = function () {
|
||||||
|
@ -39,14 +39,14 @@ var SearchEngine = (function () {
|
|||||||
get: function () {
|
get: function () {
|
||||||
return this._converter;
|
return this._converter;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(SearchEngine.prototype, "datasViewElt", {
|
Object.defineProperty(SearchEngine.prototype, "datasViewElt", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._datasViewElt;
|
return this._datasViewElt;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(SearchEngine.prototype, "btnTxt", {
|
Object.defineProperty(SearchEngine.prototype, "btnTxt", {
|
||||||
@ -59,21 +59,21 @@ var SearchEngine = (function () {
|
|||||||
else
|
else
|
||||||
console.error(errors.searchBtnTxtFail);
|
console.error(errors.searchBtnTxtFail);
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(SearchEngine.prototype, "inputValue", {
|
Object.defineProperty(SearchEngine.prototype, "inputValue", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._inputValue;
|
return this._inputValue;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(SearchEngine.prototype, "fields2Search", {
|
Object.defineProperty(SearchEngine.prototype, "fields2Search", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._fields2Search;
|
return this._fields2Search;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
SearchEngine.prototype.filter2HTML = function () {
|
SearchEngine.prototype.filter2HTML = function () {
|
||||||
@ -81,13 +81,13 @@ var SearchEngine = (function () {
|
|||||||
this.placeholder = "Please enter at least NB characters.";
|
this.placeholder = "Please enter at least NB characters.";
|
||||||
var html = "<form id=\"freeDatas2HTMLSearch\">";
|
var html = "<form id=\"freeDatas2HTMLSearch\">";
|
||||||
if (this.label !== "")
|
if (this.label !== "")
|
||||||
html += "<label for=\"freeDatas2HTMLSearchTxt\">" + this.label + "</label>";
|
html += "<label for=\"freeDatas2HTMLSearchTxt\">".concat(this.label, "</label>");
|
||||||
html += "<input type=\"search\" id=\"freeDatas2HTMLSearchTxt\" name=\"freeDatas2HTMLSearchTxt\"";
|
html += "<input type=\"search\" id=\"freeDatas2HTMLSearchTxt\" name=\"freeDatas2HTMLSearchTxt\"";
|
||||||
if (this.nbCharsForSearch > 0)
|
if (this.nbCharsForSearch > 0)
|
||||||
html += " placeholder=\"" + this.placeholder.replace("NB", "" + this.nbCharsForSearch) + "\"";
|
html += " placeholder=\"".concat(this.placeholder.replace("NB", "" + this.nbCharsForSearch), "\"");
|
||||||
else if (this.placeholder !== "")
|
else if (this.placeholder !== "")
|
||||||
html += " placeholder=\"" + this.placeholder + "\"";
|
html += " placeholder=\"".concat(this.placeholder, "\"");
|
||||||
html += "> <input type=\"submit\" id=\"freeDatas2HTMLSearchBtn\" value=\"" + this._btnTxt + "\"></form>";
|
html += "> <input type=\"submit\" id=\"freeDatas2HTMLSearchBtn\" value=\"".concat(this._btnTxt, "\"></form>");
|
||||||
this._datasViewElt.eltDOM.innerHTML = html;
|
this._datasViewElt.eltDOM.innerHTML = html;
|
||||||
var searchInput = document.getElementById("freeDatas2HTMLSearchTxt"), mySearch = this;
|
var searchInput = document.getElementById("freeDatas2HTMLSearchTxt"), mySearch = this;
|
||||||
searchInput.addEventListener("input", function (e) {
|
searchInput.addEventListener("input", function (e) {
|
||||||
|
@ -26,49 +26,49 @@ var Selector = (function () {
|
|||||||
get: function () {
|
get: function () {
|
||||||
return this._converter;
|
return this._converter;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(Selector.prototype, "datasViewElt", {
|
Object.defineProperty(Selector.prototype, "datasViewElt", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._datasViewElt;
|
return this._datasViewElt;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(Selector.prototype, "datasFieldNb", {
|
Object.defineProperty(Selector.prototype, "datasFieldNb", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._datasFieldNb;
|
return this._datasFieldNb;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(Selector.prototype, "name", {
|
Object.defineProperty(Selector.prototype, "name", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._name;
|
return this._name;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(Selector.prototype, "selectedValues", {
|
Object.defineProperty(Selector.prototype, "selectedValues", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._selectedValues;
|
return this._selectedValues;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(Selector.prototype, "separator", {
|
Object.defineProperty(Selector.prototype, "separator", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._separator;
|
return this._separator;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(Selector.prototype, "values", {
|
Object.defineProperty(Selector.prototype, "values", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._values;
|
return this._values;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Selector.prototype.setValues = function () {
|
Selector.prototype.setValues = function () {
|
||||||
|
@ -17,21 +17,21 @@ var SortingField = (function () {
|
|||||||
get: function () {
|
get: function () {
|
||||||
return this._converter;
|
return this._converter;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(SortingField.prototype, "datasFieldNb", {
|
Object.defineProperty(SortingField.prototype, "datasFieldNb", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._datasFieldNb;
|
return this._datasFieldNb;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(SortingField.prototype, "fieldsDOMSelector", {
|
Object.defineProperty(SortingField.prototype, "fieldsDOMSelector", {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this._fieldsDOMSelector;
|
return this._fieldsDOMSelector;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
Object.defineProperty(SortingField.prototype, "order", {
|
Object.defineProperty(SortingField.prototype, "order", {
|
||||||
@ -41,7 +41,7 @@ var SortingField = (function () {
|
|||||||
set: function (setting) {
|
set: function (setting) {
|
||||||
this._order = setting;
|
this._order = setting;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
SortingField.prototype.field2HTML = function () {
|
SortingField.prototype.field2HTML = function () {
|
||||||
|
@ -16,7 +16,7 @@ var MixedFieldsRender = (function () {
|
|||||||
else
|
else
|
||||||
this._fields = fields;
|
this._fields = fields;
|
||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: false,
|
||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
MixedFieldsRender.prototype.rend2HTML = function () {
|
MixedFieldsRender.prototype.rend2HTML = function () {
|
||||||
|
@ -1 +1,2 @@
|
|||||||
;
|
;
|
||||||
|
export {};
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
export {};
|
@ -7,6 +7,7 @@ const initialise=async () =>
|
|||||||
{
|
{
|
||||||
// Création d'un convertisseur parsant des données transmises en JSON :
|
// Création d'un convertisseur parsant des données transmises en JSON :
|
||||||
const converter=new FreeDatas2HTML("CSV");
|
const converter=new FreeDatas2HTML("CSV");
|
||||||
|
//converter.parser.setRemoteSource({ url: "http://localhost:8080/datas/partenaires.csv"});
|
||||||
converter.parser.setRemoteSource({ url: "https://www.segal.bzh/data/medias/partenaires/partenaires.csv"});
|
converter.parser.setRemoteSource({ url: "https://www.segal.bzh/data/medias/partenaires/partenaires.csv"});
|
||||||
// Parsage des données, qui ne sont pas encore affichées :
|
// Parsage des données, qui ne sont pas encore affichées :
|
||||||
await converter.run();
|
await converter.run();
|
||||||
@ -15,8 +16,9 @@ const initialise=async () =>
|
|||||||
{
|
{
|
||||||
allBegining: "<ul class=\"ulpartenairelvl1\">",
|
allBegining: "<ul class=\"ulpartenairelvl1\">",
|
||||||
allEnding: "</ul>",
|
allEnding: "</ul>",
|
||||||
datasLinesDisplaying: `<li><h3>##0##</h3><ul class=\"ulpartenairelvl2\"><li>##1##</li>##2##<li>Lieu(x) d'exercice : ##4####5##.</li>##6####7####8##</ul></li>`
|
datasLinesDisplaying: `<li><h3>##0##</h3><ul class=\"ulpartenairelvl2\"><li>##1##</li>##2##<li>Lieu(x) d'exercice : ##4####5##</li>##6####7####8##</ul></li>`
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fonctions spécifiques pour créer les liens hypertextes :
|
// Fonctions spécifiques pour créer les liens hypertextes :
|
||||||
const rendName2HTML=(values: {[index: string]:string} ) : string =>
|
const rendName2HTML=(values: {[index: string]:string} ) : string =>
|
||||||
{
|
{
|
||||||
@ -37,7 +39,7 @@ const initialise=async () =>
|
|||||||
const rendLieuxVente2HTML=(values: {[index: string]:string} ) : string =>
|
const rendLieuxVente2HTML=(values: {[index: string]:string} ) : string =>
|
||||||
{
|
{
|
||||||
if(values["Ville (si adresse pertinente)"] !== undefined && values["Ville (si adresse pertinente)"].trim() !== "")
|
if(values["Ville (si adresse pertinente)"] !== undefined && values["Ville (si adresse pertinente)"].trim() !== "")
|
||||||
return `${values["Adresse (si pertinente)"].trim()}, ${values["Ville (si adresse pertinente)"].trim()}`;
|
return `${values["Adresse (si pertinente)"].trim()}, ${values["Ville (si adresse pertinente)"].trim()}. `;
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user