diff --git a/package.json b/package.json index 1cedb7b..c468327 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,14 @@ "id": "cordova-plugin-dbcopy" }, "cordova-plugin-file", - "cordova-plugin-file-transfer" + "cordova-plugin-file-transfer", + { + "variables": { + "BILLING_KEY": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm/DQuSuSDJgbmTThI8xMlwTf0IKvPWzsKUPRDw2pkoaWz2U+RL3AHUTwmUhXxpLGMvj7PC0Jt4xp9ilO5h5tWQ7TrqUxdTPBeL8U+WZHoQIDFmgi+ovWdClgA6aAHs1VARKPxCM2F4ngzCFIdIsiign1IeFo+uVMcel8IgUJIQX1zy7MabnQY+jIU97xjHb2bIQQsoUG40fm7jYoXWxM8OkyAdeBfXx6eGgpbvnUvjFqVlJEEGBy4ysM4K/XajBFlge4VINku8NCiGfpWUixtvEssrLX95f1r1Vo4Zw+OPp0uyVt5OyC0IeLPZyzpw0aDDxY1x3EiGhviRkKaOIgIwIDAQAB" + }, + "locator": "C:\\_IONIC_\\AndroidInAppBilling", + "id": "com.smartmobilesoftware.androidinappbilling" + } ], "cordovaPlatforms": [ "ios", diff --git a/www/templates/imagedownload/js/controllers.js b/www/templates/imagedownload/js/controllers.js index 9204b0f..b64797a 100644 --- a/www/templates/imagedownload/js/controllers.js +++ b/www/templates/imagedownload/js/controllers.js @@ -133,7 +133,7 @@ appControllers.controller('imageDownloadCtrl', function ($scope, $stateParams, $ }; $scope.refreshData=function(){ - var data='refresh'; + var data={command:'refresh', direction: ''}; dataShare.sendData(data); $scope.navigateTo('app.pokemonlist', {isAnimated:false}); }; diff --git a/www/templates/pokemonliste/html/pokemon-setting.html b/www/templates/pokemonliste/html/pokemon-setting.html index cb93531..b888d82 100644 --- a/www/templates/pokemonliste/html/pokemon-setting.html +++ b/www/templates/pokemonliste/html/pokemon-setting.html @@ -16,39 +16,32 @@ - The setting will change SQLite data - - + - -

Enable Row Animation

+

Sortierung aufsteigend

- + - -

Disable Row Animation

+

Sortierung absteigend

- + - -

 Clear All Data

+

Nach PokedexID sortieren

+
+ + +

Nach Namen sortieren

+
+ + +

Nach Typ sortieren

- -

Refresh Data

+

Liste aktualisieren

- - - -

Contract Count

- ... - {{contractsCount.length}} - -
-
\ No newline at end of file diff --git a/www/templates/pokemonliste/js/controllers.js b/www/templates/pokemonliste/js/controllers.js index 4f35334..89a7ace 100644 --- a/www/templates/pokemonliste/js/controllers.js +++ b/www/templates/pokemonliste/js/controllers.js @@ -103,10 +103,36 @@ appControllers.controller('pokemonListCtrl', function ($scope, $stateParams,$ion $scope.$on('data_shared',function(){ var data = dataShare.getData(); - if (data=='refresh'){ + + if (data.command=='refresh'){ $scope.initialForm(); console.log('refresched'); } + + if (data.command=='sortby'){ + + if (data.direction=='pokemonname'){ + $scope.pokemons = $filter('orderBy')($scope.pokemons, 'pokemonname'); + } + + if (data.direction=='pokedexid'){ + $scope.pokemons = $filter('orderBy')($scope.pokemons, 'pokedexid'); + } + + if (data.direction=='pokemontyp'){ + $scope.pokemons = $filter('orderBy')($scope.pokemons, 'pokemontypa'); + } + + } + + if (data.command=='orderby'){ + + if (data.direction=='asc'){ + + } + + } + }); // initAdMob for initial AdMob @@ -390,8 +416,21 @@ appControllers.controller('pokemonSettingCtrl', function ($scope,$ionicViewSwitc };// End clear all data from sqlite + $scope.orderby=function(orderby){ + var data={command:'orderby', direction: orderby}; + dataShare.sendData(data); + $scope.navigateTo('app.pokemonlist', {isAnimated:false}); + }; + + + $scope.sortby=function(sortby){ + var data={command:'sortby', direction: sortby}; + dataShare.sendData(data); + $scope.navigateTo('app.pokemonlist', {isAnimated:false}); + }; + $scope.refreshData=function(){ - var data='refresh'; + var data={command:'refresh', direction: ''}; dataShare.sendData(data); $scope.navigateTo('app.pokemonlist', {isAnimated:false}); };