Aggiunto Photocamera
This commit is contained in:
parent
314cefdc70
commit
35ed8465b5
15 changed files with 137 additions and 163 deletions
|
|
@ -1,5 +1,19 @@
|
|||
// 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', [])
|
||||
.factory('_', function() {
|
||||
return window._; // assumes underscore has already been loaded on the page
|
||||
|
|
@ -27,6 +41,8 @@ angular.module('your_app_name', [
|
|||
'youtube-embed'
|
||||
])
|
||||
|
||||
|
||||
|
||||
.run(function($ionicPlatform, PushNotificationsService, $rootScope, $ionicConfig, $timeout) {
|
||||
|
||||
$ionicPlatform.on("deviceready", function(){
|
||||
|
|
@ -296,8 +312,8 @@ angular.module('your_app_name', [
|
|||
}
|
||||
}
|
||||
})
|
||||
.state('app.addTicketWithPhoto', {
|
||||
url: "/addTicketWithPhoto",
|
||||
.state('app.addticketwithphoto', {
|
||||
url: "/addticketwithphoto",
|
||||
views: {
|
||||
'menuContent': {
|
||||
templateUrl: "views/app/addTicketWithPhoto.html",
|
||||
|
|
@ -334,7 +350,7 @@ angular.module('your_app_name', [
|
|||
})
|
||||
|
||||
.state('app.category', {
|
||||
url: "/category/:categoryId",
|
||||
url: "/:categoryId",
|
||||
views: {
|
||||
'menuContent': {
|
||||
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
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ angular.module('your_app_name.controllers', [])
|
|||
$scope.user.telephone="3477608470";
|
||||
$scope.user.picture="img/laura.jpg";
|
||||
$scope.user.score="15463";
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
//LOGIN
|
||||
|
|
@ -475,7 +478,7 @@ angular.module('your_app_name.controllers', [])
|
|||
|
||||
.controller('ImagePickerCtrl', function($scope, $rootScope, $cordovaCamera) {
|
||||
|
||||
$scope.images = [];
|
||||
/*$scope.images = [];
|
||||
|
||||
$scope.selImages = function() {
|
||||
|
||||
|
|
@ -504,7 +507,7 @@ angular.module('your_app_name.controllers', [])
|
|||
|
||||
$scope.shareAll = function() {
|
||||
window.plugins.socialsharing.share(null, null, $scope.images);
|
||||
};
|
||||
};*/
|
||||
})
|
||||
.controller('BookingCtrl', function($scope, $http) {
|
||||
})
|
||||
|
|
@ -515,7 +518,9 @@ angular.module('your_app_name.controllers', [])
|
|||
})
|
||||
.controller('BookingCtrl', function($scope, $http) {
|
||||
})
|
||||
.controller('AddTicketWithCtrl', function($scope, $http) {
|
||||
.controller('AddTicketWithPhotoCtrl', function($scope, $http) {
|
||||
console.log("OSOSSOS");
|
||||
|
||||
})
|
||||
.controller('AllTicketsCtrl', function($scope, $http) {
|
||||
})
|
||||
|
|
@ -528,22 +533,40 @@ angular.module('your_app_name.controllers', [])
|
|||
});
|
||||
console.log("HOME");
|
||||
})
|
||||
|
||||
.controller('CategoryCtrl', function($scope, $http, $stateParams) {
|
||||
$scope.category_sources = [];
|
||||
|
||||
$scope.categoryId = $stateParams.categoryId;
|
||||
console.log($scope.categoryId);
|
||||
|
||||
$http.get('home-categories.json').success(function(response) {
|
||||
var category = _.find(response, {id: $scope.categoryId});
|
||||
$scope.categoryTitle = category.title;
|
||||
$scope.category_sources = category.home_sources;
|
||||
});
|
||||
switch($scope.categoryId)
|
||||
{
|
||||
case "addticketwithphoto":
|
||||
{
|
||||
console.log("ciao");
|
||||
takePicture();
|
||||
break;
|
||||
}
|
||||
case "booking":
|
||||
{
|
||||
$http.get('home-categories.json').success(function(response) {
|
||||
var category = _.find(response, {id: $scope.categoryId});
|
||||
$scope.categoryTitle = category.title;
|
||||
$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");
|
||||
})
|
||||
|
||||
;
|
||||
|
|
|
|||
|
|
@ -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();}) : '';
|
||||
};
|
||||
})
|
||||
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue