Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3208 Rev 3209
Line 1... Line 1...
1
// configuration
1
// configuration
2
var urlRacine = 'https://www.tela-botanica.org',
2
/*var urlRacine = 'https://www.tela-botanica.org',
3
  config = {
3
  config = {
4
    prod: {
4
    prod: {
5
      urlWidgetNavigation : urlRacine + '/widget:cel:saisie2',
5
      urlWidgetNavigation : urlRacine + '/widget:cel:saisie2',
6
      urlBaseAuth : 'https://www.tela-botanica.org/service:annuaire:auth'
6
      urlBaseAuth : 'https://www.tela-botanica.org/service:annuaire:auth'
7
    },
7
    },
Line 12... Line 12...
12
    local: {
12
    local: {
13
      urlWidgetNavigation : 'https://localhost/widget:cel:saisie2',
13
      urlWidgetNavigation : 'https://localhost/widget:cel:saisie2',
14
      urlBaseAuth : 'https://localhost/service:annuaire:auth'
14
      urlBaseAuth : 'https://localhost/service:annuaire:auth'
15
    }
15
    }
16
  }
16
  }
-
 
17
  */
17
// // Prod: décommenter ci-dessus et commenter ou supprimer ci-dessous
18
// // Prod: décommenter ci-dessus et commenter ou supprimer ci-dessous
18
// var urlRacine = 'http://localhost',
19
 var urlRacine = 'https://beta.tela-botanica.org',
19
//   config = {
20
   config = {
20
//     prod: {
21
     prod: {
21
//       urlWidgetNavigation : urlRacine + '/widget:cel:saisie2',
22
       urlWidgetNavigation : urlRacine + '/widget:cel:saisie2',
22
//       urlBaseAuth : 'https://www.tela-botanica.org/service:annuaire:auth'
23
       urlBaseAuth : 'https://beta.tela-botanica.org/service:annuaire:auth'
23
//     },
24
     },
24
//     test: {
25
     test: {
25
//       urlWidgetNavigation : urlRacine + '/widget:cel:saisie2',
26
       urlWidgetNavigation : urlRacine + '/widget:cel:saisie2',
26
//       urlBaseAuth : 'https://api.tela-botanica.test/service:annuaire:auth'
27
       urlBaseAuth : 'https://api.tela-botanica.test/service:annuaire:auth'
27
//     },
28
     },
28
//     local: {
29
     local: {
29
//       urlWidgetNavigation : 'https://localhost/widget:cel:saisie2',
30
       urlWidgetNavigation : 'https://localhost/widget:cel:saisie2',
30
//       urlBaseAuth : 'https://localhost/service:annuaire:auth'
31
      urlBaseAuth : 'https://localhost/service:annuaire:auth'
31
//     }
32
     }
32
//   }
33
   }
Line 33... Line 34...
33
 
34
 
34
/**
35
/**
35
 * Charge la barre de navigation depuis le widget:reseau:navigation dans un <div id="tb-navigation"> , s'il existe
36
 * Charge la barre de navigation depuis le widget:reseau:navigation dans un <div id="tb-navigation"> , s'il existe
36
 * dans la page appelante.
37
 * dans la page appelante.
Line 97... Line 98...
97
 * Interroge le SSO pour connaître le statut de l'utilisateur, et change le menu
98
 * Interroge le SSO pour connaître le statut de l'utilisateur, et change le menu
98
 * à droite de la barre en fonction
99
 * à droite de la barre en fonction
99
 */
100
 */
100
function chargerStatutSSO( urlBaseAuth ) {
101
function chargerStatutSSO( urlBaseAuth ) {
101
  var urlAuth = urlBaseAuth + '/identite';
102
  var urlAuth = urlBaseAuth + '/identite';
102
  // definirUtilisateur( 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvd3d3LnRlbGEtYm90YW5pY2Eub3JnIiwidG9rZW5faWQiOiJ0Yl9hdXRoIiwic3ViIjoiaWRpckB0ZWxhLWJvdGFuaWNhLm9yZyIsImlhdCI6MTU0Mjk3MjIxNiwiZXhwIjoxNTQyOTg0NDQ1LCJzY29wZXMiOlsidGVsYS1ib3RhbmljYS5vcmciXSwiaWQiOiI0NDA4NCIsInByZW5vbSI6IklkaXIiLCJub20iOiJBbGxpY2hlIiwicHNldWRvIjoiSWRpciBBbGxpY2hlIiwicHNldWRvVXRpbGlzZSI6dHJ1ZSwiaW50aXR1bGUiOiJJZGlyIEFsbGljaGUiLCJhdmF0YXIiOiJcL1wvd3d3LmdyYXZhdGFyLmNvbVwvYXZhdGFyXC83ODU3ZmY2MWE5Yjk5NWE4NjIyMzdkMmEyYzYxODAyMT9zPTUwJnI9ZyZkPW1tIiwiZ3JvdXBlcyI6W10sInBlcm1pc3Npb25zIjpbImVkaXRvciJdLCJub21XaWtpIjoiSWRpckFsbGljaGUiLCJkYXRlRGVybmllcmVNb2RpZiI6MTQ5NTIwNjM3Nn0.D3rySwuCDsSl6JAmjncwgwg4gUJijZjeaYeDYHsw3uI' );
-
 
103
  // Prod: décommenter $.ajax ci-dessous et supprimer la ligne ci-dessus
103
  // Prod: décommenter $.ajax ci-dessous et supprimer la ligne ci-dessus
104
  $.ajax({
104
  $.ajax({
105
    url: urlAuth,
105
    url: urlAuth,
106
    type: "GET",
106
    type: "GET",
107
    dataType: 'json',
107
    dataType: 'json',