Browse Source

https://assistance.opentalent.fr/browse/V8-2502

Olivier Massot 4 years ago
parent
commit
bd753e6862
21 changed files with 39 additions and 14 deletions
  1. 8 7
      doc/problems_resolutions/cross_domain_auth.md
  2. 6 1
      ot_templating/Resources/Public/assets/Classic/script/structures.js
  3. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-blue.css
  4. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-blue.css.map
  5. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-green.css
  6. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-green.css.map
  7. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-grey.css
  8. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-grey.css.map
  9. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-light-blue.css
  10. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-light-blue.css.map
  11. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-light-red.css
  12. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-light-red.css.map
  13. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-orange.css
  14. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-orange.css.map
  15. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-purple.css
  16. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-purple.css.map
  17. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-red.css
  18. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-red.css.map
  19. 25 6
      ot_templating/Resources/Public/assets/Classic/style/module/_structuresframe.scss
  20. 0 0
      ot_templating/Resources/Public/assets/Classic/style/style.css
  21. 0 0
      ot_templating/Resources/Public/assets/Classic/style/style.css.map

+ 8 - 7
doc/problems_resolutions/cross_domain_auth.md

@@ -73,7 +73,7 @@ Je teste dans mon navigateur:
 
 
 Raté.
 Raté.
 
 
-### 2- SetCookie + <img>
+### 2- SetCookie.php + `<img>`
 
 
 Plus de détails sur la solution ici: https://subinsb.com/set-same-cookie-on-different-domains/
 Plus de détails sur la solution ici: https://subinsb.com/set-same-cookie-on-different-domains/
 
 
@@ -90,7 +90,7 @@ Je teste de la même façon que pour la solution 1
 Le cookie est bien présent: Yes!
 Le cookie est bien présent: Yes!
 
 
 
 
-### 2- SetCookie + <img>
+### 2- SetCookie depuis la page de login
 
 
 J'ajoute à docker/apps/opentalent-admin-2.0/src/app/config/routing/main.js, ligne 79 :
 J'ajoute à docker/apps/opentalent-admin-2.0/src/app/config/routing/main.js, ligne 79 :
 
 
@@ -123,19 +123,20 @@ On décide de laisser tomber cette méthode pour le moment.
 
 
 ## Solution retenue et mise en oeuvre
 ## Solution retenue et mise en oeuvre
 
 
-On récupère le champs otherWebsite de la structure
+On récupère le champs otherWebsite de la structure(db: opentalent, table: Parameters)
 
 
 Si ce champs ne matche pas la regex `https?:\/\/.*\.opentalent\.fr`
 Si ce champs ne matche pas la regex `https?:\/\/.*\.opentalent\.fr`
 
 
-Alors, on insère la ligne:
+Alors, on insère la ligne suivante aux pages du logiciel:
 
 
     <img src="https://<domain>/typo3conf/ext/ot_connect/setCookies.php?bearer=<bearer>" alt="" style="display:none;" />
     <img src="https://<domain>/typo3conf/ext/ot_connect/setCookies.php?bearer=<bearer>" alt="" style="display:none;" />
 
 
 où:
 où:
-* <domain> est le champs otherWebsite de la table Parameters de la structure à laquelle le user est connecté
-* <bearer> est le token bearer du user connecté
+
+* `<domain>` est le champs otherWebsite de la table Parameters de la structure à laquelle le user est connecté
+* `<bearer>` est le token BEARER du user connecté
 
 
 Le setCookie appelé vérifie que le referer est bien en opentalent.fr. Si oui, et si
 Le setCookie appelé vérifie que le referer est bien en opentalent.fr. Si oui, et si
 la requête a un paramètre BEARER, alors il créé le cookie correspondant dans le bon domaine.
 la requête a un paramètre BEARER, alors il créé le cookie correspondant dans le bon domaine.
 
 
-
+> https://blog.theodo.com/2016/10/how-to-track-your-users-over-several-domains/

+ 6 - 1
ot_templating/Resources/Public/assets/Classic/script/structures.js

