From 14fdf300795032b21fe51a256b5b22d3c14ca301 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Fri, 7 May 2010 13:20:14 +0200 Subject: 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 --- doc/src/template/scripts/functions.js | 7 ++-- doc/src/template/style/style.css | 29 ++++++++++++++--- tools/qdoc3/htmlgenerator.cpp | 60 ++++++++++++++++++++++++++++------- 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('
  • no result
  • ');$('#ul001 li').css('display','block');} - if(articleCount == 0){$('#ul002').prepend('
  • no result
  • ');$('#ul002 li').css('display','block');} - if(exampleCount == 0){$('#ul003').prepend('
  • no result
  • ');$('#ul003 li').css('display','block');} + if(lookupCount == 0){$('#ul001').prepend('
  • Found no result
  • ');$('#ul001 li').css('display','block');} + 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; 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() << "" - << "" + out() << "
    Constant
    "; + // << "" + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + + out() << "" << "" << "\n"; } @@ -1093,7 +1099,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, } if (!atom->string().isEmpty()) { if (atom->string().contains("%")) - out() << "
    ConstantValueDescription
    string() << "\">\n "; + out() << "
    \n "; // width=\"" << atom->string() << "\">\n "; else { out() << "
    \n"; } @@ -2456,7 +2462,13 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << "
    \n"; for (k = 0; k < numRows; k++) { - out() << "\n"; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + //break; + +// out() << "\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() << "
    \n" - << "
    "; + out() << "\n"; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + +// << "
    "; out() << "
      \n"; int i = 0; @@ -4367,8 +4384,12 @@ void HtmlGenerator::generateQmlSummary(const Section& section, twoColumn = (count >= 5); } if (twoColumn) - out() << "\n" - << "
      "; + out() << "\n"; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + // << ""; + else + out() << ""; + + out() << "
      "; out() << "
        \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(*p); - out() << "
      "; + + if (++numTableRows % 2 == 1) + out() << "
      "; + //out() << "
      "; // old out() << ""; if (!qpn->isWritable()) out() << "read-only"; @@ -4436,7 +4464,12 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, const FunctionNode* qsn = static_cast(node); out() << "
      "; out() << ""; - out() << ""; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + out() << "
      "; + //out() << "
      "; out() << ""; 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(node); out() << "
      "; out() << ""; - out() << ""; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + out() << ""; -- cgit v0.12
      "; + //out() << "
      "; out() << ""; generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); out() << "