Aggiunto Photocamera

This commit is contained in:
Lorenzo Iovino 2016-01-30 18:42:06 +01:00
parent 314cefdc70
commit 35ed8465b5
15 changed files with 137 additions and 163 deletions

View file

@ -0,0 +1 @@
{"app_id":"8f8adae8","api_key":"52ee0b2198eb660371fbc95ab8d0d107ce58b962fda15a74"}

View file

@ -1,6 +1,6 @@
{ {
"name": "ionFullApp", "name": "ionFullApp",
"app_id": "", "app_id": "8f8adae8",
"gulpStartupTasks": [ "gulpStartupTasks": [
"sass", "sass",
"templatecache", "templatecache",

View file

@ -29,10 +29,13 @@ $pre-img-ratios: append($pre-img-ratios, $home-categories-img-ratio);
position: absolute; position: absolute;
left: 10px; left: 10px;
width: 40px; width: 40px;
height:80px;
.thumbnail .thumbnail
{ {
width: 100%; width: 100%;
height:80px;
} }
} }

View file

@ -2,7 +2,38 @@
{ {
"id":"booking", "id":"booking",
"title":"Prenota", "title":"Prenota",
"image":"img/feeds/news.jpg" "image":"img/feeds/news.jpg",
"home_sources":[
{
"id":"Trenitalia",
"title":"Trenitalia",
"description":"The latest stories from the World section of the BBC News web site.",
"image":"img/trenitalialogo.png",
"url":"http://feeds.bbci.co.uk/news/world/rss.xml"
},
{
"id":"Trenitalia",
"title":"Trenitalia",
"description":"Reuters.com is your source for breaking news, business, financial and investing news, including personal finance and stocks. Reuters is the leading global provider of news, financial information and technology solutions to the world's media, financial institutions, businesses and individuals.",
"image":"img/trenitalialogo.png",
"url":"http://feeds.reuters.com/Reuters/worldNews"
},
{
"id":"Trenitalia",
"title":"Trenitalia",
"description":"CNN.com delivers up-to-the-minute news and information on the latest top stories, weather, entertainment, politics and more.",
"image":"img/trenitalialogo.png",
"url":"http://rss.cnn.com/rss/cnn_world.rss"
},
{
"id":"Trenitalia",
"title":"Trenitalia",
"description":"Latest World news, comment and analysis from the Guardian, the world's leading liberal voice",
"image":"img/trenitalialogo.png",
"url":"http://www.theguardian.com/world/rss"
}
]
}, },
{ {
"id":"addticketwithphoto", "id":"addticketwithphoto",

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View file

@ -1,5 +1,19 @@
// Ionic Starter App // Ionic Starter App
function takePicture()
{
console.log("PSOO");
navigator.camera.getPicture(function(imageURI) {
// imageURI is the URL of the image that we can use for
// an <img> element or backgroundImage.
}, function(err) {
// Ruh-roh, something bad happened
}, cameraOptions);
}
angular.module('underscore', []) angular.module('underscore', [])
.factory('_', function() { .factory('_', function() {
return window._; // assumes underscore has already been loaded on the page return window._; // assumes underscore has already been loaded on the page
@ -27,6 +41,8 @@ angular.module('your_app_name', [
'youtube-embed' 'youtube-embed'
]) ])
.run(function($ionicPlatform, PushNotificationsService, $rootScope, $ionicConfig, $timeout) { .run(function($ionicPlatform, PushNotificationsService, $rootScope, $ionicConfig, $timeout) {
$ionicPlatform.on("deviceready", function(){ $ionicPlatform.on("deviceready", function(){
@ -296,8 +312,8 @@ angular.module('your_app_name', [
} }
} }
}) })
.state('app.addTicketWithPhoto', { .state('app.addticketwithphoto', {
url: "/addTicketWithPhoto", url: "/addticketwithphoto",
views: { views: {
'menuContent': { 'menuContent': {
templateUrl: "views/app/addTicketWithPhoto.html", templateUrl: "views/app/addTicketWithPhoto.html",
@ -334,7 +350,7 @@ angular.module('your_app_name', [
}) })
.state('app.category', { .state('app.category', {
url: "/category/:categoryId", url: "/:categoryId",
views: { views: {
'menuContent': { 'menuContent': {
templateUrl: "views/app/category.html", templateUrl: "views/app/category.html",
@ -342,6 +358,15 @@ angular.module('your_app_name', [
} }
} }
}) })
.state('app.category-entries', {
url: "/booking/:sourceId",
views: {
'menuContent': {
templateUrl: "views/app/category-entries.html",
controller: 'CategoryEntriesCtrl'
}
}
})
; ;
// if none of the above states are matched, use this as the fallback // if none of the above states are matched, use this as the fallback

View file

@ -14,6 +14,9 @@ angular.module('your_app_name.controllers', [])
$scope.user.telephone="3477608470"; $scope.user.telephone="3477608470";
$scope.user.picture="img/laura.jpg"; $scope.user.picture="img/laura.jpg";
$scope.user.score="15463"; $scope.user.score="15463";
}) })
//LOGIN //LOGIN
@ -475,7 +478,7 @@ angular.module('your_app_name.controllers', [])
.controller('ImagePickerCtrl', function($scope, $rootScope, $cordovaCamera) { .controller('ImagePickerCtrl', function($scope, $rootScope, $cordovaCamera) {
$scope.images = []; /*$scope.images = [];
$scope.selImages = function() { $scope.selImages = function() {
@ -504,7 +507,7 @@ angular.module('your_app_name.controllers', [])
$scope.shareAll = function() { $scope.shareAll = function() {
window.plugins.socialsharing.share(null, null, $scope.images); window.plugins.socialsharing.share(null, null, $scope.images);
}; };*/
}) })
.controller('BookingCtrl', function($scope, $http) { .controller('BookingCtrl', function($scope, $http) {
}) })
@ -515,7 +518,9 @@ angular.module('your_app_name.controllers', [])
}) })
.controller('BookingCtrl', function($scope, $http) { .controller('BookingCtrl', function($scope, $http) {
}) })
.controller('AddTicketWithCtrl', function($scope, $http) { .controller('AddTicketWithPhotoCtrl', function($scope, $http) {
console.log("OSOSSOS");
}) })
.controller('AllTicketsCtrl', function($scope, $http) { .controller('AllTicketsCtrl', function($scope, $http) {
}) })
@ -528,22 +533,40 @@ angular.module('your_app_name.controllers', [])
}); });
console.log("HOME"); console.log("HOME");
}) })
.controller('CategoryCtrl', function($scope, $http, $stateParams) { .controller('CategoryCtrl', function($scope, $http, $stateParams) {
$scope.category_sources = []; $scope.category_sources = [];
$scope.categoryId = $stateParams.categoryId; $scope.categoryId = $stateParams.categoryId;
console.log($scope.categoryId);
switch($scope.categoryId)
{
case "addticketwithphoto":
{
console.log("ciao");
takePicture();
break;
}
case "booking":
{
$http.get('home-categories.json').success(function(response) { $http.get('home-categories.json').success(function(response) {
var category = _.find(response, {id: $scope.categoryId}); var category = _.find(response, {id: $scope.categoryId});
$scope.categoryTitle = category.title; $scope.categoryTitle = category.title;
$scope.category_sources = category.home_sources; $scope.category_sources = category.home_sources;
}); });
}) break;
.controller('HomeEntriesCtrl', function($scope, $stateParams, $http, $q, $ionicLoading) { }
$scope.home = []; }
var categoryId = $stateParams.categoryId,
sourceId = $stateParams.sourceId; })
.controller('CategoryEntriesCtrl', function($scope, $stateParams, $http) {
$scope.category_sources = [];
$scope.sourceId = $stateParams.sourceId;
$scope.entriesTitle = $stateParams.sourceId;
console.log("ciao");
}) })
; ;

