utils.js revision 2bf0d6db03848790566d4f54d493b4df30af0ef5
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/*
* Portions Copyright 2011 Jens Elkner.
*/
}
}
for(var i in this.domReady) {
}
});
/**
* Resize the element with the ID 'content' so that it fills the whole browser
* window (i.e. the space between the header and the bottom of the window) and
* thus get rid off the scrollbar in the page header.
*/
function resizeContent() {
}
}
function domReadyMast() {
if (h != null && h != "null") {
} else {
$('#content').focus();
}
}
}
}
function pageReadyMast() {
if ($('#whole_header') != null && $('#content') != null) {
}
function() {
}
);
}
function domReadyMenu() {
/*
$("#project").autocomplete(projects, {
minChars: 0,
multiple: true,
multipleSeparator: ",",
//mustMatch: true,
matchContains: "word",
max: 200,
cacheLength:20,
//autoFill: false,
formatItem: function(row, i, max) {
return (row != null) ? i + "/" + max + ": " + row[0] : "";
},
formatMatch: function(row, i, max) {
return (row != null) ? row[0] : "";
},
formatResult: function(row) {
return (row != null) ? row[0] : "";
},
width: "300px"
});
*/
// TODO Bug 11749
// var p = document.getElementById('project');
// p.setAttribute("autocomplete", "off");
}
function domReadyHistory() {
// start state should ALWAYS be: first row: r1 hidden, r2 checked ;
// second row: r1 clicked, (r2 hidden)(optionally)
// I cannot say what will happen if they are not like that, togglediffs
// will go mad !
togglediffs();
}
function get_annotations() {
}
}
function toggle_annotations() {
$("span").each(
function() {
if (this.className == 'blame') {
this.className = 'blame-hidden';
} else if (this.className == 'blame-hidden') {
this.className = 'blame';
}
}
);
}
/** list.jsp */
/**
* Initialize defaults for list.jsp
*/
function pageReadyList() {
}
});
}
/* ------ Navigation window for definitions ------ */
/**
* Create the Navigation toggle link as well as its contents.
*/
function get_sym_list_contents() {
// var contents = "<input id=\"input_highlight\" name=\"input_highlight\"
// class=\"q\"/>";
// contents += " ";
// contents += "<b><a href=\"#\" onclick=\"javascript:add_highlight();return
// false;\" title=\"Add highlight\">Highlight</a></b><br/>";
var contents =
"<a href=\"#\" onclick=\"javascript:lsttoggle();\">[Close]</a><br/>"
if (typeof get_sym_list != 'function') {
return contents;
}
var symbol_classes = get_sym_list();
if (i > 0) {
contents += "<br/>";
}
var symbol_class = symbol_classes[i];
}
}
return contents;
}
function escape_html(string) {
}
function get_sym_div_left() {
return document.sym_div_left;
}
function get_sym_div_height() {
}
return document.sym_div_height;
}
function get_sym_div_top() {
return document.sym_div_top;
}
function get_sym_div_width() {
return document.sym_div_width;
}
/**
* Toggle the display of the 'Navigation' window used to highlight definitions.
*/
function lsttoggle() {
} else {
}
}
/**
* Toggle the display of line numbers.
*/
function lntoggle() {
$("a").each(
function() {
this.innerHTML = '';
} else if (this.className == 'l-hide'
|| this.className == 'hl-hide')
{
.indexOf('-'));
}
});
}
/* ------ Highlighting ------ */
/**
* An expensive Highlighter:
* Note: It will replace link's href contents as well, be careful.
*/
/* Not used.
function HighlightKeywordsFullText(keywords) {
var el = $("body");
$(keywords).each(
function() {
var pattern = new RegExp("("+this+")", ["gi"]);
var rs = "<span style='background-color:#FFFF00;font-weight:bold;'"
+ ">$1</span>";
}
);
// HighlightKeywordsFullText(["nfstcpsock"]);
}
*/
/**
* Highlight keywords by changeing the style of matching tags.
*/
function HighlightKeyword(keyword) {
'text-decoration' : 'underline',
% high_colors.length],
'font-weight' : 'bold'
});
}
//Test: HighlightKeyword('timeval');
/**
* Highlight the text given as value of the element with the ID "input_highlight" .
* @see HighlightKeyword
*/
function add_highlight() {
}
function toggle_filelist() {
$("div").each(
function() {
if (this.className == "filelist") {
this.className = "filelist-hidden";
} else if (this.className == "filelist-hidden") {
this.className = "filelist";
}
}
);
}
function toggle_revtags() {
$("tr").each(
function() {
if (this.className == "revtags") {
this.className = "revtags-hidden";
} else if (this.className == "revtags-hidden") {
this.className = "revtags";
}
}
);
$("span").each(
function() {
if (this.className == "revtags") {
this.className = "revtags-hidden";
} else if (this.className == "revtags-hidden") {
this.className = "revtags";
}
}
);
}
function togglediffs() {
var cr2 = false;
var cr1 = false;
$("#revisions input[type=radio]").each(
function() {
if (this.name=="r1") {
if (this.checked) {
cr1 = true;
return true;
}
if (cr2) {
this.disabled = ''
} else {
this.disabled = 'true'
}
} else if (this.name=="r2") {
if (this.checked) {
cr2=true;
return true;
}
if (!cr1) {
this.disabled = ''
} else {
this.disabled = 'true'
}
}
}
);
}
function selectAllProjects() {
}
function invertAllProjects() {
$("#project *").each(
function() {
if ($(this).attr("selected")) {
$(this).removeAttr("selected");
} else {
}
}
);
}
function goFirstProject() {
return $(e).text();
});
}
function clearSearchFrom() {
$("#sbox :input[type=text]").each(
function() {
}
);
}
function checkEnter(event) {
concat='';
$("#sbox :input[type=text]").each(
function() {
}
);
{
$("#sbox").submit();
}
}
// Intelligence Window code starts from here
};
}
}
return true;
});
{
}
{
if (!document.intelliWindow) {
}
var header = [
].join("");
}
{
}
function createIntelliWindow()
{
}
function hideIntelliWindow()
{
}
function createCapitionHTML()
{
return "<a onclick='hideIntelliWindow()'>[Close]</a><br/><b>Intelligence Window</b><br/>";
}
function createSymbolHTML(symbol)
{
}
function createDescriptionHTML(symbolType)
{
switch (symbolType) {
case "def":
return "A declaration or definition.<hr/>";
case "defined-in-file":
return "A symbol declared or defined in this file.<hr/>";
case "undefined-in-file":
return "A symbol declared or defined elsewhere.<hr/>";
default:
// should not happen
return "Something I have no idea about.<hr/>";
}
}
{
return [
"In current file:<br/><ul>",
"</i></b></a>.</li>",
"</i></b></a>.</li>",
"\")'>Search for definitions of <i><b>", symbol,
"</b></i>.</a></li>",
"\")'>Search for references of <i><b>", symbol,
"</b></i>.</a></li>",
"\")'>Do a full search with <i><b>", symbol,
"</b></i>.</a></li>",
"\")'>Search for file names that contain <i><b>", symbol,
"</b></i>.</a></li></ul>",
].join("");
}
function highlightSymbol(symbol)
{
})
return false;
}
function unhighlightSymbol(symbol)
{
})
return false;
}
function unhighlightAll(symbol)
{
return false;
}
{
return false;
}
function googleSymbol(symbol)
{
return false;
}