Vorbereitung orderby sortby
This commit is contained in:
parent
68d3cde529
commit
5016e27cca
@ -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",
|
||||
|
||||
@ -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});
|
||||
};
|
||||
|
||||
@ -16,39 +16,32 @@
|
||||
<ion-content scroll="false">
|
||||
<!--list section-->
|
||||
<md-list>
|
||||
<md-subheader class="md-warn">The setting will change SQLite data</md-subheader>
|
||||
|
||||
<md-list-item class="md-list-item-default" ng-click="navigateTo('app.contractlist',true)">
|
||||
<md-list-item class="md-list-item-default" ng-click="orderby('asc')">
|
||||
<i class="fa fa-play"></i>
|
||||
|
||||
<p>Enable Row Animation</p>
|
||||
<p>Sortierung aufsteigend</p>
|
||||
</md-list-item>
|
||||
|
||||
<md-list-item class="md-list-item-default" ng-click="navigateTo('app.contractlist',false)">
|
||||
<md-list-item class="md-list-item-default" ng-click="orderby('desc')">
|
||||
<i class="fa fa-stop"></i>
|
||||
|
||||
<p>Disable Row Animation</p>
|
||||
<p>Sortierung absteigend</p>
|
||||
</md-list-item>
|
||||
|
||||
<md-list-item class="md-list-item-default" ng-click="clearAllData($event)">
|
||||
<md-list-item class="md-list-item-default" ng-click="sortby('pokedexid')">
|
||||
<i class="ion-android-delete"></i>
|
||||
|
||||
<p> Clear All Data</p>
|
||||
<p>Nach PokedexID sortieren</p>
|
||||
</md-list-item>
|
||||
<md-list-item class="md-list-item-default" ng-click="sortby('pokemonname')">
|
||||
<i class="ion-android-delete"></i>
|
||||
<p>Nach Namen sortieren</p>
|
||||
</md-list-item>
|
||||
<md-list-item class="md-list-item-default" ng-click="sortby('pokemontyp')">
|
||||
<i class="ion-android-delete"></i>
|
||||
<p>Nach Typ sortieren</p>
|
||||
</md-list-item>
|
||||
<md-list-item class="md-list-item-default" ng-click="refreshData()">
|
||||
<i class="ion-android-refresh"></i>
|
||||
|
||||
<p>Refresh Data</p>
|
||||
<p>Liste aktualisieren</p>
|
||||
</md-list-item>
|
||||
<md-list-item class="md-list-item-default">
|
||||
<i class="fa fa-user"></i>
|
||||
|
||||
<p>Contract Count</p>
|
||||
<span ng-show="loading">...</span>
|
||||
<span ng-show="!loading">{{contractsCount.length}}</span>
|
||||
|
||||
</md-list-item>
|
||||
|
||||
</md-list><!--end list section-->
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
@ -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});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user