View file

@ -12,4 +12,11 @@ angular.module('your_app_name.filters', [])
}; };
}) })
.filter('capitalize', function() {
return function(input, all) {
var reg = (all) ? /([^\W_]+[^\s-]*) */g : /([^\W_]+[^\s-]*)/;
return (!!input) ? input.replace(reg, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}) : '';
};
})
; ;

View file

@ -1,35 +1,8 @@
<ion-view class="bookmarks-view"> <ion-view class="bookmark-view">
<ion-nav-title> <ion-nav-title>
<span>Bookmarks</span> <span>Fai una foto al biglietto</span>
</ion-nav-title> </ion-nav-title>
<ion-content> <ion-content>
<div ng-if="(bookmarks.wordpress.length == 0 && bookmarks.feeds.length == 0)" class="row bookmarks-container"> dff
<div class="col col-center">
<div class="empty-results">
<i class="icon ion-bookmark"></i>
<h3 class="no-bookmarks">There's nothing here yet. Start exploring!</h3>
</div>
</div>
</div>
<ul ng-if="(bookmarks.wordpress.length > 0 || bookmarks.feeds.length > 0)" class="bookmarks-list">
<div ng-if="bookmarks.feeds.length > 0" class="item item-divider">
Feeds Bookmarks
</div>
<li class="bookmark-item" ng-repeat="bookmark in bookmarks.feeds">
<a ng-click=goToFeedPost(bookmark.link)>
<h2 class="post-title" ng-bind-html="bookmark.title | rawHtml"></h2>
<p class="post-date">Posted <span class="post-time" am-time-ago="bookmark.date"></span></p>
</a>
</li>
<div ng-if="bookmarks.wordpress.length > 0" class="item item-divider">
Wordpress bookmarks
</div>
<li class="bookmark-item" ng-repeat="bookmark in bookmarks.wordpress">
<a ng-click=goToWordpressPost(bookmark.id)>
<h2 class="post-title" ng-bind-html="bookmark.title | rawHtml"></h2>
<p class="post-date">Posted <span class="post-time" am-time-ago="bookmark.date"></span></p>
</a>
</li>
</ul>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,35 +0,0 @@
<ion-view class="bookmarks-view">
<ion-nav-title>
<span>Bookmarks</span>
</ion-nav-title>
<ion-content>
<div ng-if="(bookmarks.wordpress.length == 0 && bookmarks.feeds.length == 0)" class="row bookmarks-container">
<div class="col col-center">
<div class="empty-results">
<i class="icon ion-bookmark"></i>
<h3 class="no-bookmarks">There's nothing here yet. Start exploring!</h3>
</div>
</div>
</div>
<ul ng-if="(bookmarks.wordpress.length > 0 || bookmarks.feeds.length > 0)" class="bookmarks-list">
<div ng-if="bookmarks.feeds.length > 0" class="item item-divider">
Feeds Bookmarks
</div>
<li class="bookmark-item" ng-repeat="bookmark in bookmarks.feeds">
<a ng-click=goToFeedPost(bookmark.link)>
<h2 class="post-title" ng-bind-html="bookmark.title | rawHtml"></h2>
<p class="post-date">Posted <span class="post-time" am-time-ago="bookmark.date"></span></p>
</a>
</li>
<div ng-if="bookmarks.wordpress.length > 0" class="item item-divider">
Wordpress bookmarks
</div>
<li class="bookmark-item" ng-repeat="bookmark in bookmarks.wordpress">
<a ng-click=goToWordpressPost(bookmark.id)>
<h2 class="post-title" ng-bind-html="bookmark.title | rawHtml"></h2>
<p class="post-date">Posted <span class="post-time" am-time-ago="bookmark.date"></span></p>
</a>
</li>
</ul>
</ion-content>
</ion-view>

