Skip to content
Snippets Groups Projects
Commit e1fc5ed9 authored by Jérémy Guiselin's avatar Jérémy Guiselin
Browse files

Fix

parent 07377752
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"ionic-img-cache": "^1.1.1" "ionic-img-cache": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"platform.js": "platform#^1.3.3", "platform.js": "platform#^1.3.4",
"ionic-platform-web-client": "^0.7.1" "ionic-platform-web-client": "^0.7.1"
} }
} }
...@@ -38,6 +38,11 @@ ...@@ -38,6 +38,11 @@
deviceData.token = 'tokenCannotBeCreated'; deviceData.token = 'tokenCannotBeCreated';
} }
if (deviceData.token != 'tokenCannotBeCreated') {
window.FirebasePlugin.subscribe(locale);
console.log("Device has subscribed to " + locale + " topic")
}
} else { } else {
//Mock deviceData //Mock deviceData
deviceData = { deviceData = {
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
prediction.prediction_win_second, prediction.prediction_win_second,
prediction.prediction_draw prediction.prediction_draw
]; ];
percentages.sort(); percentages.sort(function(a, b){return a-b});
if (percentages.indexOf(value) === 2) { if (percentages.indexOf(value) === 2) {
return "main-prediction"; return "main-prediction";
} else if (percentages.indexOf(value) === 1) { } else if (percentages.indexOf(value) === 1) {
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
'green-tick' 'green-tick'
]; ];
percentages.sort(); percentages.sort(function(a, b){return a-b});
var predictionWin = null; var predictionWin = null;
if (prediction.winner) { if (prediction.winner) {
if (prediction.winner === -1) { if (prediction.winner === -1) {
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
prediction.prediction_win_first, prediction.prediction_win_first,
prediction.prediction_win_second prediction.prediction_win_second
]; ];
percentages.sort(); percentages.sort(function(a, b){return a-b});
if (percentages.indexOf(value) === 1) { if (percentages.indexOf(value) === 1) {
return "main-prediction"; return "main-prediction";
} }
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
'green-tick' 'green-tick'
]; ];
percentages.sort(); percentages.sort(function(a, b){return a-b});
var predictionWin = null; var predictionWin = null;
if (prediction.winner) { if (prediction.winner) {
predictionWin = prediction.prediction_win_second; predictionWin = prediction.prediction_win_second;
......
<div class="set" ng-repeat="set in freePrediction.score track by set"> <div class="set" ng-repeat="set in freePrediction.score track by $index">
<span class="score-element" ng-repeat="score in set track by score">{{score}}</span> <span class="score-element" ng-repeat="score in set track by score">{{score}}</span>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment