summaryrefslogtreecommitdiffstats
path: root/doc/src/template/scripts
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-05-05 14:09:42 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-05-05 14:09:42 (GMT)
commit1b61bb9698b50fdeb97304db74e1a64b387aef8b (patch)
tree6dce2761fd6ea28c929ac972d3810aa12dac6b50 /doc/src/template/scripts
parentcbae18e48638cb3fb97dee56c32a2deb5b9af4ad (diff)
downloadQt-1b61bb9698b50fdeb97304db74e1a64b387aef8b.zip
Qt-1b61bb9698b50fdeb97304db74e1a64b387aef8b.tar.gz
Qt-1b61bb9698b50fdeb97304db74e1a64b387aef8b.tar.bz2
Doc: Changes to the HTML output
Changes in css, htmlgenerator (removing redundant class names), updating html templates and updating js. Reviewed-by: Morten Engvoldsen
Diffstat (limited to 'doc/src/template/scripts')
-rwxr-xr-xdoc/src/template/scripts/functions.js93
1 files changed, 42 insertions, 51 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 = "<ul>";
var ulEndElement = "</ul>";
for (var i=0; i< propertyTags.length; i++) {
- var full_address_lookup = "<ul><li><a href='"+qturl+"";
- var full_address_topic = "<ul><li><a href='"+qturl+"";
- var full_address_examples = "<ul><li><a href='"+qturl+"";
+ var full_address_lookup = "<li><a href='"+qturl+"";
+ var full_address_topic = "<li><a href='"+qturl+"";
+ var full_address_examples = "<li><a href='"+qturl+"";
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
lookupCount=0;
document.getElementById('live001').style.display = "block";
- // document.getElementById('live001').style.height = "150px";
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_address_lookup = full_address_lookup + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_address_lookup = full_address_lookup + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue
- + '</a></li></ul>' ;
-
- // 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";
+ + '</a></li>' ;
+
+// $('#list002 li').remove();
+// $('#tbl002').prepend('<li>foo1</li>');
+// $('#tbl002').prepend('<li>bar2</li>');
- // <li>
- //var listElement = "<li><a href='"+ full_address_lookup +"" + '</a></li>';
+ $('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
- + '</a></li></ul>';
- // 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";
+ + '</a></li>';
+
+ $('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
- + '</a></li></ul>';
- // 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";
+ + '</a></li>';
+
+ $('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 = "<ul><li><a href='"+qturl+"modules.html'>All modules</a></li>"
+ /*var fullAddressListLookup = "<ul><li><a href='"+qturl+"modules.html'>All modules</a></li>"
+ "<li><a href='"+qturl+"classes.html'>All classes</a></li>"
+ "<li><a href='"+qturl+"functions.html'>All functions</a></li>"
+ "<li><a href='"+qturl+"platform-specific.html'>Platform specifics</a></li>"
+ "</ul>";
- // var rowlistlookup = document.getElementById('tbl001').insertRow(-1);
+ // var rowlistlookup = document.getElementById('ul001').insertRow(-1);
// var celllistlookup = rowlistlookup.insertCell(-1);
// celllistlookup.style.padding="0 0 0 0";
//celllistlookup.style.width="10px";
@@ -210,7 +201,7 @@ function loadAllList(){
+ "<li><a href='"+qturl+"declarativeui.html'>Qt Quick</a></li>"
+ "<li><a href='"+qturl+"widgets-and-layouts.html'>Widget style &amp; layout</a></li>"
+ "</ul>";
- // 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(){
+ "<li><a href='"+qturl+"#'>Desktop examples</a></li>"
+ "<li><a href='"+qturl+"#'>Device examples</a></li>"
+ "</ul>";
- // 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 = "<ul><li><a href='"+qturl+"modules.html'>All modules</a></li>"
+ /*var fullAddressListLookup = "<ul><li><a href='"+qturl+"modules.html'>All modules</a></li>"
+ "<li><a href='"+qturl+"classes.html'>All classes</a></li>"
+ "<li><a href='"+qturl+"functions.html'>All functions</a></li>"
+ "<li><a href='"+qturl+"platform-specific.html'>Platform specifics</a></li>"
+ "</ul>";
- // var rowlistlookup = document.getElementById('tbl001').insertRow(-1);
+ // var rowlistlookup = document.getElementById('ul001').insertRow(-1);
// var celllistlookup = rowlistlookup.insertCell(-1);
// celllistlookup.style.padding="0 0 0 0";
//celllistlookup.style.width="10px";
@@ -245,38 +236,38 @@ function loadLookupList(){
document.getElementById('live001').style.display = "none";
document.getElementById('list001').style.display = "block";
//alert("loadLookupList")
-
+*/
}
function loadArticleList(){
-
+ /*
var fullAddressListArticle = "<ul><li><a href='"+qturl+"object.html'>QObject model</a></li>"
+ "<li><a href='"+qturl+"eventsandfilters.html'>Events, signals &amp; slots</a></li>"
+ "<li><a href='"+qturl+"paintsystem.html'>Graphics &amp; Paint system</a></li>"
+ "<li><a href='"+qturl+"declarativeui.html'>Qt Quick</a></li>"
+ "<li><a href='"+qturl+"widgets-and-layouts.html'>Widget style &amp; layout</a></li>"
+ "</ul>";
- // 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 ;
document.getElementById('live002').style.display = "none";
- document.getElementById('list002').style.display = "block";
+ document.getElementById('list002').style.display = "block";*/
}
function loadExampleList(){
-
+ /*
var fullAddressListExample = "<ul><li><a href='"+qturl+"examples.html'>All examples</a></li>"
+ "<li><a href='"+qturl+"tutorials.html'>All tutorials</a></li>"
+ "<li><a href='"+qturl+"#'>Qt Quick examples</a></li>"
+ "<li><a href='"+qturl+"#'>Desktop examples</a></li>"
+ "<li><a href='"+qturl+"#'>Desktop examples</a></li>"
+ "</ul>";
- // 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 ;
document.getElementById('live003').style.display = "none";
- document.getElementById('list003').style.display = "block";
+ document.getElementById('list003').style.display = "block";*/
}