Skip to content

Commit ed7d332

Browse files
updated iscroll lib to v5
* updated iscroll to verion 5 * fixes #52, unwanted click event after drag release * patched iscroll.js to fix a bug blocking click events cubiq/iscroll#831 * updated yuicompressor to latest version
1 parent 68fee6d commit ed7d332

File tree

5 files changed

+2037
-17
lines changed

5 files changed

+2037
-17
lines changed

build.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ echo -n "Compiling CSS... "
55
cd css
66
rm -f mobile.css
77
cat base.css skeleton.css layout.css habitat-font.css main.css > mobile.tmp
8-
java -jar "../tools/yuicompressor-2.4.8pre.jar" --type=css mobile.tmp > mobile.css
8+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=css mobile.tmp > mobile.css
99
rm -f mobile.tmp
1010
cd ..
1111
echo "Done!"
@@ -15,20 +15,21 @@ echo -n "Compiling JavaScript... "
1515
cd js
1616
rm -f mobile.js init_plot.js
1717
# precompiled libs
18-
cat jquery* iscroll.js >> mobile.js
18+
cat jquery* >> mobile.js
1919

2020
VERSION="`git rev-parse --short HEAD`"
2121

2222
# compile the rest
23-
java -jar "../tools/yuicompressor-2.4.8pre.jar" --type=js --disable-optimizations --nomunge gmaps_extentions.js >> mobile.js
24-
java -jar "../tools/yuicompressor-2.4.8pre.jar" --type=js --disable-optimizations --nomunge chasecar.lib.js | sed "s/{VER}/$VERSION/" >> mobile.js
25-
java -jar "../tools/yuicompressor-2.4.8pre.jar" --type=js --disable-optimizations --nomunge nite-overlay.js >> mobile.js
26-
java -jar "../tools/yuicompressor-2.4.8pre.jar" --type=js --disable-optimizations --nomunge tracker.js >> mobile.js
27-
java -jar "../tools/yuicompressor-2.4.8pre.jar" --type=js --disable-optimizations --nomunge app.js >> mobile.js
23+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge gmaps_extentions.js >> mobile.js
24+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge iscroll.js >> mobile.js
25+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge chasecar.lib.js | sed "s/{VER}/$VERSION/" >> mobile.js
26+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge nite-overlay.js >> mobile.js
27+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge tracker.js >> mobile.js
28+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge app.js >> mobile.js
2829

2930
#compile plot lib and config
30-
java -jar "../tools/yuicompressor-2.4.8pre.jar" --type=js --disable-optimizations --nomunge _jquery.flot.js >> init_plot.js
31-
java -jar "../tools/yuicompressor-2.4.8pre.jar" --type=js --disable-optimizations --nomunge plot_config.js >> init_plot.js
31+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge _jquery.flot.js >> init_plot.js
32+
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge plot_config.js >> init_plot.js
3233

3334
cd ..
3435
echo "Done!"

css/main.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ body {
2727
float: left;
2828
}
2929

30-
.scrollStyleV {
30+
.iScrollVerticalScrollbar {
3131
z-index: 49;
3232
width: 5px;
3333
bottom: 6px;
@@ -36,7 +36,7 @@ body {
3636
position: absolute;
3737
}
3838

39-
.scrollStyleV > div {
39+
.iScrollVerticalScrollbar > div {
4040
position: absolute;
4141
background: none repeat scroll 0 0 padding-box rgba(0, 0, 0, 0.5);
4242
border: 1px solid rgba(255, 255, 255, 0.9);
@@ -207,6 +207,7 @@ header > div {
207207
}
208208
#main {
209209
float: left;
210+
overflow: hidden;
210211
}
211212

212213
.nav {
@@ -636,7 +637,6 @@ header > div {
636637
float: left;
637638
height: 245px;
638639
width: 199px;
639-
overflow: hidden;
640640
margin-top: 55px;
641641
box-shadow: -2px 0px 6px 0px #555;
642642
}

js/app.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ var positionUpdateHandle = function(position) {
254254
// save position and update only if different is available
255255
if(CHASE_timer < (new Date()).getTime() &&
256256
(
257-
GPS_lat != lat ||
257+
GPS_lat != lat ||
258258
GPS_lon != lon ||
259259
GPS_alt != alt ||
260260
GPS_speed != speed
@@ -384,7 +384,16 @@ $(window).ready(function() {
384384
checkSize();
385385

386386
// add inline scroll to vehicle list
387-
listScroll = new iScroll('main', { hScrollbar: false, hScroll: false, snap: false, scrollbarClass: 'scrollStyle' });
387+
listScroll = new IScroll('#main', {
388+
hScrollbar: false,
389+
hScroll: false,
390+
snap: false,
391+
mouseWheel: true,
392+
scrollbars: true,
393+
scrollbarClass: 'scrollStyle',
394+
shrinkScrollbars: 'scale',
395+
tap: true,
396+
});
388397

389398
$('#telemetry_graph').on('click', '.graph_label', function() {
390399
var e = $(this), h;
@@ -476,14 +485,14 @@ $(window).ready(function() {
476485
});
477486

478487
// follow vehicle by clicking on data
479-
$('#main').on('click', '.row .data', function() {
488+
$('#main').on('tap', '.row .data', function() {
480489
var e = $(this).parent();
481490

482491
followVehicle(e.attr('data-vcallsign'));
483492
});
484493

485494
// expand/collapse data when header is clicked
486-
$('#main').on('click', '.row .header', function() {
495+
$('#main').on('tap', '.row .header', function() {
487496
var e = $(this).parent();
488497
if(e.hasClass('active')) {
489498
// collapse data for selected vehicle

0 commit comments

Comments
 (0)