From f219e3dad3c91b02a89f771f2e0c2d4d936dd85c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Guiselin?=
 <jeremy.guiselin@datadoghq.com>
Date: Mon, 6 Mar 2017 16:32:16 -0500
Subject: [PATCH] last fix

---
 scss/prediction.scss                |  6 ++++++
 scss/unlock.scss                    | 14 +++++++++++++-
 www/js/app.js                       | 12 +++++++-----
 www/js/pages/football/template.html |  5 ++++-
 www/js/pages/tennis/controller.js   | 15 +++++++++++++--
 www/js/pages/tennis/template.html   |  5 ++++-
 www/partials/prediction.html        |  2 +-
 www/partials/sport-index.html       |  4 +---
 8 files changed, 49 insertions(+), 14 deletions(-)

diff --git a/scss/prediction.scss b/scss/prediction.scss
index efccbcf..a80000f 100644
--- a/scss/prediction.scss
+++ b/scss/prediction.scss
@@ -143,3 +143,9 @@
     }
   }
 }
+
+.no-games {
+  font-family: OspDin;
+  text-align: center;
+  padding: 50px 0;
+}
diff --git a/scss/unlock.scss b/scss/unlock.scss
index 0695037..44e61c3 100644
--- a/scss/unlock.scss
+++ b/scss/unlock.scss
@@ -36,4 +36,16 @@
       margin-right: 10px;
     }
   }
-}
+
+  @media only screen and (max-width: 325px) {
+    .content {
+        font-size: 23px;
+    }
+  }
+
+  @media only screen and (max-width: 300px) {
+    .content {
+        font-size: 21px;
+    }
+  }
+}
\ No newline at end of file
diff --git a/www/js/app.js b/www/js/app.js
index dc73c3e..fe789f9 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -17,13 +17,14 @@
       "how_to_use_3": "When a 2 green ticks are displayed, it means that our prediction was accurate (the final score matches with the highest percentage.",
       "how_to_use_4": "When a orange tick is displayed, it means that our prediction was accurate in double chance (the final score matches with the 2 highest percentages).",
       "how_to_use_5": "When a red cross is displayed, it means the final score matches with the lowest percentage.",
-      "facebook_link": "fb://page/1964315240459744",
+      "facebook_link": "fb://page/?id=1964315240459744",
       "twitter_link": "https://twitter.com/betskills",
       "instagram_link": "instagram://user?username=betskills",
-      "daily_predictions": "Weekly Predictions",
+      "daily_predictions": "Weekly predictions",
       "all_predictions": "All the predictions",
       "unlock": "Unlock",
       "predictions": "Predictions",
+      "no_games": "There is no game available at the moment.",
       "games": "Games",
       "currency": "£",
       "purchase_payment_error": "An error occured during the payment, please try again.",
@@ -42,10 +43,10 @@
       "who_we_are_6": "Pour plus d'informations vous pouvez consulter nos conditions générales de vente et notre politique de protection des données à l'adresse suivante: ",
       "how_to_use_1": "Nous ne communiquons jamais sur le possible vainqueur d’une rencontre. Nous nous efforçons cependant de conseiller et d’éclairer au maximum nos utilisateurs sur le possible dénouement d’un match. Notre activité s’oriente sur du conseil et de la prédiction plutôt que sur du pronostique.",
       "how_to_use_2": "Nous conseillons à l’ensemble de nos utilisateurs de privilégier le « draw no bet » ou la double chance qui consiste à prendre en compte les 2 pourcentages les plus élevés (1 ou N, 2 ou N ou 1 et 1 ou 2). Nous déconseillons également de combiner un trop grand nombre de matchs.",
-      "how_to_use_3": "Lorsque qu’une rencontre est marquée de 2 ticks verts, cela signifie que notre prédiction est validée (le score finale concorde avec le pourcentage le plus élevé).",
-      "how_to_use_4": "Lorsqu’une rencontre est marquée d’un tick orange, cela signifie que notre prédiction est validée en double chance (le score finale concorde avec le 2ème pourcentage le plus élevé).",
+      "how_to_use_3": "Lorsque qu’une rencontre est marquée de 2 ticks verts, cela signifie que notre prédiction est validée (le score final concorde avec le pourcentage le plus élevé).",
+      "how_to_use_4": "Lorsqu’une rencontre est marquée d’un tick orange, cela signifie que notre prédiction est validée en double chance (le score final concorde avec le 2ème pourcentage le plus élevé).",
       "how_to_use_5": "Lorsqu’une rencontre est marquée d’une croix rouge, cela signifie que le score concorde avec le pourcentage le plus faible.",
-      "facebook_link": "fb://page/1757105857849857",
+      "facebook_link": "fb://page/?id=1757105857849857",
       "twitter_link": "https://twitter.com/betskills_fr",
       "instagram_link": "instagram://user?username=betskills_fr",
       "daily_predictions": "Prédictions de la semaine",
@@ -54,6 +55,7 @@
       "predictions": "Prédictions",
       "games": "Matchs",
       "currency": "€",
