Multiple Evolutionstufe vorbereitet
This commit is contained in:
parent
4f254274ef
commit
71867b9087
@ -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);
|
||||
|
||||
if (entwarr!=''){
|
||||
var entwarr = $scope.pokemon.pokemonentwicklung.split("|");
|
||||
var entwkostenarr=$scope.pokemon.pokemonentwicklungkosten.split("|");
|
||||
|
||||
if (entwarr!=''){
|
||||
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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user