rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
var str = "<input type=\"hidden\" name=\"name\" value=\"" + name + "\" />"; $('importDocName').innerHTML = str; | function selectPackage(name){ var pars = "action=getPackageInfos&name="+name+"&xpage=plain"; var myAjax = new Ajax.XWikiRequest( "XWiki", "Import", {method: 'get', parameters: pars, onComplete: showPackageInfos} , "import");} |
|
removeStyleClass(rows[i], "current"); addStyleClass(this, "current"); | rows[i].removeStyleClass("current"); this.addStyleClass("current"); | function selectStackFrame(event){ var stackframeTable = document.getElementById("stackframeTable"); var rows = stackframeTable.childNodes; for (var i = 0; i < rows.length; i++) removeStyleClass(rows[i], "current"); addStyleClass(this, "current"); this.callFrame.loadVariables(); currentCallFrame = this.callFrame; if (frameLineNumberInfo = frameLineNumberStack[this.callFrame.index - 1]) jumpToLine(frameLineNumberInfo[0], frameLineNumberInfo[1]); else if (this.callFrame.index == 0) jumpToLine(lastStatement[0], lastStatement[1]);} |
if (frameLineNumberInfo = frameLineNumberStack[this.callFrame.index - 1]) jumpToLine(frameLineNumberInfo[0], frameLineNumberInfo[1]); else if (this.callFrame.index == 0) jumpToLine(lastStatement[0], lastStatement[1]); | function selectStackFrame(event){ var stackframeTable = document.getElementById("stackframeTable"); var rows = stackframeTable.childNodes; for (var i = 0; i < rows.length; i++) removeStyleClass(rows[i], "current"); addStyleClass(this, "current"); this.callFrame.loadVariables(); currentCallFrame = this.callFrame;} |
|
if (/^([a-zA-Z]+):(.*)/.test(pattern)) { | if (/^([a-z-]+):(.*)/.test(pattern)) { | selectStrategy: function(pattern) { this.pattern = pattern; var strategyName = 'glob'; // by default if (/^([a-zA-Z]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } var matchStrategy = PatternMatcher.strategies[strategyName]; if (!matchStrategy) { throw new SeleniumError("cannot find PatternMatcher.strategies." + strategyName); } this.matcher = new matchStrategy(pattern); }, |
this.strategy = matchStrategy; | selectStrategy: function(pattern) { this.pattern = pattern; var strategyName = 'glob'; // by default if (/^([a-z-]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } var matchStrategy = PatternMatcher.strategies[strategyName]; if (!matchStrategy) { throw new SeleniumError("cannot find PatternMatcher.strategies." + strategyName); } this.matcher = new matchStrategy(pattern); }, |
|
strategyName = RegExp.$1; pattern = RegExp.$2; | var possibleNewStrategyName = RegExp.$1; var possibleNewPattern = RegExp.$2; if (PatternMatcher.strategies[possibleNewStrategyName]) { strategyName = possibleNewStrategyName; pattern = possibleNewPattern; } | selectStrategy: function(pattern) { this.pattern = pattern; var strategyName = 'glob'; // by default if (/^([a-z-]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } var matchStrategy = PatternMatcher.strategies[strategyName]; if (!matchStrategy) { throw new SeleniumError("cannot find PatternMatcher.strategies." + strategyName); } this.strategy = matchStrategy; this.matcher = new matchStrategy(pattern); }, |
removeStyleClass(rows[i], "current"); addStyleClass(this, "current"); | rows[i].removeStyleClass("current"); this.addStyleClass("current"); | function selectVariable(event){ var variablesTable = document.getElementById("variablesTable"); var rows = variablesTable.childNodes; for (var i = 0; i < rows.length; i++) removeStyleClass(rows[i], "current"); addStyleClass(this, "current");} |
currentDocument = null; | function selectWindow(target) { if(target == "null") currentWindowName = null; else { // If window exists if(eval("getContentWindow().window." + target)) currentWindowName = target; else throw new Error("Window does not exist"); }} |
|
currentWindow = null; | currentWindowName = null; | function selectWindow(target) { if(target == "null") currentWindow = null; else { // If window exists if(eval("getContentWindow().window." + target)) currentWindow = target; else throw new Error("Window does not exist"); }} |
currentWindow = target; | currentWindowName = target; | function selectWindow(target) { if(target == "null") currentWindow = null; else { // If window exists if(eval("getContentWindow().window." + target)) currentWindow = target; else throw new Error("Window does not exist"); }} |
this.optionLocatorFactory = new OptionLocatorFactory(); | function Selenium(browserbot) { this.browserbot = browserbot; this.page = function() { return browserbot.getCurrentPage(); }; var self = this; this.callOnNextPageLoad = function(callback) { nextExecution = callback; self.browserbot.callOnNextPageLoad(executeNext); };} |
|
this.reset(); | this.defaultTimeout = Selenium.DEFAULT_TIMEOUT; | function Selenium(browserbot) { /** * Defines an object that runs Selenium commands. * * <h3><a name="locators"></a>Element Locators</h3> * <p> * Element Locators tell Selenium which HTML element a command refers to. * The format of a locator is:</p> * <blockquote> * <em>locatorType</em><strong>=</strong><em>argument</em> * </blockquote> * * <p> * We support the following strategies for locating elements: * </p> * <blockquote> * <dl> * <dt><strong>identifier</strong>=<em>id</em></dt> * <dd>Select the element with the specified @id attribute. If no match is * found, select the first element whose @name attribute is <em>id</em>. * (This is normally the default; see below.)</dd> * <dt><strong>id</strong>=<em>id</em></dt> * <dd>Select the element with the specified @id attribute.</dd> * * <dt><strong>name</strong>=<em>name</em></dt> * <dd>Select the first element with the specified @name attribute.</dd> * <dd><ul class="first last simple"> * <li>username</li> * <li>name=username</li> * </ul> * </dd> * <dd>The name may optionally be followed by one or more <em>element-filters</em>, separated from the name by whitespace. If the <em>filterType</em> is not specified, <strong>value</strong> is assumed.</dd> * * <dd><ul class="first last simple"> * <li>name=flavour value=chocolate</li> * </ul> * </dd> * <dt><strong>dom</strong>=<em>javascriptExpression</em></dt> * * <dd> * * <dd>Find an element using JavaScript traversal of the HTML Document Object * Model. DOM locators <em>must</em> begin with "document.". * <ul class="first last simple"> * <li>dom=document.forms['myForm'].myDropdown</li> * <li>dom=document.images[56]</li> * </ul> * </dd> * * </dd> * * <dt><strong>xpath</strong>=<em>xpathExpression</em></dt> * <dd>Locate an element using an XPath expression. * <ul class="first last simple"> * <li>xpath=//img[@alt='The image alt text']</li> * <li>xpath=//table[@id='table1']//tr[4]/td[2]</li> * * </ul> * </dd> * <dt><strong>link</strong>=<em>textPattern</em></dt> * <dd>Select the link (anchor) element which contains text matching the * specified <em>pattern</em>. * <ul class="first last simple"> * <li>link=The link text</li> * </ul> * * </dd> * * <dt><strong>css</strong>=<em>cssSelectorSyntax</em></dt> * <dd>Select the element using css selectors. Please refer to <a href="http://www.w3.org/TR/REC-CSS2/selector.html">CSS2 selectors</a>, <a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/">CSS3 selectors</a> for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package. * <ul class="first last simple"> * <li>css=a[href="#id3"]</li> * <li>css=span#firstChild + span</li> * </ul> * </dd> * <dd>Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after). </dd> * </dl> * </blockquote> * <p> * Without an explicit locator prefix, Selenium uses the following default * strategies: * </p> * * <ul class="simple"> * <li><strong>dom</strong>, for locators starting with "document."</li> * <li><strong>xpath</strong>, for locators starting with "//"</li> * <li><strong>identifier</strong>, otherwise</li> * </ul> * * <h3><a name="element-filters">Element Filters</a></h3> * <blockquote> * <p>Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.</p> * <p>Filters look much like locators, ie.</p> * <blockquote> * <em>filterType</em><strong>=</strong><em>argument</em></blockquote> * * <p>Supported element-filters are:</p> * <p><strong>value=</strong><em>valuePattern</em></p> * <blockquote> * Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.</blockquote> * <p><strong>index=</strong><em>index</em></p> * <blockquote> * Selects a single element based on its position in the list (offset from zero).</blockquote> * </blockquote> * * <h3><a name="patterns"></a>String-match Patterns</h3> * * <p> * Various Pattern syntaxes are available for matching string values: * </p> * <blockquote> * <dl> * <dt><strong>glob:</strong><em>pattern</em></dt> * <dd>Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a * kind of limited regular-expression syntax typically used in command-line * shells. In a glob pattern, "*" represents any sequence of characters, and "?" * represents any single character. Glob patterns match against the entire * string.</dd> * <dt><strong>regexp:</strong><em>regexp</em></dt> * <dd>Match a string using a regular-expression. The full power of JavaScript * regular-expressions is available.</dd> * <dt><strong>exact:</strong><em>string</em></dt> * * <dd>Match a string exactly, verbatim, without any of that fancy wildcard * stuff.</dd> * </dl> * </blockquote> * <p> * If no pattern prefix is specified, Selenium assumes that it's a "glob" * pattern. * </p> */ this.browserbot = browserbot; this.optionLocatorFactory = new OptionLocatorFactory(); this.page = function() { return browserbot.getCurrentPage(); }; this.reset();} |
if (type == 'String' && pattern.match(/^regexp:/)) { | if (type == 'String[]') { var matcher = 'exact'; var r; if ((r = pattern.match(/^(regexp|glob|exact):/))) { matcher = r[1]; pattern = pattern.substring(r[0].length); } else if (pattern.match(/[\*\?]/)) { matcher = 'glob'; } var separateEquals = this.useSeparateEqualsForArray || 'exact' != matcher; var list = parseArray(pattern); if (separateEquals) { var result = new EqualsArray(expression); result.conditions.push(new Equals(list.length, result.length())); for (var i = 0; i < list.length; i++) { result.conditions.push(seleniumEquals('String', matcher + ':' + list[i], result.item(i))); } return result; } else { return new Equals(xlateValue(type, pattern), expression); } } else if (type == 'String' && pattern.match(/^regexp:/)) { | function seleniumEquals(type, pattern, expression) { if (type == 'String' && pattern.match(/^regexp:/)) { return new RegexpMatch(pattern.substring(7), expression); } else if (type == 'String' && (pattern.match(/^glob:/) || pattern.match(/[\*\?]/))) { pattern = pattern.replace(/^glob:/, ''); pattern = pattern.replace(/([\]\[\\\{\}\$\(\).])/g, "\\$1"); pattern = pattern.replace(/\?/g, "(.|[\r\n])"); pattern = pattern.replace(/\*/g, "(.|[\r\n])*"); return new RegexpMatch(pattern, expression); } else { pattern = pattern.replace(/^exact:/, ''); return new Equals(xlateValue(type, pattern), expression); }} |
result.conditions.push(new Equals(list.length, result.length())); | result.conditions.push(new Equals(list.length, { toString: function() { return result.length() }})); | function seleniumEquals(type, pattern, expression) { if (type == 'String[]') { var matcher = 'exact'; var r; if ((r = pattern.match(/^(regexp|glob|exact):/))) { matcher = r[1]; pattern = pattern.substring(r[0].length); } else if (pattern.match(/[\*\?]/)) { matcher = 'glob'; } var separateEquals = this.useSeparateEqualsForArray || 'exact' != matcher; var list = parseArray(pattern); if (separateEquals) { var result = new EqualsArray(expression); result.conditions.push(new Equals(list.length, result.length())); for (var i = 0; i < list.length; i++) { result.conditions.push(seleniumEquals('String', matcher + ':' + list[i], result.item(i))); } return result; } else { return new Equals(xlateValue(type, pattern), expression); } } else if (type == 'String' && pattern.match(/^regexp:/)) { return new RegexpMatch(pattern.substring(7), expression); } else if (type == 'String' && (pattern.match(/^glob:/) || pattern.match(/[\*\?]/))) { pattern = pattern.replace(/^glob:/, ''); pattern = pattern.replace(/([\]\[\\\{\}\$\(\).])/g, "\\$1"); pattern = pattern.replace(/\?/g, "(.|[\r\n])"); pattern = pattern.replace(/\*/g, "(.|[\r\n])*"); return new RegexpMatch(pattern, expression); } else { pattern = pattern.replace(/^exact:/, ''); return new Equals(xlateValue(type, pattern), expression); }} |
result.conditions.push(seleniumEquals('String', matcher + ':' + list[i], result.item(i))); | result.conditions.push(seleniumEquals('String', matcher + ':' + list[i], { index: i, toString: function() { return result.item(this.index) }})); | function seleniumEquals(type, pattern, expression) { if (type == 'String[]') { var matcher = 'exact'; var r; if ((r = pattern.match(/^(regexp|glob|exact):/))) { matcher = r[1]; pattern = pattern.substring(r[0].length); } else if (pattern.match(/[\*\?]/)) { matcher = 'glob'; } var separateEquals = this.useSeparateEqualsForArray || 'exact' != matcher; var list = parseArray(pattern); if (separateEquals) { var result = new EqualsArray(expression); result.conditions.push(new Equals(list.length, result.length())); for (var i = 0; i < list.length; i++) { result.conditions.push(seleniumEquals('String', matcher + ':' + list[i], result.item(i))); } return result; } else { return new Equals(xlateValue(type, pattern), expression); } } else if (type == 'String' && pattern.match(/^regexp:/)) { return new RegexpMatch(pattern.substring(7), expression); } else if (type == 'String' && (pattern.match(/^glob:/) || pattern.match(/[\*\?]/))) { pattern = pattern.replace(/^glob:/, ''); pattern = pattern.replace(/([\]\[\\\{\}\$\(\).])/g, "\\$1"); pattern = pattern.replace(/\?/g, "(.|[\r\n])"); pattern = pattern.replace(/\*/g, "(.|[\r\n])*"); return new RegexpMatch(pattern, expression); } else { pattern = pattern.replace(/^exact:/, ''); return new Equals(xlateValue(type, pattern), expression); }} |
pattern = pattern.replace(/\?/g, "(.|[\r\n])"); pattern = pattern.replace(/\*/g, "(.|[\r\n])*"); | pattern = pattern.replace(/\?/g, "[\\s\\S]"); pattern = pattern.replace(/\*/g, "[\\s\\S]*"); | function seleniumEquals(type, pattern, expression) { if (type == 'String[]') { var matcher = 'exact'; var r; if ((r = pattern.match(/^(regexp|glob|exact):/))) { matcher = r[1]; pattern = pattern.substring(r[0].length); } else if (pattern.match(/[\*\?]/)) { matcher = 'glob'; } var separateEquals = this.useSeparateEqualsForArray || 'exact' != matcher; var list = parseArray(pattern); if (separateEquals) { var result = new EqualsArray(expression); result.conditions.push(new Equals(list.length, result.length())); for (var i = 0; i < list.length; i++) { result.conditions.push(seleniumEquals('String', matcher + ':' + list[i], result.item(i))); } return result; } else { return new Equals(xlateValue(type, pattern), expression); } } else if (type == 'String' && pattern.match(/^regexp:/)) { return new RegexpMatch(pattern.substring(7), expression); } else if (type == 'String' && (pattern.match(/^glob:/) || pattern.match(/[\*\?]/))) { pattern = pattern.replace(/^glob:/, ''); pattern = pattern.replace(/([\]\[\\\{\}\$\(\).])/g, "\\$1"); pattern = pattern.replace(/\?/g, "(.|[\r\n])"); pattern = pattern.replace(/\*/g, "(.|[\r\n])*"); return new RegexpMatch(pattern, expression); } else { pattern = pattern.replace(/^exact:/, ''); return new Equals(xlateValue(type, pattern), expression); }} |
}; | } | function SeleniumError(message) { var error = new Error(message); error.isSeleniumError = true; return error;}; |
currentDocument = null; | function SelfRemovingLoadListener(fn) { this.fn=fn; var self = this; this.invoke=function () { try { fn(); } finally { removeLoadListener(getIframe(), self.invoke); } }} |
|
send: function(url, data){ this.fireEvent('onRequest'); this.transport.open(this.options.method, url, this.options.async); this.transport.onreadystatechange = this.onStateChange.bind(this); this.setHeaders({'X-Requested-With': 'XMLHttpRequest'}); this.setHeaders(this.options.headers); if (this.options.method == 'post'){ this.setHeaders({'Content-type' : 'application/x-www-form-urlencoded'}); if (this.transport.overrideMimeType) this.setHeaders({'Connection': 'close'}); } this.transport.send(data); return this; } | send: function(options){ options = Object.extend(options || {}, {postBody: this.toQueryString(), method: 'post'}); return new Ajax(this.getProperty('action'), options).request(); }, | send: function(url, data){ this.fireEvent('onRequest'); this.transport.open(this.options.method, url, this.options.async); this.transport.onreadystatechange = this.onStateChange.bind(this); this.setHeaders({'X-Requested-With': 'XMLHttpRequest'}); this.setHeaders(this.options.headers); if (this.options.method == 'post'){ this.setHeaders({'Content-type' : 'application/x-www-form-urlencoded'}); if (this.transport.overrideMimeType) this.setHeaders({'Connection': 'close'}); } this.transport.send(data); return this; } |
return; | sendit=false; | function send(msg){ if(msg==undefined || msg.search(/^[\r\n]*$/)!=-1) { log("Not sending blank message"); return; } for(i in exclude) { if(msg.search(exclude[i])>=0) { log("Excluding: " + msg); return; } } log("Sending: " + msg); if(!my_server.send("PRIVMSG "+channel+" :"+expand_tabs(msg)+"\r\n")) alert("send failure");} |
log("Sending: " + msg); if(!my_server.send("PRIVMSG "+channel+" :"+expand_tabs(msg)+"\r\n")) alert("send failure"); | if(sendit) { log("Sending: " + msg); if(!my_server.send("PRIVMSG "+channel+" :"+expand_tabs(msg)+"\r\n")) alert("send failure"); } | function send(msg){ if(msg==undefined || msg.search(/^[\r\n]*$/)!=-1) { log("Not sending blank message"); return; } for(i in exclude) { if(msg.search(exclude[i])>=0) { log("Excluding: " + msg); return; } } log("Sending: " + msg); if(!my_server.send("PRIVMSG "+channel+" :"+expand_tabs(msg)+"\r\n")) alert("send failure");} |
for(i in exclude) | for(i in exclude) { | function send(msg){ if(msg==undefined || msg.search(/^[\r\n]*$/)!=-1) { log("Not sending blank message"); return; } for(i in exclude) if(msg.search(exclude[i])>=0) { log("Excluding: " + msg); return; } log("Sending: " + msg); if(!my_server.send("PRIVMSG "+channel+" :"+expand_tabs(msg)+"\r\n")) alert("send failure");} |
} | function send(msg){ if(msg==undefined || msg.search(/^[\r\n]*$/)!=-1) { log("Not sending blank message"); return; } for(i in exclude) if(msg.search(exclude[i])>=0) { log("Excluding: " + msg); return; } log("Sending: " + msg); if(!my_server.send("PRIVMSG "+channel+" :"+expand_tabs(msg)+"\r\n")) alert("send failure");} |
|
case "KICK": if (param.substr(0,1) == '#' || param.substr(0,1) == '&') { sock.send(command+" "+param+"\r\n"); } else { sock.send("KICK "+channels.current.name+" "+param+"\r\n"); } break; | function send_command(command,param) { var params=[null]; var send_to=null; var full_params; var i=0; var got=""; switch(command) { case "MSG": params=param.split(" "); send_to=params.shift(); sock.send("PRIVMSG "+send_to+" :"+params.join(" ")+"\r\n"); screen.print_line(send_to+"\x01H\x01C<\x01N\x01C-\x01N\x01W "+params.join(" ")); break; case "X": case "Q": case "QUIT": sock.send("QUIT :"+param+"\r\n"); quit=1; sock.close(); exit(); break; case "J": case "JOIN": channels.join(param); break; case "ME": if(channels.current==undefined) { screen.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W"); } else { channels.current.send("\x01ACTION "+param+"\x01"); screen.print_line("\x01N\x01B*\x01W "+nick+" "+param); } break; case "CTCP": params=param.split(" "); send_to=params.shift(); full_params=params.join(" "); full_params=full_params.toUpperCase(); sock.send("PRIVMSG "+send_to+" :\x01"+full_params+"\x01\r\n"); break; case "PART": channels.part(channels.current.name,param); break; case "N": case "NEXT": channels.index+=1; if(channels.index>=channels.length) { channels.index=0; } screen.update_statline(); break; case "P": case "PREVIOUS": case "PREV": channels.index-=1; if(channels.index<0) { channels.index=channels.length-1; } screen.update_statline(); break; case "TOPIC": sock.send("TOPIC "+channels.current.name+" :"+param+"\r\n"); break; default: if(command.slice(0,1)=="#" || command.slice(0,1)=="&") { for(i=0;i<channels.length;i++) { if(command.toUpperCase()==channels.channel[i].name) { channels.index=i; screen.update_statline(); } } } else { sock.send(command+" "+param+"\r\n"); } }} |
|
function send_email(fname, subject) | function send_email(subject, body) | function send_email(fname, subject){ var file = new File(fname); if(!file.open("rt")) { log("!ERROR " + errno_str + " opening " + fname); return(false); } var msgtxt = lfexpand(file.read(file.length)); file.close(); delete file; var msgbase = new MsgBase("mail"); if(msgbase.open()==false) { log("!ERROR " + msgbase.last_error); return(false); } var hdr = { to: "sysop", to_ext: 1, from: "testbuild", subject: subject }; if(!msgbase.save_msg(hdr, msgtxt)) log("!ERROR " + msgbase.last_error + "saving mail message"); log("E-mail sent."); msgbase.close();} |
var file = new File(fname); if(!file.open("rt")) { log("!ERROR " + errno_str + " opening " + fname); return(false); } var msgtxt = lfexpand(file.read(file.length)); file.close(); delete file; | function send_email(fname, subject){ var file = new File(fname); if(!file.open("rt")) { log("!ERROR " + errno_str + " opening " + fname); return(false); } var msgtxt = lfexpand(file.read(file.length)); file.close(); delete file; var msgbase = new MsgBase("mail"); if(msgbase.open()==false) { log("!ERROR " + msgbase.last_error); return(false); } var hdr = { to: "sysop", to_ext: 1, from: "testbuild", subject: subject }; if(!msgbase.save_msg(hdr, msgtxt)) log("!ERROR " + msgbase.last_error + "saving mail message"); log("E-mail sent."); msgbase.close();} |
|
from: "testbuild", | from: "Synchronet testbuild.js", | function send_email(fname, subject){ var file = new File(fname); if(!file.open("rt")) { log("!ERROR " + errno_str + " opening " + fname); return(false); } var msgtxt = lfexpand(file.read(file.length)); file.close(); delete file; var msgbase = new MsgBase("mail"); if(msgbase.open()==false) { log("!ERROR " + msgbase.last_error); return(false); } var hdr = { to: "sysop", to_ext: 1, from: "testbuild", subject: subject }; if(!msgbase.save_msg(hdr, msgtxt)) log("!ERROR " + msgbase.last_error + "saving mail message"); log("E-mail sent."); msgbase.close();} |
if(!msgbase.save_msg(hdr, msgtxt)) log("!ERROR " + msgbase.last_error + "saving mail message"); log("E-mail sent."); | if(!msgbase.save_msg(hdr, body)) log(LOG_ERR, "!ERROR " + msgbase.last_error + "saving mail message"); else log(LOG_INFO, "E-mail sent."); | function send_email(fname, subject){ var file = new File(fname); if(!file.open("rt")) { log("!ERROR " + errno_str + " opening " + fname); return(false); } var msgtxt = lfexpand(file.read(file.length)); file.close(); delete file; var msgbase = new MsgBase("mail"); if(msgbase.open()==false) { log("!ERROR " + msgbase.last_error); return(false); } var hdr = { to: "sysop", to_ext: 1, from: "testbuild", subject: subject }; if(!msgbase.save_msg(hdr, msgtxt)) log("!ERROR " + msgbase.last_error + "saving mail message"); log("E-mail sent."); msgbase.close();} |
if (document.forms["screen"] != null) { | if (document.forms["screen"] != null && enter == false) { | function sendFormWithKey(strKey) { if (document.forms["screen"] != null) { document.forms["screen"].key.value = strKey; document.forms["screen"].submit(); } } |
enter = true; } else if (enter == true) { alert("The current transaction is still running. Please try again."); | function sendFormWithKey(strKey) { if (document.forms["screen"] != null) { document.forms["screen"].key.value = strKey; document.forms["screen"].submit(); } } |
|
data: '', | Drupal.progressBar.prototype.sendPing = function () { if (this.timer) { clearTimeout(this.timer); } if (this.uri) { var pb = this; $.ajax({ type: this.method, url: this.uri, success: function (data) { // Parse response var progress = Drupal.parseJson(data); // Display errors if (progress.status == 0) { pb.displayError(progress.data); return; } // Update display pb.setProgress(progress.percentage, progress.message); // Schedule next timer pb.timer = setTimeout(function() { pb.sendPing(); }, pb.delay); }, error: function (xmlhttp) { pb.displayError('An HTTP error '+ xmlhttp.status +' occured.\n'+ pb.uri); } }); }} |
|
var history = document.getElementById("history"); var row = document.createElement("div"); row.className = "row"; if (history.childNodes.length % 2) row.className += " alt"; var expression = document.createElement("div"); expression.className = "expression"; expression.innerText = script; row.appendChild(expression); var result = document.createElement("div"); result.className = "result"; result.innerText = mainWindow.DebuggerDocument.evaluateScript_inCallFrame_(script, mainWindow.currentCallFrame.index); row.appendChild(result); history.appendChild(row); history.scrollTop = history.scrollHeight; | appendMessage(script, mainWindow.DebuggerDocument.evaluateScript_inCallFrame_(script, mainWindow.currentCallFrame.index)); | function sendScript(script){ var history = document.getElementById("history"); var row = document.createElement("div"); row.className = "row"; if (history.childNodes.length % 2) row.className += " alt"; var expression = document.createElement("div"); expression.className = "expression"; expression.innerText = script; row.appendChild(expression); var result = document.createElement("div"); result.className = "result"; result.innerText = mainWindow.DebuggerDocument.evaluateScript_inCallFrame_(script, mainWindow.currentCallFrame.index); row.appendChild(result); history.appendChild(row); history.scrollTop = history.scrollHeight; if (script.indexOf("=") >= 0) mainWindow.currentCallFrame.loadVariables();} |
if (script.indexOf("=")) | if (script.indexOf("=") >= 0) | function sendScript(script){ var history = document.getElementById("history"); var row = document.createElement("div"); row.className = "row"; if (history.childNodes.length % 2) row.className += " alt"; var expression = document.createElement("div"); expression.className = "expression"; expression.innerText = script; row.appendChild(expression); var result = document.createElement("div"); result.className = "result"; result.innerText = mainWindow.DebuggerDocument.evaluateScript_inCallFrame_(script, mainWindow.currentCallFrame.index); row.appendChild(result); history.appendChild(row); history.scrollTop = history.scrollHeight; if (script.indexOf("=")) mainWindow.currentCallFrame.loadVariables();} |
xmlHttpObject.send(pendingMessagesToRC + dataToBePosted); | xmlHttpObject.send(dataToBePosted); | function sendToRC(dataToBePosted, urlParms, callback, xmlHttpObject) { if (xmlHttpObject==null) { xmlHttpObject = XmlHttp.create(); } var url = buildBaseUrl() + "driver/?" if (urlParms) { url += urlParms; } url += "&frameAddress=" + makeAddressToMyFrame(); if (callback==null) { callback = function(){}; } url += buildDriverParams() + preventBrowserCaching(); xmlHttpObject.open("POST", url, true); xmlHttpObject.onreadystatechange = callback; xmlHttpObject.send(pendingMessagesToRC + dataToBePosted); return null;} |
xmlHttp.send(dataToBePosted); | xmlHttp.send(pendingMessagesToRC + dataToBePosted); | function sendToRC(dataToBePosted, urlParms) { xmlHttp = XmlHttp.create(); var url = buildBaseUrl() + "driver/?" if (urlParms) { url += urlParms; } url += buildDriverParams() + preventBrowserCaching(); xmlHttp.open("POST", url, true); xmlHttp.onreadystatechange=handleHttpResponse; xmlHttp.send(dataToBePosted); return null;} |
var url = buildBaseUrl() + "driver/?" | var url = buildDriverUrl() + "?" | function sendToRC(dataToBePosted, urlParms, callback, xmlHttpObject, async) { if (async == null) { async = true; } if (xmlHttpObject == null) { xmlHttpObject = XmlHttp.create(); } var url = buildBaseUrl() + "driver/?" if (urlParms) { url += urlParms; } url += "&localFrameAddress=" + (proxyInjectionMode ? makeAddressToAUTFrame() : "top"); url += getSeleniumWindowNameURLparameters(); url += "&uniqueId=" + uniqueId; if (callback == null) { callback = function() { }; } url += buildDriverParams() + preventBrowserCaching(); xmlHttpObject.open("POST", url, async); xmlHttpObject.onreadystatechange = callback; xmlHttpObject.send(dataToBePosted); return null;} |
function sendToRC(dataToBePosted, urlParms, callback, xmlHttpObject) { if (xmlHttpObject==null) { xmlHttpObject = XmlHttp.create(); } | function sendToRC(dataToBePosted, urlParms) { xmlHttp = XmlHttp.create(); | function sendToRC(dataToBePosted, urlParms, callback, xmlHttpObject) { if (xmlHttpObject==null) { xmlHttpObject = XmlHttp.create(); } var url = buildBaseUrl() + "driver/?" if (urlParms) { url += urlParms; } if (callback==null) { callback = function(){}; } url += buildDriverParams() + preventBrowserCaching(); xmlHttpObject.open("POST", url, true); xmlHttpObject.onreadystatechange = callback; xmlHttpObject.send(pendingMessagesToRC + dataToBePosted); return null;} |
if (callback==null) { callback = function(){}; } | function sendToRC(dataToBePosted, urlParms, callback, xmlHttpObject) { if (xmlHttpObject==null) { xmlHttpObject = XmlHttp.create(); } var url = buildBaseUrl() + "driver/?" if (urlParms) { url += urlParms; } if (callback==null) { callback = function(){}; } url += buildDriverParams() + preventBrowserCaching(); xmlHttpObject.open("POST", url, true); xmlHttpObject.onreadystatechange = callback; xmlHttpObject.send(pendingMessagesToRC + dataToBePosted); return null;} |
|
xmlHttpObject.open("POST", url, true); xmlHttpObject.onreadystatechange = callback; xmlHttpObject.send(pendingMessagesToRC + dataToBePosted); | xmlHttp.open("POST", url, true); xmlHttp.onreadystatechange=handleHttpResponse; xmlHttp.send(pendingMessagesToRC + dataToBePosted); | function sendToRC(dataToBePosted, urlParms, callback, xmlHttpObject) { if (xmlHttpObject==null) { xmlHttpObject = XmlHttp.create(); } var url = buildBaseUrl() + "driver/?" if (urlParms) { url += urlParms; } if (callback==null) { callback = function(){}; } url += buildDriverParams() + preventBrowserCaching(); xmlHttpObject.open("POST", url, true); xmlHttpObject.onreadystatechange = callback; xmlHttpObject.send(pendingMessagesToRC + dataToBePosted); return null;} |
if (element.disabled) return ''; | serialize: function(element) { element = $(element); var method = element.tagName.toLowerCase(); var parameter = Form.Element.Serializers[method](element); if (parameter) { var key = encodeURIComponent(parameter[0]); if (key.length == 0) return; if (parameter[1].constructor != Array) parameter[1] = [parameter[1]]; return parameter[1].map(function(value) { return key + '=' + encodeURIComponent(value); }).join('&'); } }, |
|
var options = { | var options = Object.extend({ | serialize: function(element) { var element = $(element); var sortableOptions = this.options(element); var options = { tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }.extend(arguments[1] || {}); var items = $(element).childNodes; var queryComponents = new Array(); for(var i=0; i<items.length; i++) if(items[i].tagName && items[i].tagName==options.tag.toUpperCase() && (!options.only || (Element.Class.has(items[i], options.only)))) queryComponents.push( encodeURIComponent(options.name) + "[]=" + encodeURIComponent(items[i].id.split("_")[1])); return queryComponents.join("&"); } |
}.extend(arguments[1] || {}); | }, arguments[1] || {}); | serialize: function(element) { var element = $(element); var sortableOptions = this.options(element); var options = { tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }.extend(arguments[1] || {}); var items = $(element).childNodes; var queryComponents = new Array(); for(var i=0; i<items.length; i++) if(items[i].tagName && items[i].tagName==options.tag.toUpperCase() && (!options.only || (Element.Class.has(items[i], options.only)))) queryComponents.push( encodeURIComponent(options.name) + "[]=" + encodeURIComponent(items[i].id.split("_")[1])); return queryComponents.join("&"); } |
return Sortable.sequence(element, arguments[1]).map( function(item) { return name + "[]=" + encodeURIComponent(item); }).join('&'); | if (options.tree) { return Sortable.tree(element, arguments[1]).children.map( function (item) { return [name + Sortable._constructIndex(item) + "=" + encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); }).flatten().join('&'); } else { return Sortable.sequence(element, arguments[1]).map( function(item) { return name + "[]=" + encodeURIComponent(item); }).join('&'); } | serialize: function(element) { element = $(element); var name = encodeURIComponent( (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); return Sortable.sequence(element, arguments[1]).map( function(item) { return name + "[]=" + encodeURIComponent(item); }).join('&'); } |
name: element.id | name: element.id, format: sortableOptions.format || /^[^_]*_(.*)$/ | serialize: function(element) { element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); return $A(element.childNodes).collect( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.split("_")[1])); }).join("&"); } |
return $A(element.childNodes).collect( function(item) { | return $(this.findElements(element, options) || []).collect( function(item) { | serialize: function(element) { element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); return $A(element.childNodes).collect( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.split("_")[1])); }).join("&"); } |
encodeURIComponent(item.id.split("_")[1])); | encodeURIComponent(item.id.match(options.format) ? item.id.match(options.format)[1] : '')); | serialize: function(element) { element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); return $A(element.childNodes).collect( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.split("_")[1])); }).join("&"); } |
return [name + Sortable._constructIndex(item) + "=" + | return [name + Sortable._constructIndex(item) + "[id]=" + | serialize: function(element) { element = $(element); var options = Object.extend(Sortable.options(element), arguments[1] || {}); var name = encodeURIComponent( (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); if (options.tree) { return Sortable.tree(element, arguments[1]).children.map( function (item) { return [name + Sortable._constructIndex(item) + "=" + encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); }).flatten().join('&'); } else { return Sortable.sequence(element, arguments[1]).map( function(item) { return name + "[]=" + encodeURIComponent(item); }).join('&'); } } |
var element = $(element); | element = $(element); | serialize: function(element) { var element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); var items = $(element).childNodes; var queryComponents = new Array(); for(var i=0; i<items.length; i++) if(items[i].tagName && items[i].tagName==options.tag.toUpperCase() && (!options.only || (Element.Class.has(items[i], options.only)))) queryComponents.push( encodeURIComponent(options.name) + "[]=" + encodeURIComponent(items[i].id.split("_")[1])); return queryComponents.join("&"); } |
name: element.id | name: element.id, format: sortableOptions.format || /^[^_]*_(.*)$/ | serialize: function(element) { var element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); var items = $(element).childNodes; var queryComponents = new Array(); for(var i=0; i<items.length; i++) if(items[i].tagName && items[i].tagName==options.tag.toUpperCase() && (!options.only || (Element.Class.has(items[i], options.only)))) queryComponents.push( encodeURIComponent(options.name) + "[]=" + encodeURIComponent(items[i].id.split("_")[1])); return queryComponents.join("&"); } |
var items = $(element).childNodes; var queryComponents = new Array(); for(var i=0; i<items.length; i++) if(items[i].tagName && items[i].tagName==options.tag.toUpperCase() && (!options.only || (Element.Class.has(items[i], options.only)))) queryComponents.push( encodeURIComponent(options.name) + "[]=" + encodeURIComponent(items[i].id.split("_")[1])); return queryComponents.join("&"); | return $(this.findElements(element, options) || []).collect( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.match(options.format) ? item.id.match(options.format)[1] : '')); }).join("&"); | serialize: function(element) { var element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); var items = $(element).childNodes; var queryComponents = new Array(); for(var i=0; i<items.length; i++) if(items[i].tagName && items[i].tagName==options.tag.toUpperCase() && (!options.only || (Element.Class.has(items[i], options.only)))) queryComponents.push( encodeURIComponent(options.name) + "[]=" + encodeURIComponent(items[i].id.split("_")[1])); return queryComponents.join("&"); } |
return encodeURIComponent(element.id) + "[]=" + encodeURIComponent(item); | return name + "[]=" + encodeURIComponent(item); | serialize: function(element) { element = $(element); return Sortable.sequence(element, arguments[1]).map( function(item) { return encodeURIComponent(element.id) + "[]=" + encodeURIComponent(item); }).join('&'); } |
var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id, format: sortableOptions.format || /^[^_]*_(.*)$/ }, arguments[1] || {}); return $(this.findElements(element, options) || []).map( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.match(options.format) ? item.id.match(options.format)[1] : '')); }).join("&"); | return Sortable.sequence(element, arguments[1]).map( function(item) { return encodeURIComponent(element.id) + "[]=" + encodeURIComponent(item); }).join('&'); | serialize: function(element) { element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id, format: sortableOptions.format || /^[^_]*_(.*)$/ }, arguments[1] || {}); return $(this.findElements(element, options) || []).map( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.match(options.format) ? item.id.match(options.format)[1] : '')); }).join("&"); } |
serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; | serializeNodeAsHTML : function(n, inn) { var en, no, h = '', i, l, t, st, r, cn, va = false, f = false, at, hc, cr; | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) | if (st) | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { | if ((tinyMCE.isRealIE) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName)) && !inn) { | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
h += '<' + en; | t = '<' + en; | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
h += this._serializeAttribute(n, r, no.nodeName); | t += this._serializeAttribute(n, r, no.nodeName); | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
h += this._serializeAttribute(n, r, r.vAttribs[i]); | t += this._serializeAttribute(n, r, r.vAttribs[i]); | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
h += this._serializeAttribute(n, r, at[no]); | t += this._serializeAttribute(n, r, at[no]); | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; | if (t != null && this.closeElementsRe.test(n.nodeName)) return t + ' />'; | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
h += '>'; | if (t != null) h += t + '>'; | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) | if (this.isIE && this.codeElementsRe.test(n.nodeName)) | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
return this.isMSIE ? '' : n.nodeValue; | return this.isIE ? '' : n.nodeValue; | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
if (va) | if (t != null && va) | serializeNodeAsHTML : function(n) { var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc; this._setupRules(); // Will initialize cleanup rules if (this._isDuplicate(n)) return ''; switch (n.nodeType) { case 1: // Element hc = n.hasChildNodes(); // MSIE sometimes produces <//tag> if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) break; if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { va = true; r = this.rules[n.nodeName]; if (!r) { at = this.rules; for (no in at) { if (at[no] && at[no].validRe.test(n.nodeName)) { r = at[no]; break; } } } en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; f = r.fill; if (r.removeEmpty && !hc) return ""; h += '<' + en; if (r.vAttribsReIsWild) { // Serialize wildcard attributes at = n.attributes; for (i=at.length-1; i>-1; i--) { no = at[i]; if (no.specified && r.vAttribsRe.test(no.nodeName)) h += this._serializeAttribute(n, r, no.nodeName); } } else { // Serialize specific attributes for (i=r.vAttribs.length-1; i>-1; i--) h += this._serializeAttribute(n, r, r.vAttribs[i]); } // Serialize mce_ atts if (!this.settings.on_save) { at = this.mceAttribs; for (no in at) { if (at[no]) h += this._serializeAttribute(n, r, at[no]); } } // Close these if (this.closeElementsRe.test(n.nodeName)) return h + ' />'; h += '>'; if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) h += n.innerHTML; } break; case 3: // Text if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) return this.isMSIE ? '' : n.nodeValue; return this.xmlEncode(n.nodeValue); case 8: // Comment return "<!--" + this._trimComment(n.nodeValue) + "-->"; } if (hc) { cn = n.childNodes; for (i=0, l=cn.length; i<l; i++) h += this.serializeNodeAsHTML(cn[i]); } // Fill empty nodes if (f && !hc) h += this.fillStr; // End element if (va) h += '</' + en + '>'; return h; }, |
if (this.isMSIE) { | if (this.isIE) { | serializeNodeAsXML : function(n) { var s, b; if (!this.xmlDoc) { if (this.isMSIE) { try {this.xmlDoc = new ActiveXObject('MSXML2.DOMDocument');} catch (e) {} if (!this.xmlDoc) try {this.xmlDoc = new ActiveXObject('Microsoft.XmlDom');} catch (e) {} } else this.xmlDoc = document.implementation.createDocument('', '', null); if (!this.xmlDoc) alert("Error XML Parser could not be found."); } if (this.xmlDoc.firstChild) this.xmlDoc.removeChild(this.xmlDoc.firstChild); b = this.xmlDoc.createElement("html"); b = this.xmlDoc.appendChild(b); this._convertToXML(n, b); if (this.isMSIE) return this.xmlDoc.xml; else return new XMLSerializer().serializeToString(this.xmlDoc); }, |
if (this.isMSIE) | if (this.isIE) | serializeNodeAsXML : function(n) { var s, b; if (!this.xmlDoc) { if (this.isMSIE) { try {this.xmlDoc = new ActiveXObject('MSXML2.DOMDocument');} catch (e) {} if (!this.xmlDoc) try {this.xmlDoc = new ActiveXObject('Microsoft.XmlDom');} catch (e) {} } else this.xmlDoc = document.implementation.createDocument('', '', null); if (!this.xmlDoc) alert("Error XML Parser could not be found."); } if (this.xmlDoc.firstChild) this.xmlDoc.removeChild(this.xmlDoc.firstChild); b = this.xmlDoc.createElement("html"); b = this.xmlDoc.appendChild(b); this._convertToXML(n, b); if (this.isMSIE) return this.xmlDoc.xml; else return new XMLSerializer().serializeToString(this.xmlDoc); }, |
function server_bcast_to_servers(str) { | function server_bcast_to_servers(str,type) { | function server_bcast_to_servers(str) { for(thisClient in Local_Servers) { Local_Servers[thisClient].rawout(str); }} |
Local_Servers[thisClient].rawout(str); | var srv = Local_Servers[thisClient]; if (!type || (srv.type == type)) srv.rawout(str); | function server_bcast_to_servers(str) { for(thisClient in Local_Servers) { Local_Servers[thisClient].rawout(str); }} |
var tmp; | function Server_Quit(str,suppress_bcast,is_netsplit,origin) { var tmp; if (!str) str = this.nick; if (is_netsplit) { this.netsplit(str); } else if (this.local) { if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(servername + " " + this.nick); } else if (origin) { if (!suppress_bcast) this.bcast_to_servers_raw(":" + origin.nick + " SQUIT " + this.nick + " :" + str); this.netsplit(origin.nick + " " + this.nick); } else { umode_notice(USERMODE_OPER,"Notice", "Netspliting a server which isn't local and doesn't " + "have an origin?!"); if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(); } if (this.local) { if (server.client_remove!=undefined) server.client_remove(this.socket); // FIXME: wrong phrasing below gnotice("Closing Link: " + this.nick + " (" + str + ")"); this.rawout("ERROR :Closing Link: [" + this.uprefix + "@" + this.hostname + "] (" + str + ")"); if (this.socket!=undefined) this.socket.close(); delete Local_Sockets[this.id]; } delete Local_Sockets[this.id]; delete Local_Sockets_Map[this.id]; delete Local_Servers[this.id]; delete Servers[this.nick.toLowerCase()]; delete this; rebuild_socksel_array = true;} |
|
this.netsplit(servername + " " + this.nick); | function Server_Quit(str,suppress_bcast,is_netsplit,origin) { var tmp; if (!str) str = this.nick; if (is_netsplit) { this.netsplit(str); } else if (this.local) { if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(servername + " " + this.nick); } else if (origin) { if (!suppress_bcast) this.bcast_to_servers_raw(":" + origin.nick + " SQUIT " + this.nick + " :" + str); this.netsplit(origin.nick + " " + this.nick); } else { umode_notice(USERMODE_OPER,"Notice", "Netspliting a server which isn't local and doesn't " + "have an origin?!"); if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(); } if (this.local) { if (server.client_remove!=undefined) server.client_remove(this.socket); // FIXME: wrong phrasing below gnotice("Closing Link: " + this.nick + " (" + str + ")"); this.rawout("ERROR :Closing Link: [" + this.uprefix + "@" + this.hostname + "] (" + str + ")"); if (this.socket!=undefined) this.socket.close(); delete Local_Sockets[this.id]; } delete Local_Sockets[this.id]; delete Local_Sockets_Map[this.id]; delete Local_Servers[this.id]; delete Servers[this.nick.toLowerCase()]; delete this; rebuild_socksel_array = true;} |
|
this.netsplit(origin.nick + " " + this.nick); | function Server_Quit(str,suppress_bcast,is_netsplit,origin) { var tmp; if (!str) str = this.nick; if (is_netsplit) { this.netsplit(str); } else if (this.local) { if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(servername + " " + this.nick); } else if (origin) { if (!suppress_bcast) this.bcast_to_servers_raw(":" + origin.nick + " SQUIT " + this.nick + " :" + str); this.netsplit(origin.nick + " " + this.nick); } else { umode_notice(USERMODE_OPER,"Notice", "Netspliting a server which isn't local and doesn't " + "have an origin?!"); if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(); } if (this.local) { if (server.client_remove!=undefined) server.client_remove(this.socket); // FIXME: wrong phrasing below gnotice("Closing Link: " + this.nick + " (" + str + ")"); this.rawout("ERROR :Closing Link: [" + this.uprefix + "@" + this.hostname + "] (" + str + ")"); if (this.socket!=undefined) this.socket.close(); delete Local_Sockets[this.id]; } delete Local_Sockets[this.id]; delete Local_Sockets_Map[this.id]; delete Local_Servers[this.id]; delete Servers[this.nick.toLowerCase()]; delete this; rebuild_socksel_array = true;} |
|
if((server.client_remove!=undefined) && this.local) server.client_remove(this.socket); | if (this.local) { if (server.client_remove!=undefined) server.client_remove(this.socket); | function Server_Quit(str,suppress_bcast,is_netsplit,origin) { var tmp; if (!str) str = this.nick; if (is_netsplit) { this.netsplit(str); } else if (this.local) { if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(servername + " " + this.nick); } else if (origin) { if (!suppress_bcast) this.bcast_to_servers_raw(":" + origin.nick + " SQUIT " + this.nick + " :" + str); this.netsplit(origin.nick + " " + this.nick); } else { umode_notice(USERMODE_OPER,"Notice", "Netspliting a server which isn't local and doesn't " + "have an origin?!"); if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(); } if((server.client_remove!=undefined) && this.local) server.client_remove(this.socket); if (this.local) { this.rawout("ERROR :Closing Link: [" + this.uprefix + "@" + this.hostname + "] (" + str + ")"); // FIXME: wrong phrasing below umode_notice(USERMODE_CLIENT,"Client","SERVER exiting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + str + "] [" + this.ip + "]"); if (this.socket!=undefined) this.socket.close(); delete Local_Sockets[this.id]; } delete Local_Sockets[this.id]; delete Local_Sockets_Map[this.id]; delete Local_Servers[this.id]; delete Servers[this.nick.toLowerCase()]; delete this; rebuild_socksel_array();} |
if (this.local) { | function Server_Quit(str,suppress_bcast,is_netsplit,origin) { var tmp; if (!str) str = this.nick; if (is_netsplit) { this.netsplit(str); } else if (this.local) { if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(servername + " " + this.nick); } else if (origin) { if (!suppress_bcast) this.bcast_to_servers_raw(":" + origin.nick + " SQUIT " + this.nick + " :" + str); this.netsplit(origin.nick + " " + this.nick); } else { umode_notice(USERMODE_OPER,"Notice", "Netspliting a server which isn't local and doesn't " + "have an origin?!"); if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(); } if((server.client_remove!=undefined) && this.local) server.client_remove(this.socket); if (this.local) { this.rawout("ERROR :Closing Link: [" + this.uprefix + "@" + this.hostname + "] (" + str + ")"); // FIXME: wrong phrasing below umode_notice(USERMODE_CLIENT,"Client","SERVER exiting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + str + "] [" + this.ip + "]"); if (this.socket!=undefined) this.socket.close(); delete Local_Sockets[this.id]; } delete Local_Sockets[this.id]; delete Local_Sockets_Map[this.id]; delete Local_Servers[this.id]; delete Servers[this.nick.toLowerCase()]; delete this; rebuild_socksel_array();} |
|
rebuild_socksel_array(); | rebuild_socksel_array = true; | function Server_Quit(str,suppress_bcast,is_netsplit,origin) { var tmp; if (!str) str = this.nick; if (is_netsplit) { this.netsplit(str); } else if (this.local) { if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(servername + " " + this.nick); } else if (origin) { if (!suppress_bcast) this.bcast_to_servers_raw(":" + origin.nick + " SQUIT " + this.nick + " :" + str); this.netsplit(origin.nick + " " + this.nick); } else { umode_notice(USERMODE_OPER,"Notice", "Netspliting a server which isn't local and doesn't " + "have an origin?!"); if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(); } if (this.local) { if (server.client_remove!=undefined) server.client_remove(this.socket); this.rawout("ERROR :Closing Link: [" + this.uprefix + "@" + this.hostname + "] (" + str + ")"); // FIXME: wrong phrasing below umode_notice(USERMODE_CLIENT,"Client","SERVER exiting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + str + "] [" + this.ip + "]"); if (this.socket!=undefined) this.socket.close(); delete Local_Sockets[this.id]; } delete Local_Sockets[this.id]; delete Local_Sockets_Map[this.id]; delete Local_Servers[this.id]; delete Servers[this.nick.toLowerCase()]; delete this; rebuild_socksel_array();} |
umode_notice(USERMODE_CLIENT,"Client","SERVER exiting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + str + "] [" + this.ip + "]"); | function Server_Quit(str,suppress_bcast,is_netsplit,origin) { var tmp; if (!str) str = this.nick; if (is_netsplit) { this.netsplit(str); } else if (this.local) { if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(servername + " " + this.nick); } else if (origin) { if (!suppress_bcast) this.bcast_to_servers_raw(":" + origin.nick + " SQUIT " + this.nick + " :" + str); this.netsplit(origin.nick + " " + this.nick); } else { umode_notice(USERMODE_OPER,"Notice", "Netspliting a server which isn't local and doesn't " + "have an origin?!"); if (!suppress_bcast) this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str); this.netsplit(); } if (this.local) { if (server.client_remove!=undefined) server.client_remove(this.socket); this.rawout("ERROR :Closing Link: [" + this.uprefix + "@" + this.hostname + "] (" + str + ")"); // FIXME: wrong phrasing below umode_notice(USERMODE_CLIENT,"Client","SERVER exiting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + str + "] [" + this.ip + "]"); if (this.socket!=undefined) this.socket.close(); delete Local_Sockets[this.id]; } delete Local_Sockets[this.id]; delete Local_Sockets_Map[this.id]; delete Local_Servers[this.id]; delete Servers[this.nick.toLowerCase()]; delete this; rebuild_socksel_array = true;} |
|
server_bcast_to_servers(":" + servername + " WALLOPS :" + str); | function server_wallops(str) { wallopers(":" + servername + " WALLOPS :" + str);} |
|
Element.remove(row); | if (null != row) { Element.remove(row); } | function SessionList() { var deleteUrl = 'delete-session.xqy'; var renameUrl = 'rename-session.xqy'; this.newSession = function() { // start a new session and set the user cookie appropriately debug.print("newSession: start"); // setting the session uri to gSessionDirectory signals // lib-controller.xqy to build a new session. setCookie(gSessionUriCookie, gSessionDirectory); // refresh should show the query view window.location.replace( "." ); } this.resumeSession = function(sessionUri) { debug.print("resumeSession: start"); // set cookie to the new uri setCookie(gSessionUriCookie, sessionUri); // refresh should show the query view window.location.replace( "." ); } this.deleteSession = function(uri, context) { // delete the session debug.print("deleteSession: " + uri); if (confirm("Are you sure you want to delete this session?")) { // call session-delete var req = new Ajax.Request(deleteUrl, { method: 'post', parameters: 'URI=' + uri, asynchronous: false, onFailure: reportError }); // delete the item from the DOM // context will be the button var row = context.parentNode.parentNode; Element.remove(row); } } this.renameSession = function(uri, name) { debug.print("renameSession: " + uri + " to " + name); // call the rename xqy var req = new Ajax.Request(renameUrl, { method: 'post', parameters: 'URI=' + uri + '&NAME=' + name, asynchronous: false, onFailure: reportError }); }} // SessionListClass |
if (value == null) return false; if (this.obj[key] == undefined) this.length++; | if (value === undefined) return false; if (this.obj[key] === undefined) this.length++; | set: function(key, value) { if (value == null) return false; if (this.obj[key] == undefined) this.length++; this.obj[key] = value; return this; }, |
set:function(e) { var mes = "ERROR in initialising Bitflux Editor:\n"+e.message +"\n"; try { mes += "In File: " + e.filename +"\n"; } catch (e) { mes += "In File: " + le.fileName +"\n"; } try { mes += "Linenumber: " + e.lineNumber + "\n"; } catch(e) {} mes += "Type: " + e.name + "\n"; mes += "Stack:" + e.stack + "\n"; BXEui.lm.set(mes.replace(/\n/g,"<br /><br />")); alert(mes); | function set(text) { try { BX_innerHTML(document.getElementById("bxe_area"),"<br/><img hspace='5' width='314' height='34' src='"+ BX_root_dir + "img/bxe_logo.png'/><br/><span style='font-family: Arial; padding: 5px; background-color: #ffffff'>"+text.replace(/\n/g,"<br/><br/>")+"</span>"); } catch (e) { alert(text); | set:function(e) { var mes = "ERROR in initialising Bitflux Editor:\n"+e.message +"\n"; try { mes += "In File: " + e.filename +"\n"; } catch (e) { mes += "In File: " + le.fileName +"\n"; } try { mes += "Linenumber: " + e.lineNumber + "\n"; } catch(e) {} mes += "Type: " + e.name + "\n"; mes += "Stack:" + e.stack + "\n"; BXEui.lm.set(mes.replace(/\n/g,"<br /><br />")); alert(mes); } |
} | set:function(e) { var mes = "ERROR in initialising Bitflux Editor:\n"+e.message +"\n"; try { mes += "In File: " + e.filename +"\n"; } catch (e) { mes += "In File: " + le.fileName +"\n"; } try { mes += "Linenumber: " + e.lineNumber + "\n"; } catch(e) {} mes += "Type: " + e.name + "\n"; mes += "Stack:" + e.stack + "\n"; BXEui.lm.set(mes.replace(/\n/g,"<br /><br />")); alert(mes); } |
|
if (value == null) throw 'Cannot put null values in the map'; | if (value == null) return false; | set: function(key, value) { if (value == null) throw 'Cannot put null values in the map'; if (this.obj[key] == undefined) this.length++; this.obj[key] = value; return this; }, |
cssRules = document.styleSheets[j].cssRules; | var cssRules = document.styleSheets[j].cssRules; if( !cssRules ) cssRules = document.styleSheets[j].rules; | function set_css( item, element, value ){ for( var j = 0; j < document.styleSheets.length; j++ ) { cssRules = document.styleSheets[j].cssRules; for( var i = 0; i < cssRules.length; i++) { if( cssRules[i].selectorText == item ) { cssRules[i].style.setProperty( element, value, null ); return; } } }} |
cssRules[i].style.setProperty( element, value, null ); | if( cssRules[i].style.setProperty ) cssRules[i].style.setProperty( element, value, null ); else cssRules[i].style.setAttribute( toCamelCase( element ), value ); | function set_css( item, element, value ){ for( var j = 0; j < document.styleSheets.length; j++ ) { cssRules = document.styleSheets[j].cssRules; for( var i = 0; i < cssRules.length; i++) { if( cssRules[i].selectorText == item ) { cssRules[i].style.setProperty( element, value, null ); return; } } }} |
s.send("LIST "+query[fields[f]].list+"\r\n"); r=get_response(s); if(r.code!=301) { writeln("LIST Expected 301, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } vals=r.text.split(/\r\n/); vals.pop(); | var vals=gnats.get_list(query[fields[f]].list); if(vals==undefined) error(); | function set_prlist(s){ var i; var j; var f; var done=false; fields=new Array(); for (field in query) { fields.push(field); } while(!done) { var text=''; var expr=''; console.uselect(0,"Field","Run Query",""); for(i=0;i<fields.length;i++) { console.uselect(i+1,"Field",query[fields[i]].desc+": "+query[fields[i]].text,""); } f=console.uselect(); if(f==-1) return(true); if(f==0) break; f--; if(f>=0 && f < fields.length) { // Field selected to change... console.uselect(0,query[fields[f]].desc,"Equals",""); console.uselect(1,query[fields[f]].desc,"Does not equal",""); console.uselect(2,query[fields[f]].desc,"Contains",""); console.uselect(3,query[fields[f]].desc,"Is greater than",""); console.uselect(4,query[fields[f]].desc,"Is less than",""); console.uselect(5,query[fields[f]].desc,"Any",""); var op=console.uselect(); switch(op) { case 0: text += "Equals"; expr += query[fields[f]].field+"=="; break; case 1: text += "Doesn't equal"; expr += query[fields[f]].field+"!="; break; case 2: text += "Contains"; expr += query[fields[f]].field+"~"; break; case 3: text += "Is greater than"; expr += query[fields[f]].field+">"; break; case 4: text += "Is less than"; expr += query[fields[f]].field+"<"; break; case 5: text = "Any"; expr=undefined; query[fields[f]].text=text; query[fields[f]].expr=expr; continue; break; } if(op>=0 && op <= 4) { if(query[fields[f]].list != undefined) { s.send("LIST "+query[fields[f]].list+"\r\n"); r=get_response(s); if(r.code!=301) { writeln("LIST Expected 301, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } vals=r.text.split(/\r\n/); vals.pop(); // Remove blank at end for(i=0; i<vals.length; i++) { cols=vals[i].split(/:/); console.uselect(i, query[fields[f]].desc, cols[0]+" ("+cols[query[fields[f]].listdesc]+")", ""); } var val=console.uselect(); if(val>0 && val < vals.length) { cols=vals[val].split(/:/); text += ' "'+cols[0]+'"'; expr += ' "'+cols[0].replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } else { write(query[fields[f]].desc+" "+text+": "); var val=console.getstr(); text += ' "'+val+'"'; val.replace(/"/,'\\"'); expr += ' "'+val.replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } } } var expr="State==State"; // Must have SOME query... for(field in fields) { if(query[fields[field]].expr != undefined) { expr += " & "; expr += query[fields[field]].expr; } } s.send('RSET\r\n'); r=get_response(s); if(r.type!=SUCCESS) { writeln("RSET got unexpected "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('EXPR '+expr+'\r\n'); r=get_response(s); if(r.code!=210) { writeln("EXPR Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('QFMT "%-72.72s %-10.10s %-6.6s %-10.10s %-10.10s" Synopsis Category Number Responsible State\r\n'); r=get_response(s); if(r.code!=210) { writeln("QFMT Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); }} |
var expr="State==State"; | if(!gnats.reset_expr()) error(); | function set_prlist(s){ var i; var j; var f; var done=false; fields=new Array(); for (field in query) { fields.push(field); } while(!done) { var text=''; var expr=''; console.uselect(0,"Field","Run Query",""); for(i=0;i<fields.length;i++) { console.uselect(i+1,"Field",query[fields[i]].desc+": "+query[fields[i]].text,""); } f=console.uselect(); if(f==-1) return(true); if(f==0) break; f--; if(f>=0 && f < fields.length) { // Field selected to change... console.uselect(0,query[fields[f]].desc,"Equals",""); console.uselect(1,query[fields[f]].desc,"Does not equal",""); console.uselect(2,query[fields[f]].desc,"Contains",""); console.uselect(3,query[fields[f]].desc,"Is greater than",""); console.uselect(4,query[fields[f]].desc,"Is less than",""); console.uselect(5,query[fields[f]].desc,"Any",""); var op=console.uselect(); switch(op) { case 0: text += "Equals"; expr += query[fields[f]].field+"=="; break; case 1: text += "Doesn't equal"; expr += query[fields[f]].field+"!="; break; case 2: text += "Contains"; expr += query[fields[f]].field+"~"; break; case 3: text += "Is greater than"; expr += query[fields[f]].field+">"; break; case 4: text += "Is less than"; expr += query[fields[f]].field+"<"; break; case 5: text = "Any"; expr=undefined; query[fields[f]].text=text; query[fields[f]].expr=expr; continue; break; } if(op>=0 && op <= 4) { if(query[fields[f]].list != undefined) { s.send("LIST "+query[fields[f]].list+"\r\n"); r=get_response(s); if(r.code!=301) { writeln("LIST Expected 301, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } vals=r.text.split(/\r\n/); vals.pop(); // Remove blank at end for(i=0; i<vals.length; i++) { cols=vals[i].split(/:/); console.uselect(i, query[fields[f]].desc, cols[0]+" ("+cols[query[fields[f]].listdesc]+")", ""); } var val=console.uselect(); if(val>0 && val < vals.length) { cols=vals[val].split(/:/); text += ' "'+cols[0]+'"'; expr += ' "'+cols[0].replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } else { write(query[fields[f]].desc+" "+text+": "); var val=console.getstr(); text += ' "'+val+'"'; val.replace(/"/,'\\"'); expr += ' "'+val.replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } } } var expr="State==State"; // Must have SOME query... for(field in fields) { if(query[fields[field]].expr != undefined) { expr += " & "; expr += query[fields[field]].expr; } } s.send('RSET\r\n'); r=get_response(s); if(r.type!=SUCCESS) { writeln("RSET got unexpected "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('EXPR '+expr+'\r\n'); r=get_response(s); if(r.code!=210) { writeln("EXPR Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('QFMT "%-72.72s %-10.10s %-6.6s %-10.10s %-10.10s" Synopsis Category Number Responsible State\r\n'); r=get_response(s); if(r.code!=210) { writeln("QFMT Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); }} |
expr += " & "; expr += query[fields[field]].expr; | if(!gnats.and_expr(query[fields[field]].expr)) error(); | function set_prlist(s){ var i; var j; var f; var done=false; fields=new Array(); for (field in query) { fields.push(field); } while(!done) { var text=''; var expr=''; console.uselect(0,"Field","Run Query",""); for(i=0;i<fields.length;i++) { console.uselect(i+1,"Field",query[fields[i]].desc+": "+query[fields[i]].text,""); } f=console.uselect(); if(f==-1) return(true); if(f==0) break; f--; if(f>=0 && f < fields.length) { // Field selected to change... console.uselect(0,query[fields[f]].desc,"Equals",""); console.uselect(1,query[fields[f]].desc,"Does not equal",""); console.uselect(2,query[fields[f]].desc,"Contains",""); console.uselect(3,query[fields[f]].desc,"Is greater than",""); console.uselect(4,query[fields[f]].desc,"Is less than",""); console.uselect(5,query[fields[f]].desc,"Any",""); var op=console.uselect(); switch(op) { case 0: text += "Equals"; expr += query[fields[f]].field+"=="; break; case 1: text += "Doesn't equal"; expr += query[fields[f]].field+"!="; break; case 2: text += "Contains"; expr += query[fields[f]].field+"~"; break; case 3: text += "Is greater than"; expr += query[fields[f]].field+">"; break; case 4: text += "Is less than"; expr += query[fields[f]].field+"<"; break; case 5: text = "Any"; expr=undefined; query[fields[f]].text=text; query[fields[f]].expr=expr; continue; break; } if(op>=0 && op <= 4) { if(query[fields[f]].list != undefined) { s.send("LIST "+query[fields[f]].list+"\r\n"); r=get_response(s); if(r.code!=301) { writeln("LIST Expected 301, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } vals=r.text.split(/\r\n/); vals.pop(); // Remove blank at end for(i=0; i<vals.length; i++) { cols=vals[i].split(/:/); console.uselect(i, query[fields[f]].desc, cols[0]+" ("+cols[query[fields[f]].listdesc]+")", ""); } var val=console.uselect(); if(val>0 && val < vals.length) { cols=vals[val].split(/:/); text += ' "'+cols[0]+'"'; expr += ' "'+cols[0].replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } else { write(query[fields[f]].desc+" "+text+": "); var val=console.getstr(); text += ' "'+val+'"'; val.replace(/"/,'\\"'); expr += ' "'+val.replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } } } var expr="State==State"; // Must have SOME query... for(field in fields) { if(query[fields[field]].expr != undefined) { expr += " & "; expr += query[fields[field]].expr; } } s.send('RSET\r\n'); r=get_response(s); if(r.type!=SUCCESS) { writeln("RSET got unexpected "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('EXPR '+expr+'\r\n'); r=get_response(s); if(r.code!=210) { writeln("EXPR Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('QFMT "%-72.72s %-10.10s %-6.6s %-10.10s %-10.10s" Synopsis Category Number Responsible State\r\n'); r=get_response(s); if(r.code!=210) { writeln("QFMT Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); }} |
s.send('RSET\r\n'); r=get_response(s); if(r.type!=SUCCESS) { writeln("RSET got unexpected "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('EXPR '+expr+'\r\n'); r=get_response(s); if(r.code!=210) { writeln("EXPR Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('QFMT "%-72.72s %-10.10s %-6.6s %-10.10s %-10.10s" Synopsis Category Number Responsible State\r\n'); r=get_response(s); if(r.code!=210) { writeln("QFMT Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } | if(!gnats.set_qfmt('"%-72.72s %-10.10s %-6.6s %-10.10s %-10.10s" Synopsis Category Number Responsible State')) error(); | function set_prlist(s){ var i; var j; var f; var done=false; fields=new Array(); for (field in query) { fields.push(field); } while(!done) { var text=''; var expr=''; console.uselect(0,"Field","Run Query",""); for(i=0;i<fields.length;i++) { console.uselect(i+1,"Field",query[fields[i]].desc+": "+query[fields[i]].text,""); } f=console.uselect(); if(f==-1) return(true); if(f==0) break; f--; if(f>=0 && f < fields.length) { // Field selected to change... console.uselect(0,query[fields[f]].desc,"Equals",""); console.uselect(1,query[fields[f]].desc,"Does not equal",""); console.uselect(2,query[fields[f]].desc,"Contains",""); console.uselect(3,query[fields[f]].desc,"Is greater than",""); console.uselect(4,query[fields[f]].desc,"Is less than",""); console.uselect(5,query[fields[f]].desc,"Any",""); var op=console.uselect(); switch(op) { case 0: text += "Equals"; expr += query[fields[f]].field+"=="; break; case 1: text += "Doesn't equal"; expr += query[fields[f]].field+"!="; break; case 2: text += "Contains"; expr += query[fields[f]].field+"~"; break; case 3: text += "Is greater than"; expr += query[fields[f]].field+">"; break; case 4: text += "Is less than"; expr += query[fields[f]].field+"<"; break; case 5: text = "Any"; expr=undefined; query[fields[f]].text=text; query[fields[f]].expr=expr; continue; break; } if(op>=0 && op <= 4) { if(query[fields[f]].list != undefined) { s.send("LIST "+query[fields[f]].list+"\r\n"); r=get_response(s); if(r.code!=301) { writeln("LIST Expected 301, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } vals=r.text.split(/\r\n/); vals.pop(); // Remove blank at end for(i=0; i<vals.length; i++) { cols=vals[i].split(/:/); console.uselect(i, query[fields[f]].desc, cols[0]+" ("+cols[query[fields[f]].listdesc]+")", ""); } var val=console.uselect(); if(val>0 && val < vals.length) { cols=vals[val].split(/:/); text += ' "'+cols[0]+'"'; expr += ' "'+cols[0].replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } else { write(query[fields[f]].desc+" "+text+": "); var val=console.getstr(); text += ' "'+val+'"'; val.replace(/"/,'\\"'); expr += ' "'+val.replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } } } var expr="State==State"; // Must have SOME query... for(field in fields) { if(query[fields[field]].expr != undefined) { expr += " & "; expr += query[fields[field]].expr; } } s.send('RSET\r\n'); r=get_response(s); if(r.type!=SUCCESS) { writeln("RSET got unexpected "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('EXPR '+expr+'\r\n'); r=get_response(s); if(r.code!=210) { writeln("EXPR Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); } s.send('QFMT "%-72.72s %-10.10s %-6.6s %-10.10s %-10.10s" Synopsis Category Number Responsible State\r\n'); r=get_response(s); if(r.code!=210) { writeln("QFMT Expected 210, got "+r.code); writeln(r.message); console.pause(); clean_exit(s); }} |
while(!done) { | while(!done && bbs.online) { | function set_prlist(){ var i; var j; var f; var done=false; fields=new Array(); for (field in query) { fields.push(field); } while(!done) { var text=''; var expr=''; console.uselect(0,"Field","Run Query",""); for(i=0;i<fields.length;i++) { console.uselect(i+1,"Field",query[fields[i]].desc+": "+query[fields[i]].text,""); } f=console.uselect(); if(f==-1) return(true); if(f==0) break; f--; if(f>=0 && f < fields.length) { // Field selected to change... console.uselect(0,query[fields[f]].desc,"Equals",""); console.uselect(1,query[fields[f]].desc,"Does not equal",""); console.uselect(2,query[fields[f]].desc,"Contains",""); console.uselect(3,query[fields[f]].desc,"Is greater than",""); console.uselect(4,query[fields[f]].desc,"Is less than",""); console.uselect(5,query[fields[f]].desc,"Any",""); var op=console.uselect(); switch(op) { case 0: text += "Equals"; expr += query[fields[f]].field+"=="; break; case 1: text += "Doesn't equal"; expr += query[fields[f]].field+"!="; break; case 2: text += "Contains"; expr += query[fields[f]].field+"~"; break; case 3: text += "Is greater than"; expr += query[fields[f]].field+">"; break; case 4: text += "Is less than"; expr += query[fields[f]].field+"<"; break; case 5: text = "Any"; expr=undefined; query[fields[f]].text=text; query[fields[f]].expr=expr; continue; break; } if(op>=0 && op <= 4) { if(query[fields[f]].list != undefined) { var vals=gnats.get_list(query[fields[f]].list); if(vals==undefined) handle_error(); for(i=0; i<vals.length; i++) { cols=vals[i].split(/:/); console.uselect(i, query[fields[f]].desc, cols[0]+" ("+cols[query[fields[f]].listdesc]+")", ""); } var val=console.uselect(); if(val>0 && val < vals.length) { cols=vals[val].split(/:/); text += ' "'+cols[0]+'"'; expr += ' "'+cols[0].replace(/"/g,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } else { write(query[fields[f]].desc+" "+text+": "); var val=console.getstr(); text += ' "'+val+'"'; val.replace(/"/g,'\\"'); expr += ' "'+val.replace(/"/g,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } } } if(!gnats.reset_expr()) handle_error(); for(field in fields) { if(query[fields[field]].expr != undefined) { if(!gnats.and_expr(query[fields[field]].expr)) handle_error(); } }} |
expr += ' "'+cols[0].replace(/"/,'\\"')+'"'; | expr += ' "'+cols[0].replace(/"/g,'\\"')+'"'; | function set_prlist(){ var i; var j; var f; var done=false; fields=new Array(); for (field in query) { fields.push(field); } while(!done) { var text=''; var expr=''; console.uselect(0,"Field","Run Query",""); for(i=0;i<fields.length;i++) { console.uselect(i+1,"Field",query[fields[i]].desc+": "+query[fields[i]].text,""); } f=console.uselect(); if(f==-1) return(true); if(f==0) break; f--; if(f>=0 && f < fields.length) { // Field selected to change... console.uselect(0,query[fields[f]].desc,"Equals",""); console.uselect(1,query[fields[f]].desc,"Does not equal",""); console.uselect(2,query[fields[f]].desc,"Contains",""); console.uselect(3,query[fields[f]].desc,"Is greater than",""); console.uselect(4,query[fields[f]].desc,"Is less than",""); console.uselect(5,query[fields[f]].desc,"Any",""); var op=console.uselect(); switch(op) { case 0: text += "Equals"; expr += query[fields[f]].field+"=="; break; case 1: text += "Doesn't equal"; expr += query[fields[f]].field+"!="; break; case 2: text += "Contains"; expr += query[fields[f]].field+"~"; break; case 3: text += "Is greater than"; expr += query[fields[f]].field+">"; break; case 4: text += "Is less than"; expr += query[fields[f]].field+"<"; break; case 5: text = "Any"; expr=undefined; query[fields[f]].text=text; query[fields[f]].expr=expr; continue; break; } if(op>=0 && op <= 4) { if(query[fields[f]].list != undefined) { var vals=gnats.get_list(query[fields[f]].list); if(vals==undefined) handle_error(); for(i=0; i<vals.length; i++) { cols=vals[i].split(/:/); console.uselect(i, query[fields[f]].desc, cols[0]+" ("+cols[query[fields[f]].listdesc]+")", ""); } var val=console.uselect(); if(val>0 && val < vals.length) { cols=vals[val].split(/:/); text += ' "'+cols[0]+'"'; expr += ' "'+cols[0].replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } else { write(query[fields[f]].desc+" "+text+": "); var val=console.getstr(); text += ' "'+val+'"'; val.replace(/"/,'\\"'); expr += ' "'+val.replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } } } if(!gnats.reset_expr()) handle_error(); for(field in fields) { if(query[fields[field]].expr != undefined) { if(!gnats.and_expr(query[fields[field]].expr)) handle_error(); } }} |
val.replace(/"/,'\\"'); expr += ' "'+val.replace(/"/,'\\"')+'"'; | val.replace(/"/g,'\\"'); expr += ' "'+val.replace(/"/g,'\\"')+'"'; | function set_prlist(){ var i; var j; var f; var done=false; fields=new Array(); for (field in query) { fields.push(field); } while(!done) { var text=''; var expr=''; console.uselect(0,"Field","Run Query",""); for(i=0;i<fields.length;i++) { console.uselect(i+1,"Field",query[fields[i]].desc+": "+query[fields[i]].text,""); } f=console.uselect(); if(f==-1) return(true); if(f==0) break; f--; if(f>=0 && f < fields.length) { // Field selected to change... console.uselect(0,query[fields[f]].desc,"Equals",""); console.uselect(1,query[fields[f]].desc,"Does not equal",""); console.uselect(2,query[fields[f]].desc,"Contains",""); console.uselect(3,query[fields[f]].desc,"Is greater than",""); console.uselect(4,query[fields[f]].desc,"Is less than",""); console.uselect(5,query[fields[f]].desc,"Any",""); var op=console.uselect(); switch(op) { case 0: text += "Equals"; expr += query[fields[f]].field+"=="; break; case 1: text += "Doesn't equal"; expr += query[fields[f]].field+"!="; break; case 2: text += "Contains"; expr += query[fields[f]].field+"~"; break; case 3: text += "Is greater than"; expr += query[fields[f]].field+">"; break; case 4: text += "Is less than"; expr += query[fields[f]].field+"<"; break; case 5: text = "Any"; expr=undefined; query[fields[f]].text=text; query[fields[f]].expr=expr; continue; break; } if(op>=0 && op <= 4) { if(query[fields[f]].list != undefined) { var vals=gnats.get_list(query[fields[f]].list); if(vals==undefined) handle_error(); for(i=0; i<vals.length; i++) { cols=vals[i].split(/:/); console.uselect(i, query[fields[f]].desc, cols[0]+" ("+cols[query[fields[f]].listdesc]+")", ""); } var val=console.uselect(); if(val>0 && val < vals.length) { cols=vals[val].split(/:/); text += ' "'+cols[0]+'"'; expr += ' "'+cols[0].replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } else { write(query[fields[f]].desc+" "+text+": "); var val=console.getstr(); text += ' "'+val+'"'; val.replace(/"/,'\\"'); expr += ' "'+val.replace(/"/,'\\"')+'"'; query[fields[f]].text=text; query[fields[f]].expr=expr; } } } } if(!gnats.reset_expr()) handle_error(); for(field in fields) { if(query[fields[field]].expr != undefined) { if(!gnats.and_expr(query[fields[field]].expr)) handle_error(); } }} |
setAttrib(elm, 'mce_href', href); | function setAllAttribs(elm) { var formObj = document.forms[0]; var href = formObj.href.value; var target = getSelectValue(formObj, 'targetlist'); // Make anchors absolute if (href.charAt(0) == '#' && tinyMCE.getParam('convert_urls')) href = tinyMCE.settings['document_base_url'] + href; setAttrib(elm, 'href', convertURL(href, elm)); setAttrib(elm, 'mce_href', href); setAttrib(elm, 'title'); setAttrib(elm, 'target', target == '_self' ? '' : target); setAttrib(elm, 'id'); setAttrib(elm, 'style'); setAttrib(elm, 'class', getSelectValue(formObj, 'classlist')); setAttrib(elm, 'rel'); setAttrib(elm, 'rev'); setAttrib(elm, 'charset'); setAttrib(elm, 'hreflang'); setAttrib(elm, 'dir'); setAttrib(elm, 'lang'); setAttrib(elm, 'tabindex'); setAttrib(elm, 'accesskey'); setAttrib(elm, 'type'); setAttrib(elm, 'onfocus'); setAttrib(elm, 'onblur'); setAttrib(elm, 'onclick'); setAttrib(elm, 'ondblclick'); setAttrib(elm, 'onmousedown'); setAttrib(elm, 'onmouseup'); setAttrib(elm, 'onmouseover'); setAttrib(elm, 'onmousemove'); setAttrib(elm, 'onmouseout'); setAttrib(elm, 'onkeypress'); setAttrib(elm, 'onkeydown'); setAttrib(elm, 'onkeyup'); // Refresh in old MSIE if (tinyMCE.isMSIE5) elm.outerHTML = elm.outerHTML;} |
|
setAttrib(elm, 'mce_href', href); | function setAllAttribs(elm) { var formObj = document.forms[0]; var href = formObj.href.value; var target = getSelectValue(formObj, 'targetlist'); // Make anchors absolute if (href.charAt(0) == '#' && tinyMCE.getParam('convert_urls')) href = tinyMCE.settings['document_base_url'] + href; setAttrib(elm, 'href', convertURL(href, elm)); //setAttrib(elm, 'mce_href', href); setAttrib(elm, 'title'); setAttrib(elm, 'target', target == '_self' ? '' : target); setAttrib(elm, 'id'); setAttrib(elm, 'style'); setAttrib(elm, 'class', getSelectValue(formObj, 'classlist')); setAttrib(elm, 'rel'); setAttrib(elm, 'rev'); setAttrib(elm, 'charset'); setAttrib(elm, 'hreflang'); setAttrib(elm, 'dir'); setAttrib(elm, 'lang'); setAttrib(elm, 'tabindex'); setAttrib(elm, 'accesskey'); setAttrib(elm, 'type'); setAttrib(elm, 'onfocus'); setAttrib(elm, 'onblur'); setAttrib(elm, 'onclick'); setAttrib(elm, 'ondblclick'); setAttrib(elm, 'onmousedown'); setAttrib(elm, 'onmouseup'); setAttrib(elm, 'onmouseover'); setAttrib(elm, 'onmousemove'); setAttrib(elm, 'onmouseout'); setAttrib(elm, 'onkeypress'); setAttrib(elm, 'onkeydown'); setAttrib(elm, 'onkeyup'); // Refresh in old MSIE if (tinyMCE.isMSIE5) elm.outerHTML = elm.outerHTML;} |
|
Rico.Corner.changeColor(this.contentDiv, this.backgroundColor); | OpenLayers.Rico.Corner.changeColor(this.contentDiv, this.backgroundColor); | setBackgroundColor:function(color) { if (color != undefined) { this.backgroundColor = color; } if (this.div != null) { if (this.contentDiv != null) { this.div.style.background = "transparent"; Rico.Corner.changeColor(this.contentDiv, this.backgroundColor); } } }, |
if (newBaseLayer != this.baseLayer) { | if (newBaseLayer != oldBaseLayer) { | setBaseLayer: function(newBaseLayer, noEvent) { if (newBaseLayer != this.baseLayer) { // is newBaseLayer an already loaded layer? if (this.layers.indexOf(newBaseLayer) != -1) { // make the old base layer invisible if (this.baseLayer != null) { this.baseLayer.setVisibility(false, noEvent); } // set new baselayer and make it visible this.baseLayer = newBaseLayer; this.baseLayer.setVisibility(true, noEvent); //redraw all layers var center = this.getCenter(); if (center != null) { var zoom = this.getZoom(); this.zoom = null; if (zoom > this.baseLayer.numZoomLevels - 1) { zoom = this.baseLayer.numZoomLevels - 1; } this.setCenter(center, zoom); } if ((noEvent == null) || (noEvent == false)) { this.events.triggerEvent("changebaselayer"); } } } }, |
if (this.baseLayer != null) { this.baseLayer.setVisibility(false, noEvent); | if (oldBaseLayer != null) { oldBaseLayer.setVisibility(false, noEvent); | setBaseLayer: function(newBaseLayer, noEvent) { if (newBaseLayer != this.baseLayer) { // is newBaseLayer an already loaded layer? if (this.layers.indexOf(newBaseLayer) != -1) { // make the old base layer invisible if (this.baseLayer != null) { this.baseLayer.setVisibility(false, noEvent); } // set new baselayer and make it visible this.baseLayer = newBaseLayer; this.baseLayer.setVisibility(true, noEvent); //redraw all layers var center = this.getCenter(); if (center != null) { var zoom = this.getZoom(); this.zoom = null; if (zoom > this.baseLayer.numZoomLevels - 1) { zoom = this.baseLayer.numZoomLevels - 1; } this.setCenter(center, zoom); } if ((noEvent == null) || (noEvent == false)) { this.events.triggerEvent("changebaselayer"); } } } }, |
var zoom = this.getZoom(); this.zoom = null; if (zoom > this.baseLayer.numZoomLevels - 1) { zoom = this.baseLayer.numZoomLevels - 1; } | var oldResolution = oldBaseLayer.getResolution(); var zoom = this.baseLayer.getZoomForResolution(oldResolution); | setBaseLayer: function(newBaseLayer, noEvent) { if (newBaseLayer != this.baseLayer) { // is newBaseLayer an already loaded layer? if (this.layers.indexOf(newBaseLayer) != -1) { // make the old base layer invisible if (this.baseLayer != null) { this.baseLayer.setVisibility(false, noEvent); } // set new baselayer and make it visible this.baseLayer = newBaseLayer; this.baseLayer.setVisibility(true, noEvent); //redraw all layers var center = this.getCenter(); if (center != null) { var zoom = this.getZoom(); this.zoom = null; if (zoom > this.baseLayer.numZoomLevels - 1) { zoom = this.baseLayer.numZoomLevels - 1; } this.setCenter(center, zoom); } if ((noEvent == null) || (noEvent == false)) { this.events.triggerEvent("changebaselayer"); } } } }, |
this.rgb = Rico.Color.HSBtoRGB( hsb.h, hsb.s, hsb.b ); | this.rgb = OpenLayers.Rico.Color.HSBtoRGB( hsb.h, hsb.s, hsb.b ); | setBrightness: function(b) { // get an HSB model, and set the new hue... var hsb = this.asHSB(); hsb.b = b; // convert back to RGB and set values... this.rgb = Rico.Color.HSBtoRGB( hsb.h, hsb.s, hsb.b ); }, |
var zoomChanged = false; if (zoom != null) { if (this.zoom && zoom != this.zoom) zoomChanged = true; | var zoomChanged = null; if (zoom != null && zoom != this.zoom && zoom >= 0 && zoom <= this.getZoomLevels()) { zoomChanged = (this.zoom == null ? 0 : this.zoom); | setCenter: function (latlon, zoom) { if (this.center) { // otherwise there's nothing to move yet this.moveLayerContainer(latlon); } this.center = latlon.copyOf(); var zoomChanged = false; if (zoom != null) { if (this.zoom && zoom != this.zoom) zoomChanged = true; this.zoom = zoom; } this.events.triggerEvent("movestart"); this.moveToNewExtent(zoomChanged); this.events.triggerEvent("moveend"); }, |
if (!this.center && !this.isValidLonLat(lonlat)) { lonlat = this.maxExtent.getCenterLonLat(); } | setCenter: function (lonlat, zoom, dragging) { var zoomChanged = (this.isValidZoomLevel(zoom)) && (zoom != this.getZoom()); var centerChanged = (this.isValidLonLat(lonlat)) && (!lonlat.equals(this.center)); // if neither center nor zoom will change, no need to do anything if (zoomChanged || centerChanged || !dragging) { if (!dragging) { this.events.triggerEvent("movestart"); } if (centerChanged) { if ((!zoomChanged) && (this.center)) { // if zoom hasnt changed, just slide layerContainer // (must be done before setting this.center to new value) this.centerLayerContainer(lonlat); } this.center = lonlat.clone(); } // (re)set the layerContainerDiv's location if ((zoomChanged) || (this.layerContainerOrigin == null)) { this.layerContainerOrigin = this.center.clone(); this.layerContainerDiv.style.left = "0px"; this.layerContainerDiv.style.top = "0px"; } if (zoomChanged) { this.zoom = zoom; //redraw popups for (var i = 0; i < this.popups.length; i++) { this.popups[i].updatePosition(); } } //send the move call to the baselayer and all the overlays var bounds = this.getExtent(); for (var i = 0; i < this.layers.length; i++) { var layer = this.layers[i]; if (zoomChanged || (layer.display && layer.inRange())) { layer.moveTo(bounds, zoomChanged, dragging); } } this.events.triggerEvent("move"); if (zoomChanged) { this.events.triggerEvent("zoomend"); } } // even if nothing was done, we want to notify of this if (!dragging) { this.events.triggerEvent("moveend"); } }, |
|
this.branch.setCharPref(name, value != null ? value : ''); | var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); str.data = value; this.branch.setComplexValue(name, Components.interfaces.nsISupportsString, str); | setCharPref: function(name, value) { this.branch.setCharPref(name, value != null ? value : ''); }, |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.