Skip to content

Commit

Permalink
fixed time information on list
Browse files Browse the repository at this point in the history
  • Loading branch information
rustamli committed Feb 22, 2013
1 parent 58145ec commit c0eb4ad
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

$('.search-input').keydown(function(e) {
var value = $('.search-input').text();
console.log(e.keyCode, value.length)
if ((value.length < 2) && (e.keyCode == 8)) {
$('.clear-button').click();
return;
Expand Down Expand Up @@ -76,8 +75,15 @@
var context = {
price: row[3],
date: dateParts[2] + ' ' + dateParts[1],
airline: row[4]
};
airline: row[4],
originCode: row[0].substring(0, 3).toUpperCase(),
destinationCode: row[1].substring(0, 3).toUpperCase(),
transit: Cities[Math.round(Math.random(70)) + 80].substring(0, 3).toUpperCase(),
randTime1: (Math.round(Math.random(13)) + 10) + ':00',
randTime2: (Math.round(Math.random(13)) + 10) + ':00',
randTime3: (Math.round(Math.random(13)) + 10) + ':00',
randTime4: (Math.round(Math.random(13)) + 10) + ':00'
}


if (count > 1)
Expand Down Expand Up @@ -120,7 +126,6 @@
})

$('.clear-button').click(function() {
console.log('clear-button pressed');
$('.search-input').html('');
$('.search-input').focus();

Expand Down Expand Up @@ -173,8 +178,8 @@

<span class="date">{{ date }}</span>
<div class="details">
04:00 EDI - 05:00 LON <br>
07:00 LON - 12:00 ATH
{{ randTime1 }} {{originCode}} - {{ randTime2 }} {{transit}} <br>
{{ randTime3 }} {{transit}} - {{ randTime4 }} {{destinationCode}}
</div>

<a href="#myModal" data-toggle="modal" role="button" class="price">&pound; {{ price }}</a>
Expand All @@ -187,8 +192,8 @@

<span class="date">{{ date }}</span>
<div class="details">
04:00 EDI - 05:00 LON <br>
07:00 LON - 12:00 ATH
{{ randTime1 }} {{originCode}} - {{ randTime2 }} {{transit}} <br>
{{ randTime3 }} {{transit}} - {{ randTime4 }} {{destinationCode}}
</div>

<a href="#myModal" data-toggle="modal" role="button" class="price">&pound; {{ price }}</a>
Expand Down

0 comments on commit c0eb4ad

Please sign in to comment.