summaryrefslogtreecommitdiffstats
path: root/doc/templates/scripts
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel.molkentin@nokia.com>2012-01-23 12:53:59 +0100
committerDaniel Molkentin <daniel.molkentin@nokia.com>2012-01-23 13:34:43 +0100
commit05a3189a54125765ec1613a0bc9feb4b0049bde3 (patch)
treee0064724ce6fe7bcca90671fe7e9ae85b5baf7dd /doc/templates/scripts
parentff46f432e7020de47c0e82468cd9167f206a4cc2 (diff)
Fix the documentation to build again
- Switch to Qt 4.7.4/4.8 compatible style (from Qt Creator) - add make docs target directly to the installerfw.pro file - subsequently remove doc.pro (which was wrong to begin with) Change-Id: I3bfdd18780074df9566217fb4c0029fd122c14f0 Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'doc/templates/scripts')
-rw-r--r--doc/templates/scripts/functions.js33
-rw-r--r--doc/templates/scripts/narrow.js13
2 files changed, 27 insertions, 19 deletions
diff --git a/doc/templates/scripts/functions.js b/doc/templates/scripts/functions.js
index 58a024859..32cc901fe 100644
--- a/doc/templates/scripts/functions.js
+++ b/doc/templates/scripts/functions.js
@@ -63,11 +63,9 @@ function processNokiaData(response){
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
lookupCount++;
-
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element = full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd;
-
$('#ul001').append(full_li_element);
$('#ul001 .defaultLink').css('display','none');
@@ -77,7 +75,6 @@ function processNokiaData(response){
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){
articleCount++;
-
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
@@ -103,10 +100,13 @@ function processNokiaData(response){
if(i==propertyTags.length){$('#pageType').removeClass('loading');}
}
+ if(lookupCount > 0){$('#ul001 .menuAlert').remove();$('#ul001').prepend('<li class=\"menuAlert liveResult hit\">Found ' + lookupCount + ' hits</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
+ if(articleCount > 0){$('#ul002 .menuAlert').remove();$('#ul002').prepend('<li class=\"menuAlert liveResult hit\">Found ' + articleCount + ' hits</li>');$('#ul002 li').css('display','block');}
+ if(exampleCount > 0){$('#ul003 .menuAlert').remove();$('#ul003').prepend('<li class=\"menuAlert liveResult hit\">Found ' + articleCount + ' hits</li>');$('#ul003 li').css('display','block');}
- if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
- if(articleCount == 0){$('#ul002').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');}
- if(exampleCount == 0){$('#ul003').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');}
+ if(lookupCount == 0){$('#ul001 .menuAlert').remove();$('#ul001').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
+ if(articleCount == 0){$('#ul002 .menuAlert').remove();$('#ul002').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');}
+ if(exampleCount == 0){$('#ul003 .menuAlert').remove();$('#ul003').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');}
// reset count variables;
lookupCount=0;
articleCount = 0;
@@ -117,12 +117,8 @@ function processNokiaData(response){
var blankRE=/^\s*$/;
function CheckEmptyAndLoadList()
{
- var pageUrl = window.location.href;
- var pageVal = $('title').html();
$('#feedUrl').remove();
- $('#pageVal').remove();
- $('#feedform').append('<input id="feedUrl" name="feedUrl" value="'+pageUrl+'" style="display:none;">');
- $('#feedform').append('<input id="pageVal" name="pageVal" value="'+pageVal+'" style="display:none;">');
+ $('.menuAlert').remove();
$('.liveResult').remove();
$('.defaultLink').css('display','block');
var value = document.getElementById('pageType').value;
@@ -160,7 +156,8 @@ else
var searchString = $('#pageType').val() ;
if ((searchString == null) || (searchString.length < 3)) {
$('#pageType').removeClass('loading');
- $('.liveResult').remove(); // replaces removeResults();
+ $('.liveResult').remove();
+ $('.searching').remove();
CheckEmptyAndLoadList();
$('.report').remove();
// debug$('.content').prepend('<li>too short or blank</li>'); // debug
@@ -169,9 +166,8 @@ else
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(function () {
$('#pageType').addClass('loading');
- // debug$('.content').prepend('<li>new search started </li>');// debug
- // debug$('.content').prepend('<p class=\"report\">Search string ' +searchString +'</p>'); // debug
-
+ $('.searching').remove();
+ $('.list ul').prepend('<li class="menuAlert searching">Searching...</li>');
$.ajax({
contentType: "application/x-www-form-urlencoded",
url: 'http://' + location.host + '/nokiasearch/GetDataServlet',
@@ -180,9 +176,10 @@ else
type: 'post',
success: function (response, textStatus) {
- $('.liveResult').remove(); // replaces removeResults();
- $('#pageType').removeClass('loading');
-
+ $('.liveResult').remove();
+ $('.searching').remove();
+ $('#pageType').removeClass('loading');
+ $('.list ul').prepend('<li class="menuAlert searching">Searching...</li>');
processNokiaData(response);
}
diff --git a/doc/templates/scripts/narrow.js b/doc/templates/scripts/narrow.js
index 12d0ce89d..35c81bf4a 100644
--- a/doc/templates/scripts/narrow.js
+++ b/doc/templates/scripts/narrow.js
@@ -59,9 +59,20 @@ var narrowInit = function() {
}
$(document).ready(function(){
- if ($('body').hasClass('narrow')) {
+/* if ($('body').hasClass('narrow')) {
narrowInit();
}
+ */
+ if($(window).width()<600) {
+ $('body').addClass('narrow');
+
+ if ($("#narrowsearch").length == 0) {
+ narrowInit();
+ }
+ }
+ else {
+ $('body').removeClass('narrow');
+ }
});
$(window).bind('resize', function () {