View file

@ -1,35 +0,0 @@
<ion-view class="bookmarks-view">
<ion-nav-title>
<span>Bookmarks</span>
</ion-nav-title>
<ion-content>
<div ng-if="(bookmarks.wordpress.length == 0 && bookmarks.feeds.length == 0)" class="row bookmarks-container">
<div class="col col-center">
<div class="empty-results">
<i class="icon ion-bookmark"></i>
<h3 class="no-bookmarks">There's nothing here yet. Start exploring!</h3>
</div>
</div>
</div>
<ul ng-if="(bookmarks.wordpress.length > 0 || bookmarks.feeds.length > 0)" class="bookmarks-list">
<div ng-if="bookmarks.feeds.length > 0" class="item item-divider">
Feeds Bookmarks
</div>
<li class="bookmark-item" ng-repeat="bookmark in bookmarks.feeds">
<a ng-click=goToFeedPost(bookmark.link)>
<h2 class="post-title" ng-bind-html="bookmark.title | rawHtml"></h2>
<p class="post-date">Posted <span class="post-time" am-time-ago="bookmark.date"></span></p>
</a>
</li>
<div ng-if="bookmarks.wordpress.length > 0" class="item item-divider">
Wordpress bookmarks
</div>
<li class="bookmark-item" ng-repeat="bookmark in bookmarks.wordpress">
<a ng-click=goToWordpressPost(bookmark.id)>
<h2 class="post-title" ng-bind-html="bookmark.title | rawHtml"></h2>
<p class="post-date">Posted <span class="post-time" am-time-ago="bookmark.date"></span></p>
</a>
</li>
</ul>
</ion-content>
</ion-view>

