Sharebutton vollständig implementiert.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
</div>
|
||||
|
||||
<ion-item>
|
||||
|
||||
|
||||
<div class="item tabs tabs-secondary tabs-icon-left">
|
||||
<a href="#" class="tab-item"ng-click="deleteBuy(i.id,i.bild)"><i class="icon ion-trash-a button-custom"></i>Löschen</a>
|
||||
<a href="#" class="tab-item" ng-click="showImages(i.appimgpublicpath)"><i class="icon ion-android-image button-custom"></i>Anzeigen</a>
|
||||
<a href="#" class="tab-item"><i class="icon ion-share button-custom"></i>Teilen</a>
|
||||
<a href="#" class="tab-item" ng-click="showImages(i.appimgpublicpath,i.bild)"><i class="icon ion-android-image button-custom"></i>Anzeigen</a>
|
||||
<a href="#" class="tab-item" ng-click="shareimage(i.appimgpublicpath,i.bild)"><i class="icon ion-share button-custom"></i>Teilen</a>
|
||||
</div>
|
||||
|
||||
</ion-item>
|
||||
|
||||
Reference in New Issue
Block a user