Last commit
This commit is contained in:
parent
6bf83665f7
commit
a435a1e34d
10 changed files with 102 additions and 44 deletions
|
|
@ -50,38 +50,44 @@
|
|||
"id":"Emozione3",
|
||||
"title":"Pacchetto Emozione3",
|
||||
"description":"20% di sconto sul cofanetto regalo Avventura",
|
||||
"image":"img/promozioni/emozione.png"
|
||||
"image":"img/promozioni/emozione.png",
|
||||
"price":"400"
|
||||
|
||||
},
|
||||
{
|
||||
"id":"Chagall",
|
||||
"title":"Mostra di Chagall",
|
||||
"description":"Biglietto scontato del 10%",
|
||||
"image":"img/promozioni/chagall.png"
|
||||
"image":"img/promozioni/chagall.png",
|
||||
"price":"100"
|
||||
},
|
||||
{
|
||||
"id":"Fiorentina",
|
||||
"title":"Fiorentina Calcio",
|
||||
"description":"Vieni a vedere la Viola allo stadio! Il biglietto ti costa solo 10€ e ti offriamo la birra",
|
||||
"image":"img/promozioni/fiorentina.png"
|
||||
"image":"img/promozioni/fiorentina.png",
|
||||
"price":"1700"
|
||||
},
|
||||
{
|
||||
"id":"NaturaSi",
|
||||
"title":"NaturaSi",
|
||||
"description":"3 confezioni di ragù Alce Nero per te!",
|
||||
"image":"img/promozioni/naturasi.png"
|
||||
"image":"img/promozioni/naturasi.png",
|
||||
"price":"2000"
|
||||
},
|
||||
{
|
||||
"id":"Comisc",
|
||||
"title":"Lucca Comics And Games",
|
||||
"description":"Sconto del 15% sul prezzo del biglietto",
|
||||
"image":"img/promozioni/comics.png"
|
||||
"image":"img/promozioni/comics.png",
|
||||
"price":"1000"
|
||||
},
|
||||
{
|
||||
"id":"Trenitalia",
|
||||
"title":"Trenitalia",
|
||||
"description":"Biglietto per tratta regionale - 15% di sconto!",
|
||||
"image":"img/promozioni/trenitalia.png"
|
||||
"image":"img/promozioni/trenitalia.png",
|
||||
"price":"1500"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -89,15 +95,5 @@
|
|||
"id":"settings",
|
||||
"title":"Impostazioni",
|
||||
"image":"img/Settings.png"
|
||||
},
|
||||
{
|
||||
"id":"allTickets",
|
||||
"title":"Tutti I Biglietti",
|
||||
"image":""
|
||||
},
|
||||
{
|
||||
"id":"allShop",
|
||||
"title":"Tutti Gli Acquisti",
|
||||
"image":""
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
hackatonApp/www/img/inttrenitalia.png
Normal file
BIN
hackatonApp/www/img/inttrenitalia.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 160 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 7 KiB |
|
|
@ -22,6 +22,7 @@
|
|||
<script src="lib/ionic-contrib-tinder-cards/ionic.tdcards.js"></script>
|
||||
<script src="lib/ngCordova/dist/ng-cordova.min.js"></script>
|
||||
<script src="lib/angular-youtube-mb/dist/angular-youtube-embed.min.js"></script>
|
||||
<script src="lib/timer/timer.js"></script>
|
||||
<!-- cordova script (this will be a 404 during development) -->
|
||||
|
||||
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ angular.module('your_app_name.controllers', [])
|
|||
})
|
||||
|
||||
// APP
|
||||
.controller('AppCtrl', function($scope, $ionicConfig) {
|
||||
.controller('AppCtrl', function($scope, $ionicConfig, $ionicLoading, $state, $rootScope) {
|
||||
|
||||
$scope.user={};
|
||||
$scope.user.name="Laura";
|
||||
|
|
@ -13,30 +13,62 @@ angular.module('your_app_name.controllers', [])
|
|||
$scope.user.email="laura.rossi@email.it";
|
||||
$scope.user.telephone="3477608470";
|
||||
$scope.user.picture="img/laura.jpg";
|
||||
$scope.user.score="2450";
|
||||
$scope.takePicture = function(){
|
||||
var cameraOptions = {
|
||||
$scope.user.score=2450;
|
||||
$rootScope.fine=false;
|
||||
function startTimer(duration, $scope, $state) {
|
||||
$rootScope.fine=false;
|
||||
|
||||
var timer = duration, minutes, seconds;
|
||||
var a = setInterval(function ($scope, $state) {
|
||||
minutes = parseInt(timer / 60, 10);
|
||||
seconds = parseInt(timer % 60, 10);
|
||||
|
||||
minutes = minutes < 10 ? "0" + minutes : minutes;
|
||||
seconds = seconds < 10 ? "0" + seconds : seconds;
|
||||
|
||||
console.log(seconds);
|
||||
$ionicLoading.show({
|
||||
template: '<p>Verifico il biglietto...</p><ion-spinner></ion-spinner>'
|
||||
});
|
||||
if (--timer < 0) {
|
||||
timer = duration;
|
||||
console.log("diidi");
|
||||
clearInterval(a);
|
||||
$ionicLoading.hide();
|
||||
$rootScope.fine=true;
|
||||
|
||||
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
$scope.takePicture = function($scope, $state){
|
||||
/* var cameraOptions = {
|
||||
quality: 50,
|
||||
destinationType: Camera.DestinationType.DATA_URL
|
||||
};
|
||||
var success = function(data){
|
||||
$scope.$apply(function () {
|
||||
/*
|
||||
remember to set the image ng-src in $apply,
|
||||
i tried to set it from outside and it doesn't work.
|
||||
*/
|
||||
|
||||
$scope.cameraPic = "data:image/jpeg;base64," + data;
|
||||
|
||||
});
|
||||
};
|
||||
var failure = function(message){
|
||||
alert('Failed because: ' + message);
|
||||
};
|
||||
//call the cordova camera plugin to open the device's camera
|
||||
navigator.camera.getPicture( success , failure , cameraOptions );
|
||||
navigator.camera.getPicture( success , failure , cameraOptions ); */
|
||||
var fiveMinutes = 3;
|
||||
|
||||
startTimer(fiveMinutes, $scope, $state);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
//LOGIN
|
||||
|
|
@ -557,9 +589,9 @@ angular.module('your_app_name.controllers', [])
|
|||
console.log("HOME");
|
||||
})
|
||||
|
||||
.controller('CategoryCtrl', function($scope, $http, $stateParams) {
|
||||
.controller('CategoryCtrl', function($scope, $http, $stateParams, $state, $rootScope, $location) {
|
||||
$scope.category_sources = [];
|
||||
|
||||
$rootScope.fine=false;
|
||||
$scope.categoryId = $stateParams.categoryId;
|
||||
console.log($scope.categoryId);
|
||||
$scope.modifica=false;
|
||||
|
|
@ -567,7 +599,19 @@ angular.module('your_app_name.controllers', [])
|
|||
{
|
||||
$scope.modifica=!$scope.modifica;
|
||||
|
||||
}
|
||||
};
|
||||
$scope.clickFine = function()
|
||||
{
|
||||
$rootScope.fine=false;
|
||||
$location.url('/app/home');
|
||||
$scope.user.score+=100;
|
||||
|
||||
};
|
||||
$scope.compra= function()
|
||||
{
|
||||
alert("comprato");
|
||||
};
|
||||
|
||||
switch($scope.categoryId)
|
||||
{
|
||||
case "addticketwithphoto":
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<span>{{entriesTitle | capitalize}}</span>
|
||||
</ion-nav-title>
|
||||
<ion-content>
|
||||
<img src="img/inttrenitalia.png" style="width:100%;">
|
||||
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<ion-view class="" ng-hide="categoryId==settings'">
|
||||
<ion-view class="" ng-hide="categoryId=='settings'">
|
||||
<ion-nav-title>
|
||||
<span>{{categoryTitle}}</span>
|
||||
</ion-nav-title>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<input type="text" placeholder="Search" ng-hide="categoryId=='settings' || categoryId=='addticketwithphoto'">
|
||||
|
||||
|
||||
<div class="list category-homes">
|
||||
<div ng-hide="categoryId=='shop'" class="list category-homes">
|
||||
<a ng-repeat="source in category_sources" class="item item-icon-right" ui-sref="app.category-entries({categoryId: categoryId, sourceId: (source.title)})">
|
||||
<div class="thumbnail-outer" style="height:80px;">
|
||||
<pre-img ratio="_1_1" helper-class="">
|
||||
|
|
@ -18,8 +18,24 @@
|
|||
<span class="title">{{source.title}}</span>
|
||||
<p class="description">{{source.description}}</p>
|
||||
</div>
|
||||
<i ng-hide="categoryId=='shop'" class="icon ion-arrow-right-c"></i>
|
||||
<i ng-show="categoryId=='shop'" class="icon ion-bag"></i>
|
||||
<i class="icon ion-arrow-right-c"></i>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div ng-show="categoryId=='shop'" class="list category-homes">
|
||||
<a ng-repeat="source in category_sources" class="item item-icon-right" ng-click="compra();">
|
||||
<div class="thumbnail-outer" style="height:80px;">
|
||||
<pre-img ratio="_1_1" helper-class="">
|
||||
<img class="" ng-src="{{source.image}}" spinner-on-load>
|
||||
</pre-img>
|
||||
</div>
|
||||
<div>
|
||||
<span class="title">{{source.title}}</span>
|
||||
<p class="description">{{source.description}}</p>
|
||||
</div>
|
||||
<i class="icon ion-bag">{{source.price}}</i>
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -32,6 +48,9 @@
|
|||
|
||||
<div class="item item-image" ng-show="categoryId=='addticketwithphoto'">
|
||||
<img ng-src="{{cameraPic}}"/>
|
||||
<h5 style="
|
||||
font-size: 0px;">{{fine}}</h5>
|
||||
<a class="button button-icon icon ion-thumbsup" ng-show="fine==true" ng-click="clickFine()"></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -56,23 +75,23 @@
|
|||
<div class="list">
|
||||
<label class="item item-input item-floating-label">
|
||||
<span class="input-label">Nome</span>
|
||||
<input type="text" placeholder="Nome" value="Laura" ng-disabled="modifica">
|
||||
<input type="text" placeholder="Nome" value="Laura" ng-disabled="!modifica">
|
||||
</label>
|
||||
<label class="item item-input item-floating-label">
|
||||
<span class="input-label">Cognome</span>
|
||||
<input type="text" placeholder="Cognome" value="Rossi" ng-disabled="modifica">
|
||||
<input type="text" placeholder="Cognome" value="Rossi" ng-disabled="!modifica">
|
||||
</label>
|
||||
<label class="item item-input item-floating-label">
|
||||
<span class="input-label">Email</span>
|
||||
<input type="email" placeholder="Email" value="laura.rossi@email.it" ng-disabled="modifica">
|
||||
<input type="email" placeholder="Email" value="laura.rossi@email.it" ng-disabled="!modifica">
|
||||
</label>
|
||||
<label class="item item-input item-floating-label">
|
||||
<span class="input-label">Cellulare</span>
|
||||
<input type="text" placeholder="Cellulare" value="3477608470" ng-disabled="modifica">
|
||||
<input type="text" placeholder="Cellulare" value="3477608470" ng-disabled="!modifica">
|
||||
</label>
|
||||
<label class="item item-input item-floating-label">
|
||||
<span class="input-label">Password</span>
|
||||
<input type="password" placeholder="Password" value="passworddifficilissima" ng-disabled="modifica">
|
||||
<input type="password" placeholder="Password" value="passworddifficilissima" ng-disabled="!modifica">
|
||||
</label>
|
||||
<button class="button button-positive-right" style="float:right; border:0;" ng-click="cambiaModifica();">
|
||||
<i ng-show='!modifica' class="icon ion-edit"></i>
|
||||
|
|
@ -82,6 +101,3 @@
|
|||
</div>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
||||
|
||||
gfgr
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
|
||||
</ion-nav-buttons>
|
||||
<ion-nav-title>
|
||||
<span></span>
|
||||
<span>Home</span>
|
||||
</ion-nav-title>
|
||||
<ion-content>
|
||||
<div class="list card">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<ion-content scroll="false">
|
||||
<div class="top-content row">
|
||||
<div class="col col-center">
|
||||
<img ng-src="img/logo.png">
|
||||
<img ng-src="img/logo.png" style="width:100%; padding:5px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-content row">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue