rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
labelSpan.style.verticalAlign = (baseLayer) ? "bottom" : "auto";
labelSpan.style.verticalAlign = (baseLayer) ? "bottom" : "baseline";
redraw: function() { //clear out previous layers this.baseLayersDiv.innerHTML = ""; this.baseLayerInputs = new Array(); this.dataLayersDiv.innerHTML = ""; this.dataLayerInputs = new Array(); var containsOverlays = false; for( var i = 0; i < this.map.layers.length; i++) { var layer = this.map.layers[i]; var baseLayer = layer.isBaseLayer; if (!baseLayer) { containsOverlays = true; } // only check a baselayer if it is *the* baselayer, check data // layers if they are visible var checked = (baseLayer) ? (layer == this.map.baseLayer) : layer.getVisibility(); // create input element var inputElem = document.createElement("input"); inputElem.id = "input_" + layer.name; inputElem.name = (baseLayer) ? "baseLayers" : layer.name; inputElem.type = (baseLayer) ? "radio" : "checkbox"; inputElem.value = layer.name; inputElem.checked = checked; inputElem.defaultChecked = checked; inputElem.layer = layer; inputElem.control = this; Event.observe(inputElem, "mouseup", this.onInputClick.bindAsEventListener(inputElem)); // create span var labelSpan = document.createElement("span"); labelSpan.innerHTML = layer.name; labelSpan.style.verticalAlign = (baseLayer) ? "bottom" : "auto"; Event.observe(labelSpan, "click", this.onInputClick.bindAsEventListener(inputElem)); // create line break var br = document.createElement("br"); var groupArray = (baseLayer) ? this.baseLayerInputs : this.dataLayerInputs; groupArray.push(inputElem); var groupDiv = (baseLayer) ? this.baseLayersDiv : this.dataLayersDiv; groupDiv.appendChild(inputElem); groupDiv.appendChild(labelSpan); groupDiv.appendChild(br); } // if no overlays, dont display the overlay label this.dataLbl.style.display = (containsOverlays) ? "" : "none"; return this.div; },
this.div.innerHTML = ""; var visible = false;
this.baseLayersDiv.innerHTML = ""; this.baseLayerInputs = new Array(); this.dataLayersDiv.innerHTML = ""; this.dataLayerInputs = new Array();
redraw: function() { //clear out previous incarnation of LayerSwitcher tabs this.div.innerHTML = ""; var visible = false; for( var i = 0; i < this.map.layers.length; i++) { if (visible && this.mode == "radio") { this.map.layers[i].setVisibility(false); } else { visible = this.map.layers[i].getVisibility(); } this.addTab(this.map.layers[i]); } return this.div; },
if (visible && this.mode == "radio") { this.map.layers[i].setVisibility(false); } else { visible = this.map.layers[i].getVisibility(); } this.addTab(this.map.layers[i]);
var layer = this.map.layers[i]; var baseLayer = layer.isBaseLayer; var checked = (baseLayer) ? (layer == this.map.baseLayer) : layer.getVisibility(); var inputElem = document.createElement("input"); inputElem.id = "input_" + layer.name; inputElem.name = (baseLayer) ? "baseLayers" : layer.name; inputElem.type = (baseLayer) ? "radio" : "checkbox"; inputElem.value = layer.name; inputElem.checked = checked; inputElem.layer = layer; var labelSpan = document.createElement("span"); labelSpan.innerHTML = layer.name; labelSpan.style.verticalAlign = (baseLayer) ? "bottom" : "auto"; Event.observe(labelSpan, "click", this.onLabelClick.bindAsEventListener(inputElem)); var br = document.createElement("br"); var groupArray = (baseLayer) ? this.baseLayerInputs : this.dataLayerInputs; groupArray.push(inputElem); var groupDiv = (baseLayer) ? this.baseLayersDiv : this.dataLayersDiv; groupDiv.appendChild(inputElem); groupDiv.appendChild(labelSpan); groupDiv.appendChild(br);
redraw: function() { //clear out previous incarnation of LayerSwitcher tabs this.div.innerHTML = ""; var visible = false; for( var i = 0; i < this.map.layers.length; i++) { if (visible && this.mode == "radio") { this.map.layers[i].setVisibility(false); } else { visible = this.map.layers[i].getVisibility(); } this.addTab(this.map.layers[i]); } return this.div; },
if (this.current == 0) { debug.print(label + "displaying buffers"); this.buffersTitle.className = "buffer-tab-active"; this.historyTitle.className = "buffer-tab"; Element.show(buffersNode); Element.hide(historyNode); return; } debug.print(label + "displaying history"); this.buffersTitle.className = "buffer-tab"; this.historyTitle.className = "buffer-tab-active";
this.refresh = function(n) { var label = "BufferTabsClass.refresh: "; debug.print(label + n + ", " + this.current); if (isNaN(n)) { return this.refresh(this.current); } this.current = null == n ? 0 : n; // focus on the textarea this.buffers.focus(); var buffersNode = this.buffers.labelList; var historyNode = this.history.node; // must ensure that buffers are visible for this to work. Element.show(buffersNode); Element.hide(historyNode); var bufferHeight = this.buffers.input.clientHeight; var bufferOffset = this.buffers.input.offsetTop; var bufferWidth = buffersNode.clientWidth; debug.print(label + "buffer width = " + buffersNode.clientWidth); // must ensure that history is visible for this to work. Element.hide(buffersNode); Element.show(historyNode); var historyOffset = historyNode.offsetTop; // match the textarea height var height = bufferHeight + bufferOffset - historyOffset; debug.print(label + "new height = " + height); historyNode.style.minHeight = height + "px"; // set the history and buffers to have the same width // this works with IE6 and gecko historyNode.style.width = bufferWidth + "px"; debug.print(label + "history width = " + historyNode.clientWidth); // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (this.current == 0) { debug.print(label + "displaying buffers"); // highlight the active tab this.buffersTitle.className = "buffer-tab-active"; this.historyTitle.className = "buffer-tab"; // hide and show the appropriate list Element.show(buffersNode); Element.hide(historyNode); return; } debug.print(label + "displaying history"); // highlight the active tab this.buffersTitle.className = "buffer-tab"; this.historyTitle.className = "buffer-tab-active"; // hide and show the appropriate list Element.hide(buffersNode); Element.show(historyNode); }
refresh: function(length) {
refresh: function() {
refresh: function(length) { this.updateView(); },
if (theBuffer.selectionStart) { if (g_cq_carets[i] == null) { g_cq_carets[i] = theBuffer.value.length; } debug.print("restoring caret position " + g_cq_carets[i]); theBuffer.selectionStart = g_cq_carets[i]; theBuffer.selectionEnd = g_cq_carets[i]; }
restoreCaretPosition(theBuffer, g_cq_carets[i]);
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } var theBuffer = getBuffer(); // remember the current caret position if (theBuffer.selectionStart) { g_cq_carets[g_cq_buffer_current] = theBuffer.selectionStart; debug.print("remembering buffer " + g_cq_buffer_current + " caret position " + g_cq_carets[i]); } // for gecko, handle disappearing-cursor weirdness? // https://bugzilla.mozilla.org/show_bug.cgi?id=215724 theBuffer.blur(); // hide current, to avoid flashing hide(theBuffer); g_cq_buffer_current = n; debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! for (var i = 0; i < theParent.childNodes.length; i++) { //debug.print("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; // show the current buffer only, and put the cursor there if (i == g_cq_buffer_current) { show(theBuffer); theBuffer.focus(); if (theBuffer.selectionStart) { if (g_cq_carets[i] == null) { g_cq_carets[i] = theBuffer.value.length; } debug.print("restoring caret position " + g_cq_carets[i]); theBuffer.selectionStart = g_cq_carets[i]; theBuffer.selectionEnd = g_cq_carets[i]; } setLineNumberStatus(); } else { hide(theBuffer); } } } // for buffers} // refreshBufferList
function refreshBufferList(n) {
function refreshBufferList(n, src) {
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; debug("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); } } // for buffers // show the current buffer only debug("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
if (! n)
if (! n) {
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; debug("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); } } // for buffers // show the current buffer only debug("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
debug("refreshBufferList: " + g_cq_buffer_current);
debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current);
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; debug("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); } } // for buffers // show the current buffer only debug("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
debug("refreshBufferList: i = " + i + " of " + g_cq_buffers);
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; debug("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); } } // for buffers // show the current buffer only debug("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
debug("refreshBufferList: show " + g_cq_buffer_current);
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; debug("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); } } // for buffers // show the current buffer only debug("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
if (! theBuffer.onblur) theBuffer.onblur = textAreaBlur;
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { //debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up onblur, onfocus, onclick handlers if (! theBuffer.onblur) theBuffer.onblur = textAreaBlur; if (! theBuffer.onfocus) theBuffer.onfocus = textAreaFocus; if (! theBuffer.onclick) theBuffer.onclick = textAreaFocus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
theBuffer.onfocus = textAreaFocus;
theBuffer.onfocus = setLineNumberStatus;
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { //debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up onblur, onfocus, onclick handlers if (! theBuffer.onblur) theBuffer.onblur = textAreaBlur; if (! theBuffer.onfocus) theBuffer.onfocus = textAreaFocus; if (! theBuffer.onclick) theBuffer.onclick = textAreaFocus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
theBuffer.onclick = textAreaFocus;
theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus;
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { //debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up onblur, onfocus, onclick handlers if (! theBuffer.onblur) theBuffer.onblur = textAreaBlur; if (! theBuffer.onfocus) theBuffer.onfocus = textAreaFocus; if (! theBuffer.onclick) theBuffer.onclick = textAreaFocus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
removeChildNodes(labelsNode);
labelsNode.removeChildNodes();
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current);
debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current);
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
hide(theBuffer);
theBuffer.hide();
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
show(getBuffer());
getBuffer().show();
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
debug("refreshBufferList: " + g_cq_buffer_current);
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; //alert("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { //alert("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { //alert("refreshBufferList: i = " + i + " fontFamily = " + theBuffer.style.fontFamily); writeBufferLabel(i); hide(theBuffer); } } // for buffers // show the current buffer only //alert("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
debug("refreshBufferList: i = " + i + " of " + g_cq_buffers);
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; //alert("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { //alert("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { //alert("refreshBufferList: i = " + i + " fontFamily = " + theBuffer.style.fontFamily); writeBufferLabel(i); hide(theBuffer); } } // for buffers // show the current buffer only //alert("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
writeBufferLabel(i);
writeBufferLabel(tableBody, i);
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; //alert("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { //alert("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { //alert("refreshBufferList: i = " + i + " fontFamily = " + theBuffer.style.fontFamily); writeBufferLabel(i); hide(theBuffer); } } // for buffers // show the current buffer only //alert("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
debug("refreshBufferList: show " + g_cq_buffer_current);
function refreshBufferList(n) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // 0 will return false, will set to 0: ok if (! n) n = 0; g_cq_buffer_current = n; //alert("refreshBufferList: " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { //alert("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { //alert("refreshBufferList: i = " + i + " fontFamily = " + theBuffer.style.fontFamily); writeBufferLabel(i); hide(theBuffer); } } // for buffers // show the current buffer only //alert("refreshBufferList: show " + g_cq_buffer_current); show(getBuffer()); focusQueryInput();} // refreshBufferList
if (! theBuffer.onclick) theBuffer.onclick = textAreaFocus;
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer var theBuffer = null; var theParent = document.getElementById(g_cq_buffers_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); for (var i = 0; i < g_cq_buffers; i++) { //debug("refreshBufferList: i = " + i + " of " + g_cq_buffers); theBuffer = getBuffer(i); // not there? skip it if (theBuffer) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up onblur, onfocus handlers if (! theBuffer.onblur) theBuffer.onblur = textAreaBlur; if (! theBuffer.onfocus) theBuffer.onfocus = textAreaFocus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
labelsNode.removeChildNodes();
removeChildNodes(labelsNode);
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); labelsNode.removeChildNodes(); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug.print("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); theBuffer.hide(); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there getBuffer().show(); focusQueryInput();} // refreshBufferList
theBuffer.hide();
hide(theBuffer);
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); labelsNode.removeChildNodes(); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug.print("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); theBuffer.hide(); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there getBuffer().show(); focusQueryInput();} // refreshBufferList
getBuffer().show();
show(getBuffer());
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); labelsNode.removeChildNodes(); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug.print("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); theBuffer.hide(); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there getBuffer().show(); focusQueryInput();} // refreshBufferList
var theBuffer = null;
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug.print("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
hide(theBuffer);
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug.print("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
show(getBuffer()); focusQueryInput();
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug.print("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
var theParent = document.getElementById(g_cq_buffers_area_id);
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
var theParent = document.getElementById(g_cq_buffers_area_id);
function refreshBufferList(n, src) { // display only the current buffer (textarea) // show labels for each buffer // short-circuit if the buffer doesn't exist if (getBuffer(n) == null) return; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); // labels are stored in divs in a table cell var labelsNode = document.getElementById(g_cq_bufferlist_id); removeChildNodes(labelsNode); // create an explicit tbody for the DOM (Mozilla needs this) var tableBody = document.createElement('tbody'); labelsNode.appendChild(tableBody); // 0 will return false, will set to 0: ok if (n == null) { if (g_cq_buffer_current == null) { n = g_cq_buffer_current; } else { n = 0; } } g_cq_buffer_current = n; debug("refreshBufferList: from " + src + ", show " + g_cq_buffer_current); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { //debug("refreshBufferList: i = " + i + " of " + theParent.childNodes.length); theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { writeBufferLabel(tableBody, i); hide(theBuffer); // set up handlers to update line-number display if (! theBuffer.onfocus) theBuffer.onfocus = setLineNumberStatus; if (! theBuffer.onclick) theBuffer.onclick = setLineNumberStatus; if (! theBuffer.onkeyup) theBuffer.onkeyup = setLineNumberStatus; } } // for buffers // show the current buffer only, and put the cursor there show(getBuffer()); focusQueryInput();} // refreshBufferList
debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current);
debug.print("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current);
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
debug("refreshBufferTabs: null tabsNode");
debug.print("refreshBufferTabs: null tabsNode");
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
debug("refreshBufferTabs: null title node(s)");
debug.print("refreshBufferTabs: null title node(s)");
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
debug("refreshBufferTabs: null buffersNode");
debug.print("refreshBufferTabs: null buffersNode");
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
debug("refreshBufferTabs: null historyNode");
debug.print("refreshBufferTabs: null historyNode");
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
debug("refreshBufferTabs: displaying buffer list");
debug.print("refreshBufferTabs: displaying buffer list");
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
show(buffersNode); hide(historyNode);
buffersNode.show(); historyNode.hide();
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
debug("refreshBufferTabs: displaying history");
debug.print("refreshBufferTabs: displaying history");
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight);
debug.print("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight);
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
hide(buffersNode); show(historyNode);
buffersNode.hide(); historyNode.show();
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
return;
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list show(buffersNode); hide(historyNode); } else { debug("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list hide(buffersNode); show(historyNode); }}
buffersNode.show(); historyNode.hide();
show(buffersNode); hide(historyNode);
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug.print("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug.print("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug.print("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug.print("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug.print("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug.print("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list buffersNode.show(); historyNode.hide(); } else { debug.print("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug.print("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list buffersNode.hide(); historyNode.show(); } return;}
buffersNode.hide(); historyNode.show();
hide(buffersNode); show(historyNode);
function refreshBufferTabs(n) { if (n == null || n == g_cq_buffer_tabs_current) return; debug.print("refreshBufferTabs: " + n + ", " + g_cq_buffer_tabs_current); g_cq_buffer_tabs_current = n; var tabsNode = document.getElementById(g_cq_buffer_tabs_node); if (tabsNode == null) { debug.print("refreshBufferTabs: null tabsNode"); return; } // check g_cq_buffer_tabs_current against each child span var buffersTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-0"); var historyTitleNode = document.getElementById(g_cq_buffer_tabs_node + "-1"); if (!buffersTitleNode || ! historyTitleNode) { debug.print("refreshBufferTabs: null title node(s)"); return; } var buffersNode = document.getElementById(g_cq_bufferlist_id); if (! buffersNode) { debug.print("refreshBufferTabs: null buffersNode"); return; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug.print("refreshBufferTabs: null historyNode"); return; } // simple for now: node 0 is buffer list, 1 is history // TODO move the instruction text too? if (g_cq_buffer_tabs_current == 0) { debug.print("refreshBufferTabs: displaying buffer list"); // highlight the active tab buffersTitleNode.className = "buffer-tab-active"; historyTitleNode.className = "buffer-tab"; // hide and show the appropriate list buffersNode.show(); historyNode.hide(); } else { debug.print("refreshBufferTabs: displaying history"); // highlight the active tab buffersTitleNode.className = "buffer-tab"; historyTitleNode.className = "buffer-tab-active"; // match the buffer height, to reduce frame-redraw debug.print("resizeBufferTabs: " + buffersNode.offsetTop + ", " + buffersNode.offsetHeight); historyNode.height = buffersNode.offsetHeight; // hide and show the appropriate list buffersNode.hide(); historyNode.show(); } return;}
if (!cobj._narf) { cobj._narf = true; cobj.node.style.backgroundColor = '#ddf'; } else { cobj._narf = false; cobj.node.style.backgroundColor = '#dfd'; }
that.refreshTextarea = function(node) { var cobj = that.getCacheObj(node); //that.log('refreshNode(): '+cobj); if(!cobj) { return; } if (!cobj._narf) { cobj._narf = true; cobj.node.style.backgroundColor = '#ddf'; } else { cobj._narf = false; cobj.node.style.backgroundColor = '#dfd'; } cobj.update(); };
if (that.getDebug()) { if (!cobj._toggle) { cobj.node.style.background = '#fed'; cobj._toggle = true; } else { cobj.node.style.background = '#def'; cobj._toggle = false; } }
that.refreshTextarea = function(node) { var cobj = that.getCacheObj(node); //that.log('refreshNode(): '+cobj); if(!cobj) { return; } cobj.update(); };
PatternMatcher.GlobMatchStrategy.prototype.regexpFromGlob = function(glob) {
PatternMatcher.regexpFromGlob = function(glob) {
PatternMatcher.GlobMatchStrategy.prototype.regexpFromGlob = function(glob) { var re = glob; re = re.replace(/([.^$+(){}\[\]\\|])/g, "\\$1"); re = re.replace(/\?/g, "(.|[\r\n])"); re = re.replace(/\*/g, "(.|[\r\n])*"); return "^" + re + "$";};
re = re.replace(/\?/g, "[^]"); re = re.replace(/\*/g, "[^]*");
re = re.replace(/\?/g, "(.|[\r\n])"); re = re.replace(/\*/g, "(.|[\r\n])*");
PatternMatcher.GlobMatchStrategy.prototype.regexpFromGlob = function(glob) { var re = glob; re = re.replace(/([.^$+(){}\[\]\\|])/g, "\\$1"); re = re.replace(/\?/g, "[^]"); re = re.replace(/\*/g, "[^]*"); return "^" + re + "$";};
var re = glob; re = re.replace(/([.^$+(){}\[\]\\|])/g, "\\$1"); re = re.replace(/\?/g, "(.|[\r\n])"); re = re.replace(/\*/g, "(.|[\r\n])*"); return "^" + re + "$";
return "^" + PatternMatcher.convertGlobMetaCharsToRegexpMetaChars(glob) + "$";
PatternMatcher.regexpFromGlob = function(glob) { var re = glob; re = re.replace(/([.^$+(){}\[\]\\|])/g, "\\$1"); re = re.replace(/\?/g, "(.|[\r\n])"); re = re.replace(/\*/g, "(.|[\r\n])*"); return "^" + re + "$";};
var old_event = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { old_event(); func(); }; }
Event.observe(window, 'load', func, false);
function register_onload(func) { var old_event = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { old_event(); func(); }; }}
this.registerAction = function(name, action) {
this.registerAction = function(name, action, wait) {
this.registerAction = function(name, action) { var handler = new CommandHandler("action", true, action); this.actions[name] = handler; }
if (wait) { handler.wait = true; }
this.registerAction = function(name, action) { var handler = new CommandHandler("action", true, action); this.actions[name] = handler; }
registerAllAccessors(commandObject); registerAllActions(commandObject); registerAllAsserts(commandObject);
_registerAllAccessors(commandObject); _registerAllActions(commandObject); _registerAllAsserts(commandObject);
this.registerAll = function(commandObject) { registerAllAccessors(commandObject); registerAllActions(commandObject); registerAllAsserts(commandObject); };
this.registerAction(actionName, action);
this.registerAction(actionName, action, false); var waitActionName = actionName + "AndWait"; this.registerAction(waitActionName, action, true);
this.registerAllActions = function(commandObject) { for (var functionName in commandObject) { if (/^do([A-Z].+)$/.exec(functionName) != null) { var actionName = RegExp["$1"].toCamelCase(); var action = commandObject[functionName]; this.registerAction(actionName, action); } } }
var result = /^(.*)Present$/.exec(baseName); if (result==null) { self.registerAssert("assertNot"+baseName, negativeAssertion, true); self.registerAssert("verifyNot"+baseName, negativeAssertion, false); } else { var invertedBaseName = result[1] + "NotPresent"; self.registerAssert("assert"+invertedBaseName, negativeAssertion, true); self.registerAssert("verify"+invertedBaseName, negativeAssertion, false); }
self.registerAssert("assert" + _negtiveName(baseName), negativeAssertion, true); self.registerAssert("verify" + _negtiveName(baseName), negativeAssertion, false);
this.registerAssertionsBasedOnAccessor = function(accessor, baseName, predicate) { if (predicate==null) { predicate = self.createPredicateFromAccessor(accessor); } var assertion = self.createAssertionFromPredicate(predicate); // Register an assert with the "assert" prefix, and halt on failure. self.registerAssert("assert" + baseName, assertion, true); // Register a verify with the "verify" prefix, and do not halt on failure. self.registerAssert("verify" + baseName, assertion, false); var invertedPredicate = self.invertPredicate(predicate); var negativeAssertion = self.createAssertionFromPredicate(invertedPredicate); var result = /^(.*)Present$/.exec(baseName); if (result==null) { // Register an assertNot with the "assertNot" prefix, and halt on failure. self.registerAssert("assertNot"+baseName, negativeAssertion, true); // Register a verifyNot with the "verifyNot" prefix, and do not halt on failure. self.registerAssert("verifyNot"+baseName, negativeAssertion, false); } else { var invertedBaseName = result[1] + "NotPresent"; // Register an assertNot ending w/ "NotPresent", and halt on failure. self.registerAssert("assert"+invertedBaseName, negativeAssertion, true); // Register an assertNot ending w/ "NotPresent", and do not halt on failure. self.registerAssert("verify"+invertedBaseName, negativeAssertion, false); } };
registerCallback: function(element) { if (element.type) {
registerCallback: function(element, trigger) { if (trigger && element.type) { Event.observe(element, trigger, this.onElementEvent.bind(this)); } else if (element.type) {
registerCallback: function(element) { if (element.type) { switch (element.type.toLowerCase()) { case 'checkbox': case 'radio': Event.observe(element, 'click', this.onElementEvent.bind(this)); break; case 'password': case 'text': case 'textarea': case 'select-one': case 'select-multiple': Event.observe(element, 'change', this.onElementEvent.bind(this)); break; } } }
commandFactory.registerAction("open", selenium.doOpenWithWait);
function registerCommandHandlers() { commandFactory = new CommandFactory(); commandFactory.registerAll(selenium); // These actions are overridden for fitrunner, as they still involve some FitRunner smarts, // because of the wait/nowait behaviour modification. We need a generic solution to this. commandFactory.registerAction("click", selenium.doClickWithOptionalWait); commandFactory.registerAction("open", selenium.doOpenWithWait);}
if(this.active) return;
registerEvents: function() { if(this.active) return; Event.observe(document, "mouseup", this.eventMouseUp); Event.observe(document, "mousemove", this.eventMouseMove); Event.observe(document, "keypress", this.eventKeypress); },
Event.observe(this.handle, "mousedown", this.eventMouseDown);
registerEvents: function() { if(this.active) return; Event.observe(document, "mouseup", this.eventMouseUp); Event.observe(document, "mousemove", this.eventMouseMove); Event.observe(document, "keypress", this.eventKeypress); },
this.registerCallback(elements[i]);
this.registerCallback(elements[i], this.trigger);
registerFormCallbacks: function() { var elements = Form.getElements(this.element); for (var i = 0; i < elements.length; i++) this.registerCallback(elements[i]); },
function registerMenuCommand(docId, commandName, commandFunc, accel, access) {
function registerMenuCommand(docId, commandName, commandFunc, accel, access, where) {
function registerMenuCommand(docId, commandName, commandFunc, accel, access) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); if( access ) { menuItem.setAttribute("accesskey", access); } menuItem.__gmCommandFunc = function(e) {commandFunc()}; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; if (accel && typeof(accel.key) == "string") { var accelText = ""; if (accel.accel) { accelText += "<accel> + "; accel.accel = true; } else { accel.accel = false; } if (accel.ctrl) { accelText += "<ctrl> + "; accel.ctrl = true; } else { accel.ctrl = false; } if (accel.meta) { accelText += "<meta> + "; accel.meta = true; } else { accel.meta = false; } if (accel.shift) { accelText += "<shift> + "; accel.shift = true; } else { accel.shift = false; } if (accel.alt) { accelText += "<alt> + "; accel.alt = true; } else { accel.alt = false; } accelText += accel.key; menuItem.setAttribute("acceltext", accelText); alert( menuItem.getAttribute("acceltext") ); getActiveDocument().addEventListener("keypress", function(e){ if (/*(e.accelKey == accel.accel) &&*/ (e.ctrlKey == accel.ctrl) && (e.metaKey == accel.meta) && (e.shiftKey == accel.shift) && (e.altKey == accel.alt) && (String.fromCharCode(e.which) == accel.key)) { commandFunc(); } }, false); } var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); }
alert( menuItem.getAttribute("acceltext") ); getActiveDocument().addEventListener("keypress", function(e){
var tmpFunc = function(e){
function registerMenuCommand(docId, commandName, commandFunc, accel, access) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); if( access ) { menuItem.setAttribute("accesskey", access); } menuItem.__gmCommandFunc = function(e) {commandFunc()}; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; if (accel && typeof(accel.key) == "string") { var accelText = ""; if (accel.accel) { accelText += "<accel> + "; accel.accel = true; } else { accel.accel = false; } if (accel.ctrl) { accelText += "<ctrl> + "; accel.ctrl = true; } else { accel.ctrl = false; } if (accel.meta) { accelText += "<meta> + "; accel.meta = true; } else { accel.meta = false; } if (accel.shift) { accelText += "<shift> + "; accel.shift = true; } else { accel.shift = false; } if (accel.alt) { accelText += "<alt> + "; accel.alt = true; } else { accel.alt = false; } accelText += accel.key; menuItem.setAttribute("acceltext", accelText); alert( menuItem.getAttribute("acceltext") ); getActiveDocument().addEventListener("keypress", function(e){ if (/*(e.accelKey == accel.accel) &&*/ (e.ctrlKey == accel.ctrl) && (e.metaKey == accel.meta) && (e.shiftKey == accel.shift) && (e.altKey == accel.alt) && (String.fromCharCode(e.which) == accel.key)) { commandFunc(); } }, false); } var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); }
}, false);
} where.removeEventListener("keypress", tmpFunc, false); where.addEventListener("keypress", tmpFunc, false);
function registerMenuCommand(docId, commandName, commandFunc, accel, access) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); if( access ) { menuItem.setAttribute("accesskey", access); } menuItem.__gmCommandFunc = function(e) {commandFunc()}; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; if (accel && typeof(accel.key) == "string") { var accelText = ""; if (accel.accel) { accelText += "<accel> + "; accel.accel = true; } else { accel.accel = false; } if (accel.ctrl) { accelText += "<ctrl> + "; accel.ctrl = true; } else { accel.ctrl = false; } if (accel.meta) { accelText += "<meta> + "; accel.meta = true; } else { accel.meta = false; } if (accel.shift) { accelText += "<shift> + "; accel.shift = true; } else { accel.shift = false; } if (accel.alt) { accelText += "<alt> + "; accel.alt = true; } else { accel.alt = false; } accelText += accel.key; menuItem.setAttribute("acceltext", accelText); alert( menuItem.getAttribute("acceltext") ); getActiveDocument().addEventListener("keypress", function(e){ if (/*(e.accelKey == accel.accel) &&*/ (e.ctrlKey == accel.ctrl) && (e.metaKey == accel.meta) && (e.shiftKey == accel.shift) && (e.altKey == accel.alt) && (String.fromCharCode(e.which) == accel.key)) { commandFunc(); } }, false); } var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); }
function registerMenuCommand(docId, commandName, commandFunc) {
function registerMenuCommand(docId, commandName, commandFunc, accel, access) {
function registerMenuCommand(docId, commandName, commandFunc) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); menuItem.__gmCommandFunc = function(e) {commandFunc()}; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); }
if (accel && typeof(accel.key) == "string") { var accelText = ""; if (accel.accel) { accelText += "<accel> + "; accel.accel = true; } else { accel.accel = false; } if (accel.ctrl) { accelText += "<ctrl> + "; accel.ctrl = true; } else { accel.ctrl = false; } if (accel.meta) { accelText += "<meta> + "; accel.meta = true; } else { accel.meta = false; } if (accel.shift) { accelText += "<shift> + "; accel.shift = true; } else { accel.shift = false; } if (accel.alt) { accelText += "<alt> + "; accel.alt = true; } else { accel.alt = false; } accelText += accel.key; menuItem.setAttribute("acceltext", accelText); alert( menuItem.getAttribute("acceltext") ); getActiveDocument().addEventListener("keypress", function(e){ if ( (e.ctrlKey == accel.ctrl) && (e.metaKey == accel.meta) && (e.shiftKey == accel.shift) && (e.altKey == accel.alt) && (String.fromCharCode(e.which) == accel.key)) { commandFunc(); } }, false); }
function registerMenuCommand(docId, commandName, commandFunc) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); menuItem.__gmCommandFunc = function(e) {commandFunc()}; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); }
self.registerAction("waitForNot"+baseName, waitForNotAction, false, true); }
self.registerAction("waitFor"+_negtiveName(baseName), waitForNotAction, false, true); self.registerAction("waitForNot"+baseName, waitForNotAction, false, true); }
this.registerWaitForCommandsBasedOnAccessor = function(accessor, baseName, predicate) { if (predicate==null) { predicate = self.createPredicateFromAccessor(accessor); } var waitForAction = self.createWaitForActionFromPredicate(predicate); self.registerAction("waitFor"+baseName, waitForAction, false, true); var invertedPredicate = self.invertPredicate(predicate); var waitForNotAction = self.createWaitForActionFromPredicate(invertedPredicate); self.registerAction("waitForNot"+baseName, waitForNotAction, false, true); }
f_popup._OldContextMenu=document.body.oncontextmenu;
var oldContextMenu=document.body.oncontextmenu; if (!oldContextMenu) { oldContextMenu=f_popup.NO_CONTEXT_POPUP; } f_popup._OldContextMenu=oldContextMenu;
RegisterWindowClick: function(callbacks, component, popup) { f_core.Assert(component, "f_popup: Component parameter is null !"); f_core.Assert(callbacks, "f_popup: Callback parameter is null !"); if (!f_popup._OldContextMenu) { f_popup._OldContextMenu=document.body.oncontextmenu; document.body.oncontextmenu=f_core.CancelEventHandler; } f_core.Debug("f_popup", "Register popup on "+component.id); var oldComponent=f_popup.Component; if (oldComponent) { alert("Already old component !"); // On clot le precedant f_popup.Component=undefined; if (f_popup.Callbacks) { f_popup.Callbacks.exit.call(oldComponent); f_popup.Callbacks=undefined; } f_popup.Popup=undefined; return false; } f_popup.Callbacks=callbacks; f_popup.Component=component; f_popup.Popup=popup; // Dans le cas IE pas de Register Window click if (f_popup.Ie_enablePopup()) { return true; } if (f_popup._Installed) { return true; } f_popup._Installed=true; document.addEventListener("mousedown", f_popup._OnMouseDown, true); document.addEventListener("click", f_popup._OnClick, true); document.addEventListener("dblclick", f_popup._OnClick, true); // document.addEventListener("blur", f_popup._OnBlur, true); document.addEventListener("focus", f_popup._OnFocus, true); document.addEventListener("keydown", f_popup._OnKeyDown, true); document.addEventListener("keyup", f_popup._OnKeyUp, true); document.addEventListener("keypress", f_popup._OnKeyPress, true); return true; },
var regEx; for(var i = 1; i < arguments.length; i++) { regEx = new RegExp("(^|\\s)" + arguments[i] + "(\\s|$)", 'g'); element.className = element.className.replace(regEx, '') }
var removeClasses = arguments; $R(1,arguments.length-1).each( function(index) { element.className = element.className.split(' ').reject( function(klass) { return (klass == removeClasses[index]) } ).join(' '); });
remove: function(element) { element = $(element); var regEx; for(var i = 1; i < arguments.length; i++) { regEx = new RegExp("(^|\\s)" + arguments[i] + "(\\s|$)", 'g'); element.className = element.className.replace(regEx, '') } },
if (this.obj[key] == undefined) return false;
if (this.obj[key] === undefined) return this;
remove: function(key) { if (this.obj[key] == undefined) return false; var obj = {}; this.length--; for (var property in this.obj){ if (property != key) obj[property] = this.obj[property]; } this.obj = obj; return this; },
this.drops = this.drops.reject(function(e) { return e==element });
this.drops = this.drops.reject(function(d) { return d.element==element });
remove: function(element) { this.drops = this.drops.reject(function(e) { return e==element }); },
remove: function(element) { element = $(element); element.parentNode.removeChild(element);
remove: function(classNameToRemove) { if (!this.include(classNameToRemove)) return; this.set(this.select(function(className) { return className != classNameToRemove; }));
remove: function(element) { element = $(element); element.parentNode.removeChild(element); },
var node = this.hash[key]
this.remove = function(key) { // remove this listItem and its corresponding hash entry var node = this.hash[key] // will this work? relying on garbage collection? this.hash[key] = null; Element.remove(node); this.lastModified = new Date(); }
Element.remove(node);
this.remove = function(key) { // remove this listItem and its corresponding hash entry var node = this.hash[key] // will this work? relying on garbage collection? this.hash[key] = null; Element.remove(node); this.lastModified = new Date(); }
regEx = new RegExp("^" + arguments[i] + "\\b\\s*|\\s*\\b" + arguments[i] + "\\b", 'g');
regEx = new RegExp("(^|\\s)" + arguments[i] + "(\\s|$)", 'g');
remove: function(element) { element = $(element); var regEx; for(var i = 1; i < arguments.length; i++) { regEx = new RegExp("^" + arguments[i] + "\\b\\s*|\\s*\\b" + arguments[i] + "\\b", 'g'); element.className = element.className.replace(regEx, '') } },
for(var i = 0; i < this.drops.length; i++) if(this.drops[i].element == element) this.drops.splice(i,1);
this.drops = this.drops.reject(function(d) { return d.element==element });
remove: function(element) { for(var i = 0; i < this.drops.length; i++) if(this.drops[i].element == element) this.drops.splice(i,1); },
Element.remove(node);
if (null != node) { Element.remove(node); }
this.remove = function(key) { // remove this listItem and its corresponding hash entry // will this work? relying on garbage collection? var node = this.hash[key]; Element.remove(node); this.hash[key] = null; this.lastModified = new Date(); }
if (this.obj[key] == undefined) return;
if (this.obj[key] == undefined) return false;
remove: function(key) { if (this.obj[key] == undefined) return; var obj = {}; this.length--; for (var property in this.obj){ if (property != key) obj[property] = this.obj[property]; } this.obj = obj; return this; },
this.listeners[type].pop();
if (this.listeners[type] != null) { this.listeners[type] = new Array(); }
remove: function(type) { this.listeners[type].pop(); },
function removeChildNodes(node) { while (node.hasChildNodes()) { node.removeChild(node.firstChild);
HTMLElement.prototype.removeChildNodes = function() { while (this.hasChildNodes()) { this.removeChild(this.firstChild);
function removeChildNodes(node) { while (node.hasChildNodes()) { node.removeChild(node.firstChild); }}
HTMLElement.prototype.removeChildNodes = function() { while (this.hasChildNodes()) { this.removeChild(this.firstChild);
function removeChildNodes(n) { while (n.hasChildNodes()) { n.removeChild(n.firstChild);
HTMLElement.prototype.removeChildNodes = function() { while (this.hasChildNodes()) { this.removeChild(this.firstChild); }}
node.className = eregReplace('(^| )'+ className +'($| )', '', node.className);
node.className = eregReplace('(^|\\s+)'+ className +'($|\\s+)', ' ', node.className);
function removeClass(node, className) { if (!hasClass(node, className)) { return false; } node.className = eregReplace('(^| )'+ className +'($| )', '', node.className); return true;}
element = $(element); if (!element) return; var newClassName = ''; var a = element.className.split(' '); for (var i = 0; i < a.length; i++) { if (a[i] != className) { if (i > 0) newClassName += ' '; newClassName += a[i]; } } element.className = newClassName;
if (!(element = $(element))) return; return Element.classNames(element).remove(className);
removeClassName: function(element, className) { element = $(element); if (!element) return; var newClassName = ''; var a = element.className.split(' '); for (var i = 0; i < a.length; i++) { if (a[i] != className) { if (i > 0) newClassName += ' '; newClassName += a[i]; } } element.className = newClassName; },
if (this.detachEvent){
if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, key, false); } else {
removeEvent: function(type, fn){ if (this.events && this.events[type]){ var pos = this.events[type].keys.indexOf(fn); if (pos == -1) return this; var key = this.events[type].keys.splice(pos,1)[0]; if (this.detachEvent){ this.detachEvent('on'+type, this.events[type].values.splice(pos,1)[0]); } else { this.removeEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, key, false); } } return this; },
} else { this.removeEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, key, false);
removeEvent: function(type, fn){ if (this.events && this.events[type]){ var pos = this.events[type].keys.indexOf(fn); if (pos == -1) return this; var key = this.events[type].keys.splice(pos,1)[0]; if (this.detachEvent){ this.detachEvent('on'+type, this.events[type].values.splice(pos,1)[0]); } else { this.removeEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, key, false); } } return this; },
if (this.events && this.events[type] && this.events[type][fn]){
if (this.events && this.events[type]){ var pos = this.events[type].keys.indexOf(fn); if (pos == -1) return this; var key = this.events[type].keys.splice(pos,1)[0];
removeEvent: function(type, fn){ if (this.events && this.events[type] && this.events[type][fn]){ if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.detachEvent('on'+type, this.events[type][fn]); } this.events[type][fn] = null; } return this; },
this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false);
this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, key, false);
removeEvent: function(type, fn){ if (this.events && this.events[type] && this.events[type][fn]){ if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.detachEvent('on'+type, this.events[type][fn]); } this.events[type][fn] = null; } return this; },
this.detachEvent('on'+type, this.events[type][fn]);
this.detachEvent('on'+type, this.events[type].values.splice(pos,1)[0]);
removeEvent: function(type, fn){ if (this.events && this.events[type] && this.events[type][fn]){ if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.detachEvent('on'+type, this.events[type][fn]); } this.events[type][fn] = null; } return this; },
this.events[type][fn] = null;
removeEvent: function(type, fn){ if (this.events && this.events[type] && this.events[type][fn]){ if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.detachEvent('on'+type, this.events[type][fn]); } this.events[type][fn] = null; } return this; },
if (!this.events) return this; if (!this.events[type]) return this; if (!this.events[type][fn]) return this;
if (!this.events || !this.events[type] || !this.events[type][fn]) return this;
removeEvent: function(type, fn){ if (!this.events) return this; if (!this.events[type]) return this; if (!this.events[type][fn]) return this; if (this.removeEventListener){ var realType = type; if (type == 'mousewheel' && !window.khtml) realType = 'DOMMouseScroll'; this.removeEventListener(realType, this.events[type][fn], false); } else this.detachEvent('on'+type, this.events[type][fn]); this.events[type][fn] = null; return this; },
var realType = type; if (type == 'mousewheel' && !window.khtml) realType = 'DOMMouseScroll'; this.removeEventListener(realType, this.events[type][fn], false);
this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false);
removeEvent: function(type, fn){ if (!this.events) return this; if (!this.events[type]) return this; if (!this.events[type][fn]) return this; if (this.removeEventListener){ var realType = type; if (type == 'mousewheel' && !window.khtml) realType = 'DOMMouseScroll'; this.removeEventListener(realType, this.events[type][fn], false); } else this.detachEvent('on'+type, this.events[type][fn]); this.events[type][fn] = null; return this; },
if (!this.events || !this.events[type] || !this.events[type][fn]) return this; if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false);
if (this.events && this.events[type] && this.events[type][fn]){ if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.detachEvent('on'+type, this.events[type][fn]); } this.events[type][fn] = null;
removeEvent: function(type, fn){ if (!this.events || !this.events[type] || !this.events[type][fn]) return this; if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else this.detachEvent('on'+type, this.events[type][fn]); this.events[type][fn] = null; return this; },
else this.detachEvent('on'+type, this.events[type][fn]); this.events[type][fn] = null;
removeEvent: function(type, fn){ if (!this.events || !this.events[type] || !this.events[type][fn]) return this; if (this.removeEventListener){ this.removeEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else this.detachEvent('on'+type, this.events[type][fn]); this.events[type][fn] = null; return this; },
return true;
function removeEvent(obj, evType, fn) { if (obj.removeEventListener) { obj.removeEventListener(evType, fn, false); return true; } else if (obj.detachEvent) { obj.detachEvent("on" + evType, fn); } else { return false; }}
for (var fn in this.events[type]) this.removeEvent(type, fn);
this.events[type].keys.each(function(fn){ this.removeEvent(type, fn); });
removeEvents: function(type){ if (this.events){ if (type){ if (this.events[type]){ for (var fn in this.events[type]) this.removeEvent(type, fn); this.events[type] = null; } } else { for (var evType in this.events) this.removeEvents(evType); this.events = null; } } return this; },
if (!this.events) return this; if (type){ if (!this.events[type]) return this; for (var fn in this.events[type]) this.removeEvent(type, fn); this.events[type] = null; } else { for (var evType in this.events) this.removeEvents(evType); this.events = null;
if (this.events){ if (type){ if (this.events[type]){ for (var fn in this.events[type]) this.removeEvent(type, fn); this.events[type] = null; } } else { for (var evType in this.events) this.removeEvents(evType); this.events = null; }
removeEvents: function(type){ if (!this.events) return this; if (type){ if (!this.events[type]) return this; for (var fn in this.events[type]) this.removeEvent(type, fn); this.events[type] = null; } else { for (var evType in this.events) this.removeEvents(evType); this.events = null; } return this; },
});
}, this);
removeEvents: function(type){ if (this.events){ if (type){ if (this.events[type]){ this.events[type].keys.each(function(fn){ this.removeEvent(type, fn); }); this.events[type] = null; } } else { for (var evType in this.events) this.removeEvents(evType); this.events = null; } } return this; },
Element.remove(this.form);
if (this.form.parentNode) Element.remove(this.form);
removeForm: function() { if(this.form) { Element.remove(this.form); this.form = null; } },
var outArray = new Array();
var outArray = new Array(), skip;
function removeFromArray(in_array, remove_array) { var outArray = new Array(); for (var i=0; i<in_array.length; i++) { skip = false; for (var j=0; j<remove_array.length; j++) { if (in_array[i] == remove_array[j]) { skip = true; } } if (!skip) { outArray[outArray.length] = in_array[i]; } } return outArray; }
this.layerContainerDiv.removeChild(layer.div);
if (layer.isFixed) { this.viewPortDiv.removeChild(layer.div); } else { this.layerContainerDiv.removeChild(layer.div); }
removeLayer: function(layer) { this.layerContainerDiv.removeChild(layer.div); this.layers.remove(layer); layer.map = null; this.events.triggerEvent("removelayer"); },
if ( (this.baseLayer == null) && (this.layers[i].isBaseLayer()) ) { this.baseLayer = this.layers[i]; continue;
var iLayer = this.layers[i]; if (iLayer.isBaseLayer) { this.setBaseLayer(iLayer); break;
removeLayer: function(layer) { if (layer.isFixed) { this.viewPortDiv.removeChild(layer.div); } else { this.layerContainerDiv.removeChild(layer.div); } this.layers.remove(layer); if (this.baseLayer == layer) { this.baseLayer = null; for(i=0; i < this.layers.length; i++) { if ( (this.baseLayer == null) && (this.layers[i].isBaseLayer()) ) { this.baseLayer = this.layers[i]; continue; } } } layer.map = null; this.events.triggerEvent("removelayer"); },