Subversion Repositories eFlore/Applications.cel

Rev

Rev 3287 | Rev 3291 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3287 Rev 3290
Line 155... Line 155...
155
 * Initialise les écouteurs d'événements
155
 * Initialise les écouteurs d'événements
156
 */
156
 */
157
WidgetSaisie.prototype.initEvts = function() {
157
WidgetSaisie.prototype.initEvts = function() {
158
	var lthis = this;
158
	var lthis = this;
159
	// Empêcher que le module carto ne bind ses events partout
159
	// Empêcher que le module carto ne bind ses events partout
160
	$( '#tb-geolocation' ).on( 'submit blur click focus mousedown mouseleave mouseup touchend touchstart change', '.mat-icon-button', function( event ) {
160
	$( '#tb-geolocation' ).on( 'submit blur click focus mousedown mouseleave mouseup touchend touchstart change', '*', function( event ) {
161
		event.preventDefault();
161
		event.preventDefault();
162
		return false;
162
		return false;
163
	});
163
	});
Line 164... Line -...
164
 
-
 
165
 
164
 
166
	// identité
165
	// identité
167
	$( '#deconnexion a' ).click( function( event ) {
166
	$( '#deconnexion a' ).click( function( event ) {
168
		event.preventDefault();
167
		event.preventDefault();
169
		lthis.deconnecterUtilisateur();
168
		lthis.deconnecterUtilisateur();
Line 273... Line 272...
273
  this.connexion( urlAuth, false );
272
  this.connexion( urlAuth, false );
274
};
273
};
Line 275... Line 274...
275
 
274
 
276
WidgetSaisie.prototype.connexion = function( urlAuth, connexionOnOff ) {
275
WidgetSaisie.prototype.connexion = function( urlAuth, connexionOnOff ) {
277
	var lthis = this;
-
 
278
	console.log(urlAuth);
276
	var lthis = this;
279
  $.ajax({
277
  $.ajax({
280
	url: urlAuth,
278
	url: urlAuth,
281
	type: "GET",
279
	type: "GET",
282
	dataType: 'json',
280
	dataType: 'json',
Line 365... Line 363...
365
  input = input.replace( '_', '/' );
363
  input = input.replace( '_', '/' );
366
  return atob( input );
364
  return atob( input );
367
};
365
};
Line 368... Line 366...
368
 
366
 
369
WidgetSaisie.prototype.urlProfilUtilisateur = function( pseudo ) {
367
WidgetSaisie.prototype.urlProfilUtilisateur = function( pseudo ) {
Line 370... Line 368...
370
  var urlPart = ( 'prod' === this.mode ) ? 'www.tela-botanica.org/' : 'beta.tela-botanica.org/test/';
368
  var urlPart = ( 'test' === this.mode ) ? '/test/' : '';
371
 
369
 
Line 372... Line 370...
372
  return 'https://' + urlPart + 'membres/' + pseudo.toLowerCase().replace( ' ', '-' );
370
  return window.location.origin + urlPart + 'membres/' + pseudo.toLowerCase().replace( ' ', '-' );
373
};
371
};
374
 
372