Kaufdatum implementiert, Sortierung in DESC geändert
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
angular.module('starter.controllers', [])
|
||||
|
||||
.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state,$http) {
|
||||
.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state,$http,$filter) {
|
||||
|
||||
$scope.preis="";
|
||||
$scope.name="";
|
||||
@@ -305,7 +305,8 @@ $scope.show = function() {
|
||||
|
||||
// File name only
|
||||
var filename = url.split("/").pop();
|
||||
|
||||
|
||||
var Kaufdatum='';
|
||||
// Save location
|
||||
//var targetPath = cordova.file.externalRootDirectory + filename;
|
||||
var targetPath = cordova.file.applicationStorageDirectory + filename;
|
||||
@@ -322,8 +323,11 @@ $scope.show = function() {
|
||||
$scope.item={name: $scope.name, bild: $scope.targetpublicPath};
|
||||
$scope.items.push($scope.item);
|
||||
|
||||
|
||||
Kaufdatum = $filter('date')(new Date(),'dd.MM.yyyy - H:mm:ss');
|
||||
|
||||
//itemName,itemBild,itemBildtext,itemKaufdatum,itemappimgpath,itemappimgpublicpath
|
||||
$database.setBuys($scope.name,$scope.filename,$scope.freitext,'','', $scope.targetpublicPath);
|
||||
$database.setBuys($scope.name,$scope.filename,$scope.freitext, Kaufdatum,'', $scope.targetpublicPath);
|
||||
//Ordner erstellen auf SD-Karte
|
||||
$cordovaFile.createDir(cordova.file.externalRootDirectory, "WolleRosenKaufen", false)
|
||||
.then(function (success) {
|
||||
@@ -372,6 +376,7 @@ $scope.show = function() {
|
||||
*/
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
.controller('BuysCtrl', function($scope, $database,$location,$ionicModal,$ionicLoading,$timeout) {
|
||||
|
||||
@@ -73,7 +73,7 @@ angular.module('starter.services', [])
|
||||
},
|
||||
getAllBuys: function(){
|
||||
var ArrayQ=[];
|
||||
query="SELECT * FROM buys order by id ASC";
|
||||
query="SELECT * FROM buys order by id DESC";
|
||||
return $cordovaSQLite.execute(self.db,query).
|
||||
then(function(result) {
|
||||
for(j=0;j<result.rows.length;j++){
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<div class="list card">
|
||||
<div class="item item-avatar"> <img ng-src="{{i.appimgpublicpath}}">
|
||||
<h2> <div class="oleo">{{i.name}}</div> </h2>
|
||||
<h2> <div class="oleo">{{i.name}}</div> </h2><div class="oleo-vsmall">{{i.kaufdatum}}</div>
|
||||
</div>
|
||||
|
||||
<div class="item item-body">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
angular.module('starter.controllers', [])
|
||||
|
||||
.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state,$http) {
|
||||
.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state,$http,$filter) {
|
||||
|
||||
$scope.preis="";
|
||||
$scope.name="";
|
||||
@@ -305,7 +305,8 @@ $scope.show = function() {
|
||||
|
||||
// File name only
|
||||
var filename = url.split("/").pop();
|
||||
|
||||
|
||||
var Kaufdatum='';
|
||||
// Save location
|
||||
//var targetPath = cordova.file.externalRootDirectory + filename;
|
||||
var targetPath = cordova.file.applicationStorageDirectory + filename;
|
||||
@@ -322,8 +323,11 @@ $scope.show = function() {
|
||||
$scope.item={name: $scope.name, bild: $scope.targetpublicPath};
|
||||
$scope.items.push($scope.item);
|
||||
|
||||
|
||||
Kaufdatum = $filter('date')(new Date(),'dd.MM.yyyy - H:mm:ss');
|
||||
|
||||
//itemName,itemBild,itemBildtext,itemKaufdatum,itemappimgpath,itemappimgpublicpath
|
||||
$database.setBuys($scope.name,$scope.filename,$scope.freitext,'','', $scope.targetpublicPath);
|
||||
$database.setBuys($scope.name,$scope.filename,$scope.freitext, Kaufdatum,'', $scope.targetpublicPath);
|
||||
//Ordner erstellen auf SD-Karte
|
||||
$cordovaFile.createDir(cordova.file.externalRootDirectory, "WolleRosenKaufen", false)
|
||||
.then(function (success) {
|
||||
@@ -372,6 +376,7 @@ $scope.show = function() {
|
||||
*/
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
.controller('BuysCtrl', function($scope, $database,$location,$ionicModal,$ionicLoading,$timeout) {
|
||||
|
||||
@@ -73,7 +73,7 @@ angular.module('starter.services', [])
|
||||
},
|
||||
getAllBuys: function(){
|
||||
var ArrayQ=[];
|
||||
query="SELECT * FROM buys order by id ASC";
|
||||
query="SELECT * FROM buys order by id DESC";
|
||||
return $cordovaSQLite.execute(self.db,query).
|
||||
then(function(result) {
|
||||
for(j=0;j<result.rows.length;j++){
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<div class="list card">
|
||||
<div class="item item-avatar"> <img ng-src="{{i.appimgpublicpath}}">
|
||||
<h2> <div class="oleo">{{i.name}}</div> </h2>
|
||||
<h2> <div class="oleo">{{i.name}}</div> </h2><div class="oleo-vsmall">{{i.kaufdatum}}</div>
|
||||
</div>
|
||||
|
||||
<div class="item item-body">
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -18,7 +18,7 @@ document.getElementById(id+'Link').style.display = 'none';
|
||||
<body>
|
||||
<h1>Lint Report</h1>
|
||||
<div class="titleSeparator"></div>
|
||||
Check performed at Wed Feb 03 09:53:46 CET 2016.<br/>
|
||||
Check performed at Wed Feb 03 12:52:32 CET 2016.<br/>
|
||||
6 errors and 0 warnings found:<br/><br/>
|
||||
<table class="overview">
|
||||
<tr><td></td><td class="categoryColumn"><a href="#Correctness">Correctness</a>
|
||||
|
||||
Reference in New Issue
Block a user