Browse Source

icon and splashscreen updated, askForCar and askForPackage implemented, visualization of type of travel in the travels view

master
arnaucode 7 years ago
parent
commit
24c503eee1
82 changed files with 370 additions and 56 deletions
  1. +44
    -44
      config.xml
  2. BIN
      res/drawable-land-hdpi/screen.png
  3. BIN
      res/drawable-land-ldpi/screen.png
  4. BIN
      res/drawable-land-mdpi/screen.png
  5. BIN
      res/drawable-land-xhdpi/screen.png
  6. BIN
      res/drawable-land-xxhdpi/screen.png
  7. BIN
      res/drawable-land-xxxhdpi/screen.png
  8. BIN
      res/drawable-port-hdpi/screen.png
  9. BIN
      res/drawable-port-ldpi/screen.png
  10. BIN
      res/drawable-port-mdpi/screen.png
  11. BIN
      res/drawable-port-xhdpi/screen.png
  12. BIN
      res/drawable-port-xxhdpi/screen.png
  13. BIN
      res/drawable-port-xxxhdpi/screen.png
  14. BIN
      res/mipmap-hdpi/icon.png
  15. BIN
      res/mipmap-ldpi/icon.png
  16. BIN
      res/mipmap-mdpi/icon.png
  17. BIN
      res/mipmap-xhdpi/icon.png
  18. BIN
      res/mipmap-xxhdpi/icon.png
  19. BIN
      res/mipmap-xxxhdpi/icon.png
  20. BIN
      resources/android/icon/drawable-hdpi-icon.png
  21. BIN
      resources/android/icon/drawable-ldpi-icon.png
  22. BIN
      resources/android/icon/drawable-mdpi-icon.png
  23. BIN
      resources/android/icon/drawable-xhdpi-icon.png
  24. BIN
      resources/android/icon/drawable-xxhdpi-icon.png
  25. BIN
      resources/android/icon/drawable-xxxhdpi-icon.png
  26. BIN
      resources/android/splash/drawable-land-hdpi-screen.png
  27. BIN
      resources/android/splash/drawable-land-ldpi-screen.png
  28. BIN
      resources/android/splash/drawable-land-mdpi-screen.png
  29. BIN
      resources/android/splash/drawable-land-xhdpi-screen.png
  30. BIN
      resources/android/splash/drawable-land-xxhdpi-screen.png
  31. BIN
      resources/android/splash/drawable-land-xxxhdpi-screen.png
  32. BIN
      resources/android/splash/drawable-port-hdpi-screen.png
  33. BIN
      resources/android/splash/drawable-port-ldpi-screen.png
  34. BIN
      resources/android/splash/drawable-port-mdpi-screen.png
  35. BIN
      resources/android/splash/drawable-port-xhdpi-screen.png
  36. BIN
      resources/android/splash/drawable-port-xxhdpi-screen.png
  37. BIN
      resources/android/splash/drawable-port-xxxhdpi-screen.png
  38. BIN
      resources/icon.png
  39. BIN
      resources/icon.xcf
  40. BIN
      resources/icon_old.png
  41. BIN
      resources/ios/icon/icon-40.png
  42. BIN
      resources/ios/icon/icon-40@2x.png
  43. BIN
      resources/ios/icon/icon-50.png
  44. BIN
      resources/ios/icon/icon-50@2x.png
  45. BIN
      resources/ios/icon/icon-60.png
  46. BIN
      resources/ios/icon/icon-60@2x.png
  47. BIN
      resources/ios/icon/icon-60@3x.png
  48. BIN
      resources/ios/icon/icon-72.png
  49. BIN
      resources/ios/icon/icon-72@2x.png
  50. BIN
      resources/ios/icon/icon-76.png
  51. BIN
      resources/ios/icon/icon-76@2x.png
  52. BIN
      resources/ios/icon/icon-small.png
  53. BIN
      resources/ios/icon/icon-small@2x.png
  54. BIN
      resources/ios/icon/icon-small@3x.png
  55. BIN
      resources/ios/icon/icon.png
  56. BIN
      resources/ios/icon/icon@2x.png
  57. BIN
      resources/ios/splash/Default-568h@2x~iphone.png
  58. BIN
      resources/ios/splash/Default-667h.png
  59. BIN
      resources/ios/splash/Default-736h.png
  60. BIN
      resources/ios/splash/Default-Landscape-736h.png
  61. BIN
      resources/ios/splash/Default-Landscape@2x~ipad.png
  62. BIN
      resources/ios/splash/Default-Landscape~ipad.png
  63. BIN
      resources/ios/splash/Default-Portrait@2x~ipad.png
  64. BIN
      resources/ios/splash/Default-Portrait~ipad.png
  65. BIN
      resources/ios/splash/Default@2x~iphone.png
  66. BIN
      resources/ios/splash/Default~iphone.png
  67. BIN
      resources/splash.png
  68. BIN
      resources/splash.xcf
  69. BIN
      resources/splash_old.png
  70. +6
    -0
      www/css/style.css
  71. +2
    -2
      www/index.html
  72. +20
    -2
      www/js/app.js
  73. +81
    -0
      www/js/askForCar.js
  74. +81
    -0
      www/js/askForPackage.js
  75. +58
    -0
      www/templates/askForCar.html
  76. +58
    -0
      www/templates/askForPackage.html
  77. +5
    -1
      www/templates/editUser.html
  78. +4
    -4
      www/templates/newTravel.html
  79. +1
    -1
      www/templates/offerCar.html
  80. +4
    -1
      www/templates/travel.html
  81. +3
    -1
      www/templates/travels.html
  82. +3
    -0
      www/templates/user.html

