From 2ab3615485da7b1b2d10e406bc0e7d47923d06f2 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Tue, 13 Jul 2010 08:02:36 +1000 Subject: [PATCH] Get articles pages working on iPhone --- content/mobile.sass | 14 +++++++++++++- output/js/application.js | 31 ++++++++++++------------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/content/mobile.sass b/content/mobile.sass index 6e49c21..82cdb7d 100644 --- a/content/mobile.sass +++ b/content/mobile.sass @@ -33,13 +33,25 @@ body > header span h1 font-size: 30px - + ul.articles li margin: 0 padding-top: 0 height: auto + +nav.search + li + display: list-item + margin: 1em 0 0 0 + font-size: large + + +#search + float: none + + #flickr header diff --git a/output/js/application.js b/output/js/application.js index ec0875e..bc47947 100644 --- a/output/js/application.js +++ b/output/js/application.js @@ -28,26 +28,19 @@ jQuery(function() { var input = $('#search input'); if(input.length > 0) { - // Setup incremental search on Articles pages - if('onsearch' in input.get(0)) { - $('#search label').hide(); - input.bind("search", function() { refresh_search(this) }); - } - else { - // Poll the field for its value while it has focus - var last_value; - input.focus(function() { - last_value = input.val(); - input.everyTime('500ms', function() { - if(input.val() != last_value) { - refresh_search(input); - last_value = input.val(); - } - }); - }).blur(function() { - input.stopTime(); + // Poll the field for its value while it has focus + var last_value; + input.focus(function() { + last_value = input.val(); + input.everyTime('500ms', function() { + if(input.val() != last_value) { + refresh_search(input); + last_value = input.val(); + } }); - } + }).blur(function() { + input.stopTime(); + }); input.val(''); } $('#search').show();