Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3984 → Rev 3985

/trunk/widget/modules/photo/squelettes/js/WidgetPhotoCommun.js
92,7 → 92,7
return chaine.replace(/[^a-z0-9_\s]/gi, '').replace(/[_\s]/g, '_');
}
 
WidgetPhotoCommun.prototype.envoyerVersService = function ( mode, url, donnees = null, callback = () => {}) {
WidgetPhotoCommun.prototype.envoyerVersService = function ( mode, url, token = null, donnees = null, callback = () => {}) {
const lthis = this;
 
var xhr = new XMLHttpRequest();
99,6 → 99,10
xhr.open(mode, url, true);
xhr.setRequestHeader("Content-Type", "application/json");
 
if(token){
xhr.setRequestHeader("Authorization", token);
}
 
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status >= 200 && xhr.status < 300) {