+ 44
- 44
config.xml

@ -1,49 +1,49 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.app751563" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="com.ionicframework.app751563" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>CarsInCommon</name>
<description>
<name>CarsInCommon</name>
<description>
CarSharing app, for collective use. CarSharing app, for collective use.
</description> </description>
<author email="mail@mail.com" href="http://arnaucode.com/">
<author email="mail@mail.com" href="http://arnaucode.com/">
ArnauCode ArnauCode
</author> </author>
<content src="index.html" />
<access origin="*" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="FadeSplashScreenDuration" value="500" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashScreen" value="screen" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<platform name="android">
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="~1.3.1" />
<plugin name="cordova-plugin-device" spec="~1.1.4" />
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
<plugin name="cordova-plugin-console" spec="~1.0.5" />
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
</widget>
<content src="index.html"/>
<access origin="*"/>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="SplashScreenDelay" value="3000"/>
<preference name="FadeSplashScreenDuration" value="500"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen"/>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<platform name="android">
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>
<plugin name="cordova-plugin-whitelist" spec="~1.3.1"/>
<plugin name="cordova-plugin-device" spec="~1.1.4"/>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
<plugin name="cordova-plugin-console" spec="~1.0.5"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
</widget>

BIN
res/drawable-land-hdpi/screen.png

Before After
Width: 800  |  Height: 480  |  Size: 297 KiB Width: 800  |  Height: 480  |  Size: 258 KiB

BIN
res/drawable-land-ldpi/screen.png

Before After
Width: 320  |  Height: 240  |  Size: 82 KiB Width: 320  |  Height: 240  |  Size: 77 KiB

BIN
res/drawable-land-mdpi/screen.png

Before After
Width: 480  |  Height: 320  |  Size: 144 KiB Width: 480  |  Height: 320  |  Size: 138 KiB

BIN
res/drawable-land-xhdpi/screen.png

Before After
Width: 1280  |  Height: 720  |  Size: 587 KiB Width: 1280  |  Height: 720  |  Size: 462 KiB

BIN
res/drawable-land-xxhdpi/screen.png

Before After
Width: 1600  |  Height: 960  |  Size: 886 KiB Width: 1600  |  Height: 960  |  Size: 687 KiB

BIN
res/drawable-land-xxxhdpi/screen.png

Before After
Width: 1920  |  Height: 1280  |  Size: 1.3 MiB Width: 1920  |  Height: 1280  |  Size: 1022 KiB

BIN
res/drawable-port-hdpi/screen.png

Before After
Width: 480  |  Height: 800  |  Size: 237 KiB Width: 480  |  Height: 800  |  Size: 280 KiB

BIN
res/drawable-port-ldpi/screen.png

Before After
Width: 240  |  Height: 320  |  Size: 65 KiB Width: 240  |  Height: 320  |  Size: 79 KiB

