From 1b61bb9698b50fdeb97304db74e1a64b387aef8b Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 5 May 2010 16:09:42 +0200 Subject: Doc: Changes to the HTML output Changes in css, htmlgenerator (removing redundant class names), updating html templates and updating js. Reviewed-by: Morten Engvoldsen --- doc/src/template/scripts/functions.js | 93 +++++++++++++---------------- doc/src/template/style/style.css | 27 +++++---- tools/qdoc3/htmlgenerator.cpp | 11 ++-- tools/qdoc3/test/qt-html-templates.qdocconf | 57 ++++++++---------- 4 files changed, 88 insertions(+), 100 deletions(-) diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js index b2e791c..800660e 100755 --- a/doc/src/template/scripts/functions.js +++ b/doc/src/template/scripts/functions.js @@ -40,36 +40,30 @@ var articleCount = 0; var exampleCount = 0; var qturl = ""; // change to 0 function processNokiaData(response){ - var propertyTags = response.getElementsByTagName('page'); var ulStartElement = ""; for (var i=0; i< propertyTags.length; i++) { - var full_address_lookup = "' ; - - // var rowlookup = document.getElementById('div001').insertRow(-1); - // var celllookup = rowlookup.insertCell(-1); - // celllookup.style.padding="0 0 0 0"; - // lookupCount++; - // celllookup.innerHTML = full_address_lookup ; - // document.getElementById('list001').style.display = "none"; + + '' ; + +// $('#list002 li').remove(); +// $('#tbl002').prepend('
  • foo1
  • '); +// $('#tbl002').prepend('
  • bar2
  • '); - //
  • - //var listElement = "
  • '; + $('ul001').prepend(full_address_lookup); } } @@ -77,33 +71,24 @@ function processNokiaData(response){ if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){ articleCount = 0; document.getElementById('live002').style.display = "block"; - // document.getElementById('live002').style.height = "150px"; for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){ full_address_topic = full_address_topic + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue; full_address_topic = full_address_topic + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue - + ''; - // var rowlookup = document.getElementById('div002').insertRow(-1); - // var celllookup = rowlookup.insertCell(-1); - // celllookup.style.padding="0 0 0 0"; - // articleCount++; - // celllookup.innerHTML = full_address_topic; - // document.getElementById('list002').style.display = "none"; + + ''; + + $('ul002').prepend(full_address_lookup); } } if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example'){ exampleCount = 0; document.getElementById('live003').style.display = "block"; - // document.getElementById('live003').style.height = "150px"; - for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){ + + for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){ full_address_examples = full_address_examples + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue; full_address_examples = full_address_examples + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue - + ''; - // var rowlookup = document.getElementById('div003').insertRow(-1); - // var celllookup = rowlookup.insertCell(-1); - // celllookup.style.padding="0 0 0 0"; - // exampleCount++; - // celllookup.innerHTML = full_address_examples; - // document.getElementById('list003').style.display = "none"; + + ''; + + $('ul003').prepend(full_address_lookup); } } @@ -121,6 +106,11 @@ function processNokiaData(response){ } function removeResults() { + +// get hold of the non-default li elements and delete them + $('.live li').remove(); + + /* var resultsTableLookup = document.getElementById('div001'); var recordslookup = resultsTableLookup.rows.length; @@ -141,22 +131,22 @@ function removeResults() { var recordsexample = resultsTableexample.rows.length; for (var i=(recordsexample-1); i> 0; i--) // resultsTableexample.deleteRow(i); - */ - removeList(); + + removeList(); */ } function removeList(){ - // var resultsTableLookuplist = document.getElementById('tbl001'); + // var resultsTableLookuplist = document.getElementById('ul001'); // var recordlookuplist = resultsTableLookuplist.rows.length; // for (var i=(recordlookuplist-1); i> 0; i--) // resultsTableLookuplist.deleteRow(i); - // var resultsTableArticlelist = document.getElementById('tbl002'); + // var resultsTableArticlelist = document.getElementById('ul002'); // var recordArticlelist = resultsTableArticlelist.rows.length; // for (var i=(recordArticlelist-1); i> 0; i--) // resultsTableArticlelist.deleteRow(i); - // var resultsTableExamplelist = document.getElementById('tbl003'); + // var resultsTableExamplelist = document.getElementById('ul003'); // var recordExamplelist = resultsTableExamplelist.rows.length; // for (var i=(recordExamplelist-1); i> 0; i--) // resultsTableExamplelist.deleteRow(i); @@ -170,6 +160,7 @@ function CheckEmptyAndLoadList() if((blankRE.test(value)) || (value.length < 3)) { //empty inputbox + // load default li elements into the ul if empty loadAllList(); //alert("loadAllList"); document.getElementById('live001').style.display = "none"; @@ -189,12 +180,12 @@ function CheckEmptyAndLoadList() } function loadAllList(){ - var fullAddressListLookup = ""; - // var rowlistarticle = document.getElementById('tbl002').insertRow(-1); + // var rowlistarticle = document.getElementById('ul002').insertRow(-1); // var celllistarticle = rowlistarticle.insertCell(-1); // celllistarticle.style.padding="0 0 0 0"; //celllistarticle.innerHTML = fullAddressListArticle ; @@ -222,21 +213,21 @@ function loadAllList(){ + "
  • Desktop examples
  • " + "
  • Device examples
  • " + ""; - // var rowlistexample = document.getElementById('tbl003').insertRow(-1); + // var rowlistexample = document.getElementById('ul003').insertRow(-1); // var celllistexample = rowlistexample.insertCell(-1); // celllistexample.style.padding="0 0 0 0"; - //celllistexample.innerHTML = fullAddressListExample ; + //celllistexample.innerHTML = fullAddressListExample ;*/ } function loadLookupList(){ - var fullAddressListLookup = "