diff --git a/www/css/custom_style.css b/www/css/custom_style.css index a03dd67..fa4d87e 100644 --- a/www/css/custom_style.css +++ b/www/css/custom_style.css @@ -7,6 +7,38 @@ md-input-container { height: 64px; } +.mycenter { + text-align: center; +} + + +.typnormal{ + border-color: #0a9dc7; + background-color: #11c1f3; + color: #fff; + text-align: center; +} + +.typnmittel{ + border-color: #e6b500; + background-color: #ffc900; + color: #fff; + text-align: center; +} + +.typschwach{ + border-color: #28a54c; + background-color: #33cd5f; + color: #fff; + text-align: center; +} + +.typstark{ + border-color: #e42112; + background-color: #ef473a; + color: #fff; + text-align: center; +} .pokemontyp1 { display: inline-block; @@ -692,3 +724,345 @@ md-input-container { width: 16px; border-radius: 50%; } + +.pokemontyp1sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #D50000; + color: white; +} + +.pokemontyp1sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp2sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #C51162; + color: white; +} + +.pokemontyp2sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp3sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #AA00FF; + color: white; +} + +.pokemontyp3sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp4sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #6200EA; + color: white; +} + +.pokemontyp4sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp5sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #304FFE; + color: white; +} + +.pokemontyp5sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp6sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #2962FF; + color: white; +} + +.pokemontyp6sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp7sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #0091EA; + color: white; +} + +.pokemontyp7sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp8sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #00B8D4; + color: white; +} + +.pokemontyp8sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp9sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #00BFA5; + color: white; +} + +.pokemontyp9sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp10sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #1B5E20; + color: white; +} + +.pokemontyp10sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp11sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #33691E; + color: white; +} + +.pokemontyp11sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp12sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px;; + line-height: 16px; + border-radius: 5px; + background-color: #827717; + color: white; +} + +.pokemontyp12sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp13sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #F57F17; + color: white; +} + +.pokemontyp13sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp14sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #FF6F00; + color: white; +} + +.pokemontyp14sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp15sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #E65100; + color: white; +} + +.pokemontyp15sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp16sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #BF360C; + color: white; +} + +.pokemontyp16sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp17sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #3E2723; + color: white; +} + +.pokemontyp17sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} + +.pokemontyp18sx { + display: inline-block; + padding: 0 25px; + height: 16px; + font-size: 8px; + line-height: 16px; + border-radius: 5px; + background-color: #212121; + color: white; +} + +.pokemontyp18sx img { + float: left; + margin: 0 10px 0 -25px; + height: 16px; + width: 16px; + border-radius: 50%; +} \ No newline at end of file diff --git a/www/pokedex.db b/www/pokedex.db index 349d138..0889450 100644 Binary files a/www/pokedex.db and b/www/pokedex.db differ diff --git a/www/templates/pokemonliste/html/pokemon-detail.html b/www/templates/pokemonliste/html/pokemon-detail.html index d8c6132..0f2b58d 100644 --- a/www/templates/pokemonliste/html/pokemon-detail.html +++ b/www/templates/pokemonliste/html/pokemon-detail.html @@ -67,47 +67,108 @@
- Schwächen + Schaden durch Attacken-Typ
-
-
+
+
PokemonTyp {{ pokemonschwaeche.pokemontyptext1 }}
- {{ pokemonschwaeche.pokemontyp1 }} +

{{ pokemonschwaeche.pokemontyp1 }}

-
-
+
+
PokemonTyp {{ pokemonschwaeche.pokemontyptext2 }}
- {{ pokemonschwaeche.pokemontyp2 }} +

{{ pokemonschwaeche.pokemontyp2 }}

-
-
+
+
PokemonTyp {{ pokemonschwaeche.pokemontyptext3 }}
- {{ pokemonschwaeche.pokemontyp3 }} +

{{ pokemonschwaeche.pokemontyp3 }}

- +
+
+ Legende: +
+
+ Wenig
+
+
+ Normal
+
+
+ Mittel
+
+
+ Stark
+
+
+
+
+ Hinweis: Angriffe durch Starke Attacken (
) sollten vermieden werden. +
+
- Basiswerte -
-
- This is a basic Card with some text. + Standard Attacken
+
+ +
+ Attacke +
+
+ Typ +
+
+ Stärke +
+
+ Energie +
+
+ Dauer +
+ +
+ +
+ +
+ {{ pokemonattacke.pokemonattacke }} +
+
+
+ PokemonTyp + {{ pokemonattacke.pokemonattacketyptext }} +
+
+
+ {{ pokemonattacke.pokemonattackestaerke }} +
+
+ {{ pokemonattacke.pokemonattackeenergie }}% +
+
+ {{ pokemonattacke.pokemonattackedauer }} Sek. +
+ +
+
diff --git a/www/templates/pokemonliste/js/controllers.js b/www/templates/pokemonliste/js/controllers.js index 54f4069..8defb4b 100644 --- a/www/templates/pokemonliste/js/controllers.js +++ b/www/templates/pokemonliste/js/controllers.js @@ -93,6 +93,7 @@ appControllers.controller('pokemonDetailCtrl', function ($mdBottomSheet, $mdToas $scope.initialForm = function () { $scope.pokemonschwaechenliste = []; + $scope.pokemonattackenliste = []; // $scope.pokemon is the variable that store pokemon detail data that receive form pokemon list page. // Parameter : // $stateParams.pokemondetail(object) = pokemon that user select from pokemon list page. @@ -102,6 +103,7 @@ appControllers.controller('pokemonDetailCtrl', function ($mdBottomSheet, $mdToas // It will allow to delete data when have data in the database. $timeout(function () { $scope.getTypenEffekt($scope.pokemon.pokedexid); + $scope.getStandardAttacken($scope.pokemon.pokedexid); }, 1000); }; //End initialForm. @@ -118,6 +120,11 @@ appControllers.controller('pokemonDetailCtrl', function ($mdBottomSheet, $mdToas $scope.pokemonschwaechenliste = pokedexDB.getTypenEffekte(pokedexid); };//End getPokemonList. + // getPokemonList is for get all pokemons. + // By calling pokedexDB.all() service. + $scope.getStandardAttacken = function (pokedexid) { + $scope.pokemonattackenliste = pokedexDB.getStandardAttacken(pokedexid); + };//End getPokemonList. // showListBottomSheet is for showing the bottom sheet. // Parameter : // $event(object) = position of control that user tap. diff --git a/www/templates/pokemonliste/js/services.js b/www/templates/pokemonliste/js/services.js index 094eff4..4311850 100644 --- a/www/templates/pokemonliste/js/services.js +++ b/www/templates/pokemonliste/js/services.js @@ -39,6 +39,7 @@ appServices.factory('pokedexDB', function ($cordovaSQLite) var pokemonList = []; var pokemontypen = []; var pokemoneffektlist = []; + var pokemonstandardattackenliste= []; return { // Select all data from sqlite @@ -208,6 +209,35 @@ appServices.factory('pokedexDB', function ($cordovaSQLite) return pokemoneffektlist; }, + + getStandardAttacken: function (pokedexid) + { + + pokemonstandardattackenliste = []; + + var query = "SELECT * FROM tblPokemonStandardAttacken WHERE POKEDEXID= ?"; + // Execute query statement from query variable. + $cordovaSQLite.execute(db, query,[pokedexid]).then(function (res) + { + if (res.rows.length > 0) + { + for (var i = 0; i < res.rows.length; i++) + { + var dataItem = { + pokemonattacke : res.rows.item(i).ATTACKE , + pokemonattacketyp : res.rows.item(i).TYP , + pokemonattacketyptext : pokemontypen[res.rows.item(i).TYP] , + pokemonattackestaerke : res.rows.item(i).STAERKE , + pokemonattackeenergie : res.rows.item(i).ENERGIE , + pokemonattackedauer : res.rows.item(i).DAUER + }; + pokemonstandardattackenliste.push(dataItem); + + } + } + }); + return pokemonstandardattackenliste; + }, // To add data to sqlite. // It will receive newContract from controller then insert it into sqlite. add: function (newContract)