rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
if (attributeValue && attribute.specified)
if (attributeValue && (attribute.specified || attribute.nodeName == 'value'))
function loadAttributes(dom, domParentNode, node) { for (var i = 0; i < node.attributes.length; i ++ ) { var attribute = node.attributes[i]; var attributeValue = attribute.nodeValue; if (attributeValue && attribute.specified) { var domAttribute = dom.createAttribute(attribute.nodeName); domAttribute.value = attributeValue; domParentNode.setAttributeNode(domAttribute); } } }
ignore_css = false;
loadCSS : function(url) { var ar = url.replace(/\s+/, '').split(','); var lflen = 0, csslen = 0; var skip = false; var x = 0, i = 0, nl, le; for (x = 0,csslen = ar.length; x<csslen; x++) { ignore_css = false; if (ar[x] != null && ar[x] != 'null' && ar[x].length > 0) { /* Make sure it doesn't exist. */ for (i=0, lflen=this.loadedFiles.length; i<lflen; i++) { if (this.loadedFiles[i] == ar[x]) { skip = true; break; } } if (!skip) { if (tinyMCE.settings.strict_loading_mode) { nl = document.getElementsByTagName("head"); le = document.createElement('link'); le.setAttribute('href', ar[x]); le.setAttribute('rel', 'stylesheet'); le.setAttribute('type', 'text/css'); nl[0].appendChild(le); } else document.write('<link href="' + ar[x] + '" rel="stylesheet" type="text/css" />'); this.loadedFiles[this.loadedFiles.length] = ar[x]; } } } },
var flowUri = view.getCustomFlow(); if (flowUri != null && flowUri != "") { log("debug", "customFlow uri: [" + flowUri + "]"); cocoon.load(flowUri);
var flowUri; if (view != null) { flowUri = view.getCustomFlow(); if (flowUri != null && flowUri != "") { log("debug", "customFlow uri: [" + flowUri + "]"); cocoon.load(flowUri); } } else { log("debug", "Usecase does not define a view.");
function loadCustomFlow(view) { var flowUri = view.getCustomFlow(); if (flowUri != null && flowUri != "") { // for some reason, flowUri is not correctly cast into a Boolean, so "if (flowUri)" does not work log("debug", "customFlow uri: [" + flowUri + "]"); //loopFlow = new Function(prepareCustomFlow(flowUri)); cocoon.load(flowUri); }}
for (name in this.options) { if (/^formats\./.test(name)) { delete this.options[name] } } if (this.format) { showFormatDialog(); }
function loadDefaultOptions() { if (confirm("Do you really want to load default settings?")) { loadFromOptions(OPTIONS); }}
registerMenuCommand(docId, commandName, commandCallback, accel, access);
registerMenuCommand(docId, commandName, commandCallback, accel, access, e.explicitOriginalTarget.defaultView);
this.loadDoc = function(e) { var docId; var document = e.originalTarget; if (!document.__gmId) { document.__gmId = nextDocId++; } docMenuCommands[document.__gmId] = window.document.createElement('menupopup'); //enclose the docId to register on. //simplifies API, and disallows registering commands on a doc other //than the one the script's on. docId = document.__gmId; e.explicitOriginalTarget.defaultView.GM_registerMenuCommand = function(commandName, commandCallback, accel, access) { registerMenuCommand(docId, commandName, commandCallback, accel, access); }; }
document.GM_registerMenuCommand =
e.view.GM_registerMenuCommand =
this.loadDoc = function(e) { var docId; var document = e.originalTarget; if (!document.__gmId) { document.__gmId = nextDocId++; } docMenuCommands[document.__gmId] = window.document.createElement('menupopup'); //enclose the docId to register on. //simplifies API, and disallows registering commands on a doc other //than the one the script's on. docId = document.__gmId; document.GM_registerMenuCommand = function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); }; }
function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback);
function(commandName, commandCallback, accel, access) { registerMenuCommand(docId, commandName, commandCallback, accel, access);
this.loadDoc = function(e) { var docId; var document = e.originalTarget; if (!document.__gmId) { document.__gmId = nextDocId++; } docMenuCommands[document.__gmId] = window.document.createElement('menupopup'); //enclose the docId to register on. //simplifies API, and disallows registering commands on a doc other //than the one the script's on. docId = document.__gmId; e.explicitOriginalTarget.defaultView.GM_registerMenuCommand = function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); }; }
function loadDomViewer(){ if(window.opener != null){ newRoot = window.opener.newRoot; if (newRoot==null) newRoot = window.opener.document; document.writeln(displayDOM(newRoot)); document.close(); }else{ newRoot = parent.document.all['myiframe'].contentWindow.document; newRoot.writeln(displayDOM(newRoot)); newRoot.close(); }
function loadDomViewer() { var rootDocument = window.rootDocument; if (!rootDocument && window.opener) { rootDocument = window.opener.rootDocument || window.opener.document; } if (rootDocument) { document.body.innerHTML = displayDOM(rootDocument); } else { document.body.innerHTML = "<b>Must specify rootDocument for window. This can be done by setting the rootDocument variable on this window, or on the opener window for a popup window.</b>"; }
function loadDomViewer(){ if(window.opener != null){ //Open in a new window. // Start with specified root object. // It should be defined as a "newRoot" variable // in the tested page. Could be any element in // the DOM structure of the page that opened it. // Default to document if no object is specified. newRoot = window.opener.newRoot; if (newRoot==null) newRoot = window.opener.document; document.writeln(displayDOM(newRoot)); document.close(); }else{ newRoot = parent.document.all['myiframe'].contentWindow.document; newRoot.writeln(displayDOM(newRoot)); newRoot.close(); }}
this.scrollbar.style.display = null;
this.scrollbar.style.removeProperty("display");
function loaded(){ treeScrollbar = setUpScrollbar("treeScrollbar"); nodeContentsScrollArea = new AppleScrollArea(document.getElementById("nodeContentsScrollview"), setUpScrollbar("nodeContentsScrollbar")); elementAttributesScrollArea = new AppleScrollArea(document.getElementById("elementAttributesScrollview"), setUpScrollbar("elementAttributesScrollbar")); styleRulesScrollArea = new AppleScrollArea(document.getElementById("styleRulesScrollview"), setUpScrollbar("styleRulesScrollbar")); stylePropertiesScrollArea = new AppleScrollArea(document.getElementById("stylePropertiesScrollview"), setUpScrollbar("stylePropertiesScrollbar")); jsPropertiesScrollArea = new AppleScrollArea(document.getElementById("jsPropertiesScrollview"), setUpScrollbar("jsPropertiesScrollbar")); treeScrollbar._getViewToContentRatio = function() { var contentHeight = Inspector.treeViewScrollHeight(); var height = document.getElementById("treeScrollArea").offsetHeight; if (contentHeight > height) return height / contentHeight; return 1.0; } treeScrollbar._computeTrackOffset = function() { return Inspector.treeViewOffsetTop(); } treeScrollbar._getContentLength = function() { return Inspector.treeViewScrollHeight(); } treeScrollbar._getViewLength = function() { return document.getElementById("treeScrollArea").offsetHeight; } treeScrollbar._canScroll = function() { return true; } treeScrollbar.scrollTo = function(pos) { Inspector.treeViewScrollTo(pos); this.verticalHasScrolled(); } treeScrollbar.verticalHasScrolled = function() { var new_thumb_pos = this._thumbPositionForContentPosition(Inspector.treeViewOffsetTop()); this._thumbStart = new_thumb_pos; this._thumb.style.top = new_thumb_pos + "px"; } // much better AppleScrollArea reveal AppleScrollArea.prototype.reveal = function(node) { var offsetY = 0; var obj = node; do { offsetY += obj.offsetTop; obj = obj.offsetParent; } while (obj && obj != this.content); var offsetX = 0; obj = node; do { offsetX += obj.offsetLeft; obj = obj.offsetParent; } while (obj && obj != this.content); var top = this.content.scrollTop; var height = this.viewHeight; if ((top + height) < (offsetY + node.clientHeight)) this.verticalScrollTo(offsetY - height + node.clientHeight); else if (top > offsetY) this.verticalScrollTo(offsetY); var left = this.content.scrollLeft; var width = this.viewWidth; if ((left + width) < (offsetX + node.clientWidth)) this.horizontalScrollTo(offsetX - width + node.clientWidth); else if (left > offsetX) this.horizontalScrollTo(offsetX); } // Change the standard show/hide to include the entire scrollbar. // This lets the content reflow to use the additional space when the scrollbar is hidden. AppleScrollbar.prototype.hide = function() { this._track.style.display = "none"; this.scrollbar.style.display = "none"; this.hidden = true; } AppleScrollbar.prototype.show = function() { this._track.style.display = "block"; this.scrollbar.style.display = null; if (this.hidden) { this.hidden = false; this.refresh(); } } window.addEventListener("resize", refreshScrollbars, false); toggleNoSelection(false); switchPane("node");}
window.addEventListener("keypress", keyPressed, false);
function loaded() { window.addEventListener("keypress", keyPressed, false); document.getElementById("divider").addEventListener("mousedown", sourceDividerDragStart, false); document.getElementById("infoDivider").addEventListener("mousedown", infoDividerDragStart, false);}
elementAttributesScrollbar = new AppleVerticalScrollbar(document.getElementById("elementAttributesScrollbar")); elementAttributesScrollArea = new AppleScrollArea(document.getElementById("elementAttributesScrollview"), elementAttributesScrollbar); elementAttributesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); elementAttributesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); elementAttributesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); elementAttributesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); elementAttributesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); elementAttributesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9);
function loaded(){ treeScrollbar = new AppleVerticalScrollbar(document.getElementById("treeScrollbar")); treeScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); treeScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); treeScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); treeScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); treeScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); treeScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); nodeContentsScrollbar = new AppleVerticalScrollbar(document.getElementById("nodeContentsScrollbar")); nodeContentsScrollArea = new AppleScrollArea(document.getElementById("nodeContentsScrollview"), nodeContentsScrollbar); nodeContentsScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); nodeContentsScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); nodeContentsScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); nodeContentsScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); nodeContentsScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); nodeContentsScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); styleRulesScrollbar = new AppleVerticalScrollbar(document.getElementById("styleRulesScrollbar")); styleRulesScrollArea = new AppleScrollArea(document.getElementById("styleRulesScrollview"), styleRulesScrollbar); styleRulesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); styleRulesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); styleRulesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); styleRulesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); styleRulesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); styleRulesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); stylePropertiesScrollbar = new AppleVerticalScrollbar(document.getElementById("stylePropertiesScrollbar")); stylePropertiesScrollArea = new AppleScrollArea(document.getElementById("stylePropertiesScrollview"), stylePropertiesScrollbar); stylePropertiesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); stylePropertiesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); stylePropertiesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); stylePropertiesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); stylePropertiesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); stylePropertiesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); treeScrollbar._getViewToContentRatio = function() { var contentHeight = Inspector.treeViewScrollHeight(); var height = document.getElementById("treeScrollArea").offsetHeight; if (contentHeight > height) return height / contentHeight; return 1.0; } treeScrollbar._computeTrackOffset = function() { return Inspector.treeViewOffsetTop(); } treeScrollbar._getContentLength = function() { return Inspector.treeViewScrollHeight(); } treeScrollbar._getViewLength = function() { return document.getElementById("treeScrollArea").offsetHeight; } treeScrollbar._canScroll = function() { return true; } treeScrollbar.scrollTo = function(pos) { Inspector.treeViewScrollTo(pos); this.verticalHasScrolled(); } treeScrollbar.verticalHasScrolled = function() { var new_thumb_pos = this._thumbPositionForContentPosition(Inspector.treeViewOffsetTop()); this._thumbStart = new_thumb_pos; this._thumb.style.top = new_thumb_pos + "px"; } // much better AppleScrollArea reveal AppleScrollArea.prototype.reveal = function(node) { var offsetY = 0; var obj = node; do { offsetY += obj.offsetTop; obj = obj.offsetParent; } while (obj && obj != this.content); var offsetX = 0; obj = node; do { offsetX += obj.offsetLeft; obj = obj.offsetParent; } while (obj && obj != this.content); var top = this.content.scrollTop; var height = this.viewHeight; if ((top + height) < (offsetY + node.clientHeight)) this.verticalScrollTo(offsetY - height + node.clientHeight); else if (top > offsetY) this.verticalScrollTo(offsetY); var left = this.content.scrollLeft; var width = this.viewWidth; if ((left + width) < (offsetX + node.clientWidth)) this.horizontalScrollTo(offsetX - width + node.clientWidth); else if (left > offsetX) this.horizontalScrollTo(offsetX); }; window.addEventListener("resize", refreshScrollbars, false);}
document.getElementById("filesDivider").addEventListener("mousedown", filesDividerDragStart, false);
function loaded() { document.getElementById("divider").addEventListener("mousedown", sourceDividerDragStart, false); document.getElementById("infoDivider").addEventListener("mousedown", infoDividerDragStart, false); document.getElementById("variableColumnResizer").addEventListener("mousedown", columnResizerDragStart, false);}
{
Object.extend({
loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); },
}
}, this.options.ajaxOptions)
loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); },
file.source = file.source.replace(/\r\n|\r/, "\n");
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { file.source = file.source.replace(/\r\n|\r/, "\n"); // normalize line endings var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var lines = syntaxHighlight(file.source).split("\n"); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", addBreakPoint, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = (lines[i].length ? lines[i] : "&nbsp;"); tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
var lines = syntaxHighlight(file.source).split("\n");
var normalizedSource = file.source.replace(/\r\n|\r/, "\n"); var lines = syntaxHighlight(normalizedSource).split("\n");
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { file.source = file.source.replace(/\r\n|\r/, "\n"); // normalize line endings var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var lines = syntaxHighlight(file.source).split("\n"); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", addBreakPoint, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = (lines[i].length ? lines[i] : "&nbsp;"); tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
file.lines = file.source.split(/[\n\r]/);
file.source = file.source.replace(/\r\n|\r/, "\n");
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { file.lines = file.source.split(/[\n\r]/); var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var lines = syntaxHighlight(file.source).split(/[\n\r]/); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", addBreakPoint, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = lines[i]; tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
var lines = syntaxHighlight(file.source).split(/[\n\r]/);
var lines = syntaxHighlight(file.source).split("\n");
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { file.lines = file.source.split(/[\n\r]/); var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var lines = syntaxHighlight(file.source).split(/[\n\r]/); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", addBreakPoint, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = lines[i]; tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
td.innerHTML = lines[i];
td.innerHTML = (lines[i].length ? lines[i] : "&nbsp;");
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { file.lines = file.source.split(/[\n\r]/); var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var lines = syntaxHighlight(file.source).split(/[\n\r]/); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", addBreakPoint, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = lines[i]; tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
td.addEventListener("click", addBreakPoint, true);
td.addEventListener("click", breakpointAction, true); td.addEventListener("dblclick", toggleBreakpointEditor, true);
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var normalizedSource = file.source.replace(/\r\n|\r/, "\n"); // normalize line endings var lines = syntaxHighlight(normalizedSource).split("\n"); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", addBreakPoint, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = (lines[i].length ? lines[i] : "&nbsp;"); tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
td.addEventListener("mousedown", moveBreakPoint, true);
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { file.lines = file.source.split(/[\n\r]/); var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var lines = syntaxHighlight(file.source).split(/[\n\r]/); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", addBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = lines[i]; tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
var lines = syntaxHighlight(normalizedSource).split("\n");
var lines = syntaxHighlight(normalizedSource, file).split("\n");
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var normalizedSource = file.source.replace(/\r\n|\r/, "\n"); // normalize line endings var lines = syntaxHighlight(normalizedSource).split("\n"); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", breakpointAction, true); td.addEventListener("dblclick", function() { toggleBreakpointEditorOnLine(event.target.title); }, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = (lines[i].length ? lines[i] : "&nbsp;"); tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
if (file.functionNames.length > 0) { var functionSelect = document.getElementById("functions"); var functionOption = document.createElement("option"); document.getElementById("functionNamesPopup").style.display = "inline"; switchFunction(0, true); functionSelect.removeChildren(); functionOption.value = null; functionOption.text = "< no selected symbol >"; functionSelect.appendChild(functionOption); for (var i = 0; i < file.functionNames.length; i++) { functionOption = document.createElement("option"); functionOption.value = fileIndex + "-" + (i+1); functionOption.text = file.functionNames[i] + "()"; functionSelect.appendChild(functionOption); } } else document.getElementById("functionNamesPopup").style.display = "none";
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var normalizedSource = file.source.replace(/\r\n|\r/, "\n"); // normalize line endings var lines = syntaxHighlight(normalizedSource).split("\n"); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", breakpointAction, true); td.addEventListener("dblclick", function() { toggleBreakpointEditorOnLine(event.target.title); }, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = (lines[i].length ? lines[i] : "&nbsp;"); tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
file.element.style.display = null;
file.element.style.removeProperty("display");
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var normalizedSource = file.source.replace(/\r\n|\r/, "\n"); // normalize line endings var lines = syntaxHighlight(normalizedSource, file).split("\n"); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", breakpointAction, true); td.addEventListener("dblclick", function() { toggleBreakpointEditorOnLine(event.target.title); }, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = (lines[i].length ? lines[i] : "&nbsp;"); tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } // Populate the function names pop-up if (file.functionNames.length > 0) { var functionSelect = document.getElementById("functions"); var functionOption = document.createElement("option"); document.getElementById("functionNamesPopup").style.display = "inline"; switchFunction(0, true); functionSelect.removeChildren(); functionOption.value = null; functionOption.text = "< no selected symbol >"; functionSelect.appendChild(functionOption); for (var i = 0; i < file.functionNames.length; i++) { functionOption = document.createElement("option"); functionOption.value = fileIndex + "-" + (i+1); functionOption.text = file.functionNames[i] + "()"; functionSelect.appendChild(functionOption); } } else document.getElementById("functionNamesPopup").style.display = "none"; if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
td.addEventListener("dblclick", toggleBreakpointEditor, true);
td.addEventListener("dblclick", function() { toggleBreakpointEditorOnLine(event.target.title); }, true);
function loadFile(fileIndex, manageNavLists){ var file = files[fileIndex]; if (!file) return; if (currentFile != -1 && files[currentFile] && files[currentFile].element) files[currentFile].element.style.display = "none"; if (!file.loaded) { var sourcesDocument = document.getElementById("sources").contentDocument; var sourcesDiv = sourcesDocument.body; var sourceDiv = sourcesDocument.createElement("div"); sourceDiv.id = "file" + fileIndex; sourcesDiv.appendChild(sourceDiv); file.element = sourceDiv; var table = sourcesDocument.createElement("table"); sourceDiv.appendChild(table); var normalizedSource = file.source.replace(/\r\n|\r/, "\n"); // normalize line endings var lines = syntaxHighlight(normalizedSource).split("\n"); for( var i = 0; i < lines.length; i++ ) { var tr = sourcesDocument.createElement("tr"); var td = sourcesDocument.createElement("td"); td.className = "gutter"; td.title = (i + 1); td.addEventListener("click", breakpointAction, true); td.addEventListener("dblclick", toggleBreakpointEditor, true); td.addEventListener("mousedown", moveBreakPoint, true); tr.appendChild(td); td = sourcesDocument.createElement("td"); td.className = "source"; td.innerHTML = (lines[i].length ? lines[i] : "&nbsp;"); tr.appendChild(td); table.appendChild(tr); } file.loaded = true; } file.element.style.display = null; document.getElementById("filesPopupButtonContent").innerText = (file.url ? file.url : "(unknown script)"); var filesSelect = document.getElementById("files"); for (var i = 0; i < filesSelect.childNodes.length; i++) { if (filesSelect.childNodes[i].value == fileIndex) { filesSelect.selectedIndex = i; break; } } if (manageNavLists) { nextFiles = new Array(); if (currentFile != -1) previousFiles.push(currentFile); } document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0); document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0); currentFile = fileIndex;}
var termsOfUse = this.div.lastChild; this.div.removeChild(termsOfUse); this.pane.appendChild(termsOfUse); var poweredBy = this.div.lastChild; this.div.removeChild(poweredBy); this.pane.appendChild(poweredBy);
loadGMap:function() { //has gmaps library has been loaded? try { // create GMap, hide nav controls this.gmap = new GMap2( this.div ); this.gmap.disableDragging(); // this causes the GMap to set itself to Map's center/zoom this.moveTo(); } catch (e) { this.loadWarningMessage(); } },
if(!file_loader)
if(!file_loader || isMacIE50)
function loadLayer(e, layer_name, src, properties, parent){ if(popups.length != 0 && popups[popups.length - 1].name == layer_name && properties.hide_2nd_click) { clearToPopup(parent); return retFromEvent(false); } clearToPopup(parent); if(isNav4) { var l = getObject(layer_name); if(!l) alert("Unknown layer '"+layer_name+"'."); l.name = layer_name; l.onload = layerLoadHandler; l.src = src; l.properties = properties; } else { if(!file_loader) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.loadDocument(src); file_loader.properties = properties; } var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); shiftTo(layer_name, pos.x, pos.y); return retFromEvent(false);}
file_loader.properties = properties;
function loadLayer(e, layer_name, src, properties, parent){ if(popups.length != 0 && popups[popups.length - 1].name == layer_name && properties.hide_2nd_click) { clearToPopup(parent); return retFromEvent(false); } clearToPopup(parent); if(isNav4) { var l = getObject(layer_name); if(!l) alert("Unknown layer '"+layer_name+"'."); l.name = layer_name; l.onload = layerLoadHandler; l.src = src; l.properties = properties; } else { if(!file_loader) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.loadDocument(src); file_loader.properties = properties; } var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); shiftTo(layer_name, pos.x, pos.y); return retFromEvent(false);}
return false;
return retFromEvent(false);
function loadLayer(e, layer_name, src, properties, parent){ clearToPopup(parent); if(isNav4) { var l = getObject(layer_name); l.onload = layerLoadHandler; l.src = src; l.properties = properties; } else { if(!file_loader) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.loadDocument(src); file_loader.properties = properties; } var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); shiftTo(layer_name, pos.x, pos.y); return false;}
else popups.length--;
function loadLayer(e, layer_name, src, properties, parent){ if(popups.length != 0 && popups[popups.length - 1].name == layer_name && properties.hide_2nd_click) { clearToPopup(parent); return retFromEvent(false); } if(!properties.stay_put) clearToPopup(parent); if(isNav4) { var l = getObject(layer_name); if(!l) alert("Unknown layer '"+layer_name+"'."); l.name = layer_name; l.onload = layerLoadHandler; l.src = src; l.properties = properties; } else { if(!file_loader || isMacIE50) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.properties = properties; file_loader.loadDocument(src); } var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); if(!properties.stay_put) shiftTo(layer_name, pos.x, pos.y); return retFromEvent(false);}
if (req.status == 200) {
if (req.status == 200 || req.status == undefined) {
function loadLayer(e, layer_name, src, properties, parent){ if(popups.length != 0 && popups[popups.length - 1].name == layer_name && properties.hide_2nd_click) { clearToPopup(parent); return retFromEvent(false); } if(!properties.stay_put) clearToPopup(parent); else if(popups.length) popups.length--; var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); if(!properties.stay_put) shiftTo(layer_name, pos.x, pos.y); // Dinosaur browsers if(isNav4) { var l = getObject(layer_name); if(!l) alert("Unknown layer '"+layer_name+"'."); l.name = layer_name; l.onload = layerLoadHandler; l.src = src; l.properties = properties; return retFromEvent(false); } // Modern DOM-based guys if (window.XMLHttpRequest || window.ActiveXObject) { var req; if (window.XMLHttpRequest) { // Use XMLHttpRequest which is implemented in Safari and Mozilla/Firefox req = new XMLHttpRequest(); } else { // Use ActiveX version for MSIE try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { req = false; } } } if (req) { // Define notification function req.onreadystatechange = function() { if (req.readyState == 4) if (req.status == 200) { var o = getObject(layer_name); o.innerHTML = req.responseText; boundPopup(layer_name); addPopup(layer_name, properties); captureMouseEvent(popupMove); show(layer_name); } } // Send async request req.open("GET", src, true); req.send(null); return retFromEvent(false); } else // Fallback to FileLoader ; } // Old implementation if(!file_loader || isMacIE50) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.properties = properties; if (isSafari) file_loader.loadSafariDocument(src); else file_loader.loadDocument(src); return retFromEvent(false);}
if(isNav4) {
var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); if(!properties.stay_put) shiftTo(layer_name, pos.x, pos.y); if(isNav4) {
function loadLayer(e, layer_name, src, properties, parent){ if(popups.length != 0 && popups[popups.length - 1].name == layer_name && properties.hide_2nd_click) { clearToPopup(parent); return retFromEvent(false); } if(!properties.stay_put) clearToPopup(parent); else if(popups.length) popups.length--; if(isNav4) { var l = getObject(layer_name); if(!l) alert("Unknown layer '"+layer_name+"'."); l.name = layer_name; l.onload = layerLoadHandler; l.src = src; l.properties = properties; } else { if(!file_loader || isMacIE50) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.properties = properties; if (isSafari) file_loader.loadSafariDocument(src); else file_loader.loadDocument(src); } var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); if(!properties.stay_put) shiftTo(layer_name, pos.x, pos.y); return retFromEvent(false);}
} else { if(!file_loader || isMacIE50) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.properties = properties; if (isSafari) file_loader.loadSafariDocument(src); else file_loader.loadDocument(src);
return retFromEvent(false);
function loadLayer(e, layer_name, src, properties, parent){ if(popups.length != 0 && popups[popups.length - 1].name == layer_name && properties.hide_2nd_click) { clearToPopup(parent); return retFromEvent(false); } if(!properties.stay_put) clearToPopup(parent); else if(popups.length) popups.length--; if(isNav4) { var l = getObject(layer_name); if(!l) alert("Unknown layer '"+layer_name+"'."); l.name = layer_name; l.onload = layerLoadHandler; l.src = src; l.properties = properties; } else { if(!file_loader || isMacIE50) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.properties = properties; if (isSafari) file_loader.loadSafariDocument(src); else file_loader.loadDocument(src); } var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); if(!properties.stay_put) shiftTo(layer_name, pos.x, pos.y); return retFromEvent(false);}
var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); if(!properties.stay_put) shiftTo(layer_name, pos.x, pos.y);
if (window.XMLHttpRequest || window.ActiveXObject) { var req; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else { try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { req = false; } } } if (req) { req.onreadystatechange = function() { if (req.readyState == 4) if (req.status == 200) { var o = getObject(layer_name); o.innerHTML = req.responseText; boundPopup(layer_name); addPopup(layer_name, properties); captureMouseEvent(popupMove); show(layer_name); } } req.open("GET", src, true); req.send(null); return retFromEvent(false); } else ; } if(!file_loader || isMacIE50) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.properties = properties; if (isSafari) file_loader.loadSafariDocument(src); else file_loader.loadDocument(src);
function loadLayer(e, layer_name, src, properties, parent){ if(popups.length != 0 && popups[popups.length - 1].name == layer_name && properties.hide_2nd_click) { clearToPopup(parent); return retFromEvent(false); } if(!properties.stay_put) clearToPopup(parent); else if(popups.length) popups.length--; if(isNav4) { var l = getObject(layer_name); if(!l) alert("Unknown layer '"+layer_name+"'."); l.name = layer_name; l.onload = layerLoadHandler; l.src = src; l.properties = properties; } else { if(!file_loader || isMacIE50) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.properties = properties; if (isSafari) file_loader.loadSafariDocument(src); else file_loader.loadDocument(src); } var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); if(!properties.stay_put) shiftTo(layer_name, pos.x, pos.y); return retFromEvent(false);}
else
else if(popups.length)
function loadLayer(e, layer_name, src, properties, parent){ if(popups.length != 0 && popups[popups.length - 1].name == layer_name && properties.hide_2nd_click) { clearToPopup(parent); return retFromEvent(false); } if(!properties.stay_put) clearToPopup(parent); else popups.length--; if(isNav4) { var l = getObject(layer_name); if(!l) alert("Unknown layer '"+layer_name+"'."); l.name = layer_name; l.onload = layerLoadHandler; l.src = src; l.properties = properties; } else { if(!file_loader || isMacIE50) file_loader = new FileLoader(layerLoadHandler); file_loader.layer_name = layer_name; file_loader.properties = properties; file_loader.loadDocument(src); } var pos = new properties.LayerPosition(new TriggerCoord(e, 0), 0, properties); if(!properties.stay_put) shiftTo(layer_name, pos.x, pos.y); return retFromEvent(false);}
if (node.nodeType == 3) {
if (node.nodeName.indexOf("/") > -1 || node.nodeName == "" || node.nodeName == "#document" || node.nodeName == "#document-fragment" || node.nodeName == "#cdata-section" || node.nodeName == "#xml-declaration" || node.nodeName == "#whitespace" || node.nodeName == "#significat-whitespace" ) { return; } if (node.nodeName == "#comment") { try { domParentNode.appendChild(dom.createComment(node.nodeValue)); } catch (ex) { } } else if (node.nodeType == 3) {
function loadNode(dom, domParentNode, node, helper) { if (node.nodeType == 3) { domParentNode.appendChild(dom.createTextNode(node.nodeValue)); } else { var domNode = dom.createElement(node.nodeName.toLowerCase()); if (!node.id) { node.id = node.uniqueID; } domParentNode.appendChild(domNode); loadAttributes(dom, domNode, node); var length = node.childNodes.length; for(var i = 0; i < length; i ++ ) { loadNode(dom, domNode, node.childNodes[i], helper); } node.attachEvent("onpropertychange", onPropertyChangeEventHandler); } }
e.innerHTML = this.testManager.getFormat().format(this.testCase, OPTIONS, "Test Player");
e.innerHTML = this.testManager.getDefaultFormat().format(this.testCase, "Test Player", false, true);
function loadPlayerTest(e) { e.innerHTML = this.testManager.getFormat().format(this.testCase, OPTIONS, "Test Player");}
if (recorder.options.userExtensionsURL) {
if (editor.options.userExtensionsURL) {
function loadSeleniumCommands() { const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); var scope = new Object(); var actions = new Array(); var asserts = new Array(); var verifies = new Array(); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-api.js', scope); if (recorder.options.userExtensionsURL) { try { subScriptLoader.loadSubScript(recorder.options.userExtensionsURL, scope); } catch (error) { this.editor.showAlert("Failed to load user-extensions.js!\nfile=" + recorder.options.userExtensionsURL + "\nerror=" + error); } } var waitActions = ['click', 'select', 'type', 'check', 'uncheck', 'fireEvent', 'goBack']; for (func in scope.Selenium.prototype) { //this.log.debug("func=" + func); if (func.match(/^do[A-Z]/)) { var action = func.substr(2,1).toLowerCase() + func.substr(3); actions.push(action); if (waitActions.indexOf(action) >= 0) { actions.push(action + "AndWait"); } } else if (func.match(/^assert.+/)) { asserts.push(func); verifies.push("verify" + func.substr(6)); } else if (func.match(/^get.+/)) { asserts.push("assert" + func.substr(3)); verifies.push("verify" + func.substr(3)); } } actions.push("pause"); actions.sort(); asserts.sort(); verifies.sort(); var allCommands = actions.concat(asserts, verifies); var array = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); for (var i = 0; i < allCommands.length; i++) { var string = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); string.data = allCommands[i]; array.AppendElement(string); } var autocomplete = Components.classes["@mozilla.org/autocomplete/search;1?name=selenium-commands"].getService(Components.interfaces.nsISeleniumAutoCompleteSearch); autocomplete.setSeleniumCommands(array); }
subScriptLoader.loadSubScript(recorder.options.userExtensionsURL, scope);
subScriptLoader.loadSubScript(editor.options.userExtensionsURL, scope);
function loadSeleniumCommands() { const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); var scope = new Object(); var actions = new Array(); var asserts = new Array(); var verifies = new Array(); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-api.js', scope); if (recorder.options.userExtensionsURL) { try { subScriptLoader.loadSubScript(recorder.options.userExtensionsURL, scope); } catch (error) { this.editor.showAlert("Failed to load user-extensions.js!\nfile=" + recorder.options.userExtensionsURL + "\nerror=" + error); } } var waitActions = ['click', 'select', 'type', 'check', 'uncheck', 'fireEvent', 'goBack']; for (func in scope.Selenium.prototype) { //this.log.debug("func=" + func); if (func.match(/^do[A-Z]/)) { var action = func.substr(2,1).toLowerCase() + func.substr(3); actions.push(action); if (waitActions.indexOf(action) >= 0) { actions.push(action + "AndWait"); } } else if (func.match(/^assert.+/)) { asserts.push(func); verifies.push("verify" + func.substr(6)); } else if (func.match(/^get.+/)) { asserts.push("assert" + func.substr(3)); verifies.push("verify" + func.substr(3)); } } actions.push("pause"); actions.sort(); asserts.sort(); verifies.sort(); var allCommands = actions.concat(asserts, verifies); var array = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); for (var i = 0; i < allCommands.length; i++) { var string = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); string.data = allCommands[i]; array.AppendElement(string); } var autocomplete = Components.classes["@mozilla.org/autocomplete/search;1?name=selenium-commands"].getService(Components.interfaces.nsISeleniumAutoCompleteSearch); autocomplete.setSeleniumCommands(array); }
this.editor.showAlert("Failed to load user-extensions.js!\nfile=" + recorder.options.userExtensionsURL + "\nerror=" + error);
this.editor.showAlert("Failed to load user-extensions.js!\nfile=" + editor.options.userExtensionsURL + "\nerror=" + error);
function loadSeleniumCommands() { const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); var scope = new Object(); var actions = new Array(); var asserts = new Array(); var verifies = new Array(); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-api.js', scope); if (recorder.options.userExtensionsURL) { try { subScriptLoader.loadSubScript(recorder.options.userExtensionsURL, scope); } catch (error) { this.editor.showAlert("Failed to load user-extensions.js!\nfile=" + recorder.options.userExtensionsURL + "\nerror=" + error); } } var waitActions = ['click', 'select', 'type', 'check', 'uncheck', 'fireEvent', 'goBack']; for (func in scope.Selenium.prototype) { //this.log.debug("func=" + func); if (func.match(/^do[A-Z]/)) { var action = func.substr(2,1).toLowerCase() + func.substr(3); actions.push(action); if (waitActions.indexOf(action) >= 0) { actions.push(action + "AndWait"); } } else if (func.match(/^assert.+/)) { asserts.push(func); verifies.push("verify" + func.substr(6)); } else if (func.match(/^get.+/)) { asserts.push("assert" + func.substr(3)); verifies.push("verify" + func.substr(3)); } } actions.push("pause"); actions.sort(); asserts.sort(); verifies.sort(); var allCommands = actions.concat(asserts, verifies); var array = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); for (var i = 0; i < allCommands.length; i++) { var string = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); string.data = allCommands[i]; array.AppendElement(string); } var autocomplete = Components.classes["@mozilla.org/autocomplete/search;1?name=selenium-commands"].getService(Components.interfaces.nsISeleniumAutoCompleteSearch); autocomplete.setSeleniumCommands(array); }
commands.push("assert" + r[2]); commands.push("verify" + r[2]); commands.push("store" + r[2]); commands.push("waitFor" + r[2]);
var base = r[2]; commands.push("assert" + base); commands.push("verify" + base); commands.push("store" + base); commands.push("waitFor" + base); var r2; if ((r = func.match(/^is(.*)Present$/))) { base = r[1]; commands.push("assert" + base + "NotPresent"); commands.push("verify" + base + "NotPresent"); } else { commands.push("assertNot" + base); commands.push("verifyNot" + base); }
function loadSeleniumCommands() { var commands = []; var nonWaitActions = ['open', 'selectWindow', 'chooseCancelOnNextConfirmation', 'answerOnNextPrompt', 'close', 'setContext', 'setTimeout']; for (func in this.editor.seleniumAPI.Selenium.prototype) { //this.log.debug("func=" + func); var r; if (func.match(/^do[A-Z]/)) { var action = func.substr(2,1).toLowerCase() + func.substr(3); commands.push(action); if (!action.match(/^waitFor/) && nonWaitActions.indexOf(action) < 0) { commands.push(action + "AndWait"); } } else if (func.match(/^assert.+/)) { commands.push(func); commands.push("verify" + func.substr(6)); } else if ((r = func.match(/^(get|is)(.+)$/))) { commands.push("assert" + r[2]); commands.push("verify" + r[2]); commands.push("store" + r[2]); commands.push("waitFor" + r[2]); } } commands.push("pause"); commands.sort(); var array = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); for (var i = 0; i < commands.length; i++) { var string = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); string.data = commands[i]; array.AppendElement(string); } var autocomplete = Components.classes["@mozilla.org/autocomplete/search;1?name=selenium-commands"].getService(Components.interfaces.nsISeleniumAutoCompleteSearch); autocomplete.setSeleniumCommands(array); }
selenium.browserbot.baseUrl = testSuiteName;
selenium.browserbot.baseUrl = absolutify(testSuiteName, window.location.href);
loadSuiteFrame: function() { if (selenium == null) { var appWindow = this._getApplicationWindow(); try { appWindow.location; } catch (e) { // when reloading, we may be pointing at an old window (Perm Denied) setTimeout(fnBind(function() { this.loadSuiteFrame(); }, this), 50); return; } selenium = Selenium.createForWindow(appWindow); this._registerCommandHandlers(); } this.controlPanel.setHighlightOption(); var testSuiteName = this.controlPanel.getTestSuiteName(); var self = this; if (testSuiteName) { suiteFrame.load(testSuiteName, function() {setTimeout(fnBind(self._onloadTestSuite, self), 50)} ); selenium.browserbot.baseUrl = testSuiteName; } if (this.controlPanel.getBaseUrl()) { selenium.browserbot.baseUrl = this.controlPanel.getBaseUrl(); } },
suiteFrame.load(testSuiteName, fnBind(this._onloadTestSuite, this));
suiteFrame.load(testSuiteName, setTimeout(fnBind(this._onloadTestSuite, this), 50) );
loadSuiteFrame: function() { if (selenium == null) { var appWindow = this._getApplicationWindow(); try { appWindow.location; } catch (e) { // when reloading, we may be pointing at an old window (Perm Denied) setTimeout(fnBind(function() { this.loadSuiteFrame(); }, this), 50); return; } selenium = Selenium.createForWindow(appWindow); this._registerCommandHandlers(); } this.controlPanel.setHighlightOption(); var testSuiteName = this.controlPanel.getTestSuiteName(); if (testSuiteName) { suiteFrame.load(testSuiteName, fnBind(this._onloadTestSuite, this)); } },
selenium.browserbot.baseUrl = testSuiteName; } if (this.controlPanel.getBaseUrl()) { selenium.browserbot.baseUrl = this.controlPanel.getBaseUrl();
loadSuiteFrame: function() { if (selenium == null) { var appWindow = this._getApplicationWindow(); try { appWindow.location; } catch (e) { // when reloading, we may be pointing at an old window (Perm Denied) setTimeout(fnBind(function() { this.loadSuiteFrame(); }, this), 50); return; } selenium = Selenium.createForWindow(appWindow); this._registerCommandHandlers(); } this.controlPanel.setHighlightOption(); var testSuiteName = this.controlPanel.getTestSuiteName(); var self = this; if (testSuiteName) { suiteFrame.load(testSuiteName, function() {setTimeout(fnBind(self._onloadTestSuite, self), 50)} ); } },
suiteFrame.load(testSuiteName, this._onloadTestSuite.bind(this));
suiteFrame.load(testSuiteName, fnBind(this._onloadTestSuite, this));
loadSuiteFrame: function() { if (selenium == null) { selenium = Selenium.createForWindow(this._getApplicationWindow()); this._registerCommandHandlers(); } this.controlPanel.setHighlightOption(); var testSuiteName = this.controlPanel.getTestSuiteName(); if (testSuiteName) { suiteFrame.load(testSuiteName, this._onloadTestSuite.bind(this)); } },
selenium = Selenium.createForWindow(this._getApplicationWindow());
var appWindow = this._getApplicationWindow(); try { appWindow.location; } catch (e) { setTimeout(fnBind(function() { this.loadSuiteFrame(); }, this), 500); return; } selenium = Selenium.createForWindow(appWindow);
loadSuiteFrame: function() { if (selenium == null) { selenium = Selenium.createForWindow(this._getApplicationWindow()); this._registerCommandHandlers(); } this.controlPanel.setHighlightOption(); var testSuiteName = this.controlPanel.getTestSuiteName(); if (testSuiteName) { suiteFrame.load(testSuiteName, fnBind(this._onloadTestSuite, this)); } },
alert(testSuiteName);
function loadSuiteFrame(executionContext) { var testAppFrame = executionContext.loadFrame(); browserbot = new BrowserBot(testAppFrame,executionContext); selenium = new Selenium(browserbot); registerCommandHandlers(); document.getElementById("modeRun").onclick = setRunInterval; document.getElementById('modeWalk').onclick = setRunInterval; document.getElementById('modeStep').onclick = setRunInterval; document.getElementById('continueTest').onclick = continueCurrentTest; var testSuiteName = getQueryParameter("test"); if (testSuiteName) { addLoadListener(getSuiteFrame(), loadTestFrame); getSuiteFrame().src = testSuiteName; } else { loadTestFrame(); }}
document.getElementById("modeRun").onclick = setRunInterval; document.getElementById('modeWalk').onclick = setRunInterval; document.getElementById('modeStep').onclick = setRunInterval;
function loadSuiteFrame(){ browserbot = new BrowserBot(document.getElementById('myiframe')); selenium = new Selenium(browserbot); registerCommandHandlers() testSuiteName = getQueryStringTestName(); if( testSuiteName != "" ) { addLoadListener(getSuiteFrame(), loadTestFrame); getSuiteFrame().src = testSuiteName; } else loadTestFrame();}
testAppFrame.src = "http:
function loadSuiteFrame() { var testAppFrame = document.getElementById('myiframe'); browserbot = new BrowserBot(testAppFrame); selenium = new Selenium(browserbot); registerCommandHandlers() document.getElementById("modeRun").onclick = setRunInterval; document.getElementById('modeWalk').onclick = setRunInterval; document.getElementById('modeStep').onclick = setRunInterval; document.getElementById('continueTest').onclick = continueCurrentTest; testSuiteName = getQueryStringTestName(); if( testSuiteName != "" ) { addLoadListener(getSuiteFrame(), loadTestFrame); getSuiteFrame().src = testSuiteName; } else { loadTestFrame(); } testAppFrame.src = "http://selenium.thoughtworks.com";}
_req.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
function loadSyncURL(_url) { var _req; if (window.XMLHttpRequest) { _req = new XMLHttpRequest(); _req.open("GET", _url, false); _req.send(null); } else if (window.ActiveXObject) { _req = new ActiveXObject("Microsoft.XMLHTTP"); if(_req) { _req.open("GET", _url, false); _req.send(); } } else alert("Kein Browser-Support fr XMLHttpRequest"); if (_req.readyState == 4 && _req.status == 200) return _req.responseText; else return "";}
testFrame.setCurrentTestCase();
this.testFrame._onload();
loadTestCase: function(onloadFunction) { this.htmlTestSuite.currentRowInSuite = this.trElement.rowIndex - 1; // If the row has a stored results table, use that var resultsFromPreviousRun = this.trElement.cells[1]; if (resultsFromPreviousRun) { // this.testFrame.restoreTestCase(resultsFromPreviousRun.innerHTML); var testBody = this.testFrame.getDocument().body; testBody.innerHTML = resultsFromPreviousRun.innerHTML; testFrame.setCurrentTestCase(); if (onloadFunction) { onloadFunction(); } } else { this.testFrame.load(this.link.href, onloadFunction); } },
this.testFrame._onload();
this.testFrame._onLoad();
loadTestCase: function(onloadFunction) { this.htmlTestSuite.currentRowInSuite = this.trElement.rowIndex - 1; // If the row has a stored results table, use that var resultsFromPreviousRun = this.trElement.cells[1]; if (resultsFromPreviousRun) { // todo: delegate to TestFrame, e.g. // this.testFrame.restoreTestCase(resultsFromPreviousRun.innerHTML); var testBody = this.testFrame.getDocument().body; testBody.innerHTML = resultsFromPreviousRun.innerHTML; this.testFrame._onload(); if (onloadFunction) { onloadFunction(); } } else { this.testFrame.load(this.link.href, onloadFunction); } },
if (testCase = this.testManager.load()) {
if ((testCase = this.testManager.load()) != null) {
function loadTestCase() { log.debug("loadTestCase"); try { var testCase = null; if (testCase = this.testManager.load()) { this.setTestCase(testCase); this.view.refresh(); //document.getElementById("filename").value = this.testCase.filename; //document.title = this.testCase.filename + " - " + DEFAULT_TITLE; updateTitle(); } } catch (error) { alert(error); }}
if (!params) { params=""; } params += "&cachehack=" + new Date().getTime();
OpenLayers.loadURL = function(uri, params, caller, onComplete, onFailure) { if (OpenLayers.ProxyHost && uri.startsWith("http")) { uri = OpenLayers.ProxyHost + escape(uri); if (!params) { params=""; } params += "&cachehack=" + new Date().getTime(); } var success = (onComplete) ? onComplete.bind(caller) : OpenLayers.nullHandler; var failure = (onFailure) ? onFailure.bind(caller) : OpenLayers.nullHandler; // from prototype.js new Ajax.Request(uri, { method: 'get', parameters: params, onComplete: success, onFailure: failure } );};
this.vemap.LoadMap();
} catch (e) { } if (this.vemap == null) { this.loadWarningMessage(); } else { try { this.vemap.LoadMap(); } catch (e) { }
loadVEMap:function() { // create div and set to same size as map var veDiv = OpenLayers.Util.createDiv(this.name); var sz = this.map.getSize(); veDiv.style.width = sz.w; veDiv.style.height = sz.h; this.div.appendChild(veDiv); try { // create VEMap, hide nav controls this.vemap = new VEMap(this.name); this.vemap.LoadMap(); this.vemap.HideDashboard(); // catch pans and zooms from VE Map this.vemap.AttachEvent("onendcontinuouspan", this.catchPanZoom.bindAsEventListener(this)); this.vemap.AttachEvent("onendzoom", this.catchPanZoom.bindAsEventListener(this)); } catch (e) { this.loadWarningMessage(); } },
} catch (e) { this.loadWarningMessage();
loadVEMap:function() { // create div and set to same size as map var veDiv = OpenLayers.Util.createDiv(this.name); var sz = this.map.getSize(); veDiv.style.width = sz.w; veDiv.style.height = sz.h; this.div.appendChild(veDiv); try { // create VEMap, hide nav controls this.vemap = new VEMap(this.name); this.vemap.LoadMap(); this.vemap.HideDashboard(); // catch pans and zooms from VE Map this.vemap.AttachEvent("onendcontinuouspan", this.catchPanZoom.bindAsEventListener(this)); this.vemap.AttachEvent("onendzoom", this.catchPanZoom.bindAsEventListener(this)); } catch (e) { this.loadWarningMessage(); } },
g_req.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
function loadXMLDoc(_url, _processReqChange) { if (window.XMLHttpRequest) { g_req = new XMLHttpRequest(); g_req.onreadystatechange = _processReqChange; if(g_req.overrideMimeType) { g_req.overrideMimeType('text/xml');} g_req.open("GET", _url, true); g_req.send(null); } else if (window.ActiveXObject) { g_req = new ActiveXObject("Microsoft.XMLHTTP"); if (g_req) { g_req.onreadystatechange = _processReqChange; g_req.open("GET", _url, true); g_req.send(); } } else alert("Kein Browser-Support fr XMLHttpRequest");}
this.moveTo();
loadYMap:function() { // create div and set to same size as map var yDiv = OpenLayers.Util.createDiv(this.name); var sz = this.map.getSize(); yDiv.style.width = sz.w; yDiv.style.height = sz.h; this.div.appendChild(yDiv); // create GMap, hide nav controls this.ymap = new YMap(this.div); this.moveTo(); // catch pans and zooms from GMap var e = new YEvent(this.ymap, "endpan", catchPanZoom, this); /** // attach to the drag start and end and well set a flag so that // we dont get recursivity. this is because the events fall through // the gmaps div and into the main layer div GEvent.addListener(this.gmap, "dragstart", this.dragStart.bindAsEventListener(this)); GEvent.addListener(this.gmap, "dragend", this.dragEnd.bindAsEventListener(this)); */ },
var e = new YEvent(this.ymap, "endpan", catchPanZoom, this);
YEvent.Capture(this.ymap, EventsList.endPan, this.catchPanZoom, this);
loadYMap:function() { // create div and set to same size as map var yDiv = OpenLayers.Util.createDiv(this.name); var sz = this.map.getSize(); yDiv.style.width = sz.w; yDiv.style.height = sz.h; this.div.appendChild(yDiv); // create GMap, hide nav controls this.ymap = new YMap(this.div); this.moveTo(); // catch pans and zooms from GMap var e = new YEvent(this.ymap, "endpan", catchPanZoom, this); /** // attach to the drag start and end and well set a flag so that // we dont get recursivity. this is because the events fall through // the gmaps div and into the main layer div GEvent.addListener(this.gmap, "dragstart", this.dragStart.bindAsEventListener(this)); GEvent.addListener(this.gmap, "dragend", this.dragEnd.bindAsEventListener(this)); */ },
/**
loadYMap:function() { // create div and set to same size as map var yDiv = OpenLayers.Util.createDiv(this.name); var sz = this.map.getSize(); yDiv.style.width = sz.w; yDiv.style.height = sz.h; this.div.appendChild(yDiv); // create GMap, hide nav controls this.ymap = new YMap(this.div); this.moveTo(); // catch pans and zooms from GMap var e = new YEvent(this.ymap, "endpan", catchPanZoom, this); /** // attach to the drag start and end and well set a flag so that // we dont get recursivity. this is because the events fall through // the gmaps div and into the main layer div GEvent.addListener(this.gmap, "dragstart", this.dragStart.bindAsEventListener(this)); GEvent.addListener(this.gmap, "dragend", this.dragEnd.bindAsEventListener(this)); */ },
GEvent.addListener(this.gmap, "dragstart", this.dragStart.bindAsEventListener(this)); GEvent.addListener(this.gmap, "dragend", this.dragEnd.bindAsEventListener(this)); */
YEvent.Capture(this.ymap, EventsList.startPan, this.dragStart, this);
loadYMap:function() { // create div and set to same size as map var yDiv = OpenLayers.Util.createDiv(this.name); var sz = this.map.getSize(); yDiv.style.width = sz.w; yDiv.style.height = sz.h; this.div.appendChild(yDiv); // create GMap, hide nav controls this.ymap = new YMap(this.div); this.moveTo(); // catch pans and zooms from GMap var e = new YEvent(this.ymap, "endpan", catchPanZoom, this); /** // attach to the drag start and end and well set a flag so that // we dont get recursivity. this is because the events fall through // the gmaps div and into the main layer div GEvent.addListener(this.gmap, "dragstart", this.dragStart.bindAsEventListener(this)); GEvent.addListener(this.gmap, "dragend", this.dragEnd.bindAsEventListener(this)); */ },
element = eval("arg." + domTraversal, inWindow);
element = eval("inWindow." + domTraversal, {inWindow: inWindow});
PageBot.prototype.locateElementByDomTraversal = function(domTraversal, inDocument, inWindow) { var element = null; try { // hack to pass local variable to eval element = eval("arg." + domTraversal, inWindow); } catch (e) { e.isSeleniumError = true; throw e; } if (!element) { return null; } return element; };
var threshold = this[LOG_THRESHOLD];
var threshold = this[thresholdName];
this.log = function(level, msg) { var threshold = this[LOG_THRESHOLD]; if (level.level >= threshold.level) { var consoleService = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService); if (consoleService != null) { consoleService.logStringMessage("Selenium IDE [" + level.name + "] " + self.category + ": " + msg); } } }
log: function(message, className) {
log: function(className, message) {
log: function(message, className) { var logWindow = this.getLogWindow(); this.logHook(message, className); if (logWindow) { if (logWindow.append) { if (this.pendingMessages.length > 0) { logWindow.append("info: Appending missed logging messages", "info"); while (this.pendingMessages.length > 0) { var msg = this.pendingMessages.shift(); logWindow.append(msg.type + ": " + msg.msg, msg.type); } logWindow.append("info: Done appending missed logging messages", "info"); } logWindow.append(className + ": " + message, className); } } else { // uncomment this to turn on background logging /* these logging messages are never flushed, which creates an enormous array of strings that never stops growing. Only turn this on if you need it for debugging! */ //this.pendingMessages.push(new LogMessage(className, message)); } },
var LOG_THRESHOLD = "WARN";
function Log(category) { // DEBUG //var LOG_THRESHOLD = "DEBUG"; // RELEASE var LOG_THRESHOLD = "WARN"; // TODO: this variable should be configurable through option var log = this; var self = this; this.category = category; function LogLevel(level, name) { this.level = level; this.name = name; var self = this; log[name.toLowerCase()] = function(msg) { log.log(self, msg) }; } this.DEBUG = new LogLevel(1, "DEBUG"); this.INFO = new LogLevel(2, "INFO"); this.WARN = new LogLevel(3, "WARN"); this.ERROR = new LogLevel(4, "ERROR"); this.log = function(level, msg) { var threshold = this[LOG_THRESHOLD]; if (level.level >= threshold.level) { var consoleService = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService); if (consoleService != null) { consoleService.logStringMessage("Selenium IDE [" + level.name + "] " + self.category + ": " + msg); } } }}
var threshold = this[LOG_THRESHOLD];
var threshold = this[thresholdName];
function Log(category) { // DEBUG //var LOG_THRESHOLD = "DEBUG"; // RELEASE var LOG_THRESHOLD = "WARN"; // TODO: this variable should be configurable through option var log = this; var self = this; this.category = category; function LogLevel(level, name) { this.level = level; this.name = name; var self = this; log[name.toLowerCase()] = function(msg) { log.log(self, msg) }; } this.DEBUG = new LogLevel(1, "DEBUG"); this.INFO = new LogLevel(2, "INFO"); this.WARN = new LogLevel(3, "WARN"); this.ERROR = new LogLevel(4, "ERROR"); this.log = function(level, msg) { var threshold = this[LOG_THRESHOLD]; if (level.level >= threshold.level) { var consoleService = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService); if (consoleService != null) { consoleService.logStringMessage("Selenium IDE [" + level.name + "] " + self.category + ": " + msg); } } }}
function Logger(logLevel) {
var Logger = function(logLevel) {
function Logger(logLevel) { this.level = logLevel; this.logConsole = document.getElementById('logging-console'); this.logList = document.getElementById('log-list'); this.hide();}
var LogMessage = function(msg, type) {
var LogMessage = function(type, msg) {
var LogMessage = function(msg, type) { this.type = type; this.msg = msg;}
if (debugMode) { sendLogMessageToRClater(message, logLevel); }
function logToRc(message, logLevel) { //sendToRC(message, "logLevel=" + logLevel);}
sendToRC("logLevel=" + logLevel + ":" + message.replace(/[\n\r\015]/, " ") + "\n");
sendToRC("logLevel=" + logLevel + ":" + message.replace(/[\n\r\015]/g, " ") + "\n");
function logToRc(message, logLevel) { if (logLevel == null) { logLevel = "debug"; } if (debugMode) { sendToRC("logLevel=" + logLevel + ":" + message.replace(/[\n\r\015]/, " ") + "\n"); }}
sendToRC("logLevel=" + logLevel + ":" + message + "\n");
sendLogMessageToRClater(message, logLevel);
function logToRc(message, logLevel) { if (debugMode) { sendToRC("logLevel=" + logLevel + ":" + message + "\n"); }}
function lookForToken(token) {
function lookForToken(token, persist) {
function lookForToken(token) { if (window.location.search.indexOf(token) != -1) { document.cookie = ("DataApplet="+token+"; path=/"); return true; } return (document.cookie.indexOf("DataApplet="+token) != -1);}
document.cookie = ("DataApplet="+token+"; path=/");
var ckie = "DataApplet=" + token + "; path=/"; if (persist) { ckie = ckie + "; expires=Wednesday, 31-Dec-08 23:00:00 GMT"; } document.cookie = ckie;
function lookForToken(token) { if (window.location.search.indexOf(token) != -1) { document.cookie = ("DataApplet="+token+"; path=/"); return true; } return (document.cookie.indexOf("DataApplet="+token) != -1);}
loop: function() { var timePos = new Date().getTime();
loop: function(timePos) {
loop: function() { var timePos = new Date().getTime(); if(timePos >= this.startOn) { if(timePos >= this.finishOn) { this.cancel(); this.render(1.0); if(this.finish) this.finish(); if(this.options.afterFinish) this.options.afterFinish(this); return; } var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); var frame = Math.round(pos * this.options.fps * this.options.duration); if(frame > this.currentFrame) { this.render(pos); this.currentFrame = frame; } } if(!this.interval) this.interval = setInterval(this.loop.bind(this), 1000/this.options.fps); },
if(!this.interval) this.interval = setInterval(this.loop.bind(this), 1000/this.options.fps);
loop: function() { var timePos = new Date().getTime(); if(timePos >= this.startOn) { if(timePos >= this.finishOn) { this.cancel(); this.render(1.0); if(this.finish) this.finish(); if(this.options.afterFinish) this.options.afterFinish(this); return; } var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); var frame = Math.round(pos * this.options.fps * this.options.duration); if(frame > this.currentFrame) { this.render(pos); this.currentFrame = frame; } } if(!this.interval) this.interval = setInterval(this.loop.bind(this), 1000/this.options.fps); },
loop: function() { var timePos = new Date().getTime(); if(timePos >= this.finishOn) { this.render(this.options.to); if(this.finish) this.finish(); if(this.options.afterFinish) this.options.afterFinish(this); return;
loop: function(timePos) { if(timePos >= this.startOn) { if(timePos >= this.finishOn) { this.render(1.0); this.cancel(); this.event('beforeFinish'); if(this.finish) this.finish(); this.event('afterFinish'); return; } var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); var frame = Math.round(pos * this.options.fps * this.options.duration); if(frame > this.currentFrame) { this.render(pos); this.currentFrame = frame; }
loop: function() { var timePos = new Date().getTime(); if(timePos >= this.finishOn) { this.render(this.options.to); if(this.finish) this.finish(); if(this.options.afterFinish) this.options.afterFinish(this); return; } var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); var frame = Math.round(pos * this.options.fps * this.options.duration); if(frame > this.currentFrame) { this.render(pos); this.currentFrame = frame; } this.timeout = setTimeout(this.loop.bind(this), 10); },
var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); var frame = Math.round(pos * this.options.fps * this.options.duration); if(frame > this.currentFrame) { this.render(pos); this.currentFrame = frame; } this.timeout = setTimeout(this.loop.bind(this), 10);
loop: function() { var timePos = new Date().getTime(); if(timePos >= this.finishOn) { this.render(this.options.to); if(this.finish) this.finish(); if(this.options.afterFinish) this.options.afterFinish(this); return; } var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); var frame = Math.round(pos * this.options.fps * this.options.duration); if(frame > this.currentFrame) { this.render(pos); this.currentFrame = frame; } this.timeout = setTimeout(this.loop.bind(this), 10); },
this.render(this.options.to);
this.render(1.0);
loop: function() { var timePos = new Date().getTime(); if(timePos >= this.finishOn) { this.render(this.options.to); if(this.finish) this.finish(); if(this.options.afterFinish) this.options.afterFinish(this); return; } var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); var frame = Math.round(pos * this.options.fps * this.options.duration); if(frame > this.currentFrame) { this.render(pos); this.currentFrame = frame; } this.timeout = setTimeout(this.loop.bind(this), 10); },
var reName4 = /([^@]+)*@.*/
var reName4 = /([^@]+)@.*/
function mail_get_name(strIn) { var reName1 = /[^\"]*\"([^\"]*)\".*/ //quoted name var reName2 = /(\S[^<]+)\s+<.*/ //unquoted name var reName3 = /[^<]*<([^@>]+).*/ //first part of <email address> var reName4 = /([^@]+)*@.*/ //first part of email address if (reName1.test(strIn)) return strIn.replace(reName1,"$1"); if (reName2.test(strIn)) return strIn.replace(reName2,"$1"); if (reName3.test(strIn)) return strIn.replace(reName3,"$1"); if (reName4.test(strIn)) return strIn.replace(reName4,"$1"); return strIn; //original string}
} while(mainbar.items[mainbar.current].disabled || mainbar.items[mainbar.current].retval==undefined))
} while(mainbar.items[mainbar.current].disabled || mainbar.items[mainbar.current].retval==undefined)
function main_left(){ do { if(mainbar.current==0) mainbar.current=mainbar.items.length; mainbar.current--; } while(mainbar.items[mainbar.current].disabled || mainbar.items[mainbar.current].retval==undefined)) next_key=mainbar.items[mainbar.current].retval; if(next_key=='G' || next_key==';') next_key='';}
} while(mainbar.items[mainbar.current].disabled || mainbar.items[mainbar.current].retval==undefined))
} while(mainbar.items[mainbar.current].disabled || mainbar.items[mainbar.current].retval==undefined)
function main_right(){ do { mainbar.current++; if(mainbar.current==mainbar.items.length) mainbar.current=0; } while(mainbar.items[mainbar.current].disabled || mainbar.items[mainbar.current].retval==undefined)) next_key=mainbar.items[mainbar.current].retval; if(next_key=='G' || next_key==';') next_key='';}
this.hotkeys=KEY_DOWN+";";
this.hotkeys=KEY_DOWN+";"+ctrl('O')+ctrl('U')+ctrl('T')+ctrl('K')+ctrl('P');
function Mainbar(){ /* ToDo: They all need this... feels like a bug to ME */ this.items=new Array(); this.direction=1; this.xpos=2; this.ypos=1; this.hotkeys=KEY_DOWN+";"; this.add("|File","F",undefined,undefined,undefined,user.compare_ars("REST T")); this.add("|Messages","M"); this.add("|Email","E",undefined,undefined,undefined,user.compare_ars("REST SE")); this.add("|Chat","C",undefined,undefined,undefined,user.compare_ars("REST C")); this.add("|Settings","S"); this.add("E|xternals","x",undefined,undefined,undefined,user.compare_ars("REST X")); this.add("|View","V"); this.add("|Goodbye","G"); this.add("Commands",";"); this.timeout=100; this.callback=message_callback;}
win.user_parent = parent;
win.user_parent = (parent && parent != undefined) ? parent : false;
function make_hop_iwindow( id, klass, parent ) { var win = document.createElement( "div" ); win.id = id; win.className = klass; win.name = "hop-iwindow"; var t = "\<TABLE id='" + id + "-main' class='hop-iwindow' \ cellpadding='0' cellspacing='0' border='0'>\ <TR>\ <TD class='hop-iwindow-top' valign='top'>\ <TABLE id='" + id + "-handle' class='hop-iwindow-handle' width='100%'\ cellpadding='0' cellspacing='0' border='0'>\ <TR class='hop-iwindow-handle'>\ <TD class='hop-iwindow-iconify' align='left' onclick='hop_iwindow_iconify( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-maximize' align='left' onclick='hop_iwindow_maximize( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-up-title'>\ <TABLE class='hop-iwindow-title' width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD class='hop-iwindow-title-left'>&nbsp;</TD>\ <TD id='" + id + "-title' class='hop-iwindow-title-middle'>title</TD>\ <TD class='hop-iwindow-title-right'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD> \ <TD class='hop-iwindow-close' align='right' onclick='hop_iwindow_close( \"" + id + "\" )'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-body'>\ <TD id='" + id + "-content' class='hop-iwindow-content' valign='top'>\ <TABLE class='hop-iwindow-body' width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-body' class='hop-iwindow-body' height='100%'></TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-bottom'>\ <TD>\ <TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-resize-left' class='hop-iwindow-bottom-left'>&nbsp;</TD>\ <TD id='" + id + "-resize-middle' class='hop-iwindow-bottom-middle'>&nbsp;</TD>\ <TD id='" + id + "-resize-right' class='hop-iwindow-bottom-right'>&nbsp;</TD>\ </TR>\ </TABLE> \ </TD>\ </TR>\</TABLE>"; win.innerHTML = "\<TABLE class='hop-iwindow-shadow' cellspacing='0' cellpadding='0' border='0'>\ <TR>\ <TD class='hop-iwindow-shadow-nw' rowspan='2' colspan='2'>" + t + "</TD>\ <TD id='" + id + "-shadow-box' class='hop-iwindow-shadow-ne'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-e'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-sw'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-s'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-se'>&nbsp;</TD>\ </TR>\</TABLE>"; if( parent ) parent.appendChild( win ); else document.body.appendChild( win ); win.user_parent = parent; win.el_title = document.getElementById( id + "-title" ); win.el_handle = document.getElementById( id + "-title" ); win.el_resize_left = document.getElementById( id + "-resize-left" ); win.el_resize_middle = document.getElementById( id + "-resize-middle" ); win.el_resize_right = document.getElementById( id + "-resize-right" ); win.el_content = document.getElementById( id + "-content" ); win.el_body = document.getElementById( id + "-body" ); win.el_main = document.getElementById( id + "-main" ); win.el_shadow = win.childNodes[ 0 ]; win.el_shadow_box = document.getElementById( id + "-shadow-box" ); win.el_handle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_drag( event, win ) }; win.el_resize_middle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, true ); }; win.el_resize_right.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, true, true ); }; win.el_resize_left.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, false ); }; return win;}
win.el_handle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_drag( event, win ) };
hop_add_event_listener( win.el_handle, "mousedown", function( event ) { hop_iwindow_drag( event, win ) } );
function make_hop_iwindow( id, klass, parent ) { var win = document.createElement( "div" ); win.id = id; win.className = klass; win.name = "hop-iwindow"; var t = "\<TABLE id='" + id + "-main' class='hop-iwindow' \ cellpadding='0' cellspacing='0' border='0'>\ <TR>\ <TD class='hop-iwindow-top' valign='top'>\ <TABLE id='" + id + "-handle' class='hop-iwindow-handle' width='100%'\ cellpadding='0' cellspacing='0' border='0'>\ <TR class='hop-iwindow-handle'>\ <TD class='hop-iwindow-iconify' align='left' onclick='hop_iwindow_iconify( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-maximize' align='left' onclick='hop_iwindow_maximize( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-up-title'>\ <TABLE class='hop-iwindow-title' width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD class='hop-iwindow-title-left'>&nbsp;</TD>\ <TD id='" + id + "-title' class='hop-iwindow-title-middle'>title</TD>\ <TD class='hop-iwindow-title-right'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD> \ <TD class='hop-iwindow-close' align='right' onclick='hop_iwindow_close( \"" + id + "\" )'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-body'>\ <TD id='" + id + "-content' class='hop-iwindow-content' valign='top'>\ <TABLE class='hop-iwindow-body' width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-body' class='hop-iwindow-body' height='100%'></TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-bottom'>\ <TD>\ <TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-resize-left' class='hop-iwindow-bottom-left'>&nbsp;</TD>\ <TD id='" + id + "-resize-middle' class='hop-iwindow-bottom-middle'>&nbsp;</TD>\ <TD id='" + id + "-resize-right' class='hop-iwindow-bottom-right'>&nbsp;</TD>\ </TR>\ </TABLE> \ </TD>\ </TR>\</TABLE>"; win.innerHTML = "\<TABLE class='hop-iwindow-shadow' cellspacing='0' cellpadding='0' border='0'>\ <TR>\ <TD class='hop-iwindow-shadow-nw' rowspan='2' colspan='2'>" + t + "</TD>\ <TD id='" + id + "-shadow-box' class='hop-iwindow-shadow-ne'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-e'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-sw'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-s'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-se'>&nbsp;</TD>\ </TR>\</TABLE>"; if( parent ) parent.appendChild( win ); else document.body.appendChild( win ); win.user_parent = (parent && parent != undefined) ? parent : false; win.el_title = document.getElementById( id + "-title" ); win.el_handle = document.getElementById( id + "-title" ); win.el_resize_left = document.getElementById( id + "-resize-left" ); win.el_resize_middle = document.getElementById( id + "-resize-middle" ); win.el_resize_right = document.getElementById( id + "-resize-right" ); win.el_content = document.getElementById( id + "-content" ); win.el_body = document.getElementById( id + "-body" ); win.el_main = document.getElementById( id + "-main" ); win.el_shadow = win.childNodes[ 0 ]; win.el_shadow_box = document.getElementById( id + "-shadow-box" ); win.el_handle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_drag( event, win ) }; win.el_resize_middle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, true ); }; win.el_resize_right.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, true, true ); }; win.el_resize_left.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, false ); }; return win;}
win.el_resize_middle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, true ); };
hop_add_event_listener( win.el_resize_middle, "mousedown", function( event ) { hop_iwindow_resize( event, win, false, true ) } ); hop_add_event_listener( win.el_resize_right, "mousedown", function( event ) { hop_iwindow_resize( event, win, true, true ) } );
function make_hop_iwindow( id, klass, parent ) { var win = document.createElement( "div" ); win.id = id; win.className = klass; win.name = "hop-iwindow"; var t = "\<TABLE id='" + id + "-main' class='hop-iwindow' \ cellpadding='0' cellspacing='0' border='0'>\ <TR>\ <TD class='hop-iwindow-top' valign='top'>\ <TABLE id='" + id + "-handle' class='hop-iwindow-handle' width='100%'\ cellpadding='0' cellspacing='0' border='0'>\ <TR class='hop-iwindow-handle'>\ <TD class='hop-iwindow-iconify' align='left' onclick='hop_iwindow_iconify( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-maximize' align='left' onclick='hop_iwindow_maximize( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-up-title'>\ <TABLE class='hop-iwindow-title' width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD class='hop-iwindow-title-left'>&nbsp;</TD>\ <TD id='" + id + "-title' class='hop-iwindow-title-middle'>title</TD>\ <TD class='hop-iwindow-title-right'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD> \ <TD class='hop-iwindow-close' align='right' onclick='hop_iwindow_close( \"" + id + "\" )'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-body'>\ <TD id='" + id + "-content' class='hop-iwindow-content' valign='top'>\ <TABLE class='hop-iwindow-body' width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-body' class='hop-iwindow-body' height='100%'></TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-bottom'>\ <TD>\ <TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-resize-left' class='hop-iwindow-bottom-left'>&nbsp;</TD>\ <TD id='" + id + "-resize-middle' class='hop-iwindow-bottom-middle'>&nbsp;</TD>\ <TD id='" + id + "-resize-right' class='hop-iwindow-bottom-right'>&nbsp;</TD>\ </TR>\ </TABLE> \ </TD>\ </TR>\</TABLE>"; win.innerHTML = "\<TABLE class='hop-iwindow-shadow' cellspacing='0' cellpadding='0' border='0'>\ <TR>\ <TD class='hop-iwindow-shadow-nw' rowspan='2' colspan='2'>" + t + "</TD>\ <TD id='" + id + "-shadow-box' class='hop-iwindow-shadow-ne'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-e'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-sw'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-s'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-se'>&nbsp;</TD>\ </TR>\</TABLE>"; if( parent ) parent.appendChild( win ); else document.body.appendChild( win ); win.user_parent = (parent && parent != undefined) ? parent : false; win.el_title = document.getElementById( id + "-title" ); win.el_handle = document.getElementById( id + "-title" ); win.el_resize_left = document.getElementById( id + "-resize-left" ); win.el_resize_middle = document.getElementById( id + "-resize-middle" ); win.el_resize_right = document.getElementById( id + "-resize-right" ); win.el_content = document.getElementById( id + "-content" ); win.el_body = document.getElementById( id + "-body" ); win.el_main = document.getElementById( id + "-main" ); win.el_shadow = win.childNodes[ 0 ]; win.el_shadow_box = document.getElementById( id + "-shadow-box" ); win.el_handle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_drag( event, win ) }; win.el_resize_middle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, true ); }; win.el_resize_right.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, true, true ); }; win.el_resize_left.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, false ); }; return win;}
win.el_resize_right.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, true, true ); }; win.el_resize_left.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, false ); };
hop_add_event_listener( win.el_resize_left, "mousedown", function( event ) { hop_iwindow_resize( event, win, false, false ) } );
function make_hop_iwindow( id, klass, parent ) { var win = document.createElement( "div" ); win.id = id; win.className = klass; win.name = "hop-iwindow"; var t = "\<TABLE id='" + id + "-main' class='hop-iwindow' \ cellpadding='0' cellspacing='0' border='0'>\ <TR>\ <TD class='hop-iwindow-top' valign='top'>\ <TABLE id='" + id + "-handle' class='hop-iwindow-handle' width='100%'\ cellpadding='0' cellspacing='0' border='0'>\ <TR class='hop-iwindow-handle'>\ <TD class='hop-iwindow-iconify' align='left' onclick='hop_iwindow_iconify( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-maximize' align='left' onclick='hop_iwindow_maximize( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-up-title'>\ <TABLE class='hop-iwindow-title' width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD class='hop-iwindow-title-left'>&nbsp;</TD>\ <TD id='" + id + "-title' class='hop-iwindow-title-middle'>title</TD>\ <TD class='hop-iwindow-title-right'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD> \ <TD class='hop-iwindow-close' align='right' onclick='hop_iwindow_close( \"" + id + "\" )'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-body'>\ <TD id='" + id + "-content' class='hop-iwindow-content' valign='top'>\ <TABLE class='hop-iwindow-body' width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-body' class='hop-iwindow-body' height='100%'></TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-bottom'>\ <TD>\ <TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-resize-left' class='hop-iwindow-bottom-left'>&nbsp;</TD>\ <TD id='" + id + "-resize-middle' class='hop-iwindow-bottom-middle'>&nbsp;</TD>\ <TD id='" + id + "-resize-right' class='hop-iwindow-bottom-right'>&nbsp;</TD>\ </TR>\ </TABLE> \ </TD>\ </TR>\</TABLE>"; win.innerHTML = "\<TABLE class='hop-iwindow-shadow' cellspacing='0' cellpadding='0' border='0'>\ <TR>\ <TD class='hop-iwindow-shadow-nw' rowspan='2' colspan='2'>" + t + "</TD>\ <TD id='" + id + "-shadow-box' class='hop-iwindow-shadow-ne'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-e'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-sw'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-s'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-se'>&nbsp;</TD>\ </TR>\</TABLE>"; if( parent ) parent.appendChild( win ); else document.body.appendChild( win ); win.user_parent = (parent && parent != undefined) ? parent : false; win.el_title = document.getElementById( id + "-title" ); win.el_handle = document.getElementById( id + "-title" ); win.el_resize_left = document.getElementById( id + "-resize-left" ); win.el_resize_middle = document.getElementById( id + "-resize-middle" ); win.el_resize_right = document.getElementById( id + "-resize-right" ); win.el_content = document.getElementById( id + "-content" ); win.el_body = document.getElementById( id + "-body" ); win.el_main = document.getElementById( id + "-main" ); win.el_shadow = win.childNodes[ 0 ]; win.el_shadow_box = document.getElementById( id + "-shadow-box" ); win.el_handle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_drag( event, win ) }; win.el_resize_middle.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, true ); }; win.el_resize_right.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, true, true ); }; win.el_resize_left.onmousedown = function( event ) { if( event == undefined ) event = window.event; hop_iwindow_resize( event, win, false, false ); }; return win;}
function make_hop_iwindow( id, class, parent ) {
function make_hop_iwindow( id, klass, parent ) { var win = document.createElement( "div" ); win.id = id; win.className = klass; win.name = "hop-iwindow"; var t = "\ <TABLE id='" + id + "-main' class='hop-iwindow' \ cellpadding='0' cellspacing='0' border='0'>\ <TR>\ <TD class='hop-iwindow-top' valign='top'>\ <TABLE id='" + id + "-handle' class='hop-iwindow-handle' width='100%'\ cellpadding='0' cellspacing='0' border='0'>\ <TR class='hop-iwindow-handle'>\ <TD class='hop-iwindow-iconify' align='left' onclick='hop_iwindow_iconify( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-maximize' align='left' onclick='hop_iwindow_maximize( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-up-title'>\ <TABLE class='hop-iwindow-title' width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD class='hop-iwindow-title-left'>&nbsp;</TD>\ <TD id='" + id + "-title' class='hop-iwindow-title-middle'>title</TD>\ <TD class='hop-iwindow-title-right'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD> \ <TD class='hop-iwindow-close' align='right' onclick='hop_iwindow_close( \"" + id + "\" )'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-body'>\ <TD id='" + id + "-content' class='hop-iwindow-content' valign='top'>\ <TABLE class='hop-iwindow-body' width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-body' class='hop-iwindow-body' height='100%'></TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-bottom'>\ <TD>\ <TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-resize-left' class='hop-iwindow-bottom-left'>&nbsp;</TD>\ <TD id='" + id + "-resize-middle' class='hop-iwindow-bottom-middle'>&nbsp;</TD>\ <TD id='" + id + "-resize-right' class='hop-iwindow-bottom-right'>&nbsp;</TD>\ </TR>\ </TABLE> \ </TD>\ </TR>\ </TABLE>"; win.innerHTML = "\ <TABLE class='hop-iwindow-shadow' cellspacing='0' cellpadding='0' border='0'>\ <TR>\ <TD class='hop-iwindow-shadow-nw' rowspan='2' colspan='2'>" + t + "</TD>\ <TD id='" + id + "-shadow-box' class='hop-iwindow-shadow-ne'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-e'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-sw'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-s'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-se'>&nbsp;</TD>\ </TR>\ </TABLE>"; if( parent ) parent.appendChild( win ); else document.body.appendChild( win ); win.user_parent = parent; win.el_title = document.getElementById( id + "-title" ); win.el_handle = document.getElementById( id + "-title" ); win.el_resize_left = document.getElementById( id + "-resize-left" ); win.el_resize_middle = document.getElementById( id + "-resize-middle" ); win.el_resize_right = document.getElementById( id + "-resize-right" ); win.el_content = document.getElementById( id + "-content" ); win.el_body = document.getElementById( id + "-body" ); win.el_main = document.getElementById( id + "-main" ); win.el_shadow = win.childNodes[ 0 ]; win.el_shadow_box = document.getElementById( id + "-shadow-box" ); win.el_handle.onmousedown = function( event ) { hop_iwindow_drag( event, win ) }; win.el_resize_middle.onmousedown = function( event ) { hop_iwindow_resize( event, win, false, true ); }; win.el_resize_right.onmousedown = function( event ) { hop_iwindow_resize( event, win, true, true ); }; win.el_resize_left.onmousedown = function( event ) { hop_iwindow_resize( event, win, false, false ); }; return win; }
function make_hop_iwindow( id, class, parent ) {
if( event == undefined ) event = window.event;
function make_hop_iwindow( id, klass, parent ) { var win = document.createElement( "div" ); win.id = id; win.className = klass; win.name = "hop-iwindow"; var t = "\<TABLE id='" + id + "-main' class='hop-iwindow' \ cellpadding='0' cellspacing='0' border='0'>\ <TR>\ <TD class='hop-iwindow-top' valign='top'>\ <TABLE id='" + id + "-handle' class='hop-iwindow-handle' width='100%'\ cellpadding='0' cellspacing='0' border='0'>\ <TR class='hop-iwindow-handle'>\ <TD class='hop-iwindow-iconify' align='left' onclick='hop_iwindow_iconify( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-maximize' align='left' onclick='hop_iwindow_maximize( \"" + id + "\" )'>&nbsp;</TD>\ <TD class='hop-iwindow-up-title'>\ <TABLE class='hop-iwindow-title' width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD class='hop-iwindow-title-left'>&nbsp;</TD>\ <TD id='" + id + "-title' class='hop-iwindow-title-middle'>title</TD>\ <TD class='hop-iwindow-title-right'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD> \ <TD class='hop-iwindow-close' align='right' onclick='hop_iwindow_close( \"" + id + "\" )'>&nbsp;</TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-body'>\ <TD id='" + id + "-content' class='hop-iwindow-content' valign='top'>\ <TABLE class='hop-iwindow-body' width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-body' class='hop-iwindow-body' height='100%'></TD>\ </TR>\ </TABLE>\ </TD>\ </TR>\ <TR class='hop-iwindow-bottom'>\ <TD>\ <TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>\ <TR>\ <TD id='" + id + "-resize-left' class='hop-iwindow-bottom-left'>&nbsp;</TD>\ <TD id='" + id + "-resize-middle' class='hop-iwindow-bottom-middle'>&nbsp;</TD>\ <TD id='" + id + "-resize-right' class='hop-iwindow-bottom-right'>&nbsp;</TD>\ </TR>\ </TABLE> \ </TD>\ </TR>\</TABLE>"; win.innerHTML = "\<TABLE class='hop-iwindow-shadow' cellspacing='0' cellpadding='0' border='0'>\ <TR>\ <TD class='hop-iwindow-shadow-nw' rowspan='2' colspan='2'>" + t + "</TD>\ <TD id='" + id + "-shadow-box' class='hop-iwindow-shadow-ne'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-e'>&nbsp;</TD>\ </TR>\ <TR>\ <TD class='hop-iwindow-shadow-sw'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-s'>&nbsp;</TD>\ <TD class='hop-iwindow-shadow-se'>&nbsp;</TD>\ </TR>\</TABLE>"; if( parent ) parent.appendChild( win ); else document.body.appendChild( win ); win.user_parent = parent; win.el_title = document.getElementById( id + "-title" ); win.el_handle = document.getElementById( id + "-title" ); win.el_resize_left = document.getElementById( id + "-resize-left" ); win.el_resize_middle = document.getElementById( id + "-resize-middle" ); win.el_resize_right = document.getElementById( id + "-resize-right" ); win.el_content = document.getElementById( id + "-content" ); win.el_body = document.getElementById( id + "-body" ); win.el_main = document.getElementById( id + "-main" ); win.el_shadow = win.childNodes[ 0 ]; win.el_shadow_box = document.getElementById( id + "-shadow-box" ); win.el_handle.onmousedown = function( event ) { hop_iwindow_drag( event, win ) }; win.el_resize_middle.onmousedown = function( event ) { hop_iwindow_resize( event, win, false, true ); }; win.el_resize_right.onmousedown = function( event ) { hop_iwindow_resize( event, win, true, true ); }; win.el_resize_left.onmousedown = function( event ) { hop_iwindow_resize( event, win, false, false ); }; return win;}
while((nl[nl.length-1].text.length%8) {
while(nl[nl.length-1].text.length%8) {
function make_lines(str, attr, nl_is_hardcr){ nl=new Array(); var spos=0; var apos=0; thisattr=7; while(spos < str.length) { var done=false; nl[nl.length]=new Line; while(spos < str.length && !done) { if(apos < attr.length) { thisattr=ascii(attr.charAt(apos)); apos++; } switch(str.charAt(spos)) { case '\r': spos++; break; case '\x01': spos++; switch(str.charAt(spos).toUpperCase()) { case 'K': thisattr&=0xf8; break; case 'R': thisattr=(thisattr&0xf8)|RED; break; case 'G': thisattr=(thisattr&0xf8)|GREEN; break; case 'Y': thisattr=(thisattr&0xf8)|BROWN; break; case 'B': thisattr=(thisattr&0xf8)|BLUE; break; case 'M': thisattr=(thisattr&0xf8)|MAGENTA; break; case 'C': thisattr=(thisattr&0xf8)|CYAN; break; case 'W': thisattr=(thisattr&0xf8)|LIGHTGRAY; break; case '0': thisattr=(thisattr&0x8f); break; case '1': thisattr=(thisattr&0x8f)|(RED<<4); break; case '2': thisattr=(thisattr&0x8f)|(GREEN<<4); break; case '3': thisattr=(thisattr&0x8f)|(BROWN<<4); break; case '4': thisattr=(thisattr&0x8f)|(BLUE<<4); break; case '5': thisattr=(thisattr&0x8f)|(MAGENTA<<4); break; case '6': thisattr=(thisattr&0x8f)|(CYAN<<4); break; case '7': thisattr=(thisattr&0x8f)|(LIGHTGRAY<<4); break; case 'H': thisattr|=0x08; break; case 'I': thisattr|=0x80; break; case 'N': thisattr=7; break; case '\x01': /* ToDo: This needs to fall through to the wrapping stuff. */ nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); break; } spos++; break; case '\n': spos++; done=true; if(nl_is_hardcr) nl[nl.length-1].hardcr=true; else { /* Deduce if this is a hard or soft CR as follows */ /* If the next char is a nl, or whitespace, it is hard. */ /* If there is room for the first word of the next line on this * line, it is hard */ /* Otherwise, it is soft. */ if(str.charAt(spos)==' ' || str.charAt(spos)=='\t') nl[nl.length-1].hardcr=true; else { var len; for(len=0; str.length>=len+spos && str.charAt(spos+len)!=' ' && str.charAt(spos+len,1)!='\t'; len++); if(nl[nl.length-1].text.length+len < 80) nl[nl.length-1].hardcr=true; } } break; case ' ': /* Whitespace... never wrap here. */ nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); spos++; break; case '\t': /* Whitespace... never wrap here. */ nl[nl.length-1].text+=' '; nl[nl.length-1].attr+=ascii(thisattr); while((nl[nl.length-1].text.length%8) { nl[nl.length-1].text+=' '; nl[nl.length-1].attr+=ascii(thisattr); } break; default: /* Printable char... may need to wrap */ if(nl[nl.length-1].text.length>79) { /* Need to have wrapped */ var offset; for(offset=nl[nl.length-1].text.length-1; offset>=0; offset--) { if(nl[nl.length-1].text.charAt(offset)!=' ' && nl[nl.length-1].text.charAt(offset)!='\t') { /* ToDo: Verify/test this... it's probobly wrong */ spos-=nl[nl.length-1].text.length-1-offset; spos--; break; } } if(offset==-1) { /* There were no spaces this line. */ nl[nl.length-1].kludged=true; spos--; } done=true; } else { nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); spos++; } }
} } return(nl); }
function make_lines(str, attr, nl_is_hardcr){ nl=new Array(); var spos=0; var apos=0; thisattr=7; while(spos < str.length) { var done=false; nl[nl.length]=new Line; while(spos < str.length && !done) { if(apos < attr.length) { thisattr=ascii(attr.charAt(apos)); apos++; } switch(str.charAt(spos)) { case '\r': spos++; break; case '\x01': spos++; switch(str.charAt(spos).toUpperCase()) { case 'K': thisattr&=0xf8; break; case 'R': thisattr=(thisattr&0xf8)|RED; break; case 'G': thisattr=(thisattr&0xf8)|GREEN; break; case 'Y': thisattr=(thisattr&0xf8)|BROWN; break; case 'B': thisattr=(thisattr&0xf8)|BLUE; break; case 'M': thisattr=(thisattr&0xf8)|MAGENTA; break; case 'C': thisattr=(thisattr&0xf8)|CYAN; break; case 'W': thisattr=(thisattr&0xf8)|LIGHTGRAY; break; case '0': thisattr=(thisattr&0x8f); break; case '1': thisattr=(thisattr&0x8f)|(RED<<4); break; case '2': thisattr=(thisattr&0x8f)|(GREEN<<4); break; case '3': thisattr=(thisattr&0x8f)|(BROWN<<4); break; case '4': thisattr=(thisattr&0x8f)|(BLUE<<4); break; case '5': thisattr=(thisattr&0x8f)|(MAGENTA<<4); break; case '6': thisattr=(thisattr&0x8f)|(CYAN<<4); break; case '7': thisattr=(thisattr&0x8f)|(LIGHTGRAY<<4); break; case 'H': thisattr|=0x08; break; case 'I': thisattr|=0x80; break; case 'N': thisattr=7; break; case '\x01': /* ToDo: This needs to fall through to the wrapping stuff. */ nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); break; } spos++; break; case '\n': spos++; done=true; if(nl_is_hardcr) nl[nl.length-1].hardcr=true; else { /* Deduce if this is a hard or soft CR as follows */ /* If the next char is a nl, or whitespace, it is hard. */ /* If there is room for the first word of the next line on this * line, it is hard */ /* Otherwise, it is soft. */ if(str.charAt(spos)==' ' || str.charAt(spos)=='\t') nl[nl.length-1].hardcr=true; else { var len; for(len=0; str.length>=len+spos && str.charAt(spos+len)!=' ' && str.charAt(spos+len,1)!='\t'; len++); if(nl[nl.length-1].text.length+len < 80) nl[nl.length-1].hardcr=true; } } break; case ' ': /* Whitespace... never wrap here. */ nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); spos++; break; case '\t': /* Whitespace... never wrap here. */ nl[nl.length-1].text+=' '; nl[nl.length-1].attr+=ascii(thisattr); while((nl[nl.length-1].text.length%8) { nl[nl.length-1].text+=' '; nl[nl.length-1].attr+=ascii(thisattr); } break; default: /* Printable char... may need to wrap */ if(nl[nl.length-1].text.length>79) { /* Need to have wrapped */ var offset; for(offset=nl[nl.length-1].text.length-1; offset>=0; offset--) { if(nl[nl.length-1].text.charAt(offset)!=' ' && nl[nl.length-1].text.charAt(offset)!='\t') { /* ToDo: Verify/test this... it's probobly wrong */ spos-=nl[nl.length-1].text.length-1-offset; spos--; break; } } if(offset==-1) { /* There were no spaces this line. */ nl[nl.length-1].kludged=true; spos--; } done=true; } else { nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); spos++; } }
spos++;
function make_lines(str, attr, nl_is_hardcr){ nl=new Array(); var spos=0; var apos=0; thisattr=7; while(spos < str.length) { var done=false; nl[nl.length]=new Line; while(spos < str.length && !done) { if(apos < attr.length) { thisattr=ascii(attr.charAt(apos)); apos++; } switch(str.charAt(spos)) { case '\r': spos++; break; case '\x01': spos++; switch(str.charAt(spos).toUpperCase()) { case 'K': thisattr&=0xf8; break; case 'R': thisattr=(thisattr&0xf8)|RED; break; case 'G': thisattr=(thisattr&0xf8)|GREEN; break; case 'Y': thisattr=(thisattr&0xf8)|BROWN; break; case 'B': thisattr=(thisattr&0xf8)|BLUE; break; case 'M': thisattr=(thisattr&0xf8)|MAGENTA; break; case 'C': thisattr=(thisattr&0xf8)|CYAN; break; case 'W': thisattr=(thisattr&0xf8)|LIGHTGRAY; break; case '0': thisattr=(thisattr&0x8f); break; case '1': thisattr=(thisattr&0x8f)|(RED<<4); break; case '2': thisattr=(thisattr&0x8f)|(GREEN<<4); break; case '3': thisattr=(thisattr&0x8f)|(BROWN<<4); break; case '4': thisattr=(thisattr&0x8f)|(BLUE<<4); break; case '5': thisattr=(thisattr&0x8f)|(MAGENTA<<4); break; case '6': thisattr=(thisattr&0x8f)|(CYAN<<4); break; case '7': thisattr=(thisattr&0x8f)|(LIGHTGRAY<<4); break; case 'H': thisattr|=0x08; break; case 'I': thisattr|=0x80; break; case 'N': thisattr=7; break; case '\x01': /* ToDo: This needs to fall through to the wrapping stuff. */ nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); break; } spos++; break; case '\n': spos++; done=true; if(nl_is_hardcr) nl[nl.length-1].hardcr=true; else { /* Deduce if this is a hard or soft CR as follows */ /* If the next char is a nl, or whitespace, it is hard. */ /* If there is room for the first word of the next line on this * line, it is hard */ /* Otherwise, it is soft. */ if(str.charAt(spos)==' ' || str.charAt(spos)=='\t') nl[nl.length-1].hardcr=true; else { var len; for(len=0; str.length>=len+spos && str.charAt(spos+len)!=' ' && str.charAt(spos+len,1)!='\t'; len++); if(nl[nl.length-1].text.length+len < 80) nl[nl.length-1].hardcr=true; } } break; case ' ': /* Whitespace... never wrap here. */ nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); spos++; break; case '\t': /* Whitespace... never wrap here. */ nl[nl.length-1].text+=' '; nl[nl.length-1].attr+=ascii(thisattr); while(nl[nl.length-1].text.length%8) { nl[nl.length-1].text+=' '; nl[nl.length-1].attr+=ascii(thisattr); } break; default: /* Printable char... may need to wrap */ if(nl[nl.length-1].text.length>79) { /* Need to have wrapped */ var offset; for(offset=nl[nl.length-1].text.length-1; offset>=0; offset--) { if(nl[nl.length-1].text.charAt(offset)!=' ' && nl[nl.length-1].text.charAt(offset)!='\t') { /* ToDo: Verify/test this... it's probobly wrong */ spos-=nl[nl.length-1].text.length-1-offset; spos--; break; } } if(offset==-1) { /* There were no spaces this line. */ nl[nl.length-1].kludged=true; spos--; } done=true; } else { nl[nl.length-1].text+=str.charAt(spos); nl[nl.length-1].attr+=ascii(thisattr); spos++; } } } } return(nl);}
if((!(thisattr&0x80) && lastattr&0x80) || (!(thisattr&0x08) && lastattr&0x08)) {
if(((!(thisattr&0x80)) && (lastattr&0x80)) || ((!(thisattr&0x08)) && (lastattr&0x08))) {
function make_strings(soft,embed_colour){ var i; var str=''; var attrs=''; /* ToDo: Do we want to explicitly init the attr if it's normal? */ var lastattr=7; var thisattr; for(i=0; i<line.length; i++) { if(embed_colour) { for(j=0;j<line[i].text.length;j++) { if((thisattr=ascii(line[i].attr.substr(j,1)))!=lastattr) { /* Disable HIGH and BLINK if required */ if((!(thisattr&0x80) && lastattr&0x80) || (!(thisattr&0x08) && lastattr&0x08)) { lastattr=7; str+='\x01N'; } if(thisattr&0x80 && (!lastattr&0x80)) /* Blink */ str+='\x01I'; if(thisattr&0x08 && (!lastattr&0x08)) /* High Intensity */ str+='\x01H'; if((thisattr&0x07) != (lastattr&0x07)) { switch(thisattr&0x07) { case BLACK: str+='\x01K'; break; case RED: str+='\x01R'; break; case GREEN: str+='\x01G'; break; case BROWN: str+='\x01Y'; break; case BLUE: str+='\x01B'; break; case MAGENTA: str+='\x01M'; break; case CYAN: str+='\x01C'; break; case WHITE: str+='\x01W'; break; } } if((thisattr&0x70) != (lastattr&0x70)) { switch((thisattr&0x70)>>4) { case BLACK: str+='\x010'; break; case RED: str+='\x011'; break; case GREEN: str+='\x012'; break; case BROWN: str+='\x013'; break; case BLUE: str+='\x014'; break; case MAGENTA: str+='\x015'; break; case CYAN: str+='\x016'; break; case WHITE: str+='\x017'; break; } } lastattr=thisattr; } str+=line[i].text.substr(j,1); } } else { str+=line[i].text; attrs+=line[i].attr; } if(soft || line[i].hardcr) { /* Trim whitespace from end */ str=str.replace(/(\s*)$/,function (str, spaces, offset, s) { if(!embed_colour) { /* Remove attributes for trimmed spaces */ attrs=attrs.substr(0,attrs.length-spaces.length); } return(''); }); str+='\r\n'; attrs+=attrs.substr(-1)+attrs.substr(-1); } } return(new Array(str,attrs));}
if(thisattr&0x80 && (!lastattr&0x80))
if((thisattr&0x80) && (!(lastattr&0x80)))
function make_strings(soft,embed_colour){ var i; var str=''; var attrs=''; /* ToDo: Do we want to explicitly init the attr if it's normal? */ var lastattr=7; var thisattr; for(i=0; i<line.length; i++) { if(embed_colour) { for(j=0;j<line[i].text.length;j++) { if((thisattr=ascii(line[i].attr.substr(j,1)))!=lastattr) { /* Disable HIGH and BLINK if required */ if((!(thisattr&0x80) && lastattr&0x80) || (!(thisattr&0x08) && lastattr&0x08)) { lastattr=7; str+='\x01N'; } if(thisattr&0x80 && (!lastattr&0x80)) /* Blink */ str+='\x01I'; if(thisattr&0x08 && (!lastattr&0x08)) /* High Intensity */ str+='\x01H'; if((thisattr&0x07) != (lastattr&0x07)) { switch(thisattr&0x07) { case BLACK: str+='\x01K'; break; case RED: str+='\x01R'; break; case GREEN: str+='\x01G'; break; case BROWN: str+='\x01Y'; break; case BLUE: str+='\x01B'; break; case MAGENTA: str+='\x01M'; break; case CYAN: str+='\x01C'; break; case WHITE: str+='\x01W'; break; } } if((thisattr&0x70) != (lastattr&0x70)) { switch((thisattr&0x70)>>4) { case BLACK: str+='\x010'; break; case RED: str+='\x011'; break; case GREEN: str+='\x012'; break; case BROWN: str+='\x013'; break; case BLUE: str+='\x014'; break; case MAGENTA: str+='\x015'; break; case CYAN: str+='\x016'; break; case WHITE: str+='\x017'; break; } } lastattr=thisattr; } str+=line[i].text.substr(j,1); } } else { str+=line[i].text; attrs+=line[i].attr; } if(soft || line[i].hardcr) { /* Trim whitespace from end */ str=str.replace(/(\s*)$/,function (str, spaces, offset, s) { if(!embed_colour) { /* Remove attributes for trimmed spaces */ attrs=attrs.substr(0,attrs.length-spaces.length); } return(''); }); str+='\r\n'; attrs+=attrs.substr(-1)+attrs.substr(-1); } } return(new Array(str,attrs));}
if(thisattr&0x08 && (!lastattr&0x08))
if((thisattr&0x08) && (!(lastattr&0x08)))
function make_strings(soft,embed_colour){ var i; var str=''; var attrs=''; /* ToDo: Do we want to explicitly init the attr if it's normal? */ var lastattr=7; var thisattr; for(i=0; i<line.length; i++) { if(embed_colour) { for(j=0;j<line[i].text.length;j++) { if((thisattr=ascii(line[i].attr.substr(j,1)))!=lastattr) { /* Disable HIGH and BLINK if required */ if((!(thisattr&0x80) && lastattr&0x80) || (!(thisattr&0x08) && lastattr&0x08)) { lastattr=7; str+='\x01N'; } if(thisattr&0x80 && (!lastattr&0x80)) /* Blink */ str+='\x01I'; if(thisattr&0x08 && (!lastattr&0x08)) /* High Intensity */ str+='\x01H'; if((thisattr&0x07) != (lastattr&0x07)) { switch(thisattr&0x07) { case BLACK: str+='\x01K'; break; case RED: str+='\x01R'; break; case GREEN: str+='\x01G'; break; case BROWN: str+='\x01Y'; break; case BLUE: str+='\x01B'; break; case MAGENTA: str+='\x01M'; break; case CYAN: str+='\x01C'; break; case WHITE: str+='\x01W'; break; } } if((thisattr&0x70) != (lastattr&0x70)) { switch((thisattr&0x70)>>4) { case BLACK: str+='\x010'; break; case RED: str+='\x011'; break; case GREEN: str+='\x012'; break; case BROWN: str+='\x013'; break; case BLUE: str+='\x014'; break; case MAGENTA: str+='\x015'; break; case CYAN: str+='\x016'; break; case WHITE: str+='\x017'; break; } } lastattr=thisattr; } str+=line[i].text.substr(j,1); } } else { str+=line[i].text; attrs+=line[i].attr; } if(soft || line[i].hardcr) { /* Trim whitespace from end */ str=str.replace(/(\s*)$/,function (str, spaces, offset, s) { if(!embed_colour) { /* Remove attributes for trimmed spaces */ attrs=attrs.substr(0,attrs.length-spaces.length); } return(''); }); str+='\r\n'; attrs+=attrs.substr(-1)+attrs.substr(-1); } } return(new Array(str,attrs));}
if (element._overflow) return;
if (element._overflow) return element;
makeClipping: function(element) { element = $(element); if (element._overflow) return; element._overflow = element.style.overflow || 'auto'; if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') element.style.overflow = 'hidden'; return element; },
return CONTEXT_PREFIX+'/'+PUBLICATION_ID+"/info-"+area+"/"+link+"?lenya.usecase=tab.overview";
return CONTEXT_PREFIX+'/'+PUBLICATION_ID+"/"+area+"/"+link+"?lenya.usecase=tab.overview";
var makeHref = function makeDefaultHref(area, link){ return CONTEXT_PREFIX+'/'+PUBLICATION_ID+"/info-"+area+"/"+link+"?lenya.usecase=tab.overview"; }
if(Element.getStyle(element, 'position')=='static') {
var pos = Element.getStyle(element, 'position'); if(pos =='static' || !pos) {
Element.makePositioned = function(element) { element = $(element); if(Element.getStyle(element, 'position')=='static') { element._madePositioned = true; element.style.position = "relative"; // Opera returns the offset relative to the positioning context, when an element is position relative // but top and left have not been defined if (window.opera){ element.style.top = 0; element.style.left = 0; } }}
if(Element.getStyle(element, 'position') == "")
if(Element.getStyle(element, 'position')=='static')
Element.makePositioned = function(element) { element = $(element); if(Element.getStyle(element, 'position') == "") element.style.position = "relative";}
part.appendChild(document.createTextNode(init));
part.innerHTML = init;
function makeTimePart(className, init, range_start, range_end) { var part = Calendar.createElement("span", cell); part.className = className; part.appendChild(document.createTextNode(init)); part.calendar = cal; part.ttip = Calendar._TT["TIME_PART"]; part.navtype = 50; part._range = []; if (typeof range_start != "number") part._range = range_start; else { for (var i = range_start; i <= range_end; ++i) { var txt; if (i < 10 && range_end >= 10) txt = '0' + i; else txt = '' + i; part._range[part._range.length] = txt; } } Calendar._add_evs(part); return part; };
cached.content = cached.content.replace(closes_re, rewrite_closes_fn);
var new_content = cached.content.replace(closes_re, rewrite_closes_fn); if (cached.content_type == 'text/plain') { cached.content = '<pre>' + new_content + '</pre>'; vs.plain = "0"; } else { cached.content = new_content; }
function mangle_deb_bugnumbers(cached, vs) { if (!cached.uri.match(/^[a-z0-9]+:\/\/[a-z0-9A-Z.-]+debian\.org/) && !cached.uri.match(/changelog\.Debian/)) return true; var num_re = /([0-9]+)/g; var rewrite_closes_fn = function (str) { return str.replace(num_re, '<a href="http://bugs.debian.org/$1">$1</a>'); } /* Debian Policy Manual 4.4 footnote 16 */ var closes_re = /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/gi; cached.content = cached.content.replace(closes_re, rewrite_closes_fn); return true;}