BIN
res/drawable-port-mdpi/screen.png

Before After
Width: 320  |  Height: 480  |  Size: 112 KiB Width: 320  |  Height: 480  |  Size: 144 KiB

BIN
res/drawable-port-xhdpi/screen.png

Before After
Width: 720  |  Height: 1280  |  Size: 475 KiB Width: 720  |  Height: 1280  |  Size: 516 KiB

BIN
res/drawable-port-xxhdpi/screen.png

Before After
Width: 960  |  Height: 1600  |  Size: 704 KiB Width: 960  |  Height: 1600  |  Size: 756 KiB

BIN
res/drawable-port-xxxhdpi/screen.png

Before After
Width: 1280  |  Height: 1920  |  Size: 989 KiB Width: 1280  |  Height: 1920  |  Size: 1.1 MiB

BIN
res/mipmap-hdpi/icon.png

Before After
Width: 72  |  Height: 72  |  Size: 3.4 KiB Width: 72  |  Height: 72  |  Size: 7.3 KiB

BIN
res/mipmap-ldpi/icon.png

Before After
Width: 36  |  Height: 36  |  Size: 1.5 KiB Width: 36  |  Height: 36  |  Size: 2.7 KiB

BIN
res/mipmap-mdpi/icon.png

Before After
Width: 48  |  Height: 48  |  Size: 1.9 KiB Width: 48  |  Height: 48  |  Size: 4.0 KiB

BIN
res/mipmap-xhdpi/icon.png

Before After
Width: 96  |  Height: 96  |  Size: 4.8 KiB Width: 96  |  Height: 96  |  Size: 11 KiB

BIN
res/mipmap-xxhdpi/icon.png

Before After
Width: 144  |  Height: 144  |  Size: 7.2 KiB Width: 144  |  Height: 144  |  Size: 21 KiB

BIN
res/mipmap-xxxhdpi/icon.png

Before After
Width: 192  |  Height: 192  |  Size: 9.7 KiB Width: 192  |  Height: 192  |  Size: 33 KiB

BIN
resources/android/icon/drawable-hdpi-icon.png

Before After
Width: 72  |  Height: 72  |  Size: 3.4 KiB Width: 72  |  Height: 72  |  Size: 7.3 KiB

BIN
resources/android/icon/drawable-ldpi-icon.png

Before After
Width: 36  |  Height: 36  |  Size: 1.5 KiB Width: 36  |  Height: 36  |  Size: 2.7 KiB

BIN
resources/android/icon/drawable-mdpi-icon.png

Before After
Width: 48  |  Height: 48  |  Size: 1.9 KiB Width: 48  |  Height: 48  |  Size: 4.0 KiB

BIN
resources/android/icon/drawable-xhdpi-icon.png

Before After
Width: 96  |  Height: 96  |  Size: 4.8 KiB Width: 96  |  Height: 96  |  Size: 11 KiB

BIN
resources/android/icon/drawable-xxhdpi-icon.png

Before After
Width: 144  |  Height: 144  |  Size: 7.2 KiB Width: 144  |  Height: 144  |  Size: 21 KiB

BIN
resources/android/icon/drawable-xxxhdpi-icon.png

Before After
Width: 192  |  Height: 192  |  Size: 9.7 KiB Width: 192  |  Height: 192  |  Size: 33 KiB

BIN
resources/android/splash/drawable-land-hdpi-screen.png

Before After
Width: 800  |  Height: 480  |  Size: 297 KiB Width: 800  |  Height: 480  |  Size: 258 KiB

BIN
resources/android/splash/drawable-land-ldpi-screen.png

Before After
Width: 320  |  Height: 240  |  Size: 82 KiB Width: 320  |  Height: 240  |  Size: 77 KiB

BIN
resources/android/splash/drawable-land-mdpi-screen.png

Before After
Width: 480  |  Height: 320  |  Size: 144 KiB Width: 480  |  Height: 320  |  Size: 138 KiB

BIN
resources/android/splash/drawable-land-xhdpi-screen.png

Before After
Width: 1280  |  Height: 720  |  Size: 587 KiB Width: 1280  |  Height: 720  |  Size: 462 KiB