+      "no_games": "Aucun match n'est disponible actuellement.",
       "purchase_payment_error": "Une erreur est survenue lors du paiement, veuillez réessayer.",
       "purchase_internal_error": "Une erreur interne est survenue, veuillez contacter l'équipe Betskills pour résoudre le problème.",
       "purchase_ok": "Félicitations, votre transaction a été réalisée avec succès. Vous avez désormais accès aux éléments que vous venez d'acheter."
diff --git a/www/js/pages/football/template.html b/www/js/pages/football/template.html
index 65134c1..08778c0 100644
--- a/www/js/pages/football/template.html
+++ b/www/js/pages/football/template.html
@@ -3,6 +3,9 @@
       <img ui-sref="info" class="info-icon infobulle" src="img/info.png" alt="info">
   </ion-nav-buttons>
   <ion-content class="has-header">
-    <div ng-include src="'partials/sport-index.html'"></div>
+    <div ng-include ng-if="leagues.length > 0" src="'partials/sport-index.html'"></div>
+    <h3 class="no-games" ng-hide="leagues.length > 0">
+    	{{'no_games' | translate}}
+    </h3>
   </ion-content>
 </ion-view>
diff --git a/www/js/pages/tennis/controller.js b/www/js/pages/tennis/controller.js
index cae04ef..976e5f4 100644
--- a/www/js/pages/tennis/controller.js
+++ b/www/js/pages/tennis/controller.js
@@ -91,12 +91,23 @@
 
         var list = angular.element(document.querySelector('#list-packs .list'));
         var ionContent = angular.element(document.querySelector('ion-content'))[0];
+        var ionContentObj = angular.element(document.querySelector('ion-content'));
+        var leagueHeight = angular.element(document.querySelector('.pack-item'))[0].scrollHeight;
 
         if (self.shouldUp && $scope.selected.length > 0) {
-          list.css('marginBottom', '50px');
-          ionContent.scrollTop = ionContent.scrollHeight;
+          list.css('marginBottom', '47px');
+          if (ionic.Platform.isIOS()) {
+            ionContentObj.css('marginBottom', '47px');
+          }
         } else if (self.shouldUp && $scope.selected.length == 0) {
           list.css('marginBottom', '0');
+          if (ionic.Platform.isIOS()) {
+            ionContentObj.css('marginBottom', '0');
+          }
+        }
+
+        if (self.shouldUp && $scope.selected.length > 0) {
+          ionContent.scrollTop = ionContent.scrollHeight + 50;
         }
 
         var price = self.findPrice($scope.selected.length);
diff --git a/www/js/pages/tennis/template.html b/www/js/pages/tennis/template.html
index d6c5bca..77f67cf 100644
--- a/www/js/pages/tennis/template.html
+++ b/www/js/pages/tennis/template.html
@@ -3,6 +3,9 @@
       <img ui-sref="info" class="info-icon infobulle" src="img/info.png" alt="info">
   </ion-nav-buttons>
   <ion-content class="has-header">
-    <div ng-include src="'partials/sport-index.html'"></div>
+    <div ng-include ng-if="leagues.length > 0"src="'partials/sport-index.html'"></div>
+    <h3 class="no-games" ng-hide="leagues.length > 0">
+    	{{'no_games' | translate}}
+    </h3>
   </ion-content>
 </ion-view>
diff --git a/www/partials/prediction.html b/www/partials/prediction.html
index 6b94776..38c8b89 100644
--- a/www/partials/prediction.html
+++ b/www/partials/prediction.html
@@ -5,7 +5,7 @@
   </div>
   <div class="center">
     <div class="title">
-      {{ freePrediction.league.name }} - <span class="date">{{locale === 'fr' ? (freePrediction.date | date: "dd/MM/yy") : (freePrediction.date | date: "MM/dd/yy")}}</span>
+      {{ freePrediction.league.name }}   <span class="date">{{locale === 'fr' ? (freePrediction.date | date: "dd/MM/yy") : (freePrediction.date | date: "MM/dd/yy")}}</span>
     </div>
     <div class="figures">
       <div class="figure">1</div>
diff --git a/www/partials/sport-index.html b/www/partials/sport-index.html
index ff4a614..4ce0dd0 100644
--- a/www/partials/sport-index.html
+++ b/www/partials/sport-index.html
@@ -14,9 +14,7 @@
       <div ion-img-cache-bg class="pack-background" ng-style="{'background-image':'url({{pictureUrl}}league/{{league.picture}})'}">
         <div class="title">{{league.name}}</div>
         <div class="subtitle subtitle-upper">
-            {{locale == 'fr' ? league.french_description : league.english_description}}
-            -
-            {{league.predictions_number}} {{"games" | translate}}
+            {{locale == 'fr' ? league.french_description : league.english_description}} - {{league.predictions_number}} {{"games" | translate}}
         </div>
         <div class="subtitle">
           {{parseDate(league.min_date)}}
-- 
GitLab