summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-05-07 11:20:14 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-05-07 11:20:14 (GMT)
commit14fdf300795032b21fe51a256b5b22d3c14ca301 (patch)
treec30011370fda63a1e9cfa07610ab89973a221965
parent3a9c669816c2b0784b5c9e1790bc3bbd036cf013 (diff)
downloadQt-14fdf300795032b21fe51a256b5b22d3c14ca301.zip
Qt-14fdf300795032b21fe51a256b5b22d3c14ca301.tar.gz
Qt-14fdf300795032b21fe51a256b5b22d3c14ca301.tar.bz2
Doc: Chages to search feature, css and table order
Changes the search results Fixed table css Added odd&even classes to tables generated by the thmlgenerator Reviewed-by: Morten Engvoldsen
-rwxr-xr-xdoc/src/template/scripts/functions.js7
-rwxr-xr-xdoc/src/template/style/style.css29
-rw-r--r--tools/qdoc3/htmlgenerator.cpp60
3 files changed, 78 insertions, 18 deletions
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index 4b3107f..306b628 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -83,9 +83,9 @@ function processNokiaData(response){
}
}
- if(lookupCount == 0){$('#ul001').prepend('<li>no result</li>');$('#ul001 li').css('display','block');}
- if(articleCount == 0){$('#ul002').prepend('<li>no result</li>');$('#ul002 li').css('display','block');}
- if(exampleCount == 0){$('#ul003').prepend('<li>no result</li>');$('#ul003 li').css('display','block');}
+ if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');}
+ 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');}
// reset count variables;
lookupCount=0;
articleCount = 0;
@@ -97,6 +97,7 @@ function processNokiaData(response){
var blankRE=/^\s*$/;
function CheckEmptyAndLoadList()
{
+ $('.liveResult').remove();
var value = document.getElementById('pageType').value;
if((blankRE.test(value)) || (value.length < 3))
{
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index 6bcb0db..644e56b 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -460,12 +460,12 @@
padding-left: 12px;
background: url(../images/bullet_sq.png) no-repeat 0 5px;
font: normal 400 10pt/1 Verdana;
- color: #44a51c;
+ /* color: #44a51c;*/
margin-bottom: 10px;
}
.content li:hover
{
- text-decoration: underline;
+ /* text-decoration: underline;*/
}
.offline .wrap .content
@@ -747,11 +747,23 @@
th
{
padding: 5px 15px 5px 15px;
+ background-color: #E1E1E1;
+ border-bottom: 1px solid #E6E6E6;
+ border-left: 1px solid #E6E6E6;
+ border-right: 1px solid #E6E6E6;
}
td
{
padding: 3px 15px 3px 20px;
+ border-left: 1px solid #E6E6E6;
+ border-right: 1px solid #E6E6E6;
+ }
+ tr.odd td:hover, tr.even td:hover
+ {
+ /* border-right: 1px solid #C3C3C3;
+ border-left: 1px solid #C3C3C3;*/
}
+
td.rightAlign
{
padding: 3px 15px 3px 10px;
@@ -879,13 +891,22 @@
font: 600 12px/1.2 Arial;
}
- .generic{}
+ .generic{
+ max-width:100%;
+ }
+ .generic td{
+ padding:0;
+ }
+
.alignedsummary{}
.propsummary{}
.memItemLeft{}
.memItemRight{}
.bottomAlign{}
- .highlightedCode{}
+ .highlightedCode
+ {
+ margin:10px;
+ }
.LegaleseLeft{}
.valuelist{}
.annotated{}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 93b0218..6560b68 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -912,8 +912,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else if (atom->string() == ATOM_LIST_VALUE) {
threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom);
if (threeColumnEnumValueTable) {
- out() << "<table class=\"valuelist\">"
- << "<tr><th>Constant</th>"
+ out() << "<table class=\"valuelist\">";
+ // << "<tr>"
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+
+ out() << "<tr><th>Constant</th>"
<< "<th>Value</th>"
<< "<th>Description</th></tr>\n";
}
@@ -1093,7 +1099,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
if (!atom->string().isEmpty()) {
if (atom->string().contains("%"))
- out() << "<table class=\"generic\" width=\"" << atom->string() << "\">\n ";
+ out() << "<table class=\"generic\">\n "; // width=\"" << atom->string() << "\">\n ";
else {
out() << "<table class=\"generic\">\n";
}
@@ -2456,7 +2462,13 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << "<table class=\"generic\">\n";
for (k = 0; k < numRows; k++) {
- out() << "<tr>\n";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd topAlign\">";
+ else
+ out() << "<tr class=\"even topAlign\">";
+ //break;
+
+// out() << "<tr>\n";
for (i = 0; i < NumColumns; i++) {
if (currentOffset[i] >= firstOffset[i + 1]) {
// this column is finished
@@ -3159,8 +3171,13 @@ void HtmlGenerator::generateSectionList(const Section& section,
twoColumn = (section.members.count() >= 5);
}
if (twoColumn)
- out() << "<table class=\"generic\">\n"
- << "<tr><td class=\"topAlign\">";
+ out() << "<table class=\"generic\">\n";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd topAlign\">";
+ else
+ out() << "<tr class=\"even topAlign\">";
+
+// << "<tr><td class=\"topAlign\">";
out() << "<ul>\n";
int i = 0;
@@ -4367,8 +4384,12 @@ void HtmlGenerator::generateQmlSummary(const Section& section,
twoColumn = (count >= 5);
}
if (twoColumn)
- out() << "<table class=\"qmlsummary\">\n"
- << "<tr><td class=\"topAlign\">";
+ out() << "<table class=\"qmlsummary\">\n";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd topAlign\">";
+ else
+ out() << "<tr class=\"even topAlign\">";
+ // << "<tr><td class=\"topAlign\">";
out() << "<ul>\n";
int row = 0;
@@ -4410,7 +4431,14 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
while (p != qpgn->childNodes().end()) {
if ((*p)->type() == Node::QmlProperty) {
qpn = static_cast<const QmlPropertyNode*>(*p);
- out() << "<tr><td>";
+
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+
+ out() << "<td>";
+ //out() << "<tr><td>"; // old
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
if (!qpn->isWritable())
out() << "<span class=\"qmlreadonly\">read-only</span>";
@@ -4436,7 +4464,12 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
const FunctionNode* qsn = static_cast<const FunctionNode*>(node);
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
- out() << "<tr><td>";
+ //out() << "<tr>";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+ out() << "<td>";
out() << "<a name=\"" + refForNode(qsn) + "\"></a>";
generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false);
//generateQmlItem(qsn,relative,marker,false);
@@ -4448,7 +4481,12 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
const FunctionNode* qmn = static_cast<const FunctionNode*>(node);
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
- out() << "<tr><td>";
+ //out() << "<tr>";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+ out() << "<td>";
out() << "<a name=\"" + refForNode(qmn) + "\"></a>";
generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false);
out() << "</td></tr>";