@@ -175,7 +175,6 @@ $(document).ready(function() {
 
 
     // Does the given structure match the current query
     // Does the given structure match the current query
     function matchCurrentQuery(structure) {
     function matchCurrentQuery(structure) {
-
         // Is the structure a member of the website federation?
         // Is the structure a member of the website federation?
         if (![structure.n1Id, structure.n2Id, structure.n3Id, structure.n4Id, structure.n5Id].includes(organizationId)) {
         if (![structure.n1Id, structure.n2Id, structure.n3Id, structure.n4Id, structure.n5Id].includes(organizationId)) {
             return false;
             return false;
@@ -228,6 +227,10 @@ $(document).ready(function() {
                 structure.longitude > area[2] ||
                 structure.longitude > area[2] ||
                 structure.latitude > area[3]
                 structure.latitude > area[3]
             ) {
             ) {
+                if (structure.id == 498) {
+                    console.log(structure.longitude, structure.latitude, area);
+                    console.log(structure.longitude < area[0], structure.latitude < area[1], structure.longitude > area[2], structure.latitude > area[3])
+                }
                 return false;
                 return false;
             }
             }
         }
         }
@@ -522,6 +525,7 @@ $(document).ready(function() {
             // already in map view
             // already in map view
             return;
             return;
         }
         }
+        listenMapMoves = true;
         structureFrame.removeClass('list-view');
         structureFrame.removeClass('list-view');
         structureFrame.addClass('map-view');
         structureFrame.addClass('map-view');
 
 
@@ -538,6 +542,7 @@ $(document).ready(function() {
             // already in list view
             // already in list view
             return;
             return;
         }
         }
+        listenMapMoves = false;
         structureFrame.removeClass('map-view');
         structureFrame.removeClass('map-view');
         structureFrame.addClass('list-view');
         structureFrame.addClass('list-view');
 
 

File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-blue.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-blue.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-green.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-green.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-grey.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-grey.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-light-blue.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-light-blue.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-light-red.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-light-red.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-orange.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-orange.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-purple.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-purple.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-red.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-red.css.map


+ 25 - 6
ot_templating/Resources/Public/assets/Classic/style/module/_structuresframe.scss

@@ -6,7 +6,7 @@ $input-border-color: #bfbfbf;
 
 
 .ot-structures-frame, .ot-structures-frame-details {
 .ot-structures-frame, .ot-structures-frame-details {
   @include flex;
   @include flex;
-  font-family: "Helvetica Neue Bold Condensed", "Helvetica Neue", Arial, serif;
+  font-family: "Helvetica Neue", Arial, serif;
   font-stretch: condensed;
   font-stretch: condensed;
 
 
   header {
   header {
@@ -219,17 +219,24 @@ $input-border-color: #bfbfbf;
   .structure-search select {
   .structure-search select {
     color: $btn-background-color;
     color: $btn-background-color;
     padding: 4px 6px;
     padding: 4px 6px;
-    margin: 3px 1.5%;
+    margin: 3px 2%;
     font-weight: 750;
     font-weight: 750;
     width: 22%;
     width: 22%;
     min-width: 110px;
     min-width: 110px;
     font-size: 12px;
     font-size: 12px;
   }
   }
 
 
+  .structure-search select:first-child {
+    margin-left: 0;
+  }
+  .structure-search select:last-child {
+    margin-right: 0;
+  }
+
   .structure-search .reset-search {
   .structure-search .reset-search {
     background: none;
     background: none;
     color: $btn-background-color;
     color: $btn-background-color;
-    margin: 0 6px 6px 6px;
+    margin: 0 6px 6px 0;
     cursor: pointer;
     cursor: pointer;
     height: 36px;
     height: 36px;
     border: solid 2px $btn-background-color;
     border: solid 2px $btn-background-color;
@@ -240,7 +247,7 @@ $input-border-color: #bfbfbf;
     background-color: $btn-background-color;
     background-color: $btn-background-color;
     color: $btn-text-color;
     color: $btn-text-color;
     font-weight: 750;
     font-weight: 750;
-    margin: 0 6px 6px 6px;
+    margin: 0 0 6px 6px;
     cursor: pointer;
     cursor: pointer;
     height: 36px;
     height: 36px;
     border: none;
     border: none;
@@ -392,7 +399,15 @@ $input-border-color: #bfbfbf;
 
 
   .filters select, .filters button {
   .filters select, .filters button {
     height: 52px;
     height: 52px;
-    margin: 3px 0.5%;
+    margin: 3px 0.75%;
+  }
+
+  .filters .reset-search {
+    margin-left: 0;
+  }
+  
+  .filters .submit-search {
+    margin-right: 0;
   }
   }
 
 
   .filters select {
   .filters select {
@@ -400,7 +415,11 @@ $input-border-color: #bfbfbf;
   }
   }
 
 
   .filters button {
   .filters button {
-    width: 10%;
+    width: 10.5%;
+  }
+
+  .structure-col {
+    align-items: normal;
   }
   }
 
 
   .structure-col-results {
   .structure-col-results {

File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/style.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/style.css.map


Some files were not shown because too many files changed in this diff