Commit 4df88cce authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Update the doc style from Qt

Reviewed-by: Oswald Buddenhagen
parent 98b6f8a1
/* START non link areas where cursor should change to pointing hand */
$('.t_button').mouseover(function() {
$('.t_button').css('cursor','pointer');
/*document.getElementById(this.id).style.cursor='pointer';*/
});
/* END non link areas */
$('#smallA').click(function() {
$('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','smaller');
......@@ -20,6 +18,7 @@ $('#medA').click(function() {
$('.content p').css('font','13px/20px Verdana');
$('.content li').css('font','400 13px/1 Verdana');
$('.content li').css('line-height','14px');
$('.content .toc li').css('font', 'normal 10px/1.2 Verdana');
$('.content table').css('font','13px/1.2 Verdana');
$('.content .heading').css('font','600 16px/1 Arial');
$('.content .indexboxcont li').css('font','600 13px/1 Verdana');
......@@ -34,27 +33,160 @@ $('#bigA').click(function() {
$(this).addClass('active')
});
function doSearch(str){
if (str.length>3)
{
alert('start search');
// document.getElementById("refWrapper").innerHTML="";
return;
}
else
return;
// var url="indexSearch.php";
// url=url+"?q="+str;
// url=url+"&sid="+Math.random();
// var url="http://localhost:8983/solr/select?";
// url=url+"&q="+str;
// url=url+"&fq=&start=0&rows=10&fl=&qt=&wt=&explainOther=&hl.fl=";
// $.get(url, function(data){
// alert(data);
// document.getElementById("refWrapper").innerHTML=data;
//});
}
\ No newline at end of file
$('.feedclose').click(function() {
$('.bd').show();
$('.hd').show();
$('.footer').show();
$('#feedbackBox').hide();
$('#blurpage').hide();
});
$('.feedback').click(function() {
$('.bd').hide();
$('.hd').hide();
$('.footer').hide();
$('#feedbackBox').show();
$('#blurpage').show();
});
var lookupCount = 0;
var articleCount = 0;
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){
var propertyTags = response.getElementsByTagName('page');
for (var i=0; i< propertyTags.length; i++) {
var linkStart = "<li class=\"liveResult\"><a href='"+qturl+"";
var linkEnd = "</a></li>";
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
lookupCount++;
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element = full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd;
$('#ul001').append(full_li_element);
$('#ul001 .defaultLink').css('display','none');
}
}
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){
articleCount++;
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
$('#ul002').append(full_li_element);
$('#ul002 .defaultLink').css('display','none');
}
}
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example'){
exampleCount++;
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
$('#ul003').append(full_li_element);
$('#ul003 .defaultLink').css('display','none');
}
}
if(i==propertyTags.length){$('#pageType').removeClass('loading');}
}
if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
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;
exampleCount = 0;
}
//build regular expression object to find empty string or any number of blank
var blankRE=/^\s*$/;
function CheckEmptyAndLoadList()
{
var pageUrl = window.location.href;
var pageVal = $('title').html();
$('#feedUrl').remove();
$('#pageVal').remove();
$('#feedform').append('<input id="feedUrl" name="feedUrl" value="'+pageUrl+'" style="display:none;">');
$('#feedform').append('<input id="pageVal" name="pageVal" value="'+pageVal+'" style="display:none;">');
$('.liveResult').remove();
$('.defaultLink').css('display','block');
var value = document.getElementById('pageType').value;
if((blankRE.test(value)) || (value.length < 3))
{
//empty inputbox
// load default li elements into the ul if empty
// loadAllList(); // replaced
$('.defaultLink').css('display','block');
// $('.liveResult').css('display','none');
}else{
$('.defaultLink').css('display','none');
}
}
/*
$(window).resize(function(){
if($(window).width()<400)
$('body').addClass('offline');
else
$('body').removeClass('offline');
});
*/
// Loads on doc ready
$(document).ready(function () {
//alert(pageUrl);
//$('#pageUrl').attr('foo',pageUrl);
var pageTitle = $('title').html();
var currentString = $('#pageType').val() ;
if(currentString.length < 1){
$('.defaultLink').css('display','block');
CheckEmptyAndLoadList();
}
$('#pageType').keyup(function () {
var searchString = $('#pageType').val() ;
if ((searchString == null) || (searchString.length < 3)) {
$('#pageType').removeClass('loading');
$('.liveResult').remove(); // replaces removeResults();
CheckEmptyAndLoadList();
$('.report').remove();
// debug$('.content').prepend('<li>too short or blank</li>'); // debug
return;
}
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(function () {
$('#pageType').addClass('loading');
// debug$('.content').prepend('<li>new search started </li>');// debug
// debug$('.content').prepend('<p class=\"report\">Search string ' +searchString +'</p>'); // debug
$.ajax({
contentType: "application/x-www-form-urlencoded",
url: 'http://' + location.host + '/nokiasearch/GetDataServlet',
data: 'searchString='+searchString,
dataType:'xml',
type: 'post',
success: function (response, textStatus) {
$('.liveResult').remove(); // replaces removeResults();
$('#pageType').removeClass('loading');
processNokiaData(response);
}
});
}, 500);
});
});
var narrowInit = function() {
/* TODO:
Could probably be more efficient, not hardcoding each element to be created
*/
// 1: Create search form
var narrowSearch = $('<div id="narrowsearch"></div>');
var searchform = $("#qtdocsearch");
narrowSearch.append(searchform);
$("#qtdocheader .content .qtref").after(narrowSearch);
// 2: Create dropdowns
var narrowmenu = $('<ul id="narrowmenu" class="sf-menu"></ul>');
// Lookup
var lookuptext = $("#lookup h2").attr("title");
$("#lookup ul").removeAttr("id");
$("#lookup ul li").removeAttr("class");
$("#lookup ul li").removeAttr("style");
var lookupul = $("#lookup ul");
var lookuplist = $('<li></li>');
var lookuplink = $('<a href="#"></a>');
lookuplink.append(lookuptext);
lookuplist.append(lookuplink);
lookuplist.append(lookupul);
narrowmenu.append(lookuplist);
// Topics
var topicstext = $("#topics h2").attr("title");
$("#topics ul").removeAttr("id");
$("#topics ul li").removeAttr("class");
$("#topics ul li").removeAttr("style");
var topicsul = $("#topics ul");
var topicslist = $('<li></li>');
var topicslink = $('<a href="#"></a>');
topicslink.append(topicstext);
topicslist.append(topicslink);
topicslist.append(topicsul);
narrowmenu.append(topicslist);
// Examples
var examplestext = $("#examples h2").attr("title");
$("#examples ul").removeAttr("id");
$("#examples ul li").removeAttr("class");
$("#examples ul li").removeAttr("style");
var examplesul = $("#examples ul");
var exampleslist = $('<li></li>');
var exampleslink = $('<a href="#"></a>');
exampleslink.append(examplestext);
exampleslist.append(exampleslink);
exampleslist.append(examplesul);
narrowmenu.append(exampleslist);
$("#shortCut").after(narrowmenu);
$('ul#narrowmenu').superfish({
delay: 100,
autoArrows: false,
disableHI: true
});
}
$(document).ready(function(){
if ($('body').hasClass('narrow')) {
narrowInit();
}
});
$(window).bind('resize', function () {
if($(window).width()<600) {
$('body').addClass('narrow');
if ($("#narrowsearch").length == 0) {
narrowInit();
}
}
else {
$('body').removeClass('narrow');
}
});
\ No newline at end of file
/*
* Superfish v1.4.8 - jQuery menu widget
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
;(function($){
$.fn.superfish = function(op){
var sf = $.fn.superfish,
c = sf.c,
$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
over = function(){
var $$ = $(this), menu = getMenu($$);
clearTimeout(menu.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},
out = function(){
var $$ = $(this), menu = getMenu($$), o = sf.op;
clearTimeout(menu.sfTimer);
menu.sfTimer=setTimeout(function(){
o.retainPath=($.inArray($$[0],o.$path)>-1);
$$.hideSuperfishUl();
if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
},o.delay);
},
getMenu = function($menu){
var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
sf.op = sf.o[menu.serial];
return menu;
},
addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
return this.each(function() {
var s = this.serial = sf.o.length;
var o = $.extend({},sf.defaults,op);
o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
$(this).addClass([o.hoverClass,c.bcClass].join(' '))
.filter('li:has(ul)').removeClass(o.pathClass);
});
sf.o[s] = sf.op = o;
$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
if (o.autoArrows) addArrow( $('>a:first-child',this) );
})
.not('.'+c.bcClass)
.hideSuperfishUl();
var $a = $('a',this);
$a.each(function(i){
var $li = $a.eq(i).parents('li');
$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
});
o.onInit.call(this);
}).each(function() {
var menuClasses = [c.menuClass];
if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
$(this).addClass(menuClasses.join(' '));
});
};
var sf = $.fn.superfish;
sf.o = [];
sf.op = {};
sf.IE7fix = function(){
var o = sf.op;
if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');
};
sf.c = {
bcClass : 'sf-breadcrumb',
menuClass : 'sf-js-enabled',
anchorClass : 'sf-with-ul',
arrowClass : 'sf-sub-indicator',
shadowClass : 'sf-shadow'
};
sf.defaults = {
hoverClass : 'sfHover',
pathClass : 'overideThisToUse',
pathLevels : 1,
delay : 800,
animation : {opacity:'show'},
speed : 'normal',
autoArrows : true,
dropShadows : true,
disableHI : false, // true disables hoverIntent detection
onInit : function(){}, // callback functions
onBeforeShow: function(){},
onShow : function(){},
onHide : function(){}
};
$.fn.extend({
hideSuperfishUl : function(){
var o = sf.op,
not = (o.retainPath===true) ? o.$path : '';
o.retainPath = false;
var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
.find('>ul').hide().css('visibility','hidden');
o.onHide.call($ul);
return this;
},
showSuperfishUl : function(){
var o = sf.op,
sh = sf.c.shadowClass+'-off',
$ul = this.addClass(o.hoverClass)
.find('>ul:hidden').css('visibility','visible');
sf.IE7fix.call($ul);
o.onBeforeShow.call($ul);
$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
return this;
}
});
})(jQuery);
@media screen
{
html
{
color: #000000;
background: #FFFFFF;
}
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td
{
margin: 0;
padding: 0;
}
table
{
border-collapse: collapse;
border-spacing: 0;
}
fieldset, img
{
border: 0;
}
address, caption, cite, code, dfn, em, strong, th, var, optgroup
{
font-style: inherit;
font-weight: inherit;
}
del, ins
{
text-decoration: none;
}
li
{
list-style: none;
}
caption, th
{
text-align: left;
}
h1, h2, h3, h4, h5, h6
{
font-size: 100%;
}
q:before, q:after
{
content: '';
}
abbr, acronym
{
border: 0;
font-variant: normal;
}
sup
{
vertical-align: baseline;
}
sub
{
vertical-align: baseline;
}
tt, .qmlreadonly span, .qmldefault span
{
word-spacing:5px;
}
.heading
{
font: normal 600 16px/1.0 Arial;
}
.subtitle
{
font-size: 13px;
}
.small-subtitle
{
font-size: 13px;
}
legend
{
color: #000000;
}
input, button, textarea, select, optgroup, option
{
font-family: inherit;
font-size: inherit;
font-style: inherit;
font-weight: inherit;
}
input, button, textarea, select
{
font-size: 100%;
}
body
{
font: normal 13px/1.2 Verdana;
color: #363534;
}
strong
{
font-weight: bold;
}
em
{
font-style: italic;
}
a
{
color: #00732f;
text-decoration: none;
}
.header, .footer, .wrapper
{
/*min-width: 600px;*/
max-width: 1500px;
margin: 0 5px;
}
.wrapper
{
position:relative;
top:50px;
}
.wrapper .bd
{
position: relative;
}
.header, .footer
{
display: block;
clear: both;
overflow: hidden;
}
.header
{
height: 115px;
position: relative;
}
.header .qtref
{
position: absolute;
top: 28px;
left: 88px;
width: 302px;
height: 22px;
}
.header .qtref span
{
display: block;
height: 22px;
}
.wrap .content h1
{
font: 600 18px/1.2 Arial;
}
.wrap .content h2
{
font: 600 16px/1.2 Arial;
}
.wrap .content h3
{
font: 600 14px/1.2 Arial;
}
.wrap .content h4
{
font: 600 12px/1.2 Arial;
}
.wrap .content p
{
line-height: 20px;
padding: 5px;
}
.wrap .content table p
{
line-height: 20px;
padding: 0px;
}
.wrap .content ul
{
padding-left: 25px;
padding-top: 10px;
}
a:hover
{
color: #4c0033;
text-decoration: underline;
}
.content a:visited