From 5987412720498aa22202a1bcca3cb988a9cf5606 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 12 May 2010 17:00:46 +0200 Subject: Doc: Adding loading image to search textbox --- doc/src/template/images/spinner.gif | Bin 0 -> 2037 bytes doc/src/template/scripts/functions.js | 14 +++++++++++--- doc/src/template/style/style.css | 4 ++++ tools/qdoc3/test/qt-html-templates.qdocconf | 6 +++--- 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 doc/src/template/images/spinner.gif diff --git a/doc/src/template/images/spinner.gif b/doc/src/template/images/spinner.gif new file mode 100644 index 0000000..1ed786f Binary files /dev/null and b/doc/src/template/images/spinner.gif differ diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js index 09b7de3..7d93486 100755 --- a/doc/src/template/scripts/functions.js +++ b/doc/src/template/scripts/functions.js @@ -40,6 +40,7 @@ var exampleCount = 0; var qturl = ""; // change from "http://doc.qt.nokia.com/4.6/" to 0 so we can have relative links function processNokiaData(response){ +$('.sidebar .search form input').addClass('loading'); // debug $('.content').prepend('
  • handling search results
  • '); // debuging var propertyTags = response.getElementsByTagName('page'); @@ -92,7 +93,8 @@ function processNokiaData(response){ } } - if(lookupCount == 0){$('#ul001').prepend('
  • Found no result
  • ');$('#ul001 li').css('display','block');} + if(lookupCount == 0){$('#ul001').prepend('
  • Found no result
  • ');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading'); +} if(articleCount == 0){$('#ul002').prepend('
  • Found no result
  • ');$('#ul002 li').css('display','block');} if(exampleCount == 0){$('#ul003').prepend('
  • Found no result
  • ');$('#ul003 li').css('display','block');} // reset count variables; @@ -119,8 +121,14 @@ function CheckEmptyAndLoadList() $('.defaultLink').css('display','none'); } } - - +/* +$(window).resize(function(){ +if($(window).width()<400) + $('body').addClass('offline'); +else + $('body').removeClass('offline'); + }); + */ // Loads on doc ready $(document).ready(function () { var pageTitle = $('title').html(); diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index d87b11f..5ad90e3 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -1131,6 +1131,10 @@ visibility: hidden; } +.sidebar .search form input.loading +{ + background:url("../images/spinner.gif") no-repeat scroll right center transparent; +} /* end of screen media */ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 31fc414..9af2f92 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -105,7 +105,7 @@ HTML.postpostheader = " \n" \ "
    \n" HTML.footer = " \n" \ - "
    \n" \ + "
    \n" \ " [+] Documentation Feedback
    \n" \ "
    \n" \ "
    \n" \ @@ -124,12 +124,12 @@ HTML.footer = " \n" \ " \n" \ "
    \n" \ "
    \n" \ - " X\n" \ + " X\n" \ "
    \n" \ "
    \n" \ "

    \n" \ " \n" \ - "

    \n" \ "
    \n" \ "
    \n" \ -- cgit v0.12