hintergrundauswahl eingbaut, Vorschau jetzt modal.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
|
||||
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Bubblegum+Sans' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Bubblegum+Sans' rel='stylesheet' type='text/css'>
|
||||
<link href="css/style.css" rel="stylesheet">
|
||||
|
||||
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
<!-- ionic/angularjs js -->
|
||||
<script src="lib/ionic/js/ionic.bundle.js"></script>
|
||||
<script src="js/ionic-modal-select.min.js"></script>
|
||||
<script src="js/ng-cordova.min.js"></script>
|
||||
<!-- cordova script (this will be a 404 during development) -->
|
||||
<script src="cordova.js"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// 'starter.controllers' is found in controllers.js
|
||||
var db;
|
||||
|
||||
angular.module('starter', ['ionic', 'ngCordova', 'starter.controllers', 'starter.services'])
|
||||
angular.module('starter', ['ionic', 'ngCordova', 'ionic-modal-select', 'starter.controllers', 'starter.services'])
|
||||
|
||||
.run(function($ionicPlatform, $window, $ionicHistory, $database, $ionicPopup, $state, $localstorage, $rootScope) {
|
||||
$ionicPlatform.ready(function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
angular.module('starter.controllers', [])
|
||||
|
||||
.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state,$filter) {
|
||||
.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state,$filter,$ionicModal) {
|
||||
|
||||
$scope.preis="";
|
||||
$scope.name="";
|
||||
@@ -8,6 +8,22 @@ angular.module('starter.controllers', [])
|
||||
$scope.items=[];
|
||||
$scope.item=[];
|
||||
|
||||
|
||||
$scope.backgroundpic = "1";
|
||||
$scope.backgrounds = [
|
||||
{ name : "Hintergrund 1", backvalue : "1", beschreibung: "Herzen und Tiere"},
|
||||
{ name : "Hintergrund 2", backvalue : "2", beschreibung: "geflügeltes Herz"},
|
||||
{ name : "Hintergrund 3", backvalue : "3", beschreibung: "Herzenmuster"},
|
||||
{ name : "Hintergrund 4", backvalue : "4", beschreibung: "Herzpflanzen"},
|
||||
{ name : "Hintergrund 5", backvalue : "5", beschreibung: "Neutral dunkel"},
|
||||
{ name : "Hintergrund 6", backvalue : "6", beschreibung: "Springendes Paar"},
|
||||
{ name : "Hintergrund 7", backvalue : "7", beschreibung: "Herzen mit Verzierung"},
|
||||
{ name : "Hintergrund 8", backvalue : "8", beschreibung: "Hände die sich halten"},
|
||||
{ name : "Hintergrund 9", backvalue : "9", beschreibung: "Stoffmuster"},
|
||||
{ name : "Hintergrund 10", backvalue : "10", beschreibung: "Ballons mit Herzen"},
|
||||
];
|
||||
|
||||
|
||||
$scope.producitems=[];
|
||||
|
||||
$scope.rosen1titel="";
|
||||
@@ -55,17 +71,52 @@ $scope.show = function() {
|
||||
$scope.validate = function() {
|
||||
|
||||
var link = 'http://api.raataar.de/rosen/vorschau.php';
|
||||
|
||||
$http.post(link, {name : $scope.name, freitext: $scope.freitext, rosen: $scope.preis}).then(function (res){
|
||||
$http.post(link, {name : $scope.name, freitext: $scope.freitext, rosen: $scope.preis, bg: $scope.backgroundpic}).then(function (res){
|
||||
$scope.response = res.data;
|
||||
window.open($scope.response, '_system', 'location=yes');
|
||||
//window.open($scope.response, '_system', 'location=yes');
|
||||
//return false;
|
||||
$scope.showVorschauImages($scope.response);
|
||||
return false;
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Vorschau-Modal
|
||||
*/
|
||||
$scope.showVorschauImages = function(imagesrc) {
|
||||
//Bild im dialog anzeigen
|
||||
$scope.imagesrc=imagesrc;
|
||||
$scope.showVorschauModal('templates/image-vorschau-popover.html');
|
||||
}
|
||||
|
||||
$scope.showVorschauModal = function(templateUrl) {
|
||||
$ionicModal.fromTemplateUrl(templateUrl, {
|
||||
scope: $scope,
|
||||
animation: 'slide-in-up'
|
||||
}).then(function(modal) {
|
||||
$scope.modal = modal;
|
||||
$scope.modal.show();
|
||||
});
|
||||
}
|
||||
|
||||
// Close the modal
|
||||
$scope.closeVorschauModal = function() {
|
||||
$scope.modal.hide();
|
||||
$scope.modal.remove()
|
||||
};
|
||||
/*
|
||||
* Vorschau-Modal ENDE
|
||||
*/
|
||||
|
||||
//Getter für Selectbox
|
||||
$scope.getBackgroundOpt = function(option){
|
||||
$scope.backgroundpic=option.backvalue;
|
||||
return option.backvalue;
|
||||
};
|
||||
|
||||
//Flatrate resetten DEBUGGING
|
||||
$scope.resetflat = function() {
|
||||
inappbilling.consumePurchase(function(result) {}, function(result) {}, 'rosenflatrate');
|
||||
$rootScope.flatrate=0;
|
||||
@@ -74,6 +125,9 @@ $scope.show = function() {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Zitat in Text-Box laden
|
||||
*/
|
||||
$scope.loadzitat = function() {
|
||||
|
||||
$http({
|
||||
@@ -149,9 +203,9 @@ $scope.show = function() {
|
||||
if($rootScope.flatrate==1) {
|
||||
|
||||
$scope.showflatrate = false;
|
||||
$scope.rosen1preistag="kostenlos - Flaterate";
|
||||
$scope.rosen3preistag="kostenlos - Flaterate";
|
||||
$scope.rosen9preistag="kostenlos - Flaterate";
|
||||
$scope.rosen1preistag="kostenlos - Flatrate";
|
||||
$scope.rosen3preistag="kostenlos - Flatrate";
|
||||
$scope.rosen9preistag="kostenlos - Flatrate";
|
||||
|
||||
}
|
||||
|
||||
@@ -177,7 +231,7 @@ $scope.show = function() {
|
||||
}
|
||||
|
||||
|
||||
$timeout(getProducts, 1000);
|
||||
$timeout(getProducts, 2000);
|
||||
/*
|
||||
* Produkt-Details abrufen ENDE
|
||||
*/
|
||||
@@ -226,7 +280,7 @@ $scope.show = function() {
|
||||
}
|
||||
|
||||
function errorBuyHandler (error) {
|
||||
|
||||
/*
|
||||
var strResult = "";
|
||||
var returnBool=false;
|
||||
|
||||
@@ -235,7 +289,7 @@ $scope.show = function() {
|
||||
} else {
|
||||
strResult = error;
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
* Prüfen ob Kauf schonmal durchgeführt wurde, aber noch nicht konsumiert
|
||||
*/
|
||||
@@ -276,9 +330,9 @@ $scope.show = function() {
|
||||
$rootScope.flatrate=1;
|
||||
$scope.showflatrate = false;
|
||||
|
||||
$scope.rosen1preistag="kostenlos - Flaterate";
|
||||
$scope.rosen3preistag="kostenlos - Flaterate";
|
||||
$scope.rosen9preistag="kostenlos - Flaterate";
|
||||
$scope.rosen1preistag="kostenlos - Flatrate";
|
||||
$scope.rosen3preistag="kostenlos - Flatrate";
|
||||
$scope.rosen9preistag="kostenlos - Flatrate";
|
||||
|
||||
$timeout(getProducts, 300);
|
||||
|
||||
@@ -297,7 +351,7 @@ $scope.show = function() {
|
||||
$scope.show($ionicLoading);
|
||||
var link = 'http://api.raataar.de/rosen/kauf.php';
|
||||
|
||||
$http.post(link, {name : $scope.name, freitext: $scope.freitext, rosen: $scope.preis}).then(function (res){
|
||||
$http.post(link, {name : $scope.name, freitext: $scope.freitext, rosen: $scope.preis, bg: $scope.backgroundpic}).then(function (res){
|
||||
$scope.filetodownload = res.data;
|
||||
|
||||
// File for download
|
||||
@@ -372,7 +426,7 @@ $scope.show = function() {
|
||||
inappbilling.consumePurchase(successConsumeHandler, errorConsumeHandler, $scope.preis);
|
||||
}
|
||||
/*
|
||||
* Rosen konsuieren ENDE
|
||||
* Rosen konsumieren ENDE
|
||||
*/
|
||||
|
||||
})
|
||||
|
||||
1
www/js/ionic-modal-select.min.js
vendored
Normal file
1
www/js/ionic-modal-select.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
www/templates/image-vorschau-popover.html
Normal file
3
www/templates/image-vorschau-popover.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="modal image-modal transparent" ng-click="closeVorschauModal()">
|
||||
<img ng-src="{{imagesrc}}" class="fullscreen-image"/>
|
||||
</div>
|
||||
@@ -46,6 +46,16 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<div style="padding-bottom:15px;">
|
||||
<button class="button button-full button-custom" modal-select="" ng-model="backgroundpic" options="backgrounds" option-getter="getBackgroundOpt(option)" modal-title="Hintergrund wählen">
|
||||
{{ 'Hintergrund: ' + backgroundpic || 'Hintergrund'}}
|
||||
<div class="option">
|
||||
<h2>{{option.name}}</h2>
|
||||
<p>{{option.beschreibung}}</p>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="list card">
|
||||
<div class="item item-divider oleo">Rosen jetzt kaufen?</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user