BIN
resources/android/splash/drawable-land-xxhdpi-screen.png

Before After
Width: 1600  |  Height: 960  |  Size: 886 KiB Width: 1600  |  Height: 960  |  Size: 687 KiB

BIN
resources/android/splash/drawable-land-xxxhdpi-screen.png

Before After
Width: 1920  |  Height: 1280  |  Size: 1.3 MiB Width: 1920  |  Height: 1280  |  Size: 1022 KiB

BIN
resources/android/splash/drawable-port-hdpi-screen.png

Before After
Width: 480  |  Height: 800  |  Size: 237 KiB Width: 480  |  Height: 800  |  Size: 280 KiB

BIN
resources/android/splash/drawable-port-ldpi-screen.png

Before After
Width: 240  |  Height: 320  |  Size: 65 KiB Width: 240  |  Height: 320  |  Size: 79 KiB

BIN
resources/android/splash/drawable-port-mdpi-screen.png

Before After
Width: 320  |  Height: 480  |  Size: 112 KiB Width: 320  |  Height: 480  |  Size: 144 KiB

BIN
resources/android/splash/drawable-port-xhdpi-screen.png

Before After
Width: 720  |  Height: 1280  |  Size: 475 KiB Width: 720  |  Height: 1280  |  Size: 516 KiB

BIN
resources/android/splash/drawable-port-xxhdpi-screen.png

Before After
Width: 960  |  Height: 1600  |  Size: 704 KiB Width: 960  |  Height: 1600  |  Size: 756 KiB

BIN
resources/android/splash/drawable-port-xxxhdpi-screen.png

Before After
Width: 1280  |  Height: 1920  |  Size: 989 KiB Width: 1280  |  Height: 1920  |  Size: 1.1 MiB

BIN
resources/icon.png

Before After
Width: 411  |  Height: 411  |  Size: 9.1 KiB Width: 411  |  Height: 411  |  Size: 100 KiB

BIN
resources/icon.xcf


BIN
resources/icon_old.png

Before After
Width: 411  |  Height: 411  |  Size: 9.1 KiB

BIN
resources/ios/icon/icon-40.png

Before After
Width: 40  |  Height: 40  |  Size: 1.2 KiB

BIN
resources/ios/icon/icon-40@2x.png

Before After
Width: 80  |  Height: 80  |  Size: 3.5 KiB

BIN
resources/ios/icon/icon-50.png

Before After
Width: 50  |  Height: 50  |  Size: 1.9 KiB

BIN
resources/ios/icon/icon-50@2x.png

Before After
Width: 100  |  Height: 100  |  Size: 4.6 KiB

BIN
resources/ios/icon/icon-60.png

Before After
Width: 60  |  Height: 60  |  Size: 2.4 KiB

BIN
resources/ios/icon/icon-60@2x.png

Before After
Width: 120  |  Height: 120  |  Size: 5.9 KiB

BIN
resources/ios/icon/icon-60@3x.png

Before After
Width: 180  |  Height: 180  |  Size: 11 KiB

BIN
resources/ios/icon/icon-72.png

Before After
Width: 72  |  Height: 72  |  Size: 2.8 KiB

BIN
resources/ios/icon/icon-72@2x.png

Before After
Width: 144  |  Height: 144  |  Size: 7.6 KiB

BIN
resources/ios/icon/icon-76.png

Before After
Width: 76  |  Height: 76  |  Size: 3.2 KiB

BIN
resources/ios/icon/icon-76@2x.png

Before After
Width: 152  |  Height: 152  |  Size: 8.1 KiB

BIN
resources/ios/icon/icon-small.png

Before After
Width: 29  |  Height: 29  |  Size: 818 B

BIN
resources/ios/icon/icon-small@2x.png

Before After
Width: 58  |  Height: 58  |  Size: 2.2 KiB

BIN
resources/ios/icon/icon-small@3x.png

Before After
Width: 87  |  Height: 87  |  Size: 3.8 KiB

BIN
resources/ios/icon/icon.png

Before After
Width: 57  |  Height: 57  |  Size: 2.1 KiB

BIN
resources/ios/icon/icon@2x.png

Before After
Width: 114  |  Height: 114  |  Size: 5.6 KiB

BIN
resources/ios/splash/Default-568h@2x~iphone.png

