Multiple Evolutionstufe vorbereitet

This commit is contained in:
Hilmer, Carsten 2016-09-09 14:02:06 +02:00
parent 4f254274ef
commit 71867b9087
2 changed files with 30 additions and 8 deletions

View File

@ -82,7 +82,7 @@
</div>
<md-list>
<div class="row" ng-repeat="pokemonentwicklung in pokemonentwicklungliste" style="font-size: 10px;">
<div class="col-33 col-center"></div>
<div class="col-33 col-center">
<div>

View File

@ -71,9 +71,7 @@ appControllers.controller('pokemonListCtrl', function ($scope, $stateParams,$ion
//Scroll Trefferliste nach oben
//Wenn filtereingaben getätigt werden
$scope.scrollTop = function() {
if ($scope.filterText.length > 2){
$ionicScrollDelegate.scrollTop();
}
};
@ -114,28 +112,52 @@ appControllers.controller('pokemonDetailCtrl', function ($mdBottomSheet, $mdToas
$scope.pokemon = $scope.getPokemonData($stateParams.pokemondetail);
console.debug($scope.pokemon);
var entwarr = $scope.pokemon.pokemonentwicklung.split("|");
var entwkostenarr=$scope.pokemon.pokemonentwicklungkosten.split("|");
if (entwarr!=''){
var entwarr = $scope.pokemon.pokemonentwicklung.split("|");
var entwkostenarr=$scope.pokemon.pokemonentwicklungkosten.split("|");
var index;
for (index = 0; index < entwarr.length; ++index) {
var dummystring= entwarr[index];
var n = dummystring.search("#");
if (n < 0){
var dataItemEntwicklung = {
pokemonpokedexid : entwarr[index] ,
pokemonimage : $scope.getPokemonImage(entwarr[index]),
pokemonentwickstufe :1,
pokemonlistentyp : 1
};
};
$scope.pokemonentwicklungliste.push(dataItemEntwicklung);
if (entwkostenarr[index]>0){
var dataItemEntwicklung = {
pokemonpokedexid : entwkostenarr[index] ,
pokemonentwickstufe :1,
pokemonlistentyp : 2
};
$scope.pokemonentwicklungliste.push(dataItemEntwicklung);
}
}
}//if
else{
var res=dummystring.replace("#", "");
var dataItemEntwicklung = {
pokemonpokedexid : res ,
pokemonimage : $scope.getPokemonImage(res),
pokemonentwickstufe :2,
pokemonlistentyp : 1
};
$scope.pokemonentwicklungliste.push(dataItemEntwicklung);
}
}//for
}
//$scope.actionDelete is the variable for allow or not allow to delete data.
// It will allow to delete data when have data in the database.