Sharebutton vollständig implementiert.

This commit is contained in:
2016-02-03 16:15:27 +01:00
parent 4fdd18bb11
commit 4439b7320c
53 changed files with 3831 additions and 129 deletions

View File

@@ -388,17 +388,19 @@ $scope.show = function() {
function fill_list(){
$scope.items=[];
$database.getAllBuys().then(function (result) {
if(result.length>0){
for(i=0;i<result.length;i++){
$scope.items.push(result[i]);
}
} else {
$scope.items=[];
$scope.items=[];
$database.getAllBuys().then(function (result) {
if(result.length>0){
for(i=0;i<result.length;i++){
$scope.items.push(result[i]);
}
});
$scope.hide($ionicLoading);
}
else {
$scope.items=[];
}
});
$scope.hide($ionicLoading);
}
@@ -450,16 +452,42 @@ $scope.show = function() {
});
}
$scope.showImages = function(imagesrc) {
$scope.showImages = function(imagesrc,imagefile) {
//Sicherstellen, das Bild im Publicfolder vorhanden ist
$cordovaFile.copyFile(cordova.file.applicationStorageDirectory, imagefile, cordova.file.externalRootDirectory + "/WolleRosenKaufen", imagefile)
.then(function (success) {
// success
}, function (error) {
// error
});
//Bild im dialog anzeigen
$scope.imagesrc=imagesrc;
$scope.showModal('templates/image-popover.html');
}
$scope.shareimage = function(imagesrc,imagefile) {
//Sicherstellen, das Bild im Publicfolder vorhanden ist
$cordovaFile.copyFile(cordova.file.applicationStorageDirectory, imagefile, cordova.file.externalRootDirectory + "/WolleRosenKaufen", imagefile)
.then(function (success) {
// success
}, function (error) {
// error
});
//Bild im dialog anzeigen
$scope.imagesrc=imagesrc;
window.plugins.socialsharing.share(null, null, $scope.imagesrc, null);
}
$scope.showModal = function(templateUrl) {
$ionicModal.fromTemplateUrl(templateUrl, {
scope: $scope,