Before After
Width: 640  |  Height: 1136  |  Size: 31 KiB

BIN
resources/ios/splash/Default-667h.png

Before After
Width: 750  |  Height: 1334  |  Size: 40 KiB

BIN
resources/ios/splash/Default-736h.png

Before After
Width: 1242  |  Height: 2208  |  Size: 44 KiB

BIN
resources/ios/splash/Default-Landscape-736h.png

Before After
Width: 2208  |  Height: 1242  |  Size: 44 KiB

BIN
resources/ios/splash/Default-Landscape@2x~ipad.png

Before After
Width: 2048  |  Height: 1536  |  Size: 100 KiB

BIN
resources/ios/splash/Default-Landscape~ipad.png

Before After
Width: 1024  |  Height: 768  |  Size: 22 KiB

BIN
resources/ios/splash/Default-Portrait@2x~ipad.png

Before After
Width: 1536  |  Height: 2048  |  Size: 97 KiB

BIN
resources/ios/splash/Default-Portrait~ipad.png

Before After
Width: 768  |  Height: 1024  |  Size: 22 KiB

BIN
resources/ios/splash/Default@2x~iphone.png

Before After
Width: 640  |  Height: 960  |  Size: 18 KiB

BIN
resources/ios/splash/Default~iphone.png

Before After
Width: 320  |  Height: 480  |  Size: 7.0 KiB

BIN
resources/splash.png

Before After
Width: 2208  |  Height: 2208  |  Size: 362 KiB Width: 2208  |  Height: 2208  |  Size: 1.6 MiB

BIN
resources/splash.xcf


BIN
resources/splash_old.png

Before After
Width: 2208  |  Height: 2208  |  Size: 362 KiB

+ 6
- 0
www/css/style.css

