Merge "Update Rackspace pages to use new header/footer"
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -4,7 +4,6 @@
|
||||
http://staging.openstack.org/themes/openstack/css/main.css
|
||||
*/
|
||||
|
||||
|
||||
#rightColumn {
|
||||
float:left;
|
||||
position: relative;
|
||||
@@ -24,13 +23,14 @@ body {
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
text-indent: -1000em;
|
||||
background: url(../images/rackspace-logo.png) no-repeat left center;
|
||||
height: 54px;
|
||||
width: 177px;
|
||||
color: black;
|
||||
text-transform: uppercase;
|
||||
color: #FFF;
|
||||
line-height: 20px;
|
||||
font-size: 0.9em;
|
||||
font-weight: 600;
|
||||
background: url('apiref/images/rs-logo.svg') no-repeat scroll left center / 20px auto transparent;
|
||||
padding: 12px 12px 12px 23px;
|
||||
height: 42px;
|
||||
}
|
||||
|
||||
.container {
|
||||
@@ -42,9 +42,9 @@ body {
|
||||
.navbar-default {
|
||||
background-color: black;
|
||||
border: none;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
.subhead {
|
||||
border-bottom: 1px dotted;
|
||||
padding-bottom: 5px;
|
||||
@@ -226,7 +226,7 @@ dt:hover > a.headerlink {
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.navbar-default {
|
||||
margin-top: 25px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,4 +271,13 @@ dt:hover > a.headerlink {
|
||||
|
||||
.rowtop {
|
||||
margin-top: 75px;
|
||||
}
|
||||
|
||||
.navbar.navbar-static-top.navbar-inverse .navbar-nav > li > a {
|
||||
color: #FFF;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-nav > li > a {
|
||||
color: white;
|
||||
}
|
16
src/main/resources/apiref/images/fpo-icon.svg
Normal file
16
src/main/resources/apiref/images/fpo-icon.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="534.622px" height="534.624px" viewBox="0 0 534.622 534.624" enable-background="new 0 0 534.622 534.624"
|
||||
xml:space="preserve">
|
||||
<path fill="#010101" d="M534.622,300.726v217.191c0,9.226-7.481,16.707-16.707,16.707H16.706c-4.552,0-8.908-1.856-12.057-5.143
|
||||
c-3.149-3.284-4.825-7.713-4.634-12.257l16.707-400.968c0.371-8.951,7.734-16.014,16.691-16.014h100.242
|
||||
c8.884,0,16.217,6.954,16.682,15.828l14.737,279.97l107.131-107.127c3.194-3.198,7.468-4.895,11.816-4.895
|
||||
c2.149,0,4.323,0.416,6.392,1.273c6.24,2.586,10.311,8.676,10.311,15.434v76.613l88.43-88.426c3.194-3.198,7.468-4.895,11.816-4.895
|
||||
c2.149,0,4.323,0.416,6.392,1.273c6.24,2.586,10.311,8.676,10.311,15.434v76.613l88.43-88.426c3.194-3.198,7.468-4.895,11.816-4.895
|
||||
c2.149,0,4.323,0.416,6.392,1.273C530.552,287.877,534.622,293.967,534.622,300.726z M384.259,100.242
|
||||
C300.724,100.242,267.31,0,167.068,0C112.412,0,63.89,26.252,33.412,66.828c26.668-20.288,69.12-33.414,116.949-33.414
|
||||
c83.535,0,116.949,100.242,217.191,100.242c54.656,0,103.179-26.252,133.656-66.828C474.54,87.116,432.088,100.242,384.259,100.242z
|
||||
"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/main/resources/apiref/images/rackerpowered-logo.png
Normal file
BIN
src/main/resources/apiref/images/rackerpowered-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
24
src/main/resources/apiref/images/rs-logo.svg
Normal file
24
src/main/resources/apiref/images/rs-logo.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="148.01px" height="152.42px" viewBox="0 0 148.01 152.42" enable-background="new 0 0 148.01 152.42" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M76.856,41.274c-2.898,6.115-1.747,11.134,2.581,11.213c4.329,0.075,10.193-4.815,13.089-10.927
|
||||
c2.904-6.118,1.751-11.141-2.578-11.22C85.62,30.269,79.759,35.163,76.856,41.274z M112.124,19.195
|
||||
c0.036,0.015,0.059,0.054,0.059,0.093c0,0.014-0.002,0.025-0.005,0.032c-2.587,7.328-6.878,15.67-11.131,21.996
|
||||
c-8.959,13.301-21.819,21.689-28.718,18.728c-6.895-2.953-5.236-16.136,3.731-29.443c2.019-2.986,4.232-5.721,6.523-8.141
|
||||
c0.016-0.018,0.029-0.043,0.029-0.072c0-0.054-0.047-0.1-0.102-0.1c0,0-0.011,0-0.012,0.004c-2.818,0.39-5.673,0.945-8.553,1.672
|
||||
c-0.02,0.004-0.041,0.018-0.056,0.036C43.621,61.115,30.74,109.319,32.512,152.32l0,0c0,0.058-0.043,0.1-0.1,0.1
|
||||
c-0.013,0-0.027,0-0.038-0.004c-17.844-7.192-30.884-24.427-32.241-46.248l-0.018-0.251c-2.25-38.827,28.704-78.599,69.149-88.834
|
||||
C84.938,13.113,99.746,14.158,112.124,19.195z"/>
|
||||
<path fill="#FFFFFF" d="M100.682,123.911c-2.941,2.041-6.009,3.927-9.176,5.628c-0.014,0.004-0.032,0.011-0.047,0.011
|
||||
c-0.054,0-0.1-0.043-0.104-0.097c-0.591-9.322-2.599-18.352-6.072-25.866c-9.258-20.06-25.444-21.603-36.136-3.444
|
||||
c-6.543,11.113-9.522,27.037-8.716,42.325c0,0.043,0.03,0.079,0.07,0.09c11.345,3.555,24.413,3.945,38.356,0.426
|
||||
c40.39-10.29,71.281-50.019,69.038-88.806c-1.98-34.072-28.858-56.087-62.742-54.046c-0.023,0-0.048,0.011-0.063,0.029
|
||||
c-3.295,3.333-6.38,6.698-9.274,10.096c-0.014,0.018-0.023,0.043-0.023,0.064c0,0.058,0.047,0.104,0.1,0.104
|
||||
c0,0,0.007,0,0.014-0.004c19.855-2.513,35.769,1.521,46.157,9.795c0.022,0.018,0.034,0.047,0.034,0.078
|
||||
c0,0.018-0.004,0.04-0.012,0.054c-35.782,50.437-31.353,79.175-21.37,103.441c0.006,0.011,0.009,0.022,0.009,0.036
|
||||
C100.725,123.861,100.707,123.893,100.682,123.911z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
File diff suppressed because one or more lines are too long
1
src/main/resources/apiref/js/highlight.js
Normal file
1
src/main/resources/apiref/js/highlight.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
24
src/main/resources/common/images/rs-logo.svg
Normal file
24
src/main/resources/common/images/rs-logo.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="148.01px" height="152.42px" viewBox="0 0 148.01 152.42" enable-background="new 0 0 148.01 152.42" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M76.856,41.274c-2.898,6.115-1.747,11.134,2.581,11.213c4.329,0.075,10.193-4.815,13.089-10.927
|
||||
c2.904-6.118,1.751-11.141-2.578-11.22C85.62,30.269,79.759,35.163,76.856,41.274z M112.124,19.195
|
||||
c0.036,0.015,0.059,0.054,0.059,0.093c0,0.014-0.002,0.025-0.005,0.032c-2.587,7.328-6.878,15.67-11.131,21.996
|
||||
c-8.959,13.301-21.819,21.689-28.718,18.728c-6.895-2.953-5.236-16.136,3.731-29.443c2.019-2.986,4.232-5.721,6.523-8.141
|
||||
c0.016-0.018,0.029-0.043,0.029-0.072c0-0.054-0.047-0.1-0.102-0.1c0,0-0.011,0-0.012,0.004c-2.818,0.39-5.673,0.945-8.553,1.672
|
||||
c-0.02,0.004-0.041,0.018-0.056,0.036C43.621,61.115,30.74,109.319,32.512,152.32l0,0c0,0.058-0.043,0.1-0.1,0.1
|
||||
c-0.013,0-0.027,0-0.038-0.004c-17.844-7.192-30.884-24.427-32.241-46.248l-0.018-0.251c-2.25-38.827,28.704-78.599,69.149-88.834
|
||||
C84.938,13.113,99.746,14.158,112.124,19.195z"/>
|
||||
<path fill="#FFFFFF" d="M100.682,123.911c-2.941,2.041-6.009,3.927-9.176,5.628c-0.014,0.004-0.032,0.011-0.047,0.011
|
||||
c-0.054,0-0.1-0.043-0.104-0.097c-0.591-9.322-2.599-18.352-6.072-25.866c-9.258-20.06-25.444-21.603-36.136-3.444
|
||||
c-6.543,11.113-9.522,27.037-8.716,42.325c0,0.043,0.03,0.079,0.07,0.09c11.345,3.555,24.413,3.945,38.356,0.426
|
||||
c40.39-10.29,71.281-50.019,69.038-88.806c-1.98-34.072-28.858-56.087-62.742-54.046c-0.023,0-0.048,0.011-0.063,0.029
|
||||
c-3.295,3.333-6.38,6.698-9.274,10.096c-0.014,0.018-0.023,0.043-0.023,0.064c0,0.058,0.047,0.104,0.1,0.104
|
||||
c0,0,0.007,0,0.014-0.004c19.855-2.513,35.769,1.521,46.157,9.795c0.022,0.018,0.034,0.047,0.034,0.078
|
||||
c0,0.018-0.004,0.04-0.012,0.054c-35.782,50.437-31.353,79.175-21.37,103.441c0.006,0.011,0.009,0.022,0.009,0.036
|
||||
C100.725,123.861,100.707,123.893,100.682,123.911z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
9
src/main/resources/common/jquery/comments.js
vendored
Normal file
9
src/main/resources/common/jquery/comments.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
if(window.location.protocol.substring(0,4) == 'http'){
|
||||
var disqus_url = window.location.toString().replace(/http\:\/\/docs\.rackspace(cloud)?\.com\//,"http://docs.rackspace.com/");
|
||||
var disqus_title = document.title;
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
}
|
18
src/main/resources/common/jquery/ga.js
vendored
Normal file
18
src/main/resources/common/jquery/ga.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
var disqus_config = function ()
|
||||
{
|
||||
var config = this;
|
||||
config.callbacks.onNewComment.push (function ()
|
||||
{
|
||||
_gaq.push (['_trackEvent', 'Disqus', 'Comment', 'null', 1]);
|
||||
});
|
||||
};
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
228
src/main/resources/common/jquery/main-openstack.js
vendored
Normal file
228
src/main/resources/common/jquery/main-openstack.js
vendored
Normal file
@@ -0,0 +1,228 @@
|
||||
/**
|
||||
* Miscellaneous js functions for WebHelp
|
||||
* Kasun Gajasinghe, http://kasunbg.blogspot.com
|
||||
* David Cramer, http://www.thingbag.net
|
||||
*
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
// When you click on a link to an anchor, scroll down
|
||||
// 105 px to cope with the fact that the banner
|
||||
// hides the top 95px or so of the page.
|
||||
// This code deals with the problem when
|
||||
// you click on a link within a page.
|
||||
$('a[href*=#]').click(function() {
|
||||
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|
||||
&& location.hostname == this.hostname) {
|
||||
var $target = $(this.hash);
|
||||
$target = $target.length && $target
|
||||
|| $('[name=' + this.hash.slice(1) +']');
|
||||
if (!(this.hash == "#searchDiv" || this.hash == "#treeDiv" || this.hash == "") && $target.length) {
|
||||
var targetOffset = $target.offset().top - 140;
|
||||
$('html,body')
|
||||
.animate({scrollTop: targetOffset}, 200);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// $("#showHideHighlight").button(); //add jquery button styling to 'Go' button
|
||||
//Generate tabs in nav-pane with JQuery
|
||||
$(function() {
|
||||
$("#tabs").tabs({
|
||||
cookie: {
|
||||
// store cookie for 2 days.
|
||||
expires: 2
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//Generate the tree
|
||||
$("#ulTreeDiv").attr("style","");
|
||||
$("#tree").treeview({
|
||||
collapsed: true,
|
||||
animated: "medium",
|
||||
control: "#sidetreecontrol",
|
||||
persist: "cookie"
|
||||
});
|
||||
|
||||
//after toc fully styled, display it. Until loading, a 'loading' image will be displayed
|
||||
$("#tocLoading").attr("style","display:none;");
|
||||
// $("#ulTreeDiv").attr("style","display:block;");
|
||||
|
||||
//.searchButton is the css class applied to 'Go' button
|
||||
$(function() {
|
||||
$("button", ".searchButton").button();
|
||||
|
||||
$("button", ".searchButton").click(function() { return false; });
|
||||
});
|
||||
|
||||
//'ui-tabs-1' is the cookie name which is used for the persistence of the tabs.(Content/Search tab)
|
||||
if ($.cookie('ui-tabs-1') === '1') { //search tab is visible
|
||||
if ($.cookie('textToSearch') != undefined && $.cookie('textToSearch').length > 0) {
|
||||
document.getElementById('textToSearch').value = $.cookie('textToSearch');
|
||||
Effectuer_recherche($.cookie('textToSearch'));
|
||||
searchHighlight($.cookie('textToSearch'));
|
||||
$("#showHideHighlight").css("display","block");
|
||||
}
|
||||
}
|
||||
|
||||
syncToc(); //Synchronize the toc tree with the content pane, when loading the page.
|
||||
//$("#doSearch").button(); //add jquery button styling to 'Go' button
|
||||
|
||||
// When you click on a link to an anchor, scroll down
|
||||
// 105 px to cope with the fact that the banner
|
||||
// hides the top 95px or so of the page.
|
||||
// This code deals with the problem when
|
||||
// you click on a link from another page.
|
||||
var hash = window.location.hash.replace(/[\(\)\<\>\"\'\=]/g,'');
|
||||
if(hash){
|
||||
var targetOffset = $(hash).offset().top - 140;
|
||||
$('html,body').animate({scrollTop: targetOffset}, 200);
|
||||
return false;
|
||||
}
|
||||
|
||||
$('.gloss').each(function() {
|
||||
$(this).qtip({
|
||||
content: {
|
||||
attr: 'def'
|
||||
},
|
||||
position: {
|
||||
target: 'mouse',
|
||||
adjust: { x: 5, y: 5 }
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Synchronize with the tableOfContents
|
||||
*/
|
||||
function syncToc(){
|
||||
var a = document.getElementById("webhelp-currentid");
|
||||
if (a != undefined) {
|
||||
var b = a.getElementsByTagName("a")[0];
|
||||
|
||||
if (b != undefined) {
|
||||
//Setting the background for selected node.
|
||||
var style = a.getAttribute("style", 2);
|
||||
if (style != null && !style.match(/background-color: Background;/)) {
|
||||
a.setAttribute("style", "background-color: #DEE9E9; " + style);
|
||||
b.setAttribute("style", "color: black;");
|
||||
} else if (style != null) {
|
||||
a.setAttribute("style", "background-color: #DEE9E9; " + style);
|
||||
b.setAttribute("style", "color: black;");
|
||||
} else {
|
||||
a.setAttribute("style", "background-color: #DEE9E9; ");
|
||||
b.setAttribute("style", "color: black;");
|
||||
}
|
||||
}
|
||||
|
||||
//shows the node related to current content.
|
||||
//goes a recursive call from current node to ancestor nodes, displaying all of them.
|
||||
while (a.parentNode && a.parentNode.nodeName) {
|
||||
var parentNode = a.parentNode;
|
||||
var nodeName = parentNode.nodeName;
|
||||
|
||||
if (nodeName.toLowerCase() == "ul") {
|
||||
parentNode.setAttribute("style", "display: block;");
|
||||
} else if (nodeName.toLocaleLowerCase() == "li") {
|
||||
parentNode.setAttribute("class", "collapsable");
|
||||
parentNode.firstChild.setAttribute("class", "hitarea collapsable-hitarea ");
|
||||
}
|
||||
a = parentNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Code for Show/Hide TOC
|
||||
*
|
||||
*/
|
||||
function showHideToc() {
|
||||
var showHideButton = $("#showHideButton");
|
||||
var leftNavigation = $("#leftnavigation");
|
||||
var content = $("#content");
|
||||
|
||||
if (showHideButton != undefined && showHideButton.hasClass("pointLeft")) {
|
||||
//Hide TOC
|
||||
showHideButton.removeClass('pointLeft').addClass('pointRight');
|
||||
content.css("margin", "125px 0 0 0");
|
||||
leftNavigation.css("display","none");
|
||||
showHideButton.attr("title", "Show the TOC tree");
|
||||
$("body").addClass("sidebar");
|
||||
} else {
|
||||
//Show the TOC
|
||||
showHideButton.removeClass('pointRight').addClass('pointLeft');
|
||||
content.css("margin", "125px 0 0 280px");
|
||||
leftNavigation.css("display","block");
|
||||
showHideButton.attr("title", "Hide the TOC Tree");
|
||||
$("body").removeClass("sidebar");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Code for search highlighting
|
||||
*/
|
||||
var highlightOn = true;
|
||||
function searchHighlight(searchText) {
|
||||
highlightOn = true;
|
||||
if (searchText != undefined) {
|
||||
var wList;
|
||||
var sList = new Array(); //stem list
|
||||
//Highlight the search terms
|
||||
searchText = searchText.toLowerCase().replace(/<\//g, "_st_").replace(/\$_/g, "_di_").replace(/\.|%2C|%3B|%21|%3A|@|\/|\*/g, " ").replace(/(%20)+/g, " ").replace(/_st_/g, "</").replace(/_di_/g, "%24_")
|
||||
searchText = searchText.replace(/ +/g, " ");
|
||||
searchText = searchText.replace(/ $/, "").replace(/^ /, "");
|
||||
|
||||
wList = searchText.split(" ");
|
||||
$("#content").highlight(wList); //Highlight the search input
|
||||
|
||||
if(typeof stemmer != "undefined" ){
|
||||
//Highlight the stems
|
||||
for (var i = 0; i < wList.length; i++) {
|
||||
var stemW = stemmer(wList[i]);
|
||||
sList.push(stemW);
|
||||
}
|
||||
} else {
|
||||
sList = wList;
|
||||
}
|
||||
$("#content").highlight(sList); //Highlight the search input's all stems
|
||||
}
|
||||
}
|
||||
|
||||
function searchUnhighlight(){
|
||||
highlightOn = false;
|
||||
//unhighlight the search input's all stems
|
||||
$("#content").unhighlight();
|
||||
$("#content").unhighlight();
|
||||
}
|
||||
|
||||
function toggleHighlight(){
|
||||
if(highlightOn) {
|
||||
searchUnhighlight();
|
||||
} else {
|
||||
searchHighlight($.cookie('textToSearch'));
|
||||
}
|
||||
}
|
||||
/*
|
||||
CSS Browser Selector v0.4.0 (Nov 02, 2010)
|
||||
Rafael Lima (http://rafael.adm.br)
|
||||
http://rafael.adm.br/css_browser_selector
|
||||
License: http://creativecommons.org/licenses/by/2.5/
|
||||
Contributors: http://rafael.adm.br/css_browser_selector#contributors
|
||||
*/
|
||||
function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);
|
||||
/* End CSS Browser Selector code */
|
||||
|
||||
function logABug(bugTitle, fieldComment){
|
||||
var urlBase = "https://bugs.launchpad.net/openstack-manuals/+filebug?field.title="
|
||||
var bugLink = urlBase + encodeURIComponent(bugTitle) + "&field.comment=" + lineFeed + lineFeed + "-----------------------------------" + lineFeed + fieldComment;
|
||||
document.getElementById("logABugLink1").href=bugLink;
|
||||
document.getElementById("logABugLink2").href=bugLink;
|
||||
}
|
150
src/main/resources/common/jquery/main-rackspace-private-cloud.js
vendored
Normal file
150
src/main/resources/common/jquery/main-rackspace-private-cloud.js
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* Miscellaneous js functions for WebHelp
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
//Generate the tree
|
||||
$("#ulTreeDiv").attr("style","");
|
||||
$("#tree").treeview({
|
||||
collapsed: true,
|
||||
animated: "medium",
|
||||
control: "#sidetreecontrol",
|
||||
persist: "cookie"
|
||||
});
|
||||
|
||||
//after toc fully styled, display it. Until loading, a 'loading' image will be displayed
|
||||
$("#tocLoading").attr("style","display:none;");
|
||||
|
||||
var sidebarState = readCookie("webhelp-sidebar");
|
||||
if(sidebarState == "showing" || sidebarState == "hidden") {
|
||||
showHideToc(sidebarState);
|
||||
}else{
|
||||
showHideToc("showing");
|
||||
}
|
||||
|
||||
syncToc(); //Synchronize the toc tree with the content pane, when loading the page.
|
||||
|
||||
|
||||
$('.gloss').each(function() {
|
||||
$(this).qtip({
|
||||
content: {
|
||||
attr: 'def'
|
||||
},
|
||||
position: {
|
||||
target: 'mouse',
|
||||
adjust: { x: 5, y: 5 }
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Synchronize with the tableOfContents
|
||||
*/
|
||||
function syncToc(){
|
||||
var a = document.getElementById("webhelp-currentid");
|
||||
if (a != undefined) {
|
||||
var b = a.getElementsByTagName("a")[0];
|
||||
|
||||
if (b != undefined) {
|
||||
//Setting the background for selected node.
|
||||
var style = a.getAttribute("style", 2);
|
||||
if (style != null && !style.match(/background-color: Background;/)) {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; " + style);
|
||||
b.setAttribute("style", "color: black;");
|
||||
} else if (style != null) {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; " + style);
|
||||
b.setAttribute("style", "color: black;");
|
||||
} else {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; ");
|
||||
b.setAttribute("style", "color: black;");
|
||||
}
|
||||
}
|
||||
|
||||
//shows the node related to current content.
|
||||
//goes a recursive call from current node to ancestor nodes, displaying all of them.
|
||||
while (a.parentNode && a.parentNode.nodeName) {
|
||||
var parentNode = a.parentNode;
|
||||
var nodeName = parentNode.nodeName;
|
||||
|
||||
if (nodeName.toLowerCase() == "ul") {
|
||||
parentNode.setAttribute("style", "display: block;");
|
||||
} else if (nodeName.toLocaleLowerCase() == "li") {
|
||||
parentNode.setAttribute("class", "collapsable");
|
||||
parentNode.firstChild.setAttribute("class", "hitarea collapsable-hitarea ");
|
||||
}
|
||||
a = parentNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Code for Show/Hide TOC
|
||||
*
|
||||
*/
|
||||
function showHideToc(state) {
|
||||
var showHideButton = $("#showHideButton");
|
||||
var leftNavigation = $("#rax-leftnavigation");
|
||||
var content = $("#content");
|
||||
|
||||
|
||||
if (state != "showing" && showHideButton != undefined && showHideButton.hasClass("pointLeft")) {
|
||||
//Hide TOC
|
||||
showHideButton.removeClass('pointLeft').addClass('pointRight');
|
||||
content.css("margin", "0 0 0 0");
|
||||
leftNavigation.css("display","none");
|
||||
showHideButton.attr("title", "Show the TOC tree");
|
||||
content.css("padding-left","0px");
|
||||
$("body").addClass("sidebar");
|
||||
eraseCookie("webhelp-sidebar");
|
||||
createCookie("webhelp-sidebar","hidden",365);
|
||||
} else {
|
||||
//Show the TOC
|
||||
showHideButton.removeClass('pointRight').addClass('pointLeft');
|
||||
content.css("margin", "0 0 0 250px");
|
||||
content.css("padding-left","40px");
|
||||
leftNavigation.css("display","block");
|
||||
showHideButton.attr("title", "Hide the TOC Tree");
|
||||
$("body").removeClass("sidebar");
|
||||
eraseCookie("webhelp-sidebar");
|
||||
createCookie("webhelp-sidebar","showing",365);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function createCookie(name,value,days) {
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(days*24*60*60*1000));
|
||||
var expires = "; expires="+date.toGMTString();
|
||||
}
|
||||
else var expires = "";
|
||||
document.cookie = name+"="+value+expires+"; path=/";
|
||||
}
|
||||
|
||||
function readCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0;i < ca.length;i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function eraseCookie(name) {
|
||||
createCookie(name,"",-1);
|
||||
}
|
||||
|
||||
/*
|
||||
CSS Browser Selector v0.4.0 (Nov 02, 2010)
|
||||
Rafael Lima (http://rafael.adm.br)
|
||||
http://rafael.adm.br/css_browser_selector
|
||||
License: http://creativecommons.org/licenses/by/2.5/
|
||||
Contributors: http://rafael.adm.br/css_browser_selector#contributors
|
||||
*/
|
||||
// function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);
|
||||
/* End CSS Browser Selector code */
|
150
src/main/resources/common/jquery/main-rackspace.js
vendored
Normal file
150
src/main/resources/common/jquery/main-rackspace.js
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* Miscellaneous js functions for WebHelp
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
//Generate the tree
|
||||
$("#ulTreeDiv").attr("style","");
|
||||
$("#tree").treeview({
|
||||
collapsed: true,
|
||||
animated: "medium",
|
||||
control: "#sidetreecontrol",
|
||||
persist: "cookie"
|
||||
});
|
||||
|
||||
//after toc fully styled, display it. Until loading, a 'loading' image will be displayed
|
||||
$("#tocLoading").attr("style","display:none;");
|
||||
|
||||
var sidebarState = readCookie("webhelp-sidebar");
|
||||
if(sidebarState == "showing" || sidebarState == "hidden") {
|
||||
showHideToc(sidebarState);
|
||||
}else{
|
||||
showHideToc("showing");
|
||||
}
|
||||
|
||||
syncToc(); //Synchronize the toc tree with the content pane, when loading the page.
|
||||
|
||||
|
||||
$('.gloss').each(function() {
|
||||
$(this).qtip({
|
||||
content: {
|
||||
attr: 'def'
|
||||
},
|
||||
position: {
|
||||
target: 'mouse',
|
||||
adjust: { x: 5, y: 5 }
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Synchronize with the tableOfContents
|
||||
*/
|
||||
function syncToc(){
|
||||
var a = document.getElementById("webhelp-currentid");
|
||||
if (a != undefined) {
|
||||
var b = a.getElementsByTagName("a")[0];
|
||||
|
||||
if (b != undefined) {
|
||||
//Setting the background for selected node.
|
||||
var style = a.getAttribute("style", 2);
|
||||
if (style != null && !style.match(/background-color: Background;/)) {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; " + style);
|
||||
b.setAttribute("style", "color: black;");
|
||||
} else if (style != null) {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; " + style);
|
||||
b.setAttribute("style", "color: black;");
|
||||
} else {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; ");
|
||||
b.setAttribute("style", "color: black;");
|
||||
}
|
||||
}
|
||||
|
||||
//shows the node related to current content.
|
||||
//goes a recursive call from current node to ancestor nodes, displaying all of them.
|
||||
while (a.parentNode && a.parentNode.nodeName) {
|
||||
var parentNode = a.parentNode;
|
||||
var nodeName = parentNode.nodeName;
|
||||
|
||||
if (nodeName.toLowerCase() == "ul") {
|
||||
parentNode.setAttribute("style", "display: block;");
|
||||
} else if (nodeName.toLocaleLowerCase() == "li") {
|
||||
parentNode.setAttribute("class", "collapsable");
|
||||
parentNode.firstChild.setAttribute("class", "hitarea collapsable-hitarea ");
|
||||
}
|
||||
a = parentNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Code for Show/Hide TOC
|
||||
*
|
||||
*/
|
||||
function showHideToc(state) {
|
||||
var showHideButton = $("#showHideButton");
|
||||
var leftNavigation = $("#rax-leftnavigation");
|
||||
var content = $("#content");
|
||||
|
||||
|
||||
if (state != "showing" && showHideButton != undefined && showHideButton.hasClass("pointLeft")) {
|
||||
//Hide TOC
|
||||
showHideButton.removeClass('pointLeft').addClass('pointRight');
|
||||
content.css("margin", "0 0 0 0");
|
||||
leftNavigation.css("display","none");
|
||||
showHideButton.attr("title", "Show the TOC tree");
|
||||
content.css("padding-left","0px");
|
||||
$("body").addClass("sidebar");
|
||||
eraseCookie("webhelp-sidebar");
|
||||
createCookie("webhelp-sidebar","hidden",365);
|
||||
} else {
|
||||
//Show the TOC
|
||||
showHideButton.removeClass('pointRight').addClass('pointLeft');
|
||||
content.css("margin", "0 0 0 250px");
|
||||
content.css("padding-left","40px");
|
||||
leftNavigation.css("display","block");
|
||||
showHideButton.attr("title", "Hide the TOC Tree");
|
||||
$("body").removeClass("sidebar");
|
||||
eraseCookie("webhelp-sidebar");
|
||||
createCookie("webhelp-sidebar","showing",365);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function createCookie(name,value,days) {
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(days*24*60*60*1000));
|
||||
var expires = "; expires="+date.toGMTString();
|
||||
}
|
||||
else var expires = "";
|
||||
document.cookie = name+"="+value+expires+"; path=/";
|
||||
}
|
||||
|
||||
function readCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0;i < ca.length;i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function eraseCookie(name) {
|
||||
createCookie(name,"",-1);
|
||||
}
|
||||
|
||||
/*
|
||||
CSS Browser Selector v0.4.0 (Nov 02, 2010)
|
||||
Rafael Lima (http://rafael.adm.br)
|
||||
http://rafael.adm.br/css_browser_selector
|
||||
License: http://creativecommons.org/licenses/by/2.5/
|
||||
Contributors: http://rafael.adm.br/css_browser_selector#contributors
|
||||
*/
|
||||
// function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);
|
||||
/* End CSS Browser Selector code */
|
221
src/main/resources/common/jquery/main-repose.js
vendored
Normal file
221
src/main/resources/common/jquery/main-repose.js
vendored
Normal file
@@ -0,0 +1,221 @@
|
||||
/**
|
||||
* Miscellaneous js functions for WebHelp
|
||||
* Kasun Gajasinghe, http://kasunbg.blogspot.com
|
||||
* David Cramer, http://www.thingbag.net
|
||||
*
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
// When you click on a link to an anchor, scroll down
|
||||
// 105 px to cope with the fact that the banner
|
||||
// hides the top 95px or so of the page.
|
||||
// This code deals with the problem when
|
||||
// you click on a link within a page.
|
||||
$('a[href*=#]').click(function() {
|
||||
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|
||||
&& location.hostname == this.hostname) {
|
||||
var $target = $(this.hash);
|
||||
$target = $target.length && $target
|
||||
|| $('[name=' + this.hash.slice(1) +']');
|
||||
if (!(this.hash == "#searchDiv" || this.hash == "#treeDiv" || this.hash == "") && $target.length) {
|
||||
var targetOffset = $target.offset().top - 140;
|
||||
$('html,body')
|
||||
.animate({scrollTop: targetOffset}, 200);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// $("#showHideHighlight").button(); //add jquery button styling to 'Go' button
|
||||
//Generate tabs in nav-pane with JQuery
|
||||
$(function() {
|
||||
$("#tabs").tabs({
|
||||
cookie: {
|
||||
// store cookie for 2 days.
|
||||
expires: 2
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//Generate the tree
|
||||
$("#ulTreeDiv").attr("style","");
|
||||
$("#tree").treeview({
|
||||
collapsed: true,
|
||||
animated: "medium",
|
||||
control: "#sidetreecontrol",
|
||||
persist: "cookie"
|
||||
});
|
||||
|
||||
//after toc fully styled, display it. Until loading, a 'loading' image will be displayed
|
||||
$("#tocLoading").attr("style","display:none;");
|
||||
// $("#ulTreeDiv").attr("style","display:block;");
|
||||
|
||||
//.searchButton is the css class applied to 'Go' button
|
||||
$(function() {
|
||||
$("button", ".searchButton").button();
|
||||
|
||||
$("button", ".searchButton").click(function() { return false; });
|
||||
});
|
||||
|
||||
//'ui-tabs-1' is the cookie name which is used for the persistence of the tabs.(Content/Search tab)
|
||||
if ($.cookie('ui-tabs-1') === '1') { //search tab is visible
|
||||
if ($.cookie('textToSearch') != undefined && $.cookie('textToSearch').length > 0) {
|
||||
document.getElementById('textToSearch').value = $.cookie('textToSearch');
|
||||
Effectuer_recherche($.cookie('textToSearch'));
|
||||
searchHighlight($.cookie('textToSearch'));
|
||||
$("#showHideHighlight").css("display","block");
|
||||
}
|
||||
}
|
||||
|
||||
syncToc(); //Synchronize the toc tree with the content pane, when loading the page.
|
||||
//$("#doSearch").button(); //add jquery button styling to 'Go' button
|
||||
|
||||
// When you click on a link to an anchor, scroll down
|
||||
// 140 px to cope with the fact that the banner
|
||||
// hides the top 95px or so of the page.
|
||||
// This code deals with the problem when
|
||||
// you click on a link from another page.
|
||||
var hash = window.location.hash.replace(/[\(\)\<\>\"\'\=]/g,'');
|
||||
if(hash){
|
||||
var targetOffset = $(hash).offset().top - 140;
|
||||
$('html,body').animate({scrollTop: targetOffset}, 200);
|
||||
return false;
|
||||
}
|
||||
|
||||
$('.gloss').each(function() {
|
||||
$(this).qtip({
|
||||
content: {
|
||||
attr: 'def'
|
||||
},
|
||||
position: {
|
||||
target: 'mouse',
|
||||
adjust: { x: 5, y: 5 }
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Synchronize with the tableOfContents
|
||||
*/
|
||||
function syncToc(){
|
||||
var a = document.getElementById("webhelp-currentid");
|
||||
if (a != undefined) {
|
||||
var b = a.getElementsByTagName("a")[0];
|
||||
|
||||
if (b != undefined) {
|
||||
//Setting the background for selected node.
|
||||
var style = a.getAttribute("style", 2);
|
||||
if (style != null && !style.match(/background-color: Background;/)) {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; " + style);
|
||||
b.setAttribute("style", "color: black;");
|
||||
} else if (style != null) {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; " + style);
|
||||
b.setAttribute("style", "color: black;");
|
||||
} else {
|
||||
a.setAttribute("style", "background-color: #D8D8D8; ");
|
||||
b.setAttribute("style", "color: black;");
|
||||
}
|
||||
}
|
||||
|
||||
//shows the node related to current content.
|
||||
//goes a recursive call from current node to ancestor nodes, displaying all of them.
|
||||
while (a.parentNode && a.parentNode.nodeName) {
|
||||
var parentNode = a.parentNode;
|
||||
var nodeName = parentNode.nodeName;
|
||||
|
||||
if (nodeName.toLowerCase() == "ul") {
|
||||
parentNode.setAttribute("style", "display: block;");
|
||||
} else if (nodeName.toLocaleLowerCase() == "li") {
|
||||
parentNode.setAttribute("class", "collapsable");
|
||||
parentNode.firstChild.setAttribute("class", "hitarea collapsable-hitarea ");
|
||||
}
|
||||
a = parentNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Code for Show/Hide TOC
|
||||
*
|
||||
*/
|
||||
function showHideToc() {
|
||||
var showHideButton = $("#showHideButton");
|
||||
var leftNavigation = $("#leftnavigation");
|
||||
var content = $("#content");
|
||||
|
||||
if (showHideButton != undefined && showHideButton.hasClass("pointLeft")) {
|
||||
//Hide TOC
|
||||
showHideButton.removeClass('pointLeft').addClass('pointRight');
|
||||
content.css("margin", "125px 0 0 0");
|
||||
leftNavigation.css("display","none");
|
||||
showHideButton.attr("title", "Show the TOC tree");
|
||||
$("body").addClass("sidebar");
|
||||
} else {
|
||||
//Show the TOC
|
||||
showHideButton.removeClass('pointRight').addClass('pointLeft');
|
||||
content.css("margin", "125px 0 0 280px");
|
||||
leftNavigation.css("display","block");
|
||||
showHideButton.attr("title", "Hide the TOC Tree");
|
||||
$("body").removeClass("sidebar");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Code for search highlighting
|
||||
*/
|
||||
var highlightOn = true;
|
||||
function searchHighlight(searchText) {
|
||||
highlightOn = true;
|
||||
if (searchText != undefined) {
|
||||
var wList;
|
||||
var sList = new Array(); //stem list
|
||||
//Highlight the search terms
|
||||
searchText = searchText.toLowerCase().replace(/<\//g, "_st_").replace(/\$_/g, "_di_").replace(/\.|%2C|%3B|%21|%3A|@|\/|\*/g, " ").replace(/(%20)+/g, " ").replace(/_st_/g, "</").replace(/_di_/g, "%24_")
|
||||
searchText = searchText.replace(/ +/g, " ");
|
||||
searchText = searchText.replace(/ $/, "").replace(/^ /, "");
|
||||
|
||||
wList = searchText.split(" ");
|
||||
$("#content").highlight(wList); //Highlight the search input
|
||||
|
||||
if(typeof stemmer != "undefined" ){
|
||||
//Highlight the stems
|
||||
for (var i = 0; i < wList.length; i++) {
|
||||
var stemW = stemmer(wList[i]);
|
||||
sList.push(stemW);
|
||||
}
|
||||
} else {
|
||||
sList = wList;
|
||||
}
|
||||
$("#content").highlight(sList); //Highlight the search input's all stems
|
||||
}
|
||||
}
|
||||
|
||||
function searchUnhighlight(){
|
||||
highlightOn = false;
|
||||
//unhighlight the search input's all stems
|
||||
$("#content").unhighlight();
|
||||
$("#content").unhighlight();
|
||||
}
|
||||
|
||||
function toggleHighlight(){
|
||||
if(highlightOn) {
|
||||
searchUnhighlight();
|
||||
} else {
|
||||
searchHighlight($.cookie('textToSearch'));
|
||||
}
|
||||
}
|
||||
/*
|
||||
CSS Browser Selector v0.4.0 (Nov 02, 2010)
|
||||
Rafael Lima (http://rafael.adm.br)
|
||||
http://rafael.adm.br/css_browser_selector
|
||||
License: http://creativecommons.org/licenses/by/2.5/
|
||||
Contributors: http://rafael.adm.br/css_browser_selector#contributors
|
||||
*/
|
||||
function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);
|
||||
/* End CSS Browser Selector code */
|
Reference in New Issue
Block a user