View file

@ -0,0 +1,8 @@
<ion-view class="bookmark-view">
<ion-nav-title>
<span>{{entriesTitle | capitalize}}</span>
</ion-nav-title>
<ion-content>
</ion-content>
</ion-view>

View file

@ -1,48 +1,21 @@
<ion-view class="settings-view"> <ion-view class="">
<ion-nav-title> <ion-nav-title>
<span>Settings</span> <span>{{categoryTitle}}</span>
</ion-nav-title> </ion-nav-title>
<ion-content> <ion-content>
<ul class="list"> <div 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 | slugify)})">
<div class="item item-divider">TOGGLE</div> <div class="thumbnail-outer" style="height:80px;">
<pre-img ratio="_1_1" helper-class="">
<ion-toggle ng-model="airplaneMode" toggle-class="toggle-assertive">Airplane Mode</ion-toggle> <img class="" ng-src="{{source.image}}" spinner-on-load>
<ion-toggle ng-model="wifi" toggle-class="toggle-positive">Wi-Fi</ion-toggle> </pre-img>
<ion-toggle ng-model="bluetooth" toggle-class="toggle-calm">Bluetooth</ion-toggle>
<ion-toggle ng-model="personalHotspot" toggle-class="toggle-dark">Personal Hotspot</ion-toggle>
<div class="item item-divider">CHECKBOXES</div>
<ion-checkbox ng-model="checkOpt1">Option 1</ion-checkbox>
<ion-checkbox ng-model="checkOpt2">Option 2</ion-checkbox>
<ion-checkbox ng-model="checkOpt3">Option 3</ion-checkbox>
<div class="item item-divider">RADIO</div>
<ion-radio ng-model="radioChoice" ng-value="'A'">Choose A</ion-radio>
<ion-radio ng-model="radioChoice" ng-value="'B'">Choose B</ion-radio>
<ion-radio ng-model="radioChoice" ng-value="'C'">Choose C</ion-radio>
<div class="item item-divider">RANGES</div>
<div class="range">
<i class="icon ion-volume-low"></i>
<input type="range" name="volume">
<i class="icon ion-volume-high"></i>
</div> </div>
<div class="item range range-positive"> <div>
<i class="icon ion-ios-sunny-outline"></i> <span class="title">{{source.title}}</span>
<input type="range" name="volume" min="0" max="100" value="33"> <p class="description">{{source.description}}</p>
<i class="icon ion-ios-sunny"></i> </div>
<i class="icon ion-arrow-right-c"></i>
</a>
</div> </div>
<div class="item item-divider"></div>
<button class="button button-block button-assertive" ng-click="showLogOutMenu()">
Logout
</button>
</ul>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -3,7 +3,7 @@
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button> <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title> <ion-nav-title>
<span>Settings</span> <span>fvvv</span>
</ion-nav-title> </ion-nav-title>
<ion-content> <ion-content>
<ul class="list"> <ul class="list">