@ -95,6 +95,12 @@
border: 0px; border: 0px;
width: 80%; width: 80%;
} }
.o_transparentInputBlack{
background: rgba(255, 255, 255, 0);
color: #000000;
border: 0px;
width: 100%;
}
.o_userImgCircular { .o_userImgCircular {
margin-top: 5%; margin-top: 5%;
background: #ffffff; background: #ffffff;

+ 2
- 2
www/index.html

@ -44,8 +44,8 @@
<script src="js/travel.js"></script> <script src="js/travel.js"></script>
<script src="js/newTravel.js"></script> <script src="js/newTravel.js"></script>
<script src="js/offerCar.js"></script> <script src="js/offerCar.js"></script>
<!--<script src="js/askCar.js"></script>
<script src="js/askPackage.js"></script>-->
<script src="js/askForCar.js"></script>
<script src="js/askForPackage.js"></script>
<script src="js/users.js"></script> <script src="js/users.js"></script>
<script src="js/user.js"></script> <script src="js/user.js"></script>
<script src="js/userTravels.js"></script> <script src="js/userTravels.js"></script>

+ 20
- 2
www/js/app.js

@ -24,8 +24,8 @@ angular.module('starter', [
'app.travel', 'app.travel',
'app.newTravel', 'app.newTravel',
'app.offerCar', 'app.offerCar',
/* 'app.askCar',
'app.askPackage',*/
'app.askForCar',
'app.askForPackage',
'app.users', 'app.users',
'app.user', 'app.user',
'app.userTravels', 'app.userTravels',
@ -137,6 +137,24 @@ angular.module('starter', [
} }
} }
}) })
.state('app.askForCar', {
url: '/askForCar',
views: {
'menuContent': {
templateUrl: 'templates/askForCar.html',
controller: 'AskForCarCtrl'
}
}
})
.state('app.askForPackage', {
url: '/askForPackage',
views: {
'menuContent': {
templateUrl: 'templates/askForPackage.html',
controller: 'AskForPackageCtrl'
}
}
})
.state('app.users', { .state('app.users', {
url: '/users', url: '/users',
views: { views: {

+ 81
- 0
www/js/askForCar.js

@ -0,0 +1,81 @@
angular.module('app.askForCar', ['pascalprecht.translate', 'ui-leaflet'])
.controller('AskForCarCtrl', function($scope, $stateParams, $translate,
$http, $filter, $ionicLoading) {
$scope.newtravel={};
$scope.newtravel.from={
lat: 0,
long:0
};
$scope.newtravel.to={
lat: 0,
long:0
};
$scope.center= {
lat: 0,
lng: 0,
zoom: 1
};
$scope.markers=new Array();
$scope.tiles= {
url: "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
options: {
attribution: '<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}
};
$scope.createTravel =function(){
$scope.newtravel.type="asking";
$http({
url: urlapi + 'travels',
method: "POST",
data: $scope.newtravel
})
.then(function(data) {
console.log(data);
window.location="#app/travels"
},
function(data) { // optional
// failed
console.log(data);
$ionicLoading.show({ template: 'Complete all parameters first', noBackdrop: true, duration: 2000 });
});
};
$scope.getGeo = function(){
$scope.markers=[];
console.log($scope.newtravel.from.name);
console.log($scope.newtravel.to.name);
$http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
.then(function(data) {
console.log(data);
if(data.data[0])
{
$scope.newtravel.from.lat=data.data[0].lat;
$scope.newtravel.from.long=data.data[0].lon;
$scope.newtravel.from.name=data.data[0].display_name;
$scope.markers.push({
lat: Number(data.data[0].lat),
lng: Number(data.data[0].lon),
message: data.data[0].display_name
});
}
$http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
.then(function(data) {
if(data.data[0])
{
$scope.newtravel.to.lat=data.data[0].lat;
$scope.newtravel.to.long=data.data[0].lon;
$scope.newtravel.to.name=data.data[0].display_name;
$scope.markers.push({
lat: Number(data.data[0].lat),
lng: Number(data.data[0].lon),
message: data.data[0].display_name
});
}
});
});
};
});

+ 81
- 0
www/js/askForPackage.js

@ -0,0 +1,81 @@
angular.module('app.askForPackage', ['pascalprecht.translate', 'ui-leaflet'])
.controller('AskForPackageCtrl', function($scope, $stateParams, $translate,
$http, $filter, $ionicLoading) {
$scope.newtravel={};
$scope.newtravel.from={
lat: 0,
long:0
};
$scope.newtravel.to={
lat: 0,
long:0
};
$scope.center= {
lat: 0,
lng: 0,
zoom: 1
};
$scope.markers=new Array();
$scope.tiles= {
url: "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
options: {
attribution: '<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}
};
$scope.createTravel =function(){
$scope.newtravel.type="package";
$http({
url: urlapi + 'travels',
method: "POST",
data: $scope.newtravel
})
.then(function(data) {
console.log(data);
window.location="#app/travels"
},
function(data) { // optional
// failed
console.log(data);
$ionicLoading.show({ template: 'Complete all parameters first', noBackdrop: true, duration: 2000 });
});
};
$scope.getGeo = function(){
$scope.markers=[];
console.log($scope.newtravel.from.name);
console.log($scope.newtravel.to.name);
$http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
.then(function(data) {
console.log(data);
if(data.data[0])
{
$scope.newtravel.from.lat=data.data[0].lat;
$scope.newtravel.from.long=data.data[0].lon;
$scope.newtravel.from.name=data.data[0].display_name;
$scope.markers.push({
lat: Number(data.data[0].lat),
lng: Number(data.data[0].lon),
message: data.data[0].display_name
});
}
$http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
.then(function(data) {
if(data.data[0])
{
$scope.newtravel.to.lat=data.data[0].lat;
$scope.newtravel.to.long=data.data[0].lon;
$scope.newtravel.to.name=data.data[0].display_name;
$scope.markers.push({
lat: Number(data.data[0].lat),
lng: Number(data.data[0].lon),
message: data.data[0].display_name
});
}
});
});
};
});

+ 58
- 0
www/templates/askForCar.html

@ -0,0 +1,58 @@
<ion-view view-title="{{'Ask_For_Car' | translate}}">
<ion-content>
<div class="padding">
<label class="item item-input">
<span class="input-label">{{'Title' | translate}}</span>
<input type="text" ng-model="newtravel.title">
</label>
<div layout="row">
<label class="item item-input">
<span class="input-label">{{'From' | translate}}</span>
<input type="text" ng-model="newtravel.from.name">
</label>
<label class="item item-input">
<span class="input-label">{{'To' | translate}}</span>
<input type="text" ng-model="newtravel.to.name">
</label>
</div>
</div><!-- end of padding -->
<a ng-click="getGeo()" ng-show="newtravel.from.name && newtravel.to.name"
class="button o_purple300">{{'Get_positions' | translate}}</a>
<leaflet ng-show="markers[0]"
width="100%" height="40%" markers="markers" center="center"
tiles="tiles" id="map-simple-map"></leaflet>
<div class="padding" ng-show="markers[0]">
<label class="item item-input">
<span class="input-label">{{'n_People' | translate}}</span>
<input ng-model="newtravel.seats" type="number">
</label>
<label class="item-input">
<span class="input-label">{{'Date' | translate}}</span>
<input ng-model="newtravel.date" type="date" placeholder="">
</label>
<label class="item-input">
<span class="input-label">{{'Hour' | translate}}</span>
<input ng-model="newtravel.date" type="time" placeholder="">
</label>
<ion-toggle ng-model="newtravel.package" toggle-class="toggle-calm">
<i class="icon ion-ios-box"></i>
{{'Want_to_carry_package' | translate}}
</ion-toggle>
<!--<ion-toggle ng-model="newtravel.collectivized" toggle-class="toggle-calm">
{{'Collectivized_car' | translate}}
</ion-toggle>-->
<label class="item item-input">
<span class="input-label">{{'Description' | translate}}</span>
<input type="text" ng-model="newtravel.description">
</label>
<p class="padding">
<a ng-click="createTravel()" class="button o_purple400 o_floatRight">
{{'Post_asking_car' | translate}}
</a>
</p>
</div><!-- end of padding -->
</ion-content>
</ion-view>

+ 58
- 0
www/templates/askForPackage.html

@ -0,0 +1,58 @@
<ion-view view-title="{{'Ask_For_Package' | translate}}">
<ion-content>
<div class="padding">
<label class="item item-input">
<span class="input-label">{{'Title' | translate}}</span>
<input type="text" ng-model="newtravel.title">
</label>
<div layout="row">
<label class="item item-input">
<span class="input-label">{{'From' | translate}}</span>
<input type="text" ng-model="newtravel.from.name">
</label>
<label class="item item-input">
<span class="input-label">{{'To' | translate}}</span>
<input type="text" ng-model="newtravel.to.name">
</label>
</div>
</div><!-- end of padding -->
<a ng-click="getGeo()" ng-show="newtravel.from.name && newtravel.to.name"
class="button o_purple300">{{'Get_positions' | translate}}</a>
<leaflet ng-show="markers[0]"
width="100%" height="40%" markers="markers" center="center"
tiles="tiles" id="map-simple-map"></leaflet>
<div class="padding" ng-show="markers[0]">
<!--<label class="item item-input">
<span class="input-label">{{'n_Seats' | translate}}</span>
<input ng-model="newtravel.seats" type="number">
</label>-->
<label class="item-input">
<span class="input-label">{{'Date' | translate}}</span>
<input ng-model="newtravel.date" type="date" placeholder="">
</label>
<label class="item-input">
<span class="input-label">{{'Hour' | translate}}</span>
<input ng-model="newtravel.date" type="time" placeholder="">
</label>
<!--<ion-toggle ng-model="newtravel.package" toggle-class="toggle-calm">
<i class="icon ion-ios-box"></i>
{{'Can_carry_package' | translate}}
</ion-toggle>
<ion-toggle ng-model="newtravel.collectivized" toggle-class="toggle-calm">
{{'Collectivized_car' | translate}}
</ion-toggle>-->
<label class="item item-input">
<span class="input-label">{{'Description' | translate}}</span>
<input type="text" ng-model="newtravel.description">
</label>
<p class="padding">
<a ng-click="createTravel()" class="button o_purple400 o_floatRight">
{{'Ask_for_package' | translate}}
</a>
</p>
</div><!-- end of padding -->
</ion-content>
</ion-view>

+ 5
- 1
www/templates/editUser.html

@ -1,5 +1,5 @@
<ion-view view-title="{{'Edit_user' | translate}} {{user.username}}"> <ion-view view-title="{{'Edit_user' | translate}} {{user.username}}">
<ion-content class="has-footer">
<ion-content>
<div class="o_userProfileBackground"> <div class="o_userProfileBackground">
<img ng-src="{{user.avatar}}" class="o_userImgCircular" <img ng-src="{{user.avatar}}" class="o_userImgCircular"
ng-click="selectAvatar()"/> ng-click="selectAvatar()"/>
@ -24,6 +24,10 @@
</p> </p>
</div> </div>
<div class="item"> <div class="item">
<p>
<input ng-model="user.faircoinString" class="o_transparentInputBlack"
placeholder="{{'FaircoinWallet' | translate}}">
</p>
<img src="{{user.faircoin}}" style="width: 100%;" <img src="{{user.faircoin}}" style="width: 100%;"
ng-click="selectFaircoinPublicKey()" /> ng-click="selectFaircoinPublicKey()" />
</div> </div>

+ 4
- 4
www/templates/newTravel.html

@ -4,13 +4,13 @@
<i class="icon ion-android-car"></i> <i class="icon ion-android-car"></i>
{{'Offer_Car' | translate}} {{'Offer_Car' | translate}}
</a> </a>
<a href="" class="item item-icon-left o_purple400">
<a href="#/app/askForCar" class="item item-icon-left o_purple400">
<i class="icon ion-help"></i> <i class="icon ion-help"></i>
{{'Ask_for_Car' | translate}} (not yet)
{{'Ask_for_Car' | translate}}
</a> </a>
<a href="" class="item item-icon-left o_purple300">
<a href="#/app/askForPackage" class="item item-icon-left o_purple300">
<i class="icon ion-ios-box"></i> <i class="icon ion-ios-box"></i>
{{'Ask_for_Package' | translate}} (not yet)
{{'Ask_for_Package' | translate}}
</a> </a>
</ion-content> </ion-content>
</ion-view> </ion-view>

+ 1
- 1
www/templates/offerCar.html

@ -1,5 +1,5 @@
<ion-view view-title="{{'Offer_Car' | translate}}"> <ion-view view-title="{{'Offer_Car' | translate}}">
<ion-content class="has-footer">
<ion-content>
<div class="padding"> <div class="padding">
<label class="item item-input"> <label class="item item-input">
<span class="input-label">{{'Title' | translate}}</span> <span class="input-label">{{'Title' | translate}}</span>

+ 4
- 1
www/templates/travel.html

@ -20,7 +20,10 @@
</p> </p>
</div> </div>
<h2> <h2>
<i class="icon ion-android-car"></i> {{travel.title}}</h2>
<i ng-show="travel.type=='offering'" class="icon ion-android-car"></i>
<i ng-show="travel.type=='asking'" class="icon ion-help"></i>
<i ng-show="travel.type=='package'" class="icon ion-ios-box"></i>
{{travel.title}}</h2>
<div class="">{{travel.date | date:"dd/MM HH:mm a"}}</div> <div class="">{{travel.date | date:"dd/MM HH:mm a"}}</div>
</div> </div>

+ 3
- 1
www/templates/travels.html

@ -23,7 +23,9 @@
<div class="item-note text-right"> <div class="item-note text-right">
{{travel.user.username}} {{travel.user.username}}
</div> </div>
<i class="icon ion-android-car o_text_grey700"></i>
<i ng-show="travel.type=='offering'" class="icon ion-android-car o_text_grey700"></i>
<i ng-show="travel.type=='asking'" class="icon ion-help o_text_grey700"></i>
<i ng-show="travel.type=='package'" class="icon ion-ios-box o_text_grey700"></i>
<h2 class="o_text_grey800">{{travel.title}}</h2> <h2 class="o_text_grey800">{{travel.title}}</h2>
<div class="item-note text-right"> <div class="item-note text-right">
<div class="o_text_purple300">{{travel.date | date:"dd/MM"}}</div> <div class="o_text_purple300">{{travel.date | date:"dd/MM"}}</div>

+ 3
- 0
www/templates/user.html

@ -44,6 +44,9 @@
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<p>
{{user.faircoinString}}
</p>
<img src="{{user.faircoin}}" style="width: 100%;" /> <img src="{{user.faircoin}}" style="width: 100%;" />
</div> </div>
<!--<div class="item item-body"> <!--<div class="item item-body">

Loading…
Cancel
Save