Skip to content
Snippets Groups Projects
Commit 6f6caac5 authored by Jeremy Guiselin's avatar Jeremy Guiselin
Browse files

last wave fix

parent 2454ff3b
Branches
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.Dimago.Betskills" version="2.0.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="com.dimago.betskills" version="2.0.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Betskills</name> <name>Betskills</name>
<description> <description>
Betskills app to see predictions of football and tennis games. Betskills app to see predictions of football and tennis games.
...@@ -44,32 +44,32 @@ ...@@ -44,32 +44,32 @@
<access origin="cdvfile://*" /> <access origin="cdvfile://*" />
<allow-intent href="cdvfile://*" /> <allow-intent href="cdvfile://*" />
<preference name="iosPersistentFileLocation" value="Library" /> <preference name="iosPersistentFileLocation" value="Library" />
<icon src="resources/ios/icon/icon.png" width="57" height="57"/> <icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/> <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/> <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/> <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
<icon src="resources/ios/icon/icon-40@3x.png" width="120" height="120"/> <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/> <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/> <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/> <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/> <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/> <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/> <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/> <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/> <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/> <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
<icon src="resources/ios/icon/icon-83.5@2x.png" width="167" height="167"/> <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/> <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/> <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/> <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/> <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/> <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/> <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/> <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" height="2732"/> <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/> <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/> <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/> <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
</platform> </platform>
<platform name="android"> <platform name="android">
<preference name="android-minSdkVersion" value="23" /> <preference name="android-minSdkVersion" value="23" />
...@@ -80,18 +80,19 @@ ...@@ -80,18 +80,19 @@
<preference name="android-build-tool" value="gradle" /> <preference name="android-build-tool" value="gradle" />
<access origin="cdvfile://*" /> <access origin="cdvfile://*" />
<allow-intent href="cdvfile://*" /> <allow-intent href="cdvfile://*" />
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/> <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/> <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/> <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/> <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/> <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/> <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/> <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/> <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/> <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform> </platform>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" /> <icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<plugin name="com.jcjee.plugins.emailcomposer" spec="https://github.com/jcjee/email-composer.git" />
</widget> </widget>
...@@ -37,5 +37,5 @@ ...@@ -37,5 +37,5 @@
} }
.info-section { .info-section {
margin-bottom: 10px; margin-bottom: 10px !important;
} }
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
], ],
'football': [ 'football': [
'ligue_1', 'ligue_1',
'premiere_league', 'premier_league',
'bundesliga', 'bundesliga',
'liga_bbva', 'liga_bbva',
'liga_nos', 'liga_nos',
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
{ productId: 'liga_nos', title: 'Liga NOS', description: 'Liga NOS pack', price: '0.99€' }, { productId: 'liga_nos', title: 'Liga NOS', description: 'Liga NOS pack', price: '0.99€' },
{ productId: 'serie_a', title: 'Serie A', description: 'Serie A pack', price: '0.99€' }, { productId: 'serie_a', title: 'Serie A', description: 'Serie A pack', price: '0.99€' },
{ productId: 'eredivisie', title: 'Eredivisie', description: 'Eredivisie pack', price: '0.99€' }, { productId: 'eredivisie', title: 'Eredivisie', description: 'Eredivisie pack', price: '0.99€' },
{ productId: 'premiere_league', title: 'Premiere League', description: 'Premiere League pack', price: '0.99€' }, { productId: 'premier_league', title: 'Premiere League', description: 'Premiere League pack', price: '0.99€' },
{ productId: 'champions_league', title: 'Champions League', description: 'Champions League pack', price: '1.99€' }, { productId: 'champions_league', title: 'Champions League', description: 'Champions League pack', price: '1.99€' },
{ productId: 'full_champions_league', title: 'Full Champions League', description: 'Full Champions League pack', price: '2.99€' }, { productId: 'full_champions_league', title: 'Full Champions League', description: 'Full Champions League pack', price: '2.99€' },
{ productId: 'football_full_2', 'title': 'Tennis 2', description: 'Tennis 2 pack', price: '1.99€' }, { productId: 'football_full_2', 'title': 'Tennis 2', description: 'Tennis 2 pack', price: '1.99€' },
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
$scope.price = 0; $scope.price = 0;
$scope.predictionsNumber = 0; $scope.predictionsNumber = 0;
/** /**
End Scope variables End Scope variables
**/ **/
...@@ -83,7 +84,10 @@ ...@@ -83,7 +84,10 @@
$scope.selected.push(league); $scope.selected.push(league);
$scope.predictionsNumber += league.predictions_number; $scope.predictionsNumber += league.predictions_number;
} }
$scope.price = self.findPrice($scope.selected.length);
var price = self.findPrice($scope.selected.length);
$scope.price = price;
$scope.$parent.$parent.select($scope.selected, price, $scope.predictionsNumber, 'football', self.findPack($scope.selected.length));
} }
}; };
...@@ -231,7 +235,6 @@ ...@@ -231,7 +235,6 @@
}) })
); );
$scope.$on('$destroy', function(){ $scope.$on('$destroy', function(){
angular.forEach(deregistrationCallbackList, function(deregistrationCallback){ angular.forEach(deregistrationCallbackList, function(deregistrationCallback){
deregistrationCallback(); deregistrationCallback();
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
}; };
$scope.sendEmail = function () { $scope.sendEmail = function () {
//cordova plugin add https://github.com/jcjee/email-composer.git
if(window.plugins && window.plugins.emailComposer) { if(window.plugins && window.plugins.emailComposer) {
window.plugins.emailComposer.showEmailComposerWithCallback(function(result) { window.plugins.emailComposer.showEmailComposerWithCallback(function(result) {
console.log(result); console.log(result);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<img class="info-icon" ng-click="myGoBack()" src="img/back.png" alt=""> <img class="info-icon" ng-click="myGoBack()" src="img/back.png" alt="">
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-buttons side="right"> <ion-nav-buttons side="right">
<img class="info-icon" ng-click="sendEmail()" src="img/message.png" alt=""> <img class="info-icon infobulle" ng-click="sendEmail()" src="img/message.png" alt="">
</ion-nav-buttons> </ion-nav-buttons>
<ion-content class="has-header info"> <ion-content class="has-header info">
<h3 class="title-section" translate="info_title_1"></h3> <h3 class="title-section" translate="info_title_1"></h3>
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
<p class="content" translate="who_we_are_5"></p> <p class="content" translate="who_we_are_5"></p>
<p class="content"> <p class="content">
{{"who_we_are_6"|translate}} {{"who_we_are_6"|translate}}
<a ng-href="www.betskills.com/terms-and-conditions" onclick="window.open(this.href, '_system', 'location=yes'); return false;">www.betskills.com/terms-and-conditions</a> <a ng-href="http://betskills.com/terms-and-conditions" onclick="window.open(this.href, '_system', 'location=yes'); return false;">www.betskills.com/terms-and-conditions</a>
</p> </p>
<h3 class="title-section" translate="info_title_3"></h3> <h3 class="title-section info-section" translate="info_title_3"></h3>
<p class="content" translate="how_to_use_1"></p> <p class="content" translate="how_to_use_1"></p>
<p class="content" translate="how_to_use_2"></p> <p class="content" translate="how_to_use_2"></p>
<p class="content" translate="how_to_use_3"></p> <p class="content" translate="how_to_use_3"></p>
......
/**
* Created by jeremyguiselin on 08/02/2017.
*/
/**
* Created by jeremyguiselin on 10/12/2016.
*/
(function (angular) {
"use strict";
/**
* @ngdoc controller
* @name InfoController
*
* @description
* Controller for the info page.
*
* @ngInject
*/
function TabsController(
$ionicHistory,
$scope,
PurchaseService
) {
var deregistrationCallbackList = [];
var self = this;
self.uuid = window.cordova ? ionic.Platform.device().uuid : '7f4a6a40e5c87157';
self.sport = '';
self.pack = '';
// cleanup
$scope.$on('$destroy', function(){
angular.forEach(
deregistrationCallbackList,
function(deregistrationCallback){
deregistrationCallback();
});
deregistrationCallbackList = null;
});
$scope.selected = [];
$scope.price = 0;
$scope.predictionsNumber = 0;
$scope.select = function (selected, price, predictionsNumber, sport, pack) {
$scope.selected = selected;
$scope.price = price;
$scope.predictionsNumber = predictionsNumber;
self.sport = sport;
self.pack = pack
};
$scope.buyContent = function () {
if (self.pack !== '') {
PurchaseService.buyContent(self.uuid, self.pack, $scope.selected);
}
};
}
angular.module('starter')
.controller('TabsController', TabsController);
})(angular);
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
views: { views: {
'content': { 'content': {
templateUrl: 'js/pages/tabs/template.html', templateUrl: 'js/pages/tabs/template.html',
controller: 'TabsController as tabsCtrl'
} }
} }
}); });
......
...@@ -12,4 +12,9 @@ ...@@ -12,4 +12,9 @@
<ion-nav-view name="tab-notification"></ion-nav-view> <ion-nav-view name="tab-notification"></ion-nav-view>
</ion-tab> </ion-tab>
</ion-tabs> </ion-tabs>
<div id="unlock" class="unlock" ng-class="{active : selected.length > 0}">
<div class="content" ng-click="buyContent()">
{{"unlock" | translate}} {{predictionsNumber}} {{"predictions" | translate}} <span>{{price}}</span>
</div>
</div>
</ion-view> </ion-view>
...@@ -83,7 +83,10 @@ ...@@ -83,7 +83,10 @@
$scope.selected.push(league); $scope.selected.push(league);
$scope.predictionsNumber += league.predictions_number; $scope.predictionsNumber += league.predictions_number;
} }
$scope.price = self.findPrice($scope.selected.length);
var price = self.findPrice($scope.selected.length);
$scope.price = price;
$scope.$parent.$parent.select($scope.selected, price, $scope.predictionsNumber, 'tennis', self.findPack());
} }
}; };
...@@ -188,6 +191,18 @@ ...@@ -188,6 +191,18 @@
} }
}; };
this.findPack = function () {
var selectedPack = '';
if ($scope.selected.length === 1) {
selectedPack = 'tennis';
} else if($scope.selected.length > 1 && $scope.selected.length <= 6) {
var packNumber = $scope.selected.length - 1;
selectedPack = 'tennis_full_'+ packNumber;
}
return selectedPack;
};
/** /**
End Controller functions End Controller functions
**/ **/
...@@ -202,7 +217,6 @@ ...@@ -202,7 +217,6 @@
}) })
); );
$scope.$on('$destroy', function(){ $scope.$on('$destroy', function(){
angular.forEach(deregistrationCallbackList, function(deregistrationCallback){ angular.forEach(deregistrationCallbackList, function(deregistrationCallback){
deregistrationCallback(); deregistrationCallback();
...@@ -210,7 +224,6 @@ ...@@ -210,7 +224,6 @@
deregistrationCallbackList = null; deregistrationCallbackList = null;
}); });
$scope.$on("$ionicView.beforeEnter", function(event, data){ $scope.$on("$ionicView.beforeEnter", function(event, data){
$ionicLoading.show({ $ionicLoading.show({
template: '<ion-spinner icon="ripple" class="spinner-assertive"></ion-spinner>', template: '<ion-spinner icon="ripple" class="spinner-assertive"></ion-spinner>',
......
...@@ -30,9 +30,4 @@ ...@@ -30,9 +30,4 @@
</a> </a>
</ion-item> </ion-item>
</ion-list> </ion-list>
<div class="unlock" ng-class="{active : selected.length > 0}">
<a class="content" ng-click="buyContent()">
{{"unlock" | translate}} {{predictionsNumber}} {{"predictions" | translate}} <span>{{price}}</span>
</div>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment