diff --git a/www/css/style.css b/www/css/style.css index 7c66e53..a25d01b 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -81,4 +81,37 @@ .tab-item{ background-color: #A50505 !important; - } \ No newline at end of file + } + +.image-list-thumb { + padding: 2px 2px 2px 2px; + height: 100px; +} + +.image-modal { + width: 100% !important; + height: 100%; + top: 0 !important; + left: 0 !important; +} + +.transparent { + background: transparent !important; +} + +.fullscreen-image { + max-width: 100%; + max-height: 100%; + bottom: 0; + left: 0; + margin: auto; + overflow: auto; + position: fixed; + right: 0; + top: 0; +} + +.slider { + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/www/js/app.js b/www/js/app.js index 32ae3bc..8508d4b 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -121,6 +121,7 @@ angular.module('starter', ['ionic', 'ngCordova', 'starter.controllers', 'starter } }) + .state('tab.buys', { url: '/buys', views: { diff --git a/www/js/controllers.js b/www/js/controllers.js index d268c1c..9fd40e8 100644 --- a/www/js/controllers.js +++ b/www/js/controllers.js @@ -1,6 +1,6 @@ angular.module('starter.controllers', []) -.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile) { +.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state) { $scope.preis=""; $scope.name=""; @@ -9,6 +9,17 @@ angular.module('starter.controllers', []) $scope.item=[]; +$scope.show = function() { + $ionicLoading.show({ + template: '

Kauf wird abgeschlossen.

' + }); + }; + + $scope.hide = function(){ + $ionicLoading.hide(); + }; + + $scope.validate = function() { var link = 'http://api.raataar.de/rosen/vorschau.php'; @@ -22,38 +33,12 @@ angular.module('starter.controllers', []) }; - - $scope.loaddata = function() { - $scope.items=[]; - $database.getAllBuys().then(function (result) { - if(result.length>0){ - alert("daten da"); - for(i=0;i0){ for(i=0;iLade...

' + }); + }; + + $scope.hide = function(){ + $ionicLoading.hide(); + }; + + + $scope.showImages = function(imagesrc) { + $scope.imagesrc=imagesrc; + $scope.showModal('templates/image-popover.html'); + } + + $scope.showModal = function(templateUrl) { + $ionicModal.fromTemplateUrl(templateUrl, { + scope: $scope, + animation: 'slide-in-up' + }).then(function(modal) { + $scope.modal = modal; + $scope.modal.show(); + }); + } + + // Close the modal + $scope.closeModal = function() { + $scope.modal.hide(); + $scope.modal.remove() + }; - }); }) diff --git a/www/templates/image-popover.html b/www/templates/image-popover.html new file mode 100644 index 0000000..1187278 --- /dev/null +++ b/www/templates/image-popover.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/www/templates/tab-buys.html b/www/templates/tab-buys.html index d4e3e18..1bd09a5 100644 --- a/www/templates/tab-buys.html +++ b/www/templates/tab-buys.html @@ -21,7 +21,7 @@ diff --git a/www/templates/tab-dash.html b/www/templates/tab-dash.html index 0373c0a..7ebbf2d 100644 --- a/www/templates/tab-dash.html +++ b/www/templates/tab-dash.html @@ -33,10 +33,6 @@
-
-
-
-