Detailsseite angepasst, Liste angepasst, Liste klickbar gemacht
This commit is contained in:
parent
4ac611f7f3
commit
4f254274ef
@ -6,6 +6,10 @@ md-input-container {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.Width95 {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.itemfontsize{
|
||||
font-size: 14px;
|
||||
}
|
||||
@ -118,7 +122,7 @@ md-input-container {
|
||||
background-color: #705848;
|
||||
}
|
||||
/* Typ Stahl */
|
||||
.pokemontyp18{
|
||||
.pokemontyp17{
|
||||
background-color: #B8B8D0;
|
||||
}
|
||||
/* Typ Flug */
|
||||
|
||||
@ -341,7 +341,7 @@ angular.module('starter', ['ionic','ngIOS9UIWebViewPatch','starter.controllers',
|
||||
})
|
||||
.state('app.pokemonlist', {
|
||||
url: "/pokemonlist",
|
||||
cache: false,
|
||||
cache: true,
|
||||
params:{
|
||||
isAnimated:(ionic.Platform.isAndroid()==false)
|
||||
},
|
||||
@ -354,6 +354,7 @@ angular.module('starter', ['ionic','ngIOS9UIWebViewPatch','starter.controllers',
|
||||
})
|
||||
.state('app.pokemondetail', {
|
||||
url: "/pokemondetail",
|
||||
cache: false,
|
||||
params: {
|
||||
pokemondetail: null
|
||||
},
|
||||
|
||||
BIN
www/pokedex.db
BIN
www/pokedex.db
Binary file not shown.
@ -16,7 +16,7 @@
|
||||
<button class="button button-full" ng-click="downloadabbrechen()" ng-show="AbbrechenisVisible">
|
||||
Download abbrechen
|
||||
</button>
|
||||
<progress id="progressbar" max="721" value="{{ progressval }}"> </progress>
|
||||
<progress id="progressbar" max="152" value="{{ progressval }}"> </progress>
|
||||
<div id="progressbarlabel">{{ progressprozent }} %</div>
|
||||
<div id="currentfile">Aktuelle Datei: {{ currentfile }}</div>
|
||||
<p>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
// Controller of Contract List Page.
|
||||
appControllers.controller('imageDownloadCtrl', function ($scope, $stateParams, $mdBottomSheet, $timeout, $mdDialog, $cordovaFileTransfer, $cordovaFile, $state, pokedexDB) {
|
||||
|
||||
$scope.progressval = 0;
|
||||
$scope.progressval = 0;
|
||||
$scope.currentfile = '';
|
||||
$scope.progressprozent = 0;
|
||||
$scope.DownloadisVisible=true;
|
||||
|
||||
@ -48,20 +48,20 @@
|
||||
<div class="col-100 itemfontsize">Entw. ab:</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-100 itemfontsize">{{pokemon.pokemonentwicklungtext}} {{pokemon.pokemonname}}-Bonbons</div>
|
||||
<div class="col-100 itemfontsize">{{pokemon.pokemonentwicklungtext}} Bonbons</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-50">
|
||||
<div class="col-50">
|
||||
<div ng-if="pokemon.pokemontypa > 0" class="pokemontypnor pokemontyp{{ pokemon.pokemontypa }} full-image">
|
||||
<img src="img/typbilder/{{ pokemon.pokemontypa }}.png" alt="PokemonTyp" width="32" height="32">
|
||||
{{ pokemon.pokemontypaString }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-50">
|
||||
<div nv class="pokemontypnor pokemontyp{{ pokemon.pokemontypb }} full-image">
|
||||
<div ng-if="pokemon.pokemontypb > 0" class="pokemontypnor pokemontyp{{ pokemon.pokemontypb }} full-image">
|
||||
<img src="img/typbilder/{{ pokemon.pokemontypb }}.png" alt="PokemonTyp" width="32" height="32">
|
||||
{{ pokemon.pokemontypbString }}
|
||||
</div>
|
||||
@ -80,23 +80,21 @@
|
||||
<div class="item item-divider">
|
||||
Entwicklung
|
||||
</div>
|
||||
<div class="item item-text-wrap">
|
||||
<md-list>
|
||||
<div class="row" ng-repeat="pokemonentwicklung in pokemonentwicklungliste" style="font-size: 10px;">
|
||||
<div class="row" ng-repeat="pokemonentwicklung in pokemonentwicklungliste" style="font-size: 10px;">
|
||||
|
||||
<div class="col-100 col-center mycenter" >
|
||||
|
||||
<div style="margin: 0 auto; width:100%">
|
||||
<div class="col-33 col-center"></div>
|
||||
<div class="col-33 col-center">
|
||||
<div>
|
||||
<p ng-if="pokemonentwicklung.pokemonlistentyp == 2">{{ pokemonentwicklung.pokemonpokedexid }} Bonbons</p>
|
||||
<img ng-if="pokemonentwicklung.pokemonlistentyp == 1" src="{{pokemonentwicklung.pokemonimage}}" width="64" height="64">
|
||||
<p ng-if="pokemonentwicklung.pokemonlistentyp == 1">Pokedex-ID: {{ pokemonentwicklung.pokemonpokedexid }} </p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-33 col-center"></div>
|
||||
|
||||
</div>
|
||||
</md-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -154,6 +152,7 @@
|
||||
Hinweis: Angriffe durch Starke Attacken (<div style="height:5px;width:5px;display: inline-block;" class="typstark"></div>) sollten vermieden werden.
|
||||
</div>
|
||||
</div>
|
||||
</md-list-item>
|
||||
</md-list>
|
||||
</div>
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<div>
|
||||
<md-list-item>
|
||||
<md-input-container md-no-float="" class="md-list-item-full-width">
|
||||
<input ng-model="filterText" placeholder="Finde Pokemon..." ng-minlength="3">
|
||||
<input ng-model="filterText" placeholder="Finde Pokemon..." ng-minlength="3" ng-change="scrollTop()">
|
||||
</md-input-container>
|
||||
</md-list-item>
|
||||
</div>
|
||||
@ -29,9 +29,8 @@
|
||||
<ion-content id="pokemon-list-content" class="fade-in">
|
||||
<!--list section-->
|
||||
<md-list>
|
||||
|
||||
<!--Below code it will disable animation to better performance-->
|
||||
<div ng-if="!isAnimated" class="row pokemon-list-item"
|
||||
<div ng-if="!isAnimated" class="row pokemon-list-item md-list-item-default"
|
||||
ng-repeat="pokemon in pokemons | filter: filterText | orderBy: 'pokemonname' | limitTo: numberOfItemsToDisplay">
|
||||
<div class="col-25 icon-user">
|
||||
<img ng-src="{{ pokemon.pokemonimage }}" class="image-list-thumb"/>
|
||||
@ -98,17 +97,29 @@
|
||||
|
||||
</div>
|
||||
<div class="col-75">
|
||||
<div class="row" ng-click="navigateTo('app.pokemondetail',pokemon)">
|
||||
<div class="col-100">
|
||||
<h4>{{ pokemon.pokemonname }}</h4>
|
||||
<h5>Pokedex-Id: {{ pokemon.pokedexidString }}</h5>
|
||||
<div ng-if="pokemon.pokemontypa > 0" class="pokemontypnor pokemontyp{{ pokemon.pokemontypa }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-50">
|
||||
<div ng-if="pokemon.pokemontypa > 0" class="pokemontypnor pokemontyp{{ pokemon.pokemontypa }} Width95">
|
||||
<img src="img/typbilder/{{ pokemon.pokemontypa }}.png" alt="PokemonTyp" width="32" height="32">
|
||||
{{ pokemon.pokemontypaString }}
|
||||
</div>
|
||||
<div ng-if="pokemon.pokemontypb > 0" class="pokemontypnor pokemontyp{{ pokemon.pokemontypb }}">
|
||||
</div>
|
||||
<div class="col-50">
|
||||
<div ng-if="pokemon.pokemontypb > 0" class="pokemontypnor pokemontyp{{ pokemon.pokemontypb }} Width95">
|
||||
<img src="img/typbilder/{{ pokemon.pokemontypb }}.png" alt="PokemonTyp" width="32" height="32">
|
||||
{{ pokemon.pokemontypbString }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Below code it will show animation when selecting row.-->
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
// http://ngcordova.com/docs/plugins/sqlite/
|
||||
//
|
||||
// Controller of Pokemon List Page.
|
||||
appControllers.controller('pokemonListCtrl', function ($scope, $stateParams,$filter, $mdDialog, $timeout, $ionicModal, $state, $mdBottomSheet, pokedexDB) {
|
||||
appControllers.controller('pokemonListCtrl', function ($scope, $stateParams,$ionicScrollDelegate, $filter, $mdDialog, $timeout, $ionicModal, $state, $mdBottomSheet, pokedexDB) {
|
||||
|
||||
// initialForm is the first activity in the controller.
|
||||
// It will initial all variable data and let the function works when page load.
|
||||
@ -50,7 +50,7 @@ appControllers.controller('pokemonListCtrl', function ($scope, $stateParams,$fil
|
||||
jQuery('#pokemon-list-loading-progress').hide();
|
||||
jQuery('#pokemon-list-content').fadeIn();
|
||||
$scope.isLoading = false;
|
||||
}, 3000);// End loading progress.
|
||||
}, 1000);// End loading progress.
|
||||
|
||||
};// End initialForm.
|
||||
|
||||
@ -67,6 +67,16 @@ appControllers.controller('pokemonListCtrl', function ($scope, $stateParams,$fil
|
||||
$scope.pokemons = pokedexDB.all();
|
||||
};//End getPokemonList.
|
||||
|
||||
|
||||
//Scroll Trefferliste nach oben
|
||||
//Wenn filtereingaben getätigt werden
|
||||
$scope.scrollTop = function() {
|
||||
if ($scope.filterText.length > 2){
|
||||
$ionicScrollDelegate.scrollTop();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// navigateTo is for navigate to other page
|
||||
// by using targetPage to be the destination page
|
||||
// and sending objectData to the destination page.
|
||||
@ -81,7 +91,10 @@ appControllers.controller('pokemonListCtrl', function ($scope, $stateParams,$fil
|
||||
},400);
|
||||
};// End navigateTo.
|
||||
|
||||
$scope.initialForm();
|
||||
$scope.$on('$ionicView.loaded', function(viewInfo, state){
|
||||
console.log('CTRL - $ionicView.loaded', viewInfo, state);
|
||||
$scope.initialForm();
|
||||
});
|
||||
|
||||
});// End of Pokemon List Page Controller.
|
||||
|
||||
@ -99,29 +112,31 @@ appControllers.controller('pokemonDetailCtrl', function ($mdBottomSheet, $mdToas
|
||||
// Parameter :
|
||||
// $stateParams.pokemondetail(object) = pokemon that user select from pokemon list page.
|
||||
$scope.pokemon = $scope.getPokemonData($stateParams.pokemondetail);
|
||||
console.debug($scope.pokemon);
|
||||
|
||||
var entwarr = $scope.pokemon.pokemonentwicklung.split("|");
|
||||
var entwkostenarr=$scope.pokemon.pokemonentwicklungkosten.split("|");
|
||||
|
||||
var index;
|
||||
for (index = 0; index < entwarr.length; ++index) {
|
||||
if (entwarr!=''){
|
||||
var index;
|
||||
for (index = 0; index < entwarr.length; ++index) {
|
||||
|
||||
|
||||
var dataItemEntwicklung = {
|
||||
pokemonpokedexid : entwarr[index] ,
|
||||
pokemonimage : $scope.getPokemonImage(entwarr[index]),
|
||||
pokemonlistentyp : 1
|
||||
};
|
||||
$scope.pokemonentwicklungliste.push(dataItemEntwicklung);
|
||||
|
||||
if (entwkostenarr[index]>0){
|
||||
var dataItemEntwicklung = {
|
||||
pokemonpokedexid : entwkostenarr[index] ,
|
||||
pokemonlistentyp : 2
|
||||
pokemonpokedexid : entwarr[index] ,
|
||||
pokemonimage : $scope.getPokemonImage(entwarr[index]),
|
||||
pokemonlistentyp : 1
|
||||
};
|
||||
$scope.pokemonentwicklungliste.push(dataItemEntwicklung);
|
||||
}
|
||||
}
|
||||
|
||||
if (entwkostenarr[index]>0){
|
||||
var dataItemEntwicklung = {
|
||||
pokemonpokedexid : entwkostenarr[index] ,
|
||||
pokemonlistentyp : 2
|
||||
};
|
||||
$scope.pokemonentwicklungliste.push(dataItemEntwicklung);
|
||||
}
|
||||
}
|
||||
}
|
||||
//$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.
|
||||
$timeout(function () {
|
||||
|
||||
@ -50,7 +50,8 @@ appServices.factory('pokedexDB', function ($cordovaSQLite)
|
||||
pokemonList = [];
|
||||
pokemontypen = [];
|
||||
pokemonfundorte = [];
|
||||
|
||||
pokemonimages = [];
|
||||
|
||||
//Typen einlesen
|
||||
var query = "SELECT * FROM tblPokemonTyp order by ID ASC";
|
||||
$cordovaSQLite.execute(db, query).then(function (res)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user