rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
|| ((!file_area.lib_list[bbs.curdir].dir_list[bbs.curdir].can_upload)
|| ((!file_area.lib_list[bbs.curlib].dir_list[bbs.curdir].can_upload)
function Filemenu(){ this.items=new Array(); // Width of longest line with no dynamic variables var width=0; var scantime=system.datestr(bbs.new_file_time); // Expand for scan time line. if(width < 27+scantime.length) width=27+scantime.length; if(width < 11+file_area.lib_list[bbs.curlib].dir_list[bbs.curdir].name.length) width=11+file_area.lib_list[bbs.curlib].dir_list[bbs.curdir].name.length; this.xpos=1; this.ypos=2; this.lpadding="\xb3"; this.rpadding="\xb3"; this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"+ctrl('O')+ctrl('U')+ctrl('T')+ctrl('K')+ctrl('P'); this.add(top_bar(width),undefined,undefined,"",""); this.add( format_opt("|Change Directory",width,false) ,"C",width ); this.add( format_opt("|List Dir ("+file_area.lib_list[bbs.curlib].dir_list[bbs.curdir].name+")",width,false) ,"L",width ); this.add( format_opt("Scan for |New Files since "+scantime,width,true) ,"N",width ); this.add( format_opt("Search for |Filenames",width,true) ,"F",width ); this.add( format_opt("Search for |Text in Descriptions",width,true) ,"T",width ); this.add( format_opt("|Download file(s)",width,true) ,"D",width,undefined,undefined ,user.compare_ars("REST D") || (!file_area.lib_list[bbs.curdir].dir_list[bbs.curdir].can_download) ); this.add( format_opt("|Upload file(s)",width,true) ,"U",width,undefined,undefined ,user.compare_ars("REST U") || ((!file_area.lib_list[bbs.curdir].dir_list[bbs.curdir].can_upload) && file_area.upload_dir==undefined) ); this.add( format_opt("|Remove/Edit Files",width,false) ,"R",width ); this.add( format_opt("View/Edit |Batch Queue",width,false) ,"B",width,undefined,undefined // Disabled if you can't upload or download. // Disabled if no upload dir and no batch queue ,(user.compare_ars("REST U AND REST D")) || (bbs.batch_upload_total <= 0 && bbs.batch_dnload_total <= 0 && file_area.upload_dir==undefined ) ); this.add( format_opt("|View",width,true) ,"V",width ); this.add( format_opt("|Settings",width,true) ,"S",width ); this.add(bottom_bar(width),undefined,undefined,"",""); this.timeout=100; this.callback=message_callback;}
var matches = []; for (var i = 0; i < this.length; i++) { if (test(this[i])) { matches[matches.length] = this[i];
var matches = []; var len = this.length; for (var i = 0; i < len; i++) { if (test(this[i])) { matches[matches.length] = this[i]; }
Array.prototype.filter = function(test) { var matches = []; for (var i = 0; i < this.length; i++) { if (test(this[i])) { matches[matches.length] = this[i]; } } return matches;};
} return matches; };
return matches; };
Array.prototype.filter = function(test) { var matches = []; for (var i = 0; i < this.length; i++) { if (test(this[i])) { matches[matches.length] = this[i]; } } return matches;};
if ($Element(el, 'hasClass', className)) found.push(el);
if (Element.prototype.hasClass.call(el, className)) found.push(el);
filterByClassName: function(className){ var found = []; this.each(function(el){ if ($Element(el, 'hasClass', className)) found.push(el); }); return found; },
dictTypes ['sc'] = true;
function filterTree (){ var eltMissing = document.getElementById ('missing'); var eltTodo = document.getElementById ('todo'); var eltExtra = document.getElementById ('extra'); var eltErrors = document.getElementById ('errors'); var dictTypes = new Object (); if (eltMissing.checked) dictTypes ['sm'] = true; if (eltTodo.checked) dictTypes ['st'] = true; if (eltErrors.checked) dictTypes ['se'] = true; if (eltExtra.checked) dictTypes ['sx'] = true; dictTypes ['sc'] = true; viewAll (document.getElementById ('ROOT'), dictTypes);}
f_resourceBundle._resources=undefined;
f_resourceBundle._Resources=undefined;
f_resourceBundle.Finalizer=function() { f_resourceBundle._resources=undefined;}
}
},
Finalizer: function() { f_locale._Instance=undefined; }
if($element == null) return null;
function find_class($element,$classnames,$result,$first) { if(!$first)$first=$element; if(!$result)$result=new Array(); if ($element.nodeType==1) { var $test_exp=new RegExp("(^| )("+$classnames+")( |$)"); if($test_exp.test($element.className)) $result[$result.length]=$element; } if ($element.hasChildNodes()) $result=find_class($element.firstChild,$classnames,$result,$first); if ($element.nextSibling && $element!=$first) $result=find_class($element.nextSibling,$classnames,$result,$first); return $result; }
var c;
var c, i, ok, n;
function find_config_w32(dirname){ if (!FSO.FolderExists(dirname)) { return; } var f = FSO.GetFolder(dirname); var fc = new Enumerator(f.SubFolders); var c; for (; !fc.atEnd(); fc.moveNext()) { c = FSO.BuildPath(fc.item(), "config.w32"); if (FSO.FileExists(c)) { //WScript.StdOut.WriteLine(c); modules += file_get_contents(c); } }}
modules += "configure_module_dirname = condense_path(FSO.GetParentFolderName('" + c.replace(new RegExp('(["\\\\])', "g"), '\\$1') + "'));\r\n";
function find_config_w32(dirname){ if (!FSO.FolderExists(dirname)) { return; } var f = FSO.GetFolder(dirname); var fc = new Enumerator(f.SubFolders); var c; for (; !fc.atEnd(); fc.moveNext()) { c = FSO.BuildPath(fc.item(), "config.w32"); if (FSO.FileExists(c)) { //WScript.StdOut.WriteLine(c); modules += file_get_contents(c); } }}
var re_dep_line = new RegExp("ADD_EXTENSION_DEP\\([^,]*\\s*,\\s*['\"]([^'\"]+)['\"]\\);", "gm");
var re_dep_line = new RegExp("ADD_EXTENSION_DEP\\([^,]*\\s*,\\s*['\"]([^'\"]+)['\"].*\\);", "gm");
function find_config_w32(dirname){ if (!FSO.FolderExists(dirname)) { return; } var f = FSO.GetFolder(dirname); var fc = new Enumerator(f.SubFolders); var c, i, ok, n; var item = null; var re_dep_line = new RegExp("ADD_EXTENSION_DEP\\([^,]*\\s*,\\s*['\"]([^'\"]+)['\"]\\);", "gm"); for (; !fc.atEnd(); fc.moveNext()) { ok = true; /* check if we already picked up a module with the same dirname; * if we have, don't include it here */ n = FSO.GetFileName(fc.item()); if (n == 'CVS' || n == 'tests') continue; // WScript.StdOut.WriteLine("checking " + dirname + "/" + n); if (MODULES.Exists(n)) { WScript.StdOut.WriteLine("Skipping " + dirname + "/" + n + " -- already have a module with that name"); continue; } c = FSO.BuildPath(fc.item(), "config.w32"); if (FSO.FileExists(c)) {// WScript.StdOut.WriteLine(c); var dir_line = "configure_module_dirname = condense_path(FSO.GetParentFolderName('" + c.replace(new RegExp('(["\\\\])', "g"), '\\$1') + "'));\r\n"; var contents = file_get_contents(c); var deps = new Array(); // parse out any deps from the file var calls = contents.match(re_dep_line); if (calls != null) { for (i = 0; i < calls.length; i++) { // now we need the extension name out of this thing if (calls[i].match(re_dep_line)) {// WScript.StdOut.WriteLine("n depends on " + RegExp.$1); deps[deps.length] = RegExp.$1; } } } item = new Module_Item(n, c, dir_line, deps, contents); MODULES.Add(n, item); } }}
WScript.StdOut.WriteLine(fc.item());
function find_cvsignore(dirname){ if (!FSO.FolderExists(dirname)) return; var f = FSO.GetFolder(dirname); var fc = new Enumerator(f.SubFolders); for (; !fc.atEnd(); fc.moveNext()) { WScript.StdOut.WriteLine(fc.item()); find_cvsignore(fc.item()); } if (FSO.FileExists(dirname + "\\.cvsignore")) { kill_from_cvsignore(dirname + "\\.cvsignore"); }}
element = Event.element(event); while (element.tagName.toUpperCase() != tagName.toUpperCase() && element.parentNode)
var element = Event.element(event); while (element.parentNode && (!element.tagName || (element.tagName.toUpperCase() != tagName.toUpperCase())))
findElement: function(event, tagName) { element = Event.element(event); while (element.tagName.toUpperCase() != tagName.toUpperCase() && element.parentNode) element = element.parentNode; return element; },
element = getDoc().getElementById(id);
var element = findElementByIdOrName(id);
function findElement(id) { element = getDoc().getElementById(id); if(element == null) { setRowFailed("Element not found", ERROR); } return element;}
throw new Error("Unrecognised locator type: '" + locatorType + "'");
throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'");
this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new Error("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); };
(!options.only || (Element.hasClassName(e, options.only))))
(!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
findElements: function(element, options) { if(!element.hasChildNodes()) return null; var elements = []; $A(element.childNodes).each( function(e) { if(e.tagName && e.tagName.toUpperCase()==options.tag.toUpperCase() && (!options.only || (Element.hasClassName(e, options.only)))) elements.push(e); if(options.tree) { var grandchildren = this.findElements(e, options); if(grandchildren) elements.push(grandchildren); } }); return (elements.length>0 ? elements.flatten() : null); },
if(!element.hasChildNodes()) return null; var elements = []; var only = options.only ? [options.only].flatten() : null; $A(element.childNodes).each( function(e) { if(e.tagName && e.tagName.toUpperCase()==options.tag.toUpperCase() && (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) elements.push(e); if(options.tree) { var grandchildren = this.findElements(e, options); if(grandchildren) elements.push(grandchildren); } }); return (elements.length>0 ? elements.flatten() : null);
return Element.findChildren( element, options.only, options.tree ? true : false, options.tag);
findElements: function(element, options) { if(!element.hasChildNodes()) return null; var elements = []; var only = options.only ? [options.only].flatten() : null; $A(element.childNodes).each( function(e) { if(e.tagName && e.tagName.toUpperCase()==options.tag.toUpperCase() && (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) elements.push(e); if(options.tree) { var grandchildren = this.findElements(e, options); if(grandchildren) elements.push(grandchildren); } }); return (elements.length>0 ? elements.flatten() : null); },
if(e.tagName && e.tagName==options.tag.toUpperCase() &&
if(e.tagName && e.tagName.toUpperCase()==options.tag.toUpperCase() &&
findElements: function(element, options) { if(!element.hasChildNodes()) return null; var elements = []; $A(element.childNodes).each( function(e) { if(e.tagName && e.tagName==options.tag.toUpperCase() && (!options.only || (Element.hasClassName(e, options.only)))) elements.push(e); if(options.tree) { var grandchildren = this.findElements(e, options); if(grandchildren) elements.push(grandchildren); } }); return (elements.length>0 ? elements.flatten() : null); },
return element.type != 'hidden' && !element.disabled &&
return element.type != 'hidden' && element.type != 'submit' && !element.disabled &&
findFirstElement: function(form) { return Form.getElements(form).find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); }); },
var last_token_pos = -1;
var lastTokenPos = -1;
findLastToken: function() { var last_token_pos = -1; for (var i=0; i<this.options.tokens.length; i++) { var this_token_pos = this.element.value.lastIndexOf(this.options.tokens[i]); if (this_token_pos > last_token_pos) last_token_pos = this_token_pos; } return last_token_pos; }
var this_token_pos = this.element.value.lastIndexOf(this.options.tokens[i]); if (this_token_pos > last_token_pos) last_token_pos = this_token_pos;
var thisTokenPos = this.element.value.lastIndexOf(this.options.tokens[i]); if (thisTokenPos > lastTokenPos) lastTokenPos = thisTokenPos;
findLastToken: function() { var last_token_pos = -1; for (var i=0; i<this.options.tokens.length; i++) { var this_token_pos = this.element.value.lastIndexOf(this.options.tokens[i]); if (this_token_pos > last_token_pos) last_token_pos = this_token_pos; } return last_token_pos; }
return last_token_pos;
return lastTokenPos;
findLastToken: function() { var last_token_pos = -1; for (var i=0; i<this.options.tokens.length; i++) { var this_token_pos = this.element.value.lastIndexOf(this.options.tokens[i]); if (this_token_pos > last_token_pos) last_token_pos = this_token_pos; } return last_token_pos; }
throw new Error("Option with value '" + this.value + "' not found");
throw new SeleniumError("Option with value '" + this.value + "' not found");
this.findOption = function(element) { for (var i = 0; i < element.options.length; i++) { if (this.patternMatcher.matches(this.value, element.options[i].value)) { return element.options[i]; } } throw new Error("Option with value '" + this.value + "' not found"); };
curleft += obj.offsetLeft
curleft += obj.offsetLeft;
function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) { curleft += obj.x; } return curleft;}
curtop += obj.offsetTop
curtop += obj.offsetTop;
function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) { curtop += obj.y; } return curtop;}
this.element.style.backgroundImage = this.oldBgImage;
finish: function() { this.element.style.backgroundColor = this.options.restorecolor; }
if(this.oldBgImage) this.element.style.backgroundImage = this.oldBgImage;
this.element.style.backgroundImage = this.oldBgImage;
finish: function() { this.element.style.backgroundColor = this.options.restorecolor; if(this.oldBgImage) this.element.style.backgroundImage = this.oldBgImage; }
this.addLinksToResults();
finish: function(status, summary) { if (!this.log) return; this.lastLogLine.className = status; this.statusCell.innerHTML = status; this.messageCell.innerHTML = this._toHTML(summary); },
this.element.style.backgroundImage = this.oldBgImage;
if(this.oldBgImage) this.element.style.backgroundImage = this.oldBgImage;
finish: function() { this.element.style.backgroundColor = this.options.restorecolor; this.element.style.backgroundImage = this.oldBgImage; }
if(this.options.ghosting) { Position.relativize(this.element); Element.remove(this._clone); this._clone = null; }
finishDrag: function(event, success) { this.active = false; this.dragging = false; if(success) Droppables.fire(event, this.element); Draggables.notify('onEnd', this); var revert = this.options.revert; if(revert && typeof revert == 'function') revert = revert(this.element); if(this.options.ghosting) { Position.relativize(this.element); Element.remove(this._clone); this._clone = null; } if(revert && this.options.reverteffect) { this.options.reverteffect(this.element, this.currentTop()-this.originalTop, this.currentLeft()-this.originalLeft); } else { this.originalLeft = this.currentLeft(); this.originalTop = this.currentTop(); } this.element.style.zIndex = this.originalZ; if(this.options.endeffect) this.options.endeffect(this.element); Droppables.reset(); },
this.element.style.zIndex = this.originalZ;
if(this.options.zindex) this.element.style.zIndex = this.originalZ;
finishDrag: function(event, success) { // this.unregisterEvents(); this.active = false; this.dragging = false; if(this.options.ghosting) { Position.relativize(this.element); Element.remove(this._clone); this._clone = null; } if(success) Droppables.fire(event, this.element); Draggables.notify('onEnd', this); var revert = this.options.revert; if(revert && typeof revert == 'function') revert = revert(this.element); if(revert && this.options.reverteffect) { this.options.reverteffect(this.element, this.currentTop()-this.originalTop, this.currentLeft()-this.originalLeft); } else { this.originalLeft = this.currentLeft(); this.originalTop = this.currentTop(); } this.element.style.zIndex = this.originalZ; if(this.options.endeffect) this.options.endeffect(this.element); Droppables.reset(); },
if(this.options.ghosting) { Position.relativize(this.element); Element.remove(this._clone); this._clone = null; }
finishDrag: function(event, success) { this.active = false; this.dragging = false; if(success) Droppables.fire(event, this.element); Draggables.notify('onEnd', this); var revert = this.options.revert; if(revert && typeof revert == 'function') revert = revert(this.element); if(revert && this.options.reverteffect) { this.options.reverteffect(this.element, this.currentTop()-this.originalTop, this.currentLeft()-this.originalLeft); } else { this.originalLeft = this.currentLeft(); this.originalTop = this.currentTop(); } this.element.style.zIndex = this.originalZ; if(this.options.endeffect) this.options.endeffect(this.element); Droppables.reset(); },
this.element.style.zIndex = this.originalZ;
if(this.options.zindex) this.element.style.zIndex = this.originalZ;
finishDrag: function(event, success) { this.active = false; this.dragging = false; if(success) Droppables.fire(event, this.element); Draggables.notify('onEnd', this); var revert = this.options.revert; if(revert && typeof revert == 'function') revert = revert(this.element); if(revert && this.options.reverteffect) { this.options.reverteffect(this.element, this.currentTop()-this.originalTop, this.currentLeft()-this.originalLeft); } else { this.originalLeft = this.currentLeft(); this.originalTop = this.currentTop(); } this.element.style.zIndex = this.originalZ; if(this.options.endeffect) this.options.endeffect(this.element); Droppables.reset(); },
this.unregisterEvents();
finishDrag: function(event, success) { this.unregisterEvents(); this.active = false; this.dragging = false; if(this.options.ghosting) { Position.relativize(this.element); Element.remove(this._clone); this._clone = null; } if(success) Droppables.fire(event, this.element); Draggables.notify('onEnd', this); var revert = this.options.revert; if(revert && typeof revert == 'function') revert = revert(this.element); if(revert && this.options.reverteffect) { this.options.reverteffect(this.element, this.currentTop()-this.originalTop, this.currentLeft()-this.originalLeft); } else { this.originalLeft = this.currentLeft(); this.originalTop = this.currentTop(); } this.element.style.zIndex = this.originalZ; if(this.options.endeffect) this.options.endeffect(this.element); Droppables.reset(); },
popupWindow.close();
if (popupWindow != null) { popupWindow.close(); }
function finishEPerson(){ selectAll(window.document.forms[0].eperson_id); popupWindow.close();}
refreshBufferList(g_cq_buffer_current);
refreshBufferList(g_cq_buffer_current, "finishImport");
function finishImport() { debug('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; debug("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; // if we timed out, try again if (theList.length < 1) { debug("no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); debug("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { theValue = unescape( (theList[i]).firstChild.nodeValue ); debug("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // leave the user in the same buffer refreshBufferList(g_cq_buffer_current); //clearTimeout(theTimeout); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
if (theList.length < 1) theTimeout = setTimeout('finishImport();', g_cq_timeout);
if (theList.length < 1) { debug("no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; }
function finishImport() { debug('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; debug("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; if (theList.length < 1) theTimeout = setTimeout('finishImport();', g_cq_timeout); clearTimeout(theTimeout); debug("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { theValue = unescape( (theList[i]).firstChild.nodeValue ); debug("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // leave the user in the same buffer refreshBufferList(g_cq_buffer_current); //clearTimeout(theTimeout); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
var theOutputDoc = null;
function finishImport() { debug('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; debug("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; // if we timed out, try again if (theList.length < 1) { debug("no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them debug("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("cqImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument;
if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } if (theOutputDoc == null) return; var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } var theTimeout = null; if (theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); if (is.gecko) { theOutputDoc.normalize(); } debug("finishImport: theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i].firstChild == null) continue; theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true);
function finishImport() { debug('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; debug("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; // if we timed out, try again if (theList.length < 1) { debug("no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them debug("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("cqImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } var theTimeout = null; if (theList.length < 1) { debug("no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout);
refreshBufferList(g_cq_buffer_current, "finishImport");
function finishImport() { debug('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; debug("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; // if we timed out, try again if (theList.length < 1) { debug("no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them debug("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("cqImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>';
function finishImport() { debug('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; debug("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; // if we timed out, try again if (theList.length < 1) { debug("no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them debug("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("cqImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
debug("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i].firstChild == null) continue; theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("cqImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); } }
submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");
function finishImport() { debug('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; debug("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; // if we timed out, try again if (theList.length < 1) { debug("no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them debug("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("cqImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
debug('finishImport: checking for output');
debug.print('finishImport: checking for output');
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug("finishImport: theOutput = " + theOutput);
debug.print("finishImport: theOutput = " + theOutput);
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug("finishImport: ie, using XMLDocument");
debug.print("finishImport: ie, using XMLDocument");
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug("finishImport: no list: setting new timeout " + g_cq_timeout);
debug.print("finishImport: no list: setting new timeout = " + g_cq_timeout);
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
return null;
return;
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug("finishImport: gecko workaround");
debug.print("finishImport: normalizing for gecko workaround");
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length);
debug.print("finishImport: theList = " + theList.length);
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue);
debug.print("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue.substr(0, 16));
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug("finishImport: null historyNode");
debug.print("finishImport: null historyNode");
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
saveQueryHistory(theValue, true);
saveQueryHistory(theValue, true, false);
function finishImport() { debug('finishImport: checking for output'); var theOutput = getResultFrame(); debug("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug("finishImport: no list: setting new timeout " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return null; } clearTimeout(theTimeout); // TODO if the imported worksheet has rows/cols attributes, use them if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug("finishImport: gecko workaround"); theOutputDoc.normalize(); } debug("finishImport: theList = " + theList.innerHTML + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug('finishImport');
function finishImport() { //alert('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; //alert("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; if (theList.length < 1) theTimeout = setTimeout('finishImport();', g_cq_timeout); clearTimeout(theTimeout); //alert("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { theValue = unescape( (theList[i]).firstChild.nodeValue ); //alert("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // leave the user in the same buffer refreshBufferList(g_cq_buffer_current); //clearTimeout(theTimeout); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
debug("theOutput = " + theOutput);
function finishImport() { //alert('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; //alert("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; if (theList.length < 1) theTimeout = setTimeout('finishImport();', g_cq_timeout); clearTimeout(theTimeout); //alert("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { theValue = unescape( (theList[i]).firstChild.nodeValue ); //alert("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // leave the user in the same buffer refreshBufferList(g_cq_buffer_current); //clearTimeout(theTimeout); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
debug("theList = " + theList + ", length = " + theList.length);
function finishImport() { //alert('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; //alert("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; if (theList.length < 1) theTimeout = setTimeout('finishImport();', g_cq_timeout); clearTimeout(theTimeout); //alert("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { theValue = unescape( (theList[i]).firstChild.nodeValue ); //alert("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // leave the user in the same buffer refreshBufferList(g_cq_buffer_current); //clearTimeout(theTimeout); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
debug("i = " + i + ", " + theValue);
function finishImport() { //alert('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; //alert("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; if (theList.length < 1) theTimeout = setTimeout('finishImport();', g_cq_timeout); clearTimeout(theTimeout); //alert("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { theValue = unescape( (theList[i]).firstChild.nodeValue ); //alert("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // leave the user in the same buffer refreshBufferList(g_cq_buffer_current); //clearTimeout(theTimeout); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
submitForm(document.getElementById(g_cq_query_form),
submitForm(document.getElementById(g_cq_query_form_id),
function finishImport() { //alert('finishImport'); var theOutput = getResultFrame(); var theOutputDoc = null; //alert("theOutput = " + theOutput); if (theOutput) { if (is.ie) { theOutputDoc = theOutput.contentWindow.document; } else { theOutputDoc = theOutput.contentDocument; } if (theOutputDoc) { var theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); if (is.ie && theOutputDoc.XMLDocument) { theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } // is.ie var theTimeout = null; if (theList.length < 1) theTimeout = setTimeout('finishImport();', g_cq_timeout); clearTimeout(theTimeout); //alert("theList = " + theList + ", length = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { theValue = unescape( (theList[i]).firstChild.nodeValue ); //alert("i = " + i + ", " + theValue); getBuffer(i).value = theValue; } // for theList // leave the user in the same buffer refreshBufferList(g_cq_buffer_current); //clearTimeout(theTimeout); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form), theQuery, "text/html"); } // if theOutputDoc } // if theOutput} // finishImport
saveQueryHistory(theValue, true, false);
saveQueryHistory(theValue, false);
function finishImport() { debug.print('finishImport: checking for output'); var theOutput = getResultFrame(); debug.print("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug.print("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug.print("finishImport: no list: setting new timeout = " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return; } clearTimeout(theTimeout); // TODO use rows, cols from imported worksheet, if present if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug.print("finishImport: normalizing for gecko workaround"); theOutputDoc.normalize(); } debug.print("finishImport: theList = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug.print("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue.substr(0, 16)); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug.print("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); saveQueryHistory(theValue, true, false); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
debug.print("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename);
debug.print("finishImport: ie, using XMLDocument = " + theOutputDoc.XMLDocument); theOutputDoc = theOutputDoc.XMLDocument; } if (theOutputDoc.getElementsByTagName(g_cq_buffers_area_id).length < 1) { retry = true;
function finishImport() { debug.print('finishImport: checking for output'); var theOutput = getResultFrame(); debug.print("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug.print("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug.print("finishImport: no list: setting new timeout = " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return; } clearTimeout(theTimeout); // TODO use rows, cols from imported worksheet, if present if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug.print("finishImport: normalizing for gecko workaround"); theOutputDoc.normalize(); } debug.print("finishImport: theList = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug.print("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue.substr(0, 16)); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug.print("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); // set checkFlag false, to speed up imports saveQueryHistory(theValue, false); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
if (theList == null || theList.length < 1) { debug.print("finishImport: no list: setting new timeout = "
if (retry) { debug.print("finishImport: retrying with new timeout = "
function finishImport() { debug.print('finishImport: checking for output'); var theOutput = getResultFrame(); debug.print("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug.print("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug.print("finishImport: no list: setting new timeout = " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return; } clearTimeout(theTimeout); // TODO use rows, cols from imported worksheet, if present if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug.print("finishImport: normalizing for gecko workaround"); theOutputDoc.normalize(); } debug.print("finishImport: theList = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug.print("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue.substr(0, 16)); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug.print("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); // set checkFlag false, to speed up imports saveQueryHistory(theValue, false); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
if (theList.length < 1) { var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>Sorry, but ' + theUri + ' was empty</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html"); }
function finishImport() { debug.print('finishImport: checking for output'); var theOutput = getResultFrame(); debug.print("finishImport: theOutput = " + theOutput); if (theOutput == null) return; var theOutputDoc = theOutput.contentDocument; if (is.ie) theOutputDoc = theOutput.contentWindow.document; // no document? no results... if (theOutputDoc == null) return; // now check for buffers var theList = null; if (is.ie && theOutputDoc.XMLDocument) { debug.print("finishImport: ie, using XMLDocument"); theList = theOutputDoc.XMLDocument.getElementsByTagName (g_cq_buffer_basename); } else { theList = theOutputDoc.getElementsByTagName(g_cq_buffer_basename); } // if we timed out, try again var theTimeout = null; if (theList == null || theList.length < 1) { debug.print("finishImport: no list: setting new timeout = " + g_cq_timeout); theTimeout = setTimeout('finishImport();', g_cq_timeout); return; } clearTimeout(theTimeout); // TODO use rows, cols from imported worksheet, if present if (is.gecko) { // gecko has a problem with nodeValue longer than 4kB (encoded): // it creates multiple text-node children. // this is a DOM violation, but won't be fixed for some time. // see https://bugzilla.mozilla.org/show_bug.cgi?id=194231 // workaround: call normalize() early debug.print("finishImport: normalizing for gecko workaround"); theOutputDoc.normalize(); } debug.print("finishImport: theList = " + theList.length); var theValue = null; for (var i = 0; i < theList.length; i++) { if (theList[i] == null || theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); debug.print("finishImport: buffer i = " + i + ", " + theValue.length + ": " + theValue.substr(0, 16)); getBuffer(i).value = theValue; } // for theList // import query history too, by appending //clearQueryHistory(); var historyNode = document.getElementById(g_cq_history_node); if (! historyNode) { debug.print("finishImport: null historyNode"); } else { var theList = theOutputDoc.getElementsByTagName(g_cq_history_basename); for (var i = 0; i < theList.length ; i++) { if (g_cq_history_limit != null && i > g_cq_history_limit) break; if (theList[i].firstChild == null) continue; // TODO remove decode if encode isn't needed? theValue = decodeURIComponent( (theList[i]).firstChild.nodeValue ); // set checkFlag false, to speed up imports saveQueryHistory(theValue, false); } } // leave the user in the same buffer refreshBufferList(g_cq_buffer_current, "finishImport"); var theUri = document.getElementById(g_cq_uri).value; var theQuery = '<p>' + theUri + ' imported</p>'; submitForm(document.getElementById(g_cq_query_form_id), theQuery, "text/html");} // finishImport
this.last_active.onDrop(element, this.last_active.element);
this.last_active.onDrop(element, this.last_active.element, event);
fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.isAffected(Event.pointerX(event), Event.pointerY(event), element, this.last_active)) if (this.last_active.onDrop) this.last_active.onDrop(element, this.last_active.element); },
if(this.include_scroll_offsets) Position.prepare();
Position.prepare();
fire: function(event, element) { if(!this.drops) return; var pX = Event.pointerX(event); var pY = Event.pointerY(event); if(this.include_scroll_offsets) Position.prepare(); var i = this.drops.length-1; do { var drop = this.drops[i]; if(this.is_affected(pX, pY, element, drop)) if(drop.droppable.onDrop) drop.droppable.onDrop(element); } while (i--); },
if (this.is_affected(Event.pointerX(event), Event.pointerY(event), element, this.last_active))
if (this.isAffected(Event.pointerX(event), Event.pointerY(event), element, this.last_active))
fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.is_affected(Event.pointerX(event), Event.pointerY(event), element, this.last_active)) if (this.last_active.onDrop) this.last_active.onDrop(element, this.last_active); },
this.last_active.onDrop(element, this.last_active);
this.last_active.onDrop(element, this.last_active.element, event);
fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.is_affected(Event.pointerX(event), Event.pointerY(event), element, this.last_active)) if (this.last_active.onDrop) this.last_active.onDrop(element, this.last_active); },
this.last_active.onDrop(element, this.last_active);
this.last_active.onDrop(element, this.last_active.element);
fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.isAffected(Event.pointerX(event), Event.pointerY(event), element, this.last_active)) if (this.last_active.onDrop) this.last_active.onDrop(element, this.last_active); },
for (var fn in this.events[type]){ if (this.events[type][fn]) this.events[type][fn].apply(this, args || []); }
this.events[type].keys.each(function(fn){ fn.apply(this, args || []); }, this);
fireEvent: function(type, args){ if (this.events && this.events[type]){ args = args || []; if ($type(args) != 'array') args = [args]; for (var fn in this.events[type]){ if (this.events[type][fn]) this.events[type][fn].apply(this, args || []); } } },
fn.apply(this, args || []);
fn.apply(this, args);
fireEvent: function(type, args){ if (this.events && this.events[type]){ args = args || []; if ($type(args) != 'array') args = [args]; this.events[type].keys.each(function(fn){ fn.apply(this, args || []); }, this); } },
if (this.events[type][fn]) this.events[type][fn].apply(this, args);
if (this.events[type][fn]) this.events[type][fn].apply(this, args || []);
fireEvent: function(type, args){ if (!this.events || !this.events[type]) return; for (var fn in this.events[type]){ if (this.events[type][fn]) this.events[type][fn].apply(this, args); } },
if (!this.events || !this.events[type]) return; for (var fn in this.events[type]){ if (this.events[type][fn]) this.events[type][fn].apply(this, args || []);
if (this.events && this.events[type]){ for (var fn in this.events[type]){ if (this.events[type][fn]) this.events[type][fn].apply(this, args || []); }
fireEvent: function(type, args){ if (!this.events || !this.events[type]) return; for (var fn in this.events[type]){ if (this.events[type][fn]) this.events[type][fn].apply(this, args || []); } },
args = args || []; if ($type(args) != 'array') args = [args];
fireEvent: function(type, args){ if (this.events && this.events[type]){ for (var fn in this.events[type]){ if (this.events[type][fn]) this.events[type][fn].apply(this, args || []); } } },
var nl, i, a, n, xsrc, xhref, el;
var xsrc, xhref;
fixGeckoBaseHREFBug : function(m, e, h) { var nl, i, a, n, xsrc, xhref, el; if (tinyMCE.isGecko) { if (m == 1) { h = h.replace(/\ssrc=/gi, " mce_tsrc="); h = h.replace(/\shref=/gi, " mce_thref="); return h; } else { el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link'); for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]); for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_tsrc"); } if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_thref"); } } } el = tinyMCE.selectNodes(e, function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src="); n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href="); } return false; }); } } return h; },
el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link');
if (!new RegExp('(src|href)=', 'g').test(h)) return h;
fixGeckoBaseHREFBug : function(m, e, h) { var nl, i, a, n, xsrc, xhref, el; if (tinyMCE.isGecko) { if (m == 1) { h = h.replace(/\ssrc=/gi, " mce_tsrc="); h = h.replace(/\shref=/gi, " mce_thref="); return h; } else { el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link'); for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]); for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_tsrc"); } if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_thref"); } } } el = tinyMCE.selectNodes(e, function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src="); n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href="); } return false; }); } } return h; },
for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]);
tinyMCE.selectElements(e, 'A,IMG,SELECT,AREA,IFRAME,BASE,INPUT,SCRIPT,EMBED,OBJECT,LINK', function (n) { xsrc = tinyMCE.getAttrib(n, "mce_tsrc"); xhref = tinyMCE.getAttrib(n, "mce_thref");
fixGeckoBaseHREFBug : function(m, e, h) { var nl, i, a, n, xsrc, xhref, el; if (tinyMCE.isGecko) { if (m == 1) { h = h.replace(/\ssrc=/gi, " mce_tsrc="); h = h.replace(/\shref=/gi, " mce_thref="); return h; } else { el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link'); for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]); for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_tsrc"); } if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_thref"); } } } el = tinyMCE.selectNodes(e, function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src="); n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href="); } return false; }); } } return h; },
for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { } n[i].removeAttribute("mce_tsrc");
if (xsrc != "") { try { n.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) {
fixGeckoBaseHREFBug : function(m, e, h) { var nl, i, a, n, xsrc, xhref, el; if (tinyMCE.isGecko) { if (m == 1) { h = h.replace(/\ssrc=/gi, " mce_tsrc="); h = h.replace(/\shref=/gi, " mce_thref="); return h; } else { el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link'); for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]); for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_tsrc"); } if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_thref"); } } } el = tinyMCE.selectNodes(e, function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src="); n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href="); } return false; }); } } return h; },
if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { }
n.removeAttribute("mce_tsrc"); }
fixGeckoBaseHREFBug : function(m, e, h) { var nl, i, a, n, xsrc, xhref, el; if (tinyMCE.isGecko) { if (m == 1) { h = h.replace(/\ssrc=/gi, " mce_tsrc="); h = h.replace(/\shref=/gi, " mce_thref="); return h; } else { el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link'); for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]); for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_tsrc"); } if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_thref"); } } } el = tinyMCE.selectNodes(e, function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src="); n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href="); } return false; }); } } return h; },
n[i].removeAttribute("mce_thref");
if (xhref != "") { try { n.href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) {
fixGeckoBaseHREFBug : function(m, e, h) { var nl, i, a, n, xsrc, xhref, el; if (tinyMCE.isGecko) { if (m == 1) { h = h.replace(/\ssrc=/gi, " mce_tsrc="); h = h.replace(/\shref=/gi, " mce_thref="); return h; } else { el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link'); for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]); for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_tsrc"); } if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_thref"); } } } el = tinyMCE.selectNodes(e, function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src="); n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href="); } return false; }); } } return h; },
}
fixGeckoBaseHREFBug : function(m, e, h) { var nl, i, a, n, xsrc, xhref, el; if (tinyMCE.isGecko) { if (m == 1) { h = h.replace(/\ssrc=/gi, " mce_tsrc="); h = h.replace(/\shref=/gi, " mce_thref="); return h; } else { el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link'); for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]); for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_tsrc"); } if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_thref"); } } } el = tinyMCE.selectNodes(e, function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src="); n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href="); } return false; }); } } return h; },
el = tinyMCE.selectNodes(e, function(n) {
return false; }); tinyMCE.selectNodes(e, function(n) {
fixGeckoBaseHREFBug : function(m, e, h) { var nl, i, a, n, xsrc, xhref, el; if (tinyMCE.isGecko) { if (m == 1) { h = h.replace(/\ssrc=/gi, " mce_tsrc="); h = h.replace(/\shref=/gi, " mce_thref="); return h; } else { el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link'); for (a=0; a<el.length; a++) { n = e.getElementsByTagName(el[a]); for (i=0; i<n.length; i++) { xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc"); xhref = tinyMCE.getAttrib(n[i], "mce_thref"); if (xsrc != "") { try { n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_tsrc"); } if (xhref != "") { try { n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref); } catch (e) { // Ignore, Firefox cast exception if local file wasn't found } n[i].removeAttribute("mce_thref"); } } } el = tinyMCE.selectNodes(e, function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src="); n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href="); } return false; }); } } return h; },
Position.clone(this.update, this.iefix);
Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
fixIEOverlapping: function() { Position.clone(this.update, this.iefix); this.iefix.style.zIndex = 1; this.update.style.zIndex = 2; Element.show(this.iefix); },
return array.concat(value.constructor == Array ?
return array.concat(value && value.constructor == Array ?
flatten: function() { return this.inject([], function(array, value) { return array.concat(value.constructor == Array ? value.flatten() : [value]); }); },
return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random(0.25);
return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
Effect.Transitions.flicker = function(pos) { return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random(0.25);}
if (document.forms[0] && document.forms[0].elements["faqusername"]) { document.forms[0].elements["faqusername"].focus();
if (document.getElementById('faqusername')) { document.getElementById('faqusername').focus();
function focusOnUsernameField(){ if (document.forms[0] && document.forms[0].elements["faqusername"]) { document.forms[0].elements["faqusername"].focus(); }}
textAreaFocus();
setLineNumberStatus();
function focusQueryInput() { var t = getBuffer(); if (!t) return; t.focus(); textAreaFocus();}
new Effect.Scale(element, 5, {
new Effect.Scale(element, 5, Object.extend({
Effect.Fold = function(element) { $(element).style.overflow = 'hidden'; new Effect.Scale(element, 5, { scaleContent: false, scaleTo: 100, scaleX: false, afterFinish: function(effect) { new Effect.Scale(element, 1, { scaleContent: false, scaleTo: 0, scaleY: false, afterFinish: function(effect) { Element.hide(effect.element) } }); }}.extend(arguments[1] || {}));}
}}.extend(arguments[1] || {}));
}}, arguments[1] || {}));
Effect.Fold = function(element) { $(element).style.overflow = 'hidden'; new Effect.Scale(element, 5, { scaleContent: false, scaleTo: 100, scaleX: false, afterFinish: function(effect) { new Effect.Scale(element, 1, { scaleContent: false, scaleTo: 0, scaleY: false, afterFinish: function(effect) { Element.hide(effect.element) } }); }}.extend(arguments[1] || {}));}
new Effect2.Scale(element, 5, {
new Effect.Scale(element, 5, {
Effect.Fold = function(element) { $(element).style.overflow = 'hidden'; new Effect2.Scale(element, 5, { scaleContent: false, scaleTo: 100, scaleX: false, afterFinish: function(effect) { new Effect.Scale(element, 1, { scaleContent: false, scaleTo: 0, scaleY: false, afterFinish: function(effect) { Element.hide(effect.element) } }); }}.extend(arguments[1] || {}));}
}
};
Effect.Fold = function(element) { element = $(element); var oldStyle = { top: element.style.top, left: element.style.left, width: element.style.width, height: element.style.height }; Element.makeClipping(element); return new Effect.Scale(element, 5, Object.extend({ scaleContent: false, scaleX: false, afterFinishInternal: function(effect) { new Effect.Scale(element, 1, { scaleContent: false, scaleY: false, afterFinishInternal: function(effect) { effect.element.hide(); effect.element.undoClipping(); effect.element.setStyle(oldStyle); } }); }}, arguments[1] || {}));}
$(element).style.overflow = 'hidden';
element = $(element); element.style.overflow = 'hidden';
Effect.Fold = function(element) { $(element).style.overflow = 'hidden'; return new Effect.Scale(element, 5, Object.extend({ scaleContent: false, scaleTo: 100, scaleX: false, afterFinish: function(effect) { new Effect.Scale(element, 1, { scaleContent: false, scaleTo: 0, scaleY: false, afterFinish: function(effect) { Element.hide(effect.element) } }); }}, arguments[1] || {}));}
$(element).style.overflow = 'hidden'; new Effect.Scale(element, 5, Object.extend({ scaleContent: false, scaleTo: 100, scaleX: false, afterFinish: function(effect) { new Effect.Scale(element, 1, { scaleContent: false, scaleTo: 0, scaleY: false, afterFinish: function(effect) { Element.hide(effect.element) } }); }}, arguments[1] || {}));
element = $(element); var originalTop = element.style.top; var originalLeft = element.style.left; var originalWidth = element.style.width; var originalHeight = element.style.height; Element.makeClipping(element); return new Effect.Scale(element, 5, Object.extend({ scaleContent: false, scaleX: false, afterFinishInternal: function(effect) { new Effect.Scale(element, 1, { scaleContent: false, scaleY: false, afterFinishInternal: function(effect) { Element.hide(effect.element); Element.undoClipping(effect.element); effect.element.style.top = originalTop; effect.element.style.left = originalLeft; effect.element.style.width = originalWidth; effect.element.style.height = originalHeight; } }); }}, arguments[1] || {}));
Effect.Fold = function(element) { $(element).style.overflow = 'hidden'; new Effect.Scale(element, 5, Object.extend({ scaleContent: false, scaleTo: 100, scaleX: false, afterFinish: function(effect) { new Effect.Scale(element, 1, { scaleContent: false, scaleTo: 0, scaleY: false, afterFinish: function(effect) { Element.hide(effect.element) } }); }}, arguments[1] || {}));}
ICONPATH = '/lenya/lenya/images/tree/';
ICONPATH = CONTEXT_PREFIX + '/lenya/images/tree/';
function Folder(folderDescription, hreference) //constructor { //constant data ICONPATH = '/lenya/lenya/images/tree/'; this.desc = folderDescription; this.hreference = hreference; this.id = -1; this.navObj = 0; this.iconImg = 0; this.nodeImg = 0; this.isLastNode = 0; this.iconSrc = ICONPATH + "ftv2folderopen.gif"; this.iconSrcClosed = ICONPATH + "ftv2folderclosed.gif"; this.children = new Array; this.nChildren = 0; this.level = 0; this.leftSideCoded = ""; this.isLastNode=false; this.parentObj = null; this.maySelect=true; this.prependHTML = "" //dynamic data this.isOpen = false this.isLastOpenedFolder = false this.isRendered = 0 //methods this.initialize = initializeFolder this.setState = setStateFolder this.addChild = addChild this.createIndex = createEntryIndex this.escondeBlock = escondeBlock this.esconde = escondeFolder this.folderMstr = folderMstr this.renderOb = drawFolder this.totalHeight = totalHeight this.subEntries = folderSubEntries this.linkHTML = linkFolderHTML this.blockStartHTML = blockStartHTML this.blockEndHTML = blockEndHTML this.nodeImageSrc = nodeImageSrc this.iconImageSrc = iconImageSrc this.getID = getID this.forceOpeningOfAncestorFolders = forceOpeningOfAncestorFolders}
this.iconSrc = ICONPATH + "ftv2folderopen.gif"; this.iconSrcClosed = ICONPATH + "ftv2folderclosed.gif";
this.iconSrc = ICONPATH + ""; this.iconSrcClosed = ICONPATH + "";
function Folder(folderDescription, hreference) //constructor { //constant data this.desc = folderDescription; this.hreference = hreference; this.id = -1; this.navObj = 0; this.iconImg = 0; this.nodeImg = 0; this.isLastNode = 0; this.iconSrc = ICONPATH + "ftv2folderopen.gif"; this.iconSrcClosed = ICONPATH + "ftv2folderclosed.gif"; this.children = new Array; this.nChildren = 0; this.level = 0; this.leftSideCoded = ""; this.isLastNode=false; this.parentObj = null; this.maySelect=true; this.prependHTML = "" //dynamic data this.isOpen = false this.isLastOpenedFolder = false this.isRendered = 0 //methods this.initialize = initializeFolder this.setState = setStateFolder this.addChild = addChild this.createIndex = createEntryIndex this.escondeBlock = escondeBlock this.esconde = escondeFolder this.folderMstr = folderMstr this.renderOb = drawFolder this.totalHeight = totalHeight this.subEntries = folderSubEntries this.linkHTML = linkFolderHTML this.blockStartHTML = blockStartHTML this.blockEndHTML = blockEndHTML this.nodeImageSrc = nodeImageSrc this.iconImageSrc = iconImageSrc this.getID = getID this.forceOpeningOfAncestorFolders = forceOpeningOfAncestorFolders}
function forcePlugIn() { return lookForToken("ForceJavaPlugIn"); }
function forcePlugIn() { return lookForToken("ForceJavaPlugIn", true); }
function forcePlugIn() { return lookForToken("ForceJavaPlugIn"); }
var n = document.createTextNode(' '); $(element).appendChild(n); Element.remove(n);
try { element = $(element); var n = document.createTextNode(' '); element.appendChild(n); element.removeChild(n); } catch(e) {}
Element.forceRerendering = function(element) { var n = document.createTextNode(' '); $(element).appendChild(n); Element.remove(n);}
handler.handleWindow(browsers[i].contentWindow);
callForWindow(handler, browsers[i].contentWindow);
function forEachBrowser(handler) { log.debug("forEachBrowser"); var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); var e = wm.getEnumerator("navigator:browser"); var window; var browsers; var i; while (e.hasMoreElements()) { window = e.getNext(); log.debug("window=" + window); browsers = window.getBrowser().browsers; for (i = 0; i < browsers.length; i++) { log.debug("browser=" + browsers[i]); handler.handleWindow(browsers[i].contentWindow); } } }
testText = testText.replace(/\$\{encoding\}/g, options["global.encoding"]);
function format(testCase, name, saveHeaderAndFooter, useDefaultHeaderAndFooter) { var text; var commandsText = ""; var testText; var i; for (i = 0; i < testCase.commands.length; i++) { var text = getSourceForCommand(testCase.commands[i]); commandsText = commandsText + text; } var testText; if (testCase.header == null || testCase.footer == null || useDefaultHeaderAndFooter) { testText = options.testTemplate; testText = testText.replace(/\$\{name\}/g, name); var commandsIndex = testText.indexOf("${commands}"); if (commandsIndex >= 0) { var header = testText.substr(0, commandsIndex); var footer = testText.substr(commandsIndex + "${commands}".length); testText = header + commandsText + footer; if (saveHeaderAndFooter) { testCase.header = header; testCase.footer = footer; } } } else { testText = testCase.header + commandsText + testCase.footer; } return testText;}
function format(testCase, name, saveHeaderAndFooter) {
function format(testCase, name, saveHeaderAndFooter, useDefaultHeaderAndFooter) {
function format(testCase, name, saveHeaderAndFooter) { var text; var commandsText = ""; var testText; var i; for (i = 0; i < testCase.commands.length; i++) { var text = getSourceForCommand(testCase.commands[i]); commandsText = commandsText + text; } var testText; if (testCase.header == null || testCase.footer == null) { testText = options.testTemplate; testText = testText.replace(/\$\{name\}/g, name); var commandsIndex = testText.indexOf("${commands}"); if (commandsIndex >= 0) { var header = testText.substr(0, commandsIndex); var footer = testText.substr(commandsIndex + "${commands}".length); testText = header + commandsText + footer; if (saveHeaderAndFooter) { testCase.header = header; testCase.footer = footer; } } } else { testText = testCase.header + commandsText + testCase.footer; } return testText;}
if (testCase.header == null || testCase.footer == null) {
if (testCase.header == null || testCase.footer == null || useDefaultHeaderAndFooter) {
function format(testCase, name, saveHeaderAndFooter) { var text; var commandsText = ""; var testText; var i; for (i = 0; i < testCase.commands.length; i++) { var text = getSourceForCommand(testCase.commands[i]); commandsText = commandsText + text; } var testText; if (testCase.header == null || testCase.footer == null) { testText = options.testTemplate; testText = testText.replace(/\$\{name\}/g, name); var commandsIndex = testText.indexOf("${commands}"); if (commandsIndex >= 0) { var header = testText.substr(0, commandsIndex); var footer = testText.substr(commandsIndex + "${commands}".length); testText = header + commandsText + footer; if (saveHeaderAndFooter) { testCase.header = header; testCase.footer = footer; } } } else { testText = testCase.header + commandsText + testCase.footer; } return testText;}
if (command.command.match(/^(verify|assert)/)) { line = statement((def.negative ? assertFalse : assertTrue)(call));
if (command.command.match(/^assert/) || (this.assertOrVerifyFailureOnNext && command.command.match(/^verify/))) { line = (def.negative ? assertFalse : assertTrue)(call); } else if (command.command.match(/^verify/)) { line = (def.negative ? verifyFalse : verifyTrue)(call);
function formatCommand(command) { var line = null; if (command.type == 'command') { var def = command.getDefinition(); if (def && def.isAccessor) { var call = new CallSelenium(def.name); for (var i = 0; i < def.params.length; i++) { call.args.push(xlateArgument(command.getParameterAt(i))); } var extraArg = command.getParameterAt(def.params.length) if (def.name.match(/^is/)) { // isXXX if (command.command.match(/^(verify|assert)/)) { line = statement((def.negative ? assertFalse : assertTrue)(call)); } else if (command.command.match(/^store/)) { addDeclaredVar(extraArg); line = statement(assignToVariable('boolean', extraArg, call)); } else if (command.command.match(/^waitFor/)) { line = waitFor((def.negative ? not : is)(call)); } } else { // getXXX if (command.command.match(/^(verify|assert)/)) { var eq = seleniumEquals(def.returnType, extraArg, call); if (def.negative) eq = eq.invert(); var method = command.command.match(/^verify/) ? 'verify' : 'assert'; line = statement(eq[method]()); } else if (command.command.match(/^store/)) { addDeclaredVar(extraArg); line = statement(assignToVariable(def.returnType, extraArg, call)); } else if (command.command.match(/^waitFor/)) { var eq = seleniumEquals(def.returnType, extraArg, call); if (def.negative) eq = eq.invert(); line = waitFor(eq); } } } else if (this.pause && 'pause' == command.command) { line = pause(command.target); } else if (this.echo && 'echo' == command.command) { line = echo(command.target); } else if ('store' == command.command) { addDeclaredVar(command.value); line = statement(assignToVariable('String', command.value, xlateArgument(command.target))); } else if (command.command.match(/^(assert|verify)Selected$/)) { var optionLocator = command.value; var flavor = 'Label'; var value = optionLocator; var r = /^(index|label|value|id)=(.*)$/.exec(optionLocator); if (r) { flavor = r[1].replace(/^[a-z]/, function(str) { return str.toUpperCase() }); value = r[2]; } var method = command.command.match(/^verify/) ? 'verify' : 'assert'; var call = new CallSelenium("getSelected" + flavor); call.args.push(xlateArgument(command.target)); var eq = new Equals(xlateValue('String', value), call); line = statement(eq[method]()); } else if (def) { if (def.name.match(/^(assert|verify)(Error|Failure)OnNext$/)) { this.assertFailureOnNext = def.name.match(/^assert/); this.verifyFailureOnNext = def.name.match(/^verify/); } else { var call = new CallSelenium(def.name); for (var i = 0; i < def.params.length; i++) { call.args.push(xlateArgument(command.getParameterAt(i))); } line = statement(call); } } else { this.log.info("unknown command: <" + command.command + ">"); // TODO var call = new CallSelenium(command.command); if ((command.target != null && command.target.length > 0) || (command.value != null && command.value.length > 0)) { call.args.push(string(command.target)); if (command.value != null && command.value.length > 0) { call.args.push(string(command.value)); } } line = formatComment(new Comment(statement(call))); } } if (line && (this.assertFailureOnNext || this.verifyFailureOnNext)) { line = assertOrVerifyFailure(line, this.assertFailureOnNext); this.assertFailureOnNext = false; this.verifyFailureOnNext = false; } if (line) { return indent() + line; } else { return null; }}
line = waitFor((def.negative ? not : is)(call));
line = waitFor(def.negative ? call.invert() : call);
function formatCommand(command) { var line = null; if (command.type == 'command') { var def = command.getDefinition(); if (def && def.isAccessor) { var call = new CallSelenium(def.name); for (var i = 0; i < def.params.length; i++) { call.args.push(xlateArgument(command.getParameterAt(i))); } var extraArg = command.getParameterAt(def.params.length) if (def.name.match(/^is/)) { // isXXX if (command.command.match(/^(verify|assert)/)) { line = statement((def.negative ? assertFalse : assertTrue)(call)); } else if (command.command.match(/^store/)) { addDeclaredVar(extraArg); line = statement(assignToVariable('boolean', extraArg, call)); } else if (command.command.match(/^waitFor/)) { line = waitFor((def.negative ? not : is)(call)); } } else { // getXXX if (command.command.match(/^(verify|assert)/)) { var eq = seleniumEquals(def.returnType, extraArg, call); if (def.negative) eq = eq.invert(); var method = command.command.match(/^verify/) ? 'verify' : 'assert'; line = statement(eq[method]()); } else if (command.command.match(/^store/)) { addDeclaredVar(extraArg); line = statement(assignToVariable(def.returnType, extraArg, call)); } else if (command.command.match(/^waitFor/)) { var eq = seleniumEquals(def.returnType, extraArg, call); if (def.negative) eq = eq.invert(); line = waitFor(eq); } } } else if (this.pause && 'pause' == command.command) { line = pause(command.target); } else if (this.echo && 'echo' == command.command) { line = echo(command.target); } else if ('store' == command.command) { addDeclaredVar(command.value); line = statement(assignToVariable('String', command.value, xlateArgument(command.target))); } else if (command.command.match(/^(assert|verify)Selected$/)) { var optionLocator = command.value; var flavor = 'Label'; var value = optionLocator; var r = /^(index|label|value|id)=(.*)$/.exec(optionLocator); if (r) { flavor = r[1].replace(/^[a-z]/, function(str) { return str.toUpperCase() }); value = r[2]; } var method = command.command.match(/^verify/) ? 'verify' : 'assert'; var call = new CallSelenium("getSelected" + flavor); call.args.push(xlateArgument(command.target)); var eq = new Equals(xlateValue('String', value), call); line = statement(eq[method]()); } else if (def) { if (def.name.match(/^(assert|verify)(Error|Failure)OnNext$/)) { this.assertFailureOnNext = def.name.match(/^assert/); this.verifyFailureOnNext = def.name.match(/^verify/); } else { var call = new CallSelenium(def.name); for (var i = 0; i < def.params.length; i++) { call.args.push(xlateArgument(command.getParameterAt(i))); } line = statement(call); } } else { this.log.info("unknown command: <" + command.command + ">"); // TODO var call = new CallSelenium(command.command); if ((command.target != null && command.target.length > 0) || (command.value != null && command.value.length > 0)) { call.args.push(string(command.target)); if (command.value != null && command.value.length > 0) { call.args.push(string(command.value)); } } line = formatComment(new Comment(statement(call))); } } if (line && (this.assertFailureOnNext || this.verifyFailureOnNext)) { line = assertOrVerifyFailure(line, this.assertFailureOnNext); this.assertFailureOnNext = false; this.verifyFailureOnNext = false; } if (line) { return indent() + line; } else { return null; }}