From d53b25d397e54551aff15b79e3807e7ce4612886 Mon Sep 17 00:00:00 2001
From: Morten Engvoldsen
Date: Fri, 21 May 2010 09:55:14 +0200
Subject: Doc: Changes to the HTMLGenerator, style and js Replacing tables with
lists in the HTML generator Adding img to search box Moving JS from template
to script files
---
doc/src/template/scripts/functions.js | 17 ++++++++---------
doc/src/template/style/style.css | 17 +++++++++++++----
tools/qdoc3/htmlgenerator.cpp | 20 ++++++++++----------
tools/qdoc3/test/assistant.qdocconf | 1 +
tools/qdoc3/test/designer.qdocconf | 1 +
tools/qdoc3/test/linguist.qdocconf | 1 +
tools/qdoc3/test/qdeclarative.qdocconf | 1 +
tools/qdoc3/test/qmake.qdocconf | 1 +
tools/qdoc3/test/qt-build-docs.qdocconf | 1 +
tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 1 +
tools/qdoc3/test/qt-defines.qdocconf | 1 +
tools/qdoc3/test/qt-html-templates.qdocconf | 1 -
tools/qdoc3/test/qt.qdocconf | 1 +
tools/qdoc3/test/qt_zh_CN.qdocconf | 1 +
14 files changed, 41 insertions(+), 24 deletions(-)
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index afd1ec3..7ae2421 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -54,8 +54,6 @@ 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');
for (var i=0; i< propertyTags.length; i++) {
@@ -64,7 +62,6 @@ $('.sidebar .search form input').addClass('loading');
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
lookupCount++;
- //$('.live001').css('display','block');
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
@@ -79,7 +76,6 @@ $('.sidebar .search form input').addClass('loading');
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){
articleCount++;
- //$('.live002').css('display','block');
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
@@ -93,7 +89,6 @@ $('.sidebar .search form input').addClass('loading');
}
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example'){
exampleCount++;
- //$('.live003').css('display','block');
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
@@ -105,10 +100,11 @@ $('.sidebar .search form input').addClass('loading');
}
}
+ if(i==propertyTags.length){$('#pageType').removeClass('loading');}
+
}
- if(lookupCount == 0){$('#ul001').prepend('Found no result');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');
-}
+ 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;
@@ -117,7 +113,6 @@ $('.sidebar .search form input').addClass('loading');
exampleCount = 0;
}
-
//build regular expression object to find empty string or any number of blank
var blankRE=/^\s*$/;
function CheckEmptyAndLoadList()
@@ -147,7 +142,7 @@ else
$(document).ready(function () {
var pageUrl = window.location.href;
//alert(pageUrl);
- $('#pageUrl').attr('foo',pageUrl);
+ //$('#pageUrl').attr('foo',pageUrl);
var pageTitle = $('title').html();
$('#feedform').append('');
var currentString = $('#pageType').val() ;
@@ -159,6 +154,7 @@ else
$('#pageType').keyup(function () {
var searchString = $('#pageType').val() ;
if ((searchString == null) || (searchString.length < 3)) {
+ $('#pageType').removeClass('loading');
$('.liveResult').remove(); // replaces removeResults();
CheckEmptyAndLoadList();
$('.report').remove();
@@ -167,6 +163,7 @@ else
}
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(function () {
+ $('#pageType').addClass('loading');
// debug$('.content').prepend('new search started ');// debug
// debug$('.content').prepend('Search string ' +searchString +'
'); // debug
@@ -179,6 +176,8 @@ else
success: function (response, textStatus) {
$('.liveResult').remove(); // replaces removeResults();
+ $('#pageType').removeClass('loading');
+
processNokiaData(response);
}
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index 3f35642..82acd3e 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -998,17 +998,17 @@
.rightAlign
{
- text-align:right;
+ /*text-align:right; */
}
.leftAlign
{
- text-align:left;
+ /*text-align:left; */
}
.topAlign{
- vertical-align:top
+ /*vertical-align:top*/
}
.functionIndex a{
@@ -1140,7 +1140,16 @@
/* end of screen media */
-
+.flowList{
+display:inline-block;
+width:260px;
+}
+.flowList dl{
+padding:0px;
+}
+.wrap .content .flowList p{
+padding:0px;
+}
}
/* end of screen media */
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 6394b6e..0e8d021 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -2479,19 +2479,19 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << "
\n";
}
- out() << "\n";
+ out() << "\n";
for (k = 0; k < numRows; k++) {
if (++numTableRows % 2 == 1)
- out() << "
";
+ out() << "";
+ out() << "";
//break;
// out() << "\n";
for (i = 0; i < NumColumns; i++) {
if (currentOffset[i] >= firstOffset[i + 1]) {
// this column is finished
- out() << "\n | \n"; // check why?
+ out() << "- \n
\n"; // check why?
}
else {
while ((currentParagraphNo[i] < NumParagraphs) &&
@@ -2506,7 +2506,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
currentParagraphNo[i] = NumParagraphs - 1;
}
#endif
- out() << "";
+ out() << " ";
if (currentOffsetInParagraph[i] == 0) {
// start a new paragraph
if (includeAlphabet) {
@@ -2517,9 +2517,9 @@ void HtmlGenerator::generateCompactList(const Node *relative,
<< paragraphName[currentParagraphNo[i]]
<< "";
}
- out() << " | \n";
+ out() << "\n";
- out() << "";
+ out() << " ";
if ((currentParagraphNo[i] < NumParagraphs) &&
!paragraphName[currentParagraphNo[i]].isEmpty()) {
NodeMap::Iterator it;
@@ -2545,15 +2545,15 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << ")";
}
}
- out() << " | \n";
+ out() << "\n";
currentOffset[i]++;
currentOffsetInParagraph[i]++;
}
}
- out() << "
\n";
+ out() << "
\n";
}
- out() << "
\n";
+ out() << "\n";
}
void HtmlGenerator::generateFunctionIndex(const Node *relative,
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index 3711ec4..167bb19 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -30,6 +30,7 @@ qhp.Assistant.extraFiles = images/bg_l.png \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index 39da68b..48e3ea1 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -30,6 +30,7 @@ qhp.Designer.extraFiles = images/bg_l.png \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index dba4fb5..8974bd7 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -30,6 +30,7 @@ qhp.Linguist.extraFiles = images/bg_l.png \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index f744879..0f2e381 100644
--- a/tools/qdoc3/test/qdeclarative.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
@@ -41,6 +41,7 @@ qhp.Qml.extraFiles = images/bg_l.png \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.png \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index b7f4115..ea58059 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -30,6 +30,7 @@ qhp.qmake.extraFiles = images/bg_l.png \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index d3c855f..bd363a6 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -36,6 +36,7 @@ qhp.Qt.extraFiles = index.html \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
index e9bc00c..caf5f73 100644
--- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
@@ -44,6 +44,7 @@ qhp.Qt.extraFiles = index.html \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf
index f3291df..3e71d07 100644
--- a/tools/qdoc3/test/qt-defines.qdocconf
+++ b/tools/qdoc3/test/qt-defines.qdocconf
@@ -34,6 +34,7 @@ extraimages.HTML = qt-logo \
page.png \
page_bg.png \
sprites-combined.png \
+ spinner.gif \
taskmenuextension-example.png \
coloreditorfactoryimage.png \
dynamiclayouts-example.png \
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 50bf0c3..09f0c96 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -130,7 +130,6 @@ HTML.footer = " \n" \
" X
\n" \
" \n" \
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index 83a35a9..267d536 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -40,6 +40,7 @@ qhp.Qt.extraFiles = index.html \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf
index 9275b5c..db02478 100644
--- a/tools/qdoc3/test/qt_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt_zh_CN.qdocconf
@@ -46,6 +46,7 @@ qhp.Qt.extraFiles = index.html \
images/page.png \
images/page_bg.png \
images/sprites-combined.png \
+ images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
--
cgit v0.12