File tree Expand file tree Collapse file tree 4 files changed +33
-11
lines changed
Expand file tree Collapse file tree 4 files changed +33
-11
lines changed Original file line number Diff line number Diff line change 1+ * on expand scroll to item on list
2+
3+ * add functionality to select which balloon to follow
4+
5+ * adjust colors and fonts of the template to be more slick
6+
7+ * make the global tamplate to landscape, so it fits anything
8+ that is not a phone in portrait mode. This way the app
9+ can be run by desktop browsers as well as handhelds
10+
111* functionality of menu icons
212 - home (HAB list)
313 - perhas a screen with current location? if phone allows
414 - just a list of all chase cars
515 - just a list of all stations
16+
17+ New idea: Have just home and help icon
18+ - home is just the regular screen
19+ - help cotains credits and useful info
620
721* resize elements with javascript, so app displays correctly on any browser/mobile/tablet
822
9- * adjust top and bottom padding with javascript based on browser
10- iPhone safari's addressbar and bottom bar cover part of the web page.
11- At least on iOS 4.1, maybe fixed on newer version
12-
1323* add rotation animation to arrow in vehicle list
1424
15- * add functionality to select which balloon to follow
1625
1726
1827
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ header > div,
7171.header i {
7272 float : right;
7373 font-weight : normal;
74- color : # 000 ;
74+ color : # aaa ;
7575}
7676.header i : after { content : "▼" ; }
7777
Original file line number Diff line number Diff line change @@ -28,12 +28,24 @@ $(window).ready(function() {
2828 $ ( '#main' ) . on ( 'click' , '.row .header' , function ( ) {
2929 var e = $ ( this ) . parent ( ) ;
3030 if ( e . hasClass ( 'active' ) ) {
31+ // collapse data for selecte vehicle
3132 e . removeClass ( 'active' ) ;
32- e . find ( '.data' ) . slideUp ( ) ;
33+ e . find ( '.data' ) . hide ( ) ;
34+
35+ listScroll . refresh ( ) ;
3336 } else {
37+ // expand data for select vehicle
3438 e . addClass ( 'active' ) ;
35- e . find ( '.data' ) . slideDown ( ) ;
39+ e . find ( '.data' ) . show ( ) ;
40+
41+ listScroll . refresh ( ) ;
42+
43+ // auto scroll when expanding an item
44+ var eName = "." + e . parent ( ) . attr ( 'class' ) + " ." + e . attr ( 'class' ) . match ( / v e h i c l e \d + / ) [ 0 ] ;
45+ listScroll . scrollToElement ( eName ) ;
46+
47+ // pan to selected vehicle
48+ panTo ( parseInt ( e . attr ( 'class' ) . match ( / v e h i c l e ( \d + ) / ) [ 1 ] ) ) ;
3649 }
37- listScroll . refresh ( ) ;
3850 } ) ;
3951} ) ;
Original file line number Diff line number Diff line change @@ -495,8 +495,9 @@ function updateVehicleInfo(index, position) {
495495 //var container = $('vehicle' + index);
496496 var elm = $ ( '.vehicle' + index ) ;
497497 if ( elm . length == 0 ) {
498- $ ( '.portrait' ) . append ( '<div class="row vehicle' + index + '"></div>' ) ;
499- $ ( '.landscape' ) . append ( '<div class="row vehicle' + index + '"></div>' ) ;
498+ var active = ( index == 0 ) ? 'active' : '' ;
499+ $ ( '.portrait' ) . append ( '<div class="row ' + active + ' vehicle' + index + '"></div>' ) ;
500+ $ ( '.landscape' ) . append ( '<div class="row ' + active + ' vehicle' + index + '"></div>' ) ;
500501
501502 }
502503
You can’t perform that action at this time.
0 commit comments