rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
this.continueCommandExecutionWithDelay = function() { // Get the interval to use for this command execution, using the pauseInterval is // specified. Reset the pause interval, since it's a one-off thing. var interval = this.pauseInterval || this.getCommandInterval(); this.pauseInterval = undefined; // Continue processing if (interval >= 0) { window.setTimeout("testLoop.finishCommandExecution()", interval); } }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/2fcc52b4c36971bc80c8c53c7e2a4289ca8af0c0/selenium-executionloop.js/clean/code/javascript/selenium-executionloop.js |
||
if (interval >= 0) { | if (interval < 0) { this.waitingForNext(); } else { | this.continueCommandExecutionWithDelay = function() { // Get the interval to use for this command execution, using the pauseInterval is // specified. Reset the pause interval, since it's a one-off thing. var interval = this.pauseInterval || this.getCommandInterval(); this.pauseInterval = undefined; // Continue processing if (interval >= 0) { window.setTimeout("testLoop.finishCommandExecution()", interval); } }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/2fcc52b4c36971bc80c8c53c7e2a4289ca8af0c0/selenium-executionloop.js/clean/code/javascript/selenium-executionloop.js |
this.continueCommandExecutionWithDelay = function() { // Get the interval to use for this command execution, using the pauseInterval is // specified. Reset the pause interval, since it's a one-off thing. var interval = this.pauseInterval || this.getCommandInterval(); this.pauseInterval = undefined; // Continue processing if (interval >= 0) { window.setTimeout("testLoop.finishCommandExecution()", interval); } }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ed2c8a04823b08b4112b9e08d6cbf9962ca6c66f/selenium-executionloop.js/clean/code/javascript/selenium-executionloop.js |
||
if (interval >= 0) { | if (interval < 0) { this.waitingForNext(); } else { | this.continueCommandExecutionWithDelay = function() { // Get the interval to use for this command execution, using the pauseInterval is // specified. Reset the pause interval, since it's a one-off thing. var interval = this.pauseInterval || this.getCommandInterval(); this.pauseInterval = undefined; // Continue processing if (interval >= 0) { window.setTimeout("testLoop.finishCommandExecution()", interval); } }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ed2c8a04823b08b4112b9e08d6cbf9962ca6c66f/selenium-executionloop.js/clean/code/javascript/selenium-executionloop.js |
}; | }; | this.continueCurrentTest = function() { var testStatus = this.kickoffNextCommandExecution(); if (testStatus == TEST_FINISHED) { this.testComplete(); } }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ffcc6e38fdd60734dac28f8585206590a016367d/selenium-executionloop.js/buggy/code/javascript/selenium-executionloop.js |
this.runInterval = this.speedController.value; | this.reset(); | continueCurrentTest: function () { this.runInterval = this.speedController.value; currentTest.resume(); this._switchContinueButtonToPause(); }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/eff8afcb162f8155443954e039d24982e1947ff1/selenium-testrunner.js/clean/code/javascript/core/scripts/selenium-testrunner.js |
this._switchContinueButtonToPause(); | continueCurrentTest: function () { this.runInterval = this.speedController.value; currentTest.resume(); this._switchContinueButtonToPause(); }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/eff8afcb162f8155443954e039d24982e1947ff1/selenium-testrunner.js/clean/code/javascript/core/scripts/selenium-testrunner.js |
|
}; | }; | this.continueCurrentTest = function() { var testStatus = this.kickoffNextCommandExecution(); if (testStatus == TEST_FINISHED) { this.testComplete(); } }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/02a0b4820ee03a2ea48dcd7849e696cbcb2e910b/selenium-executionloop.js/buggy/code/javascript/selenium-executionloop.js |
document.getElementById('continueTest').disabled = true; | function continueCurrentTest() { testLoop.finishCommandExecution();} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/2fcc52b4c36971bc80c8c53c7e2a4289ca8af0c0/selenium-fitrunner.js/clean/code/javascript/selenium-fitrunner.js |
|
document.getElementById('continueTest').disabled = true; | function continueCurrentTest() { testLoop.finishCommandExecution();} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ed2c8a04823b08b4112b9e08d6cbf9962ca6c66f/selenium-fitrunner.js/buggy/code/javascript/selenium-fitrunner.js |
|
LOG.debug("testLoop.continueTest() - acquire the next command"); | this.continueTest = function() { if (! this.aborted) { this.currentCommand = this.nextCommand(); } if (! this.requiresCallBack) { this.beginNextTest(); } // otherwise, just finish and let the callback invoke beginNextTest() }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ee8f57a55845d6b1bd383c79ecd25cc8e6bc6cc0/selenium-executionloop.js/buggy/code/javascript/selenium-executionloop.js |
|
if (this.waitForCondition == null || this.waitForCondition()) { | if (this.waitForCondition == null) { LOG.debug("null condition; let's continueTest()"); LOG.debug("Command complete"); this.commandComplete(this.result); this.continueTest(); } else if (this.waitForCondition()) { | continueTestWhenConditionIsTrue: function () { /** * Busy wait for waitForCondition() to become true, and then carry * on with test. Fail the current test if there's a timeout or an * exception. */ //LOG.debug("currentTest.continueTestWhenConditionIsTrue()"); selenium.browserbot.runScheduledPollers(); try { if (this.waitForCondition == null || this.waitForCondition()) { LOG.debug("condition satisfied; let's continueTest()"); this.waitForCondition = null; this.continueTest(); } else { //LOG.debug("waitForCondition was false; keep waiting!"); window.setTimeout(fnBind(this.continueTestWhenConditionIsTrue, this), 100); } } catch (e) { var lastResult = {}; lastResult.failed = true; lastResult.failureMessage = extractExceptionMessage(e); this.commandComplete(lastResult); this.testComplete(); } }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/afa54887f887b5863f6af88f1b5293c9af5683a3/selenium-executionloop.js/clean/code/javascript/core/scripts/selenium-executionloop.js |
var lastResult = {}; lastResult.failed = true; lastResult.failureMessage = extractExceptionMessage(e); this.commandComplete(lastResult); this.testComplete(); | this.result = {}; this.result.failed = true; this.result.failureMessage = extractExceptionMessage(e); this.commandComplete(this.result); this.continueTest(); | continueTestWhenConditionIsTrue: function () { /** * Busy wait for waitForCondition() to become true, and then carry * on with test. Fail the current test if there's a timeout or an * exception. */ //LOG.debug("currentTest.continueTestWhenConditionIsTrue()"); selenium.browserbot.runScheduledPollers(); try { if (this.waitForCondition == null || this.waitForCondition()) { LOG.debug("condition satisfied; let's continueTest()"); this.waitForCondition = null; this.continueTest(); } else { //LOG.debug("waitForCondition was false; keep waiting!"); window.setTimeout(fnBind(this.continueTestWhenConditionIsTrue, this), 100); } } catch (e) { var lastResult = {}; lastResult.failed = true; lastResult.failureMessage = extractExceptionMessage(e); this.commandComplete(lastResult); this.testComplete(); } }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/afa54887f887b5863f6af88f1b5293c9af5683a3/selenium-executionloop.js/clean/code/javascript/core/scripts/selenium-executionloop.js |
window.setTimeout(this.continueTestWhenConditionIsTrue.bind(this), 100); | window.setTimeout(fnBind(this.continueTestWhenConditionIsTrue, this), 100); | continueTestWhenConditionIsTrue: function () { /** * Busy wait for waitForCondition() to become true, and then carry * on with test. Fail the current test if there's a timeout or an * exception. */ LOG.debug("currentTest.continueTestWhenConditionIsTrue()"); selenium.browserbot.runScheduledPollers(); try { if (this.waitForCondition == null || this.waitForCondition()) { LOG.debug("condition satisfied; let's continueTest()"); this.waitForCondition = null; this.continueTest(); } else { LOG.debug("waitForCondition was false; keep waiting!"); window.setTimeout(this.continueTestWhenConditionIsTrue.bind(this), 100); } } catch (e) { var lastResult = {}; lastResult.failed = true; lastResult.failureMessage = e.message; this.commandComplete(lastResult); this.testComplete(); } }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/697a29d268d2448c4391184afe752f6497773118/selenium-executionloop.js/clean/code/javascript/core/scripts/selenium-executionloop.js |
this.waitForConditionTimeout = null; | this.continueTestWhenConditionIsTrue = function () { try { if (this.waitForCondition == null || this.waitForCondition()) { this.waitForCondition = null; this.waitForConditionStart = null; this.waitForConditionTimeout = null; this.continueTest(); } else { if (this.waitForConditionTimeout != null) { var now = new Date(); if ((now - this.waitForConditionStart) > this.waitForConditionTimeout) { throw new SeleniumError("Timed out after " + this.waitForConditionTimeout + "ms"); } } window.setTimeout("testLoop.continueTestWhenConditionIsTrue()", 10); } } catch (e) { var lastResult = new CommandResult(); lastResult.failed = true; lastResult.failureMessage = e.message; this.commandComplete(lastResult); this.testComplete(); } }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ee8f57a55845d6b1bd383c79ecd25cc8e6bc6cc0/selenium-executionloop.js/buggy/code/javascript/selenium-executionloop.js |
|
LOG.debug("waitForCondition was false; keep waiting!"); | this.continueTestWhenConditionIsTrue = function () { try { if (this.waitForCondition == null || this.waitForCondition()) { this.waitForCondition = null; this.waitForConditionStart = null; this.waitForConditionTimeout = null; this.continueTest(); } else { if (this.waitForConditionTimeout != null) { var now = new Date(); if ((now - this.waitForConditionStart) > this.waitForConditionTimeout) { throw new SeleniumError("Timed out after " + this.waitForConditionTimeout + "ms"); } } window.setTimeout("testLoop.continueTestWhenConditionIsTrue()", 10); } } catch (e) { var lastResult = new CommandResult(); lastResult.failed = true; lastResult.failureMessage = e.message; this.commandComplete(lastResult); this.testComplete(); } }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ee8f57a55845d6b1bd383c79ecd25cc8e6bc6cc0/selenium-executionloop.js/buggy/code/javascript/selenium-executionloop.js |
|
var tldRegExp = new RegExp("^(\\^(?:[^/]*)(?: var tldRes = res.match(tldRegExp); if (tldRes) { var gTLD = [ "arpa", "com", "edu", "int", "mil", "net", "org", "aero", "biz", "coop", "info", "museum", "name", "pro" ]; var ccTLD = [ "ac", "ad", "ae", "af", "ag", "ai", "al", "am", "an", "ao", "aq", "ar", "ar", "as", "at", "au", "aw", "ax", "az", "ba", "bb", "bd", "be", "bf", "bg", "bh", "bi", "bj", "bm", "bn", "bo", "br", "bs", "bt", "bv", "bw", "by", "bz", "ca", "cc", "cd", "cf", "cg", "ch", "ci", "ck", "cl", "cm", "cn", "co", "cr", "cs", "cu", "cv", "cx", "cy", "cz", "de", "dj", "dk", "dm", "do", "dz", "ec", "ee", "eg", "eh", "er", "es", "et", "eu", "fi", "fj", "fk", "fm", "fo", "fr", "ga", "gb", "gd", "ge", "gf", "gg", "gh", "gi", "gl", "gm", "gn", "gp", "gq", "gr", "gs", "gt", "gu", "gw", "gy", "hk", "hm", "hn", "hr", "ht", "hu", "id", "ie", "il", "im", "in", "io", "iq", "ir", "is", "it", "je", "jm", "jo", "jp", "ke", "kh", "ki", "km", "kn", "kp", "kr", "kw", "ky", "kz", "la", "lb", "lc", "li", "lk", "lr", "ls", "lt", "lu", "lv", "ly", "ma", "mc", "md", "mg", "mg", "mh", "mk", "ml", "mm", "mn", "mo", "mp", "mq", "mr", "mp", "mq", "mr", "ms", "mt", "mu", "mv", "mw", "mx", "my", "mz", "na", "nc", "ne", "nf", "ng", "ni", "nl", "no", "np", "nr", "nu", "nz", "om", "pa", "pe", "pf", "pg", "ph", "pk", "pl", "pm", "pn", "pr", "ps", "pt", "pw", "py", "qa", "re", "ro", "ru", "rw", "sa", "sb", "sc", "sd", "se", "sg", "sh", "si", "sj", "sk", "sl", "sm", "sn", "so", "sr", "st", "sv", "sy", "sz", "tc", "td", "tf", "tg", "th", "tj", "tk", "tl", "tm", "tn", "to", "tp", "tr", "tt", "tv", "tw", "tz", "ua", "ug", "uk", "um", "us", "uy", "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu", "wf", "ws", "ye", "yt", "yu", "za", "zm", "zw" ] var subTLD = [ "co", "or" ] var tldStr = "(\\.((" + gTLD.join("|") +")|(((" + subTLD.join( "|" ) + ")\\.)?(" +ccTLD.join("|") +"))))"; res = tldRes[1] + tldStr + tldRes[3]; } | function convert2RegExp( pattern ) { s = new String(pattern); res = new String("^"); for (var i = 0 ; i < s.length ; i++) { switch(s[i]) { case '*' : res += ".*"; break; case '.' : case '?' : case '^' : case '$' : case '+' : case '{' : case '[' : case '|' : case '(' : case ')' : case ']' : res += "\\" + s[i]; break; case '\\' : res += "\\\\"; break; case ' ' : // Remove spaces from URLs. break; default : res += s[i]; break; } } return new RegExp(res + '$', "i");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0ffe0d13bc268a9071251a057c30ab9ba398fe0b/greasemonkey.js/buggy/src/content/greasemonkey.js |
|
function Convert (s, ty) | function Convert (s, ty, validator) | function Convert (s, ty){ var cvt = this ["To" + ty]; if (typeof (cvt) == 'function') return cvt (s); else return null;} | 7338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7338/f9cd6d0dbb79bde7153e4901d04bc2ceb87dcb68/WebUIValidation_2.0.js/buggy/mcs/class/System.Web/resources/WebUIValidation_2.0.js |
return cvt (s); | return cvt (s, validator); | function Convert (s, ty){ var cvt = this ["To" + ty]; if (typeof (cvt) == 'function') return cvt (s); else return null;} | 7338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7338/f9cd6d0dbb79bde7153e4901d04bc2ceb87dcb68/WebUIValidation_2.0.js/buggy/mcs/class/System.Web/resources/WebUIValidation_2.0.js |
result[1] = result[1].replace(/%20/gi, " "); result[3] = result[3].replace(/%20/gi, " "); | WikiEditor.prototype.convertAttachmentInternal = function(regexp, result, content) { var str; if (result[1] == result[3]) str = "{attach:" + result[1] + "}"; else if ((result[1] == "undefined") || (this.trimString(result[1]) == "")) str = "{attach:" + result[3] + "}"; else str = "{attach:" + result[3] + "|" + result[1] + "}"; return content.replace(regexp, str);} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/baa0ff49e632f866bc8a0a1f4a567e8416b94608/attachments.js/clean/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/attachments.js |
|
return content.substring(0, bounds["start"]) + "\r\n" + str + content.substring(bounds["end"], content.length); | return content.substring(0, bounds["start"]) + "\r\n" + str + content.substring(bounds["end"], content.length); | WikiEditor.prototype.convertListInternal = function(regexp, result, content) { var bounds = this.replaceMatchingTag(content, result[1], null); var str = ""; if(bounds && bounds["start"] > -1) { str = this._convertListInternal(content.substring(bounds["start"], bounds["end"])); return content.substring(0, bounds["start"]) + "\r\n" + str + content.substring(bounds["end"], content.length); } return content;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/baa0ff49e632f866bc8a0a1f4a567e8416b94608/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
return content; | return content; | WikiEditor.prototype.convertListInternal = function(regexp, result, content) { var bounds = this.replaceMatchingTag(content, result[1], null); var str = ""; if(bounds && bounds["start"] > -1) { str = this._convertListInternal(content.substring(bounds["start"], bounds["end"])); return content.substring(0, bounds["start"]) + "\r\n" + str + content.substring(bounds["end"], content.length); } return content;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/baa0ff49e632f866bc8a0a1f4a567e8416b94608/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
var tag = "font"; | var tag = "font", style = "", class = "", id = "", name = ""; | WikiEditor.prototype.convertStyleExternal = function(regexp, result, content) { var str = ""; var tag = "font"; var atts = result[1].split("|"); for (var i=0; i < atts.length; i++) { var att = atts[i].substring(0, atts[i].indexOf("=")); var value = atts[i].substring(atts[i].indexOf("=") + 1, atts[i].length); if (att == "size") att = "font-size"; if (att == "face") att = "font-family"; if (i==0) { if (att == "type") { tag = value; str = "<" + tag + " "; } else { str = "<" + tag + " style=\"" + att + ":" + value + ";"; } } else if (i < atts.length) { if (i == 1) str += "style=\""; str += " " + att + ":" + value + ";"; if (i == atts.length - 1) str += "\"" } if (atts.length == 1) { str += "\""; } } str += ">"; str += result[2]; str += "</" + tag + ">"; return content.replace(regexp, str) ;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/d8e01170d65b6a2465209dec28f3f2c10514d226/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
var att = atts[i].substring(0, atts[i].indexOf("=")); var value = atts[i].substring(atts[i].indexOf("=") + 1, atts[i].length); if (att == "size") att = "font-size"; if (att == "face") att = "font-family"; if (i==0) { if (att == "type") { tag = value; str = "<" + tag + " "; } else { str = "<" + tag + " style=\"" + att + ":" + value + ";"; } } else if (i < atts.length) { if (i == 1) str += "style=\""; str += " " + att + ":" + value + ";"; if (i == atts.length - 1) str += "\"" } if (atts.length == 1) { str += "\""; } | var att = this.trimString(atts[i].substring(0, atts[i].indexOf("="))); var value = this.trimString(atts[i].substring(atts[i].indexOf("=") + 1, atts[i].length)); if (att == "class") class = value; else if (att == "id") id = value; else if (att == "name") name = value; else if (att == "type") tag = value; else style += att + ":" + value + ";"; | WikiEditor.prototype.convertStyleExternal = function(regexp, result, content) { var str = ""; var tag = "font"; var atts = result[1].split("|"); for (var i=0; i < atts.length; i++) { var att = atts[i].substring(0, atts[i].indexOf("=")); var value = atts[i].substring(atts[i].indexOf("=") + 1, atts[i].length); if (att == "size") att = "font-size"; if (att == "face") att = "font-family"; if (i==0) { if (att == "type") { tag = value; str = "<" + tag + " "; } else { str = "<" + tag + " style=\"" + att + ":" + value + ";"; } } else if (i < atts.length) { if (i == 1) str += "style=\""; str += " " + att + ":" + value + ";"; if (i == atts.length - 1) str += "\"" } if (atts.length == 1) { str += "\""; } } str += ">"; str += result[2]; str += "</" + tag + ">"; return content.replace(regexp, str) ;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/d8e01170d65b6a2465209dec28f3f2c10514d226/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
str += "<" + tag; if (id != "") str += " id=\"" + id + "\""; if (class != "") str += " class=\"" + class + "\""; if (name != "") str += " name=\"" + name + "\""; if (style != "") str += " style=\"" + style + "\""; | WikiEditor.prototype.convertStyleExternal = function(regexp, result, content) { var str = ""; var tag = "font"; var atts = result[1].split("|"); for (var i=0; i < atts.length; i++) { var att = atts[i].substring(0, atts[i].indexOf("=")); var value = atts[i].substring(atts[i].indexOf("=") + 1, atts[i].length); if (att == "size") att = "font-size"; if (att == "face") att = "font-family"; if (i==0) { if (att == "type") { tag = value; str = "<" + tag + " "; } else { str = "<" + tag + " style=\"" + att + ":" + value + ";"; } } else if (i < atts.length) { if (i == 1) str += "style=\""; str += " " + att + ":" + value + ";"; if (i == atts.length - 1) str += "\"" } if (atts.length == 1) { str += "\""; } } str += ">"; str += result[2]; str += "</" + tag + ">"; return content.replace(regexp, str) ;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/d8e01170d65b6a2465209dec28f3f2c10514d226/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
|
var tag = "font", style = "", class = "", id = "", name = ""; | WikiEditor.prototype.convertStyleExternal = function(regexp, result, content) { var str = ""; var tag = "font", style = "", class = "", id = "", name = ""; var atts = result[1].split("|"); for (var i=0; i < atts.length; i++) { var att = this.trimString(atts[i].substring(0, atts[i].indexOf("="))); var value = this.trimString(atts[i].substring(atts[i].indexOf("=") + 1, atts[i].length)); if (att == "class") class = value; else if (att == "id") id = value; else if (att == "name") name = value; else if (att == "type") tag = value; else style += att + ":" + value + ";"; } str += "<" + tag; if (id != "") str += " id=\"" + id + "\""; if (class != "") str += " class=\"" + class + "\""; if (name != "") str += " name=\"" + name + "\""; if (style != "") str += " style=\"" + style + "\""; str += ">"; str += result[2]; str += "</" + tag + ">"; return content.replace(regexp, str) ;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/b0cf9cdc57a651cb0de2982beeeef65bb2eefa7b/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
|
if (att == "class") class = value; else if (att == "id") id = value; else if (att == "name") name = value; else if (att == "type") tag = value; else style += att + ":" + value + ";"; | if (att == "class") { myclass = value; } else if (att == "id") { id = value; } else if (att == "name") { name = value; } else if (att == "type") { tag = value; } else { style += att + ":" + value + ";"; } | WikiEditor.prototype.convertStyleExternal = function(regexp, result, content) { var str = ""; var tag = "font", style = "", class = "", id = "", name = ""; var atts = result[1].split("|"); for (var i=0; i < atts.length; i++) { var att = this.trimString(atts[i].substring(0, atts[i].indexOf("="))); var value = this.trimString(atts[i].substring(atts[i].indexOf("=") + 1, atts[i].length)); if (att == "class") class = value; else if (att == "id") id = value; else if (att == "name") name = value; else if (att == "type") tag = value; else style += att + ":" + value + ";"; } str += "<" + tag; if (id != "") str += " id=\"" + id + "\""; if (class != "") str += " class=\"" + class + "\""; if (name != "") str += " name=\"" + name + "\""; if (style != "") str += " style=\"" + style + "\""; str += ">"; str += result[2]; str += "</" + tag + ">"; return content.replace(regexp, str) ;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/b0cf9cdc57a651cb0de2982beeeef65bb2eefa7b/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
if (id != "") str += " id=\"" + id + "\""; if (class != "") str += " class=\"" + class + "\""; if (name != "") str += " name=\"" + name + "\""; if (style != "") str += " style=\"" + style + "\""; | if (id != "") { str += " id=\"" + id + "\""; } if (myclass != "") { str += " class=\"" + myclass + "\""; } if (name != "") { str += " name=\"" + name + "\""; } if (style != "") { str += " style=\"" + style + "\""; } | WikiEditor.prototype.convertStyleExternal = function(regexp, result, content) { var str = ""; var tag = "font", style = "", class = "", id = "", name = ""; var atts = result[1].split("|"); for (var i=0; i < atts.length; i++) { var att = this.trimString(atts[i].substring(0, atts[i].indexOf("="))); var value = this.trimString(atts[i].substring(atts[i].indexOf("=") + 1, atts[i].length)); if (att == "class") class = value; else if (att == "id") id = value; else if (att == "name") name = value; else if (att == "type") tag = value; else style += att + ":" + value + ";"; } str += "<" + tag; if (id != "") str += " id=\"" + id + "\""; if (class != "") str += " class=\"" + class + "\""; if (name != "") str += " name=\"" + name + "\""; if (style != "") str += " style=\"" + style + "\""; str += ">"; str += result[2]; str += "</" + tag + ">"; return content.replace(regexp, str) ;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/b0cf9cdc57a651cb0de2982beeeef65bb2eefa7b/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
if (attributes && attributes["id"]) { str += "|id=" + attributes["id"] ; } if (attributes && attributes["class"]) { str += "|class=" + attributes["class"] ; } if (attributes && attributes["name"]) { str += "|name=" + attributes["name"] ; } | WikiEditor.prototype.convertStyleInternal = function(regexp, result, content) { var type = result[1]; var str = ""; if (type == "span" || type =="div") { var attributes = this.readAttributes(result[2]); str += "{style:type=" + type; if (attributes && attributes["style"]) { var atts = attributes["style"].split(";"); for (var i=0; i < atts.length ; i++) { var att = this.trimString(atts[i].substring(0, atts[i].indexOf(":"))); var value = this.trimString(atts[i].substring(atts[i].indexOf(":") + 1 , atts[i].length)); str += "|" + att + "=" + value; } } str += "}"; str += result[3]; str += "{style}"; } // alert("str = " + str); return content.replace(regexp, str);} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/d8e01170d65b6a2465209dec28f3f2c10514d226/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
|
content = content.replace(/<div class="paragraph">([\s\S]+?)<\/div>/g,'$1'); content = content.replace(/<span class="(wikilink|wikiexternallink)">\s*([\s\S]+?)<\/span>/g,'$2'); content = content.replace(/<span class="(bold|italic|strike)">([\s\S]+?)<\/span>/g,'$2'); | WikiEditor.prototype.convertStyleInternal = function(regexp, result, content) { var type = result[1]; var str = ""; if (type == "span" || type =="div") { var attributes = this.readAttributes(result[2]); str += "{style:type=" + type; if (attributes && attributes["id"]) { str += "|id=" + attributes["id"] ; } if (attributes && attributes["class"]) { str += "|class=" + attributes["class"] ; } if (attributes && attributes["name"]) { str += "|name=" + attributes["name"] ; } if (attributes && attributes["style"]) { var atts = attributes["style"].split(";"); for (var i=0; i < atts.length ; i++) { var att = this.trimString(atts[i].substring(0, atts[i].indexOf(":"))); var value = this.trimString(atts[i].substring(atts[i].indexOf(":") + 1 , atts[i].length)); str += "|" + att + "=" + value; } } str += "}"; str += result[3]; str += "{style}"; } // alert("str = " + str); return content.replace(regexp, str);} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/f29deeb74124823188a469c79e8bffa00b36f465/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
|
var lines = this._getLines(text); | var _lines = this._getLines(text); | WikiEditor.prototype.convertTableExternal = function(regexp, result, content) { var text = this.trimString(result[1]); var lines = this._getLines(text); var str = "<table class=\"wiki-table\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">" for (var i=0; i < lines.length; i++) lines[i] = this.trimString(lines[i].replace(/\r|\n/g, "")); var rows = new Array(); // rows of table var rowindex = 0; for (var i=0; i < lines.length; i++) { var row = ""; var k = 0; do { row += lines[i+k]; k++; } while ((lines[i + k] != null) && (lines[i+k-1].lastIndexOf("\\\\") == (lines[i+k-1].length - 2))) rows[rowindex] = row; rowindex++; i += (k - 1); } for (var i=0; i < rows.length; i ++) { str += "<tr>"; var cols = rows[i].split("|"); // get cols for (var j=0; j < cols.length; j++) { if ( i== 0) str += "<td style='background:#b6c5f2;font-weight:bold;'>"; else str += "<td style='background:#FFFFFF'>"; var linescol = cols[j].split("\\\\"); if (linescol.length == 1) str += linescol[0]; else if (linescol.length > 1) for (var k=0; k < linescol.length; k++) { if (linescol[k] == "") linescol[k] = " " // for empty paragraph str += ("<p class='paragraph'>" + linescol[k] + "<\/p>"); } str += "<\/td>"; } str += "<\/tr>"; } str += "<\/table>"; return content.replace(regexp, str) ;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/1e540478186618f6b999863aedec34c80810164b/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
for (var i=0; i < lines.length; i++) lines[i] = this.trimString(lines[i].replace(/\r|\n/g, "")); | var lines = new Array(); var numColumns = 0; for (var i=0; i < _lines.length; i++) { _lines[i] = this.trimString(_lines[i].replace(/\r|\n/g, "")); _lines[i] = _lines[i].replace(/<\/?p[^>]*>/gi, ""); if (_lines[i] != "") { lines[numColumns] = _lines[i]; numColumns++; } } | WikiEditor.prototype.convertTableExternal = function(regexp, result, content) { var text = this.trimString(result[1]); var lines = this._getLines(text); var str = "<table class=\"wiki-table\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">" for (var i=0; i < lines.length; i++) lines[i] = this.trimString(lines[i].replace(/\r|\n/g, "")); var rows = new Array(); // rows of table var rowindex = 0; for (var i=0; i < lines.length; i++) { var row = ""; var k = 0; do { row += lines[i+k]; k++; } while ((lines[i + k] != null) && (lines[i+k-1].lastIndexOf("\\\\") == (lines[i+k-1].length - 2))) rows[rowindex] = row; rowindex++; i += (k - 1); } for (var i=0; i < rows.length; i ++) { str += "<tr>"; var cols = rows[i].split("|"); // get cols for (var j=0; j < cols.length; j++) { if ( i== 0) str += "<td style='background:#b6c5f2;font-weight:bold;'>"; else str += "<td style='background:#FFFFFF'>"; var linescol = cols[j].split("\\\\"); if (linescol.length == 1) str += linescol[0]; else if (linescol.length > 1) for (var k=0; k < linescol.length; k++) { if (linescol[k] == "") linescol[k] = " " // for empty paragraph str += ("<p class='paragraph'>" + linescol[k] + "<\/p>"); } str += "<\/td>"; } str += "<\/tr>"; } str += "<\/table>"; return content.replace(regexp, str) ;} | 6184 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/1e540478186618f6b999863aedec34c80810164b/core.js/buggy/xwiki-platform-web/standard/src/main/webapp/wiki_editor_2/plugins/core.js |
tinyMCE.importPluginLanguagePack('table','en,tr,ar,cs,da,de,el,es,fi,fr_ca,hu,it,ja,ko,nl,nb,pl,pt,pt_br,sv,tw,zh_cn,fr,de,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_TablePlugin={getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems',authorurl:'http: | tinyMCE.importPluginLanguagePack('table');var TinyMCE_TablePlugin={getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems AB',authorurl:'http: | tinyMCE.importPluginLanguagePack('table','en,tr,ar,cs,da,de,el,es,fi,fr_ca,hu,it,ja,ko,nl,nb,pl,pt,pt_br,sv,tw,zh_cn,fr,de,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_TablePlugin={getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_table.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){if(tinyMCE.isGecko){var doc=inst.getDoc();tinyMCE.addEvent(doc,"mouseup",TinyMCE_TablePlugin._mouseDownHandler);}inst.tableRowClipboard=null;},getControlHTML:function(control_name){var controls=new Array(['table','table.gif','lang_table_desc','mceInsertTable',true],['delete_col','table_delete_col.gif','lang_table_delete_col_desc','mceTableDeleteCol'],['delete_row','table_delete_row.gif','lang_table_delete_row_desc','mceTableDeleteRow'],['col_after','table_insert_col_after.gif','lang_table_col_after_desc','mceTableInsertColAfter'],['col_before','table_insert_col_before.gif','lang_table_col_before_desc','mceTableInsertColBefore'],['row_after','table_insert_row_after.gif','lang_table_row_after_desc','mceTableInsertRowAfter'],['row_before','table_insert_row_before.gif','lang_table_row_before_desc','mceTableInsertRowBefore'],['row_props','table_row_props.gif','lang_table_row_desc','mceTableRowProps',true],['cell_props','table_cell_props.gif','lang_table_cell_desc','mceTableCellProps',true],['split_cells','table_split_cells.gif','lang_table_split_cells_desc','mceTableSplitCells',true],['merge_cells','table_merge_cells.gif','lang_table_merge_cells_desc','mceTableMergeCells',true]);for(var i=0;i<controls.length;i++){var but=controls[i];var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+but[3]+'\', '+(but.length>4?but[4]:false)+(but.length>5?', \''+but[5]+'\'':'')+');return false;';if(but[0]==control_name)return tinyMCE.getButtonHTML(control_name,but[2],'{$pluginurl}/images/'+but[1],but[3],(but.length>4?but[4]:false));}if(control_name=="tablecontrols"){var html="";html+=tinyMCE.getControlHTML("table");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("row_props");html+=tinyMCE.getControlHTML("cell_props");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("row_before");html+=tinyMCE.getControlHTML("row_after");html+=tinyMCE.getControlHTML("delete_row");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("col_before");html+=tinyMCE.getControlHTML("col_after");html+=tinyMCE.getControlHTML("delete_col");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("split_cells");html+=tinyMCE.getControlHTML("merge_cells");return html;}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":var inst=tinyMCE.getInstanceById(editor_id);inst.execCommand('mceBeginUndoLevel');TinyMCE_TablePlugin._doExecCommand(editor_id,element,command,user_interface,value);inst.execCommand('mceEndUndoLevel');return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){var colspan="1",rowspan="1";var inst=tinyMCE.getInstanceById(editor_id);tinyMCE.switchClass(editor_id+'_table','mceButtonNormal');tinyMCE.switchClass(editor_id+'_row_props','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_cell_props','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_row_before','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_row_after','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_delete_row','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_col_before','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_col_after','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_delete_col','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_split_cells','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_merge_cells','mceButtonDisabled');if(tdElm=tinyMCE.getParentElement(node,"td,th")){tinyMCE.switchClass(editor_id+'_cell_props','mceButtonSelected');tinyMCE.switchClass(editor_id+'_row_before','mceButtonNormal');tinyMCE.switchClass(editor_id+'_row_after','mceButtonNormal');tinyMCE.switchClass(editor_id+'_delete_row','mceButtonNormal');tinyMCE.switchClass(editor_id+'_col_before','mceButtonNormal');tinyMCE.switchClass(editor_id+'_col_after','mceButtonNormal');tinyMCE.switchClass(editor_id+'_delete_col','mceButtonNormal');colspan=tinyMCE.getAttrib(tdElm,"colspan");rowspan=tinyMCE.getAttrib(tdElm,"rowspan");colspan=colspan==""?"1":colspan;rowspan=rowspan==""?"1":rowspan;if(colspan!="1"||rowspan!="1")tinyMCE.switchClass(editor_id+'_split_cells','mceButtonNormal');}if(tinyMCE.getParentElement(node,"tr"))tinyMCE.switchClass(editor_id+'_row_props','mceButtonSelected');if(tinyMCE.getParentElement(node,"table")){tinyMCE.switchClass(editor_id+'_table','mceButtonSelected');tinyMCE.switchClass(editor_id+'_merge_cells','mceButtonNormal');}},_mouseDownHandler:function(e){var elm=tinyMCE.isMSIE?event.srcElement:e.target;var focusElm=tinyMCE.selectedInstance.getFocusElement();if(elm.nodeName=="BODY"&&(focusElm.nodeName=="TD"||focusElm.nodeName=="TH"||(focusElm.parentNode&&focusElm.parentNode.nodeName=="TD")||(focusElm.parentNode&&focusElm.parentNode.nodeName=="TH"))){window.setTimeout(function(){var tableElm=tinyMCE.getParentElement(focusElm,"table");tinyMCE.handleVisualAid(tableElm,true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);},10);}},_doExecCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();var trElm=tinyMCE.getParentElement(focusElm,"tr");var tdElm=tinyMCE.getParentElement(focusElm,"td,th");var tableElm=tinyMCE.getParentElement(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i<ar.length;i++){if(ar[i].length>0&&inArray(ar[i],v))return true;if(ar[i]==v)return true;}return false;}function makeTD(){var newTD=doc.createElement("td");newTD.innerHTML=" ";}function getColRowSpan(td){var colspan=tinyMCE.getAttrib(td,"colspan");var rowspan=tinyMCE.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan};}function getCellPos(grid,td){for(var y=0;y<grid.length;y++){for(var x=0;x<grid[y].length;x++){if(grid[y][x]==td)return{cellindex:x,rowindex:y};}}return null;}function getCell(grid,row,col){if(grid[row]&&grid[row][col])return grid[row][col];return null;}function getTableGrid(table){var grid=new Array();var rows=table.rows;for(var y=0;y<rows.length;y++){for(var x=0;x<rows[y].cells.length;x++){var td=rows[y].cells[x];var sd=getColRowSpan(td);for(xstart=x;grid[y]&&grid[y][xstart];xstart++);for(var y2=y;y2<y+sd['rowspan'];y2++){if(!grid[y2])grid[y2]=new Array();for(var x2=xstart;x2<xstart+sd['colspan'];x2++){grid[y2][x2]=td;}}}}return grid;}function trimRow(table,tr,td,new_tr){var grid=getTableGrid(table);var cpos=getCellPos(grid,td);if(new_tr.cells.length!=tr.childNodes.length){var cells=tr.childNodes;var lastElm=null;for(var x=0;td=getCell(grid,cpos.rowindex,x);x++){var remove=true;var sd=getColRowSpan(td);if(inArray(cells,td)){new_tr.childNodes[x]._delete=true;}else if((lastElm==null||td!=lastElm)&&sd.colspan>1){for(var i=x;i<x+td.colSpan;i++)new_tr.childNodes[i]._delete=true;}if((lastElm==null||td!=lastElm)&&sd.rowspan>1)td.rowSpan=sd.rowspan+1;lastElm=td;}deleteMarked(tableElm);}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node;}return null;}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase())return node;}}return null;}function deleteMarked(tbl){if(tbl.rows==0)return;var tr=tbl.rows[0];do{var next=nextElm(tr,"TR");if(tr._delete){tr.parentNode.removeChild(tr);continue;}var td=tr.cells[0];if(td.cells>1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td);}while((td=nexttd)!=null);}}while((tr=next)!=null);}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i<rowspan&&trNext;i++){var newTD=doc.createElement("td");newTD.innerHTML=" ";if(tinyMCE.isMSIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR");}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=tinyMCE.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i<tr.cells.length;i++){if(tdElm==tr.cells[i]){newTD=tdElm.cloneNode(true);break;}}}if(newTD==null){newTD=doc.createElement("td");newTD.innerHTML=" ";}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm;}return newTR;}switch(command){case"mceTableRowProps":if(trElm==null)return true;if(user_interface){var template=new Array();template['file']='../../plugins/table/row.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_rowprops_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_rowprops_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes"});}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){var template=new Array();template['file']='../../plugins/table/cell.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_cellprops_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_cellprops_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes"});}return true;case"mceInsertTable":if(user_interface){var template=new Array();template['file']='../../plugins/table/table.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_table_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_table_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes",action:value});}return true;case"mceTableDelete":var table=tinyMCE.getParentElement(inst.getFocusElement(),"table");if(table){table.parentNode.removeChild(table);inst.repaint();}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");newTD.innerHTML=" ";newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");newTD.innerHTML=" ";newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR);}break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1){tableElm.parentNode.removeChild(tableElm);return true;}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x<cells.length;x++){if(cells[x].rowSpan>1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD);}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1;}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true;}lastTDElm=tdElm;}}deleteMarked(tableElm);cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;inst.selection.selectNode(getCell(grid,cpos.rowindex,0),true,true);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);newTD.innerHTML=" ";newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm);}else tdElm.colSpan++;lastTDElm=tdElm;}}break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);newTD.innerHTML=" ";newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD);}else tdElm.colSpan++;lastTDElm=tdElm;}}break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if(grid.length>1&&grid[0].length<=1){tableElm.parentNode.removeChild(tableElm);return true;}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm);}lastTDElm=tdElm;}}cpos.cellindex--;if(cpos.cellindex<0)cpos.cellindex=0;inst.selection.selectNode(getCell(grid,0,cpos.cellindex),true,true);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i<colspan;i++){var newTD=doc.createElement("td");newTD.innerHTML=" ";trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan);}addRows(tdElm,trElm,rowspan);}tableElm=tinyMCE.getParentElement(inst.getFocusElement(),"table");break;case"mceTableMergeCells":var rows=new Array();var sel=inst.getSel();var grid=getTableGrid(tableElm);if(tinyMCE.isMSIE||sel.rangeCount==1){if(user_interface){var template=new Array();var sp=getColRowSpan(tdElm);template['file']='../../plugins/table/merge_cells.htm';template['width']=250;template['height']=105+(tinyMCE.isNS7?25:0);template['width']+=tinyMCE.getLang('lang_table_merge_cells_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_merge_cells_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes",action:"update",numcols:sp.colspan,numrows:sp.rowspan});return true;}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y<grid.length;y++){var rowCells=new Array();for(var x=cpos.cellindex;x<grid[y].length;x++){var td=getCell(grid,y,x);if(td&&!inArray(rows,td)&&!inArray(rowCells,td)){var cp=getCellPos(grid,td);if(cp.cellindex<cpos.cellindex+numCols&&cp.rowindex<cpos.rowindex+numRows)rowCells[rowCells.length]=td;}}if(rowCells.length>0)rows[rows.length]=rowCells;}}}else{var cells=new Array();var sel=inst.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i<sel.rangeCount;i++){var rng=sel.getRangeAt(i);var tdElm=rng.startContainer.childNodes[rng.startOffset];if(!tdElm)break;if(tdElm.nodeName=="TD")cells[cells.length]=tdElm;}var tRows=tableElm.rows;for(var y=0;y<tRows.length;y++){var rowCells=new Array();for(var x=0;x<tRows[y].cells.length;x++){var td=tRows[y].cells[x];for(var i=0;i<cells.length;i++){if(td==cells[i]){rowCells[rowCells.length]=td;}}}if(rowCells.length>0)rows[rows.length]=rowCells;}var curRow=new Array();var lastTR=null;for(var y=0;y<grid.length;y++){for(var x=0;x<grid[y].length;x++){grid[y][x]._selected=false;for(var i=0;i<cells.length;i++){if(grid[y][x]==cells[i]){if(x1==-1){x1=x;y1=y;}x2=x;y2=y;grid[y][x]._selected=true;}}}}for(var y=y1;y<=y2;y++){for(var x=x1;x<=x2;x++){if(!grid[y][x]._selected){alert("Invalid selection for merge.");return true;}}}}var rowSpan=1,colSpan=1;var lastRowSpan=-1;for(var y=0;y<rows.length;y++){var rowColSpan=0;for(var x=0;x<rows[y].length;x++){var sd=getColRowSpan(rows[y][x]);rowColSpan+=sd['colspan'];if(lastRowSpan!=-1&&sd['rowspan']!=lastRowSpan){alert("Invalid selection for merge.");return true;}lastRowSpan=sd['rowspan'];}if(rowColSpan>colSpan)colSpan=rowColSpan;lastRowSpan=-1;}var lastColSpan=-1;for(var x=0;x<rows[0].length;x++){var colRowSpan=0;for(var y=0;y<rows.length;y++){var sd=getColRowSpan(rows[y][x]);colRowSpan+=sd['rowspan'];if(lastColSpan!=-1&&sd['colspan']!=lastColSpan){alert("Invalid selection for merge.");return true;}lastColSpan=sd['colspan'];}if(colRowSpan>rowSpan)rowSpan=colRowSpan;lastColSpan=-1;}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y<rows.length;y++){for(var x=0;x<rows[y].length;x++){var html=rows[y][x].innerHTML;var chk=tinyMCE.regexpReplace(html,"[ \t\r\n]","");if(chk!="<br/>"&&chk!="<br>"&&chk!=" "&&(x+y>0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm;}if(tdElm.rowSpan>1)tdElm.rowSpan--;}}}}break;}tableElm=tinyMCE.getParentElement(inst.getFocusElement(),"table");tinyMCE.handleVisualAid(tableElm,true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);tinyMCE.triggerNodeChange();inst.repaint();}return true;}return false;}};tinyMCE.addPlugin("table",TinyMCE_TablePlugin); | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/editor_plugin.js/buggy/mambots/editors/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js |
function correctPNG() | function correctPNG() | function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.{ for(var i=0; i<document.images.length; i++) { var img = document.images[i] var imgName = img.src.toUpperCase() if (imgName.substring(imgName.length-3, imgName.length) == "PNG") { var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText var imgOnClick = " onclick=\"" + img.getAttributeNode("onclick").nodeValue + "\" " if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "<span " + imgID + imgClass + imgTitle + imgOnClick + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" img.outerHTML = strNewHTML i = i-1 } }} | 1595 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1595/cca2e85bcae3b1bdccae09bb27e8ed7c567dcbb3/correct_png.js/clean/source/adm_program/system/correct_png.js |
for(var i=0; i<document.images.length; i++) | var arVersion = navigator.appVersion.split("MSIE") var version = parseFloat(arVersion[1]) if ((version >= 5.5) && (document.body.filters)) | function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.{ for(var i=0; i<document.images.length; i++) { var img = document.images[i] var imgName = img.src.toUpperCase() if (imgName.substring(imgName.length-3, imgName.length) == "PNG") { var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText var imgOnClick = " onclick=\"" + img.getAttributeNode("onclick").nodeValue + "\" " if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "<span " + imgID + imgClass + imgTitle + imgOnClick + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" img.outerHTML = strNewHTML i = i-1 } }} | 1595 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1595/cca2e85bcae3b1bdccae09bb27e8ed7c567dcbb3/correct_png.js/clean/source/adm_program/system/correct_png.js |
var img = document.images[i] var imgName = img.src.toUpperCase() if (imgName.substring(imgName.length-3, imgName.length) == "PNG") { var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText var imgOnClick = " onclick=\"" + img.getAttributeNode("onclick").nodeValue + "\" " if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "<span " + imgID + imgClass + imgTitle + imgOnClick + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" img.outerHTML = strNewHTML i = i-1 } } | for(var i=0; i<document.images.length; i++) { var img = document.images[i] var imgName = img.src.toUpperCase() if (imgName.substring(imgName.length-3, imgName.length) == "PNG") { var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText var imgOnClick = " onclick=\"" + img.getAttributeNode("onclick").nodeValue + "\" " if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "<span " + imgID + imgClass + imgTitle + imgOnClick + " style=\"/*margin: 0px; padding: 0px;*/ " + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" img.outerHTML = strNewHTML i = i-1 } } } | function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.{ for(var i=0; i<document.images.length; i++) { var img = document.images[i] var imgName = img.src.toUpperCase() if (imgName.substring(imgName.length-3, imgName.length) == "PNG") { var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText var imgOnClick = " onclick=\"" + img.getAttributeNode("onclick").nodeValue + "\" " if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "<span " + imgID + imgClass + imgTitle + imgOnClick + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" img.outerHTML = strNewHTML i = i-1 } }} | 1595 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1595/cca2e85bcae3b1bdccae09bb27e8ed7c567dcbb3/correct_png.js/clean/source/adm_program/system/correct_png.js |
tmp_counter=0; | var tmp_counter = 0; | function count_channels() { tmp_counter=0; for (tmp_count in Channels) { if (Channels[tmp_count]) tmp_counter++; } return tmp_counter;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/2a89ac90e96057c1f27b4ede559cce5d9d5a7f83/ircd.js/buggy/ircd.js |
tmp_counter=0; | var tmp_counter = 0; | function count_local_nicks() { tmp_counter=0; for (tmp_count in Clients) { if ((Clients[tmp_count] != undefined) && !Clients[tmp_count].parent) tmp_counter++; } return tmp_counter;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/2a89ac90e96057c1f27b4ede559cce5d9d5a7f83/ircd.js/buggy/ircd.js |
tmp_counter=0; | function count_nicks(count_bit) { if(!count_bit) count_bit=USERMODE_NONE; tmp_counter=0; for (tmp_count in Clients) { if ((Clients[tmp_count] != undefined) && ((Clients[tmp_count].conntype == TYPE_USER) || (Clients[tmp_count].conntype == TYPE_USER_REMOTE)) && (Clients[tmp_count].mode&count_bit) && (!(Clients[tmp_count].mode&USERMODE_INVISIBLE) || (count_bit==USERMODE_INVISIBLE) || (count_bit==USERMODE_OPER) ) ) tmp_counter++; } return tmp_counter;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/2a89ac90e96057c1f27b4ede559cce5d9d5a7f83/ircd.js/buggy/ircd.js |
|
var tmp_counter; | function count_servers(count_all) { if (count_all) tmp_counter=1; // we start by counting ourself. else tmp_counter=0; // we're just counting servers connected to us for (tmp_count in Clients) { if ((Clients[tmp_count] != undefined) && Clients[tmp_count].server) { if (Clients[tmp_count].local || count_all) tmp_counter++; } } return tmp_counter;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/2a89ac90e96057c1f27b4ede559cce5d9d5a7f83/ircd.js/buggy/ircd.js |
|
debug("cqAutoSave: " + theFlag.checked); | function cqAutoSave(n) { // use incremental updates if autosave form element is set // and the incremental flag is true (has already been exported) var theFlag = document.getElementById(g_cq_autosave_id); //alert("cqAutoSave: " + theFlag.checked); if (theFlag.checked) { if (! g_cq_autosave_incremental) { // this session hasn't been exported, as far as we know: // export it, then mark it ok for incremental cqExport(document.getElementById(g_cq_query_form)); g_cq_autosave_incremental = true; } else { //alert("cqAutoSave: incremental"); var theForm = document.getElementById(g_cq_query_form); var theUri = document.getElementById(g_cq_uri).value; if (theForm && theUri) { // default to current buffer if ( (!n) && (n != 0) ) n = g_cq_buffer_current; var theQuery = 'xdmp:node-replace((doc("' + theUri + '")/' // path to buffer n + g_cq_buffers_id + '/' // XPath starts at 1, not 0 + g_cq_buffer_basename + ')[' + (1+n) + "],\n" // new value + '<' + g_cq_buffer_basename + '>' + escape(getBuffer(n).value) + '</' + g_cq_buffer_basename + '>' + '), "updated"'; //alert("cqAutoSave: " + theQuery); submitForm(theForm, theQuery, "text/html"); } // theForm and theUri } // if incremental } // if autosave} // cqAutoSave | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
|
cqExport(document.getElementById(g_cq_query_form)); | cqExport(document.getElementById(g_cq_query_form_id)); | function cqAutoSave(n) { // use incremental updates if autosave form element is set // and the incremental flag is true (has already been exported) var theFlag = document.getElementById(g_cq_autosave_id); //alert("cqAutoSave: " + theFlag.checked); if (theFlag.checked) { if (! g_cq_autosave_incremental) { // this session hasn't been exported, as far as we know: // export it, then mark it ok for incremental cqExport(document.getElementById(g_cq_query_form)); g_cq_autosave_incremental = true; } else { //alert("cqAutoSave: incremental"); var theForm = document.getElementById(g_cq_query_form); var theUri = document.getElementById(g_cq_uri).value; if (theForm && theUri) { // default to current buffer if ( (!n) && (n != 0) ) n = g_cq_buffer_current; var theQuery = 'xdmp:node-replace((doc("' + theUri + '")/' // path to buffer n + g_cq_buffers_id + '/' // XPath starts at 1, not 0 + g_cq_buffer_basename + ')[' + (1+n) + "],\n" // new value + '<' + g_cq_buffer_basename + '>' + escape(getBuffer(n).value) + '</' + g_cq_buffer_basename + '>' + '), "updated"'; //alert("cqAutoSave: " + theQuery); submitForm(theForm, theQuery, "text/html"); } // theForm and theUri } // if incremental } // if autosave} // cqAutoSave | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
var theForm = document.getElementById(g_cq_query_form); | debug("cqAutoSave: incremental"); var theForm = document.getElementById(g_cq_query_form_id); | function cqAutoSave(n) { // use incremental updates if autosave form element is set // and the incremental flag is true (has already been exported) var theFlag = document.getElementById(g_cq_autosave_id); //alert("cqAutoSave: " + theFlag.checked); if (theFlag.checked) { if (! g_cq_autosave_incremental) { // this session hasn't been exported, as far as we know: // export it, then mark it ok for incremental cqExport(document.getElementById(g_cq_query_form)); g_cq_autosave_incremental = true; } else { //alert("cqAutoSave: incremental"); var theForm = document.getElementById(g_cq_query_form); var theUri = document.getElementById(g_cq_uri).value; if (theForm && theUri) { // default to current buffer if ( (!n) && (n != 0) ) n = g_cq_buffer_current; var theQuery = 'xdmp:node-replace((doc("' + theUri + '")/' // path to buffer n + g_cq_buffers_id + '/' // XPath starts at 1, not 0 + g_cq_buffer_basename + ')[' + (1+n) + "],\n" // new value + '<' + g_cq_buffer_basename + '>' + escape(getBuffer(n).value) + '</' + g_cq_buffer_basename + '>' + '), "updated"'; //alert("cqAutoSave: " + theQuery); submitForm(theForm, theQuery, "text/html"); } // theForm and theUri } // if incremental } // if autosave} // cqAutoSave | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
debug("cqAutoSave: " + theQuery); | function cqAutoSave(n) { // use incremental updates if autosave form element is set // and the incremental flag is true (has already been exported) var theFlag = document.getElementById(g_cq_autosave_id); //alert("cqAutoSave: " + theFlag.checked); if (theFlag.checked) { if (! g_cq_autosave_incremental) { // this session hasn't been exported, as far as we know: // export it, then mark it ok for incremental cqExport(document.getElementById(g_cq_query_form)); g_cq_autosave_incremental = true; } else { //alert("cqAutoSave: incremental"); var theForm = document.getElementById(g_cq_query_form); var theUri = document.getElementById(g_cq_uri).value; if (theForm && theUri) { // default to current buffer if ( (!n) && (n != 0) ) n = g_cq_buffer_current; var theQuery = 'xdmp:node-replace((doc("' + theUri + '")/' // path to buffer n + g_cq_buffers_id + '/' // XPath starts at 1, not 0 + g_cq_buffer_basename + ')[' + (1+n) + "],\n" // new value + '<' + g_cq_buffer_basename + '>' + escape(getBuffer(n).value) + '</' + g_cq_buffer_basename + '>' + '), "updated"'; //alert("cqAutoSave: " + theQuery); submitForm(theForm, theQuery, "text/html"); } // theForm and theUri } // if incremental } // if autosave} // cqAutoSave | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
|
theDatabase = document.getElementById(g_cq_database_list_id); | theDatabase = document.getElementById(g_cq_eval_list_id); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_id + ' id="' + g_cq_buffers_id + '">'; for (var i = 0; i < g_cq_buffers; i++) { theQuery += '<' + g_cq_buffer_basename + '>' + escape(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } // for buffers theQuery += '</' + g_cq_buffers_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_database_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); // TODO restore the user's chosen db debug("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO must we really encode each of these? CDATA? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO must we really escape each of these? CDATA? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/acaf2f3cc32a6781b1b116b2d37f39fc2d4472e2/cq.js/clean/cq.js |
||
function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO must we really encode each of these? CDATA? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO must we really escape each of these? CDATA? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/acaf2f3cc32a6781b1b116b2d37f39fc2d4472e2/cq.js/clean/cq.js |
||
if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; var buf = null; var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } | if (! theUri) { return null; } var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; var buf = null; var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = trim(document.getElementById(g_cq_uri).value); if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug.print("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d682e810d9bf848245210389669c48ed070f8d26/cq.js/clean/cq.js |
var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } | } var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = trim(document.getElementById(g_cq_uri).value); if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug.print("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d682e810d9bf848245210389669c48ed070f8d26/cq.js/clean/cq.js |
theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); | } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; submitForm(theForm, theQuery, "text/html"); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = trim(document.getElementById(g_cq_uri).value); if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug.print("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d682e810d9bf848245210389669c48ed070f8d26/cq.js/clean/cq.js |
debug.print("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } | debug.print("cqExport: preserving selected database " + oldDatabase); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = trim(document.getElementById(g_cq_uri).value); if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug.print("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d682e810d9bf848245210389669c48ed070f8d26/cq.js/clean/cq.js |
debug("cqExport: null listNode"); | debug.print("cqExport: null listNode"); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
debug("cqExport: preserving selected database " + oldDatabase); | debug.print("cqExport: preserving selected database " + oldDatabase); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
theDatabase = document.getElementById(g_cq_database_list); | theDatabase = document.getElementById(g_cq_database_list_id); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_id + ' id="' + g_cq_buffers_id + '">'; for (var i = 0; i < g_cq_buffers; i++) { theQuery += '<' + g_cq_buffer_basename + '>' + escape(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } // for buffers theQuery += '</' + g_cq_buffers_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_database_list); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); // TODO restore the user's chosen db //alert("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
debug("cqExport: preserving selected database " + oldDatabase); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_id + ' id="' + g_cq_buffers_id + '">'; for (var i = 0; i < g_cq_buffers; i++) { theQuery += '<' + g_cq_buffer_basename + '>' + escape(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } // for buffers theQuery += '</' + g_cq_buffers_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_database_list); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); // TODO restore the user's chosen db //alert("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
|
theQuery += '<' + g_cq_history_basename + '>' + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; | queryText = historyQueries[i].firstChild.nodeValue; if (queryText != null) { theQuery += '<' + g_cq_history_basename + '>' + encodeURIComponent(queryText) + '</' + g_cq_history_basename + '>' + "\n"; } | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = trim(document.getElementById(g_cq_uri).value); if (! theUri) { return null; } var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // TODO think about separating queries from worksheets, // for storage purposes. submitForm(theForm, theQuery, "text/html"); debug.print("cqExport: preserving selected database " + oldDatabase);} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/c2e7a157fb2c674a41925a5417c356a9c4ff1404/cq.js/buggy/cq.js |
debug.print("cqExport: preserving selected database " + oldDatabase); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = trim(document.getElementById(g_cq_uri).value); if (! theUri) { return null; } var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // TODO think about separating queries from worksheets, // for storage purposes. submitForm(theForm, theQuery, "text/html"); debug.print("cqExport: preserving selected database " + oldDatabase);} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/c2e7a157fb2c674a41925a5417c356a9c4ff1404/cq.js/buggy/cq.js |
|
alert("cqExport: preserving selected database " + oldDatabase); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_id + ' id="' + g_cq_buffers_id + '">'; for (var i = 0; i < g_cq_buffers; i++) { theQuery += '<' + g_cq_buffer_basename + '>' + escape(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } // for buffers theQuery += '</' + g_cq_buffers_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_database_list); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); // TODO restore the user's chosen db alert("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/7713533e1a5035671ad88b70eaf1a71be6c5fab3/cq.js/clean/cq.js |
|
var theUri = document.getElementById(g_cq_uri).value; | var theUri = trim(document.getElementById(g_cq_uri).value); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug.print("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/80df44989b199bf06ecaf6b380ef0d6ae363df5b/cq.js/clean/cq.js |
theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; | var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO export non-default options (rows, cols, etc), export them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug.print("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' // TODO xml-escape, instead? + encodeURIComponent(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug.print("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/80df44989b199bf06ecaf6b380ef0d6ae363df5b/cq.js/clean/cq.js |
var theParent = document.getElementById(g_cq_buffers_area_id); | function cqExport(theForm) { // export store the buffer state into the value of form element g_cq_uri // if the g_cq_uri does not exist, we must create it in one XQuery, // then populate it in another // the simplest way is to create temporary form elements, and submit them // TODO if the worksheet has non-default rows/cols attributes, export them var theUri = document.getElementById(g_cq_uri).value; if (theUri) { var theQuery = 'xdmp:document-insert("' + theUri + '",' + '<' + g_cq_buffers_area_id + ' id="' + g_cq_buffers_area_id + '">'; // save buffers // childNodes.length will return some non-buffer elements, too! var buf = null; for (var i = 0; i < theParent.childNodes.length; i++) { buf = getBuffer(i); if (buf != null) { theQuery += '<' + g_cq_buffer_basename + '>' + escape(getBuffer(i).value) + '</' + g_cq_buffer_basename + '>' + "\n"; } } // save history too var listNode = getQueryHistoryListNode(false); if (!listNode) { debug("cqExport: null listNode"); } else { var historyQueries = listNode.childNodes; var historyLength = historyQueries.length; for (var i = 0; i < historyLength; i++) { theQuery += '<' + g_cq_history_basename + '>' + escape(historyQueries[i].firstChild.nodeValue) + '</' + g_cq_history_basename + '>' + "\n"; } } theQuery += '</' + g_cq_buffers_area_id + '>)' + ', "exported ' + theUri + '"'; // set the current database to null, // so we save to the default db? theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/html"); debug("cqExport: preserving selected database " + oldDatabase); theDatabase.value = oldDatabase; } // if theUri} // cqExport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d78133c63c6016418ecccff62bb2c65ed609c867/cq.js/clean/cq.js |
|
theDatabase = document.getElementById(g_cq_database_list_id); | theDatabase = document.getElementById(g_cq_eval_list_id); | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); debug("cqImport: " + theQuery); // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_database_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
debug("setting import timeout to " + g_cq_timeout); | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); debug("cqImport: " + theQuery); // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_database_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/060bfd9298d0dda1cada0ef8d4fc481b37878a48/cq.js/clean/cq.js |
|
var theQuery = "(doc('" + theUri + "'), <" + g_cq_buffers_area_id + "/>)[1]"; | var theQuery = "(doc('" + theUri + "'), <" + g_cq_buffers_area_id + "/>)[1]"; | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = trim(document.getElementById(g_cq_uri).value); if (! theUri) return; // if the document doesn't exits, we want an empty parent element var theQuery = "(doc('" + theUri + "'), <" + g_cq_buffers_area_id + "/>)[1]"; var theOutput = getResultFrame(); debug.print("cqImport: " + theQuery); // set the current database to null, // so we save to the default db var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; // must send XML, so that we can use the resulting nodes submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug.print("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d682e810d9bf848245210389669c48ed070f8d26/cq.js/clean/cq.js |
var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = trim(document.getElementById(g_cq_uri).value); if (! theUri) return; // if the document doesn't exits, we want an empty parent element var theQuery = "(doc('" + theUri + "'), <" + g_cq_buffers_area_id + "/>)[1]"; var theOutput = getResultFrame(); debug.print("cqImport: " + theQuery); // set the current database to null, // so we save to the default db var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; // must send XML, so that we can use the resulting nodes submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug.print("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d682e810d9bf848245210389669c48ed070f8d26/cq.js/clean/cq.js |
|
theDatabase.value = oldDatabase; | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = trim(document.getElementById(g_cq_uri).value); if (! theUri) return; // if the document doesn't exits, we want an empty parent element var theQuery = "(doc('" + theUri + "'), <" + g_cq_buffers_area_id + "/>)[1]"; var theOutput = getResultFrame(); debug.print("cqImport: " + theQuery); // set the current database to null, // so we save to the default db var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; // must send XML, so that we can use the resulting nodes submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug.print("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d682e810d9bf848245210389669c48ed070f8d26/cq.js/clean/cq.js |
|
} | } | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = trim(document.getElementById(g_cq_uri).value); if (! theUri) return; // if the document doesn't exits, we want an empty parent element var theQuery = "(doc('" + theUri + "'), <" + g_cq_buffers_area_id + "/>)[1]"; var theOutput = getResultFrame(); debug.print("cqImport: " + theQuery); // set the current database to null, // so we save to the default db var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; // must send XML, so that we can use the resulting nodes submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug.print("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d682e810d9bf848245210389669c48ed070f8d26/cq.js/clean/cq.js |
debug("cqImport: " + theQuery); | debug.print("cqImport: " + theQuery); | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); debug("cqImport: " + theQuery); // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; | var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); debug("cqImport: " + theQuery); // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
debug("setting import timeout to " + g_cq_timeout); | debug.print("setting import timeout to " + g_cq_timeout); | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); debug("cqImport: " + theQuery); // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_eval_list_id); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
debug("cqImport: " + theQuery); | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); //alert("cqImport: " + theQuery); // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_database_list); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
|
theDatabase = document.getElementById(g_cq_database_list); | theDatabase = document.getElementById(g_cq_database_list_id); | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); //alert("cqImport: " + theQuery); // set the current database to null, // so we save to the default db theDatabase = document.getElementById(g_cq_database_list); oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
var theQuery = | var theQuery = | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = trim(document.getElementById(g_cq_uri).value); if (! theUri) return; // if the document doesn't exits, we want an empty parent element var theQuery = "(doc('" + theUri + "'), <" + g_cq_buffers_area_id + "/>)[1]"; var theOutput = getResultFrame(); debug.print("cqImport: " + theQuery); // must send XML, so that we can use the resulting nodes submitForm(theForm, theQuery, "text/xml"); // read the output debug.print("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/c2e7a157fb2c674a41925a5417c356a9c4ff1404/cq.js/buggy/cq.js |
var theUri = document.getElementById(g_cq_uri).value; | var theUri = trim(document.getElementById(g_cq_uri).value); | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); debug.print("cqImport: " + theQuery); // set the current database to null, // so we save to the default db var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug.print("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/80df44989b199bf06ecaf6b380ef0d6ae363df5b/cq.js/clean/cq.js |
var theQuery = "doc('" + theUri + "')"; | var theQuery = "(doc('" + theUri + "'), <" + g_cq_buffers_area_id + "/>)[1]"; | function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); debug.print("cqImport: " + theQuery); // set the current database to null, // so we save to the default db var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug.print("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/80df44989b199bf06ecaf6b380ef0d6ae363df5b/cq.js/clean/cq.js |
function cqImport(theForm) { // load the buffer state from the uri stored in g_cq_uri var theUri = document.getElementById(g_cq_uri).value; if (! theUri) return; var theQuery = "doc('" + theUri + "')"; var theOutput = getResultFrame(); debug.print("cqImport: " + theQuery); // set the current database to null, // so we save to the default db var theDatabase = document.getElementById(g_cq_eval_list_id); var oldDatabase = theDatabase.value; theDatabase.value = null; submitForm(theForm, theQuery, "text/xml"); theDatabase.value = oldDatabase; // read the output debug.print("setting import timeout to " + g_cq_timeout); var theTimeout = setTimeout("finishImport();", g_cq_timeout);} // cqImport | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/80df44989b199bf06ecaf6b380ef0d6ae363df5b/cq.js/clean/cq.js |
||
var theForm = document.getElementById(g_cq_query_form); | var theForm = document.getElementById(g_cq_query_form_id); | function cqListBuffers() { var theForm = document.getElementById(g_cq_query_form); var theQuery = "for $i in input() return (document-uri($i), <br/>)"; submitForm(theForm, theQuery, "text/html");} // cqListBuffers | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
var theForm = $(kQueryFormId); | function cqListDocuments() { // TODO create a link to display each document? var theForm = $(kQueryFormId); var theQuery = "let $est := xdmp:estimate(doc()) " + "return (" + "( text { 'Too many documents to display!' }," + " text { 'First 1000 documents of', $est, 'total:' }," + " text{})[$est gt 1000]," + " for $i in doc()[1 to 1000] return text { base-uri($i) }" + ")"; submitForm(theForm, theQuery, "text/plain", false);} | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/fa73b32cceb4f0083ba3aeb2e77c3b68663bf56d/query.js/buggy/query.js |
|
+ "( text { 'Too many documents to display!' }," + " text { 'First 1000 documents of', $est, 'total:' }," + " text{})[$est gt 1000]," + " for $i in doc()[1 to 1000] return text { base-uri($i) }" | + "( element p { 'Too many documents to display!'," + " 'First 10000 documents of', $est, 'total:' }" + ")[$est gt 10000]," + " for $i in doc()[1 to 10000]" + " let $uri := base-uri($i)" + " order by $uri" + " return ( $uri, <br/> )" | function cqListDocuments() { // TODO create a link to display each document? var theForm = $(kQueryFormId); var theQuery = "let $est := xdmp:estimate(doc()) " + "return (" + "( text { 'Too many documents to display!' }," + " text { 'First 1000 documents of', $est, 'total:' }," + " text{})[$est gt 1000]," + " for $i in doc()[1 to 1000] return text { base-uri($i) }" + ")"; submitForm(theForm, theQuery, "text/plain", false);} | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/fa73b32cceb4f0083ba3aeb2e77c3b68663bf56d/query.js/buggy/query.js |
submitForm(theForm, theQuery, "text/plain", false); | submitForm($(kQueryFormId), theQuery, "text/html", false); | function cqListDocuments() { // TODO create a link to display each document? var theForm = $(kQueryFormId); var theQuery = "let $est := xdmp:estimate(doc()) " + "return (" + "( text { 'Too many documents to display!' }," + " text { 'First 1000 documents of', $est, 'total:' }," + " text{})[$est gt 1000]," + " for $i in doc()[1 to 1000] return text { base-uri($i) }" + ")"; submitForm(theForm, theQuery, "text/plain", false);} | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/fa73b32cceb4f0083ba3aeb2e77c3b68663bf56d/query.js/buggy/query.js |
var theForm = $(gQueryFormId); | var theForm = $(kQueryFormId); | function cqListDocuments() { // TODO create a link to display each document? var theForm = $(gQueryFormId); var theQuery = "let $est := xdmp:estimate(doc()) " + "return (" + "( text { 'Too many documents to display!' }," + " text { 'First 1000 documents of', $est, 'total:' }," + " text{})[$est gt 1000]," + " for $i in doc()[1 to 1000] return text { base-uri($i) }" + ")"; submitForm(theForm, theQuery, "text/plain", false);} | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/95f89c0957a3426915b61066d1c0793d3f8f49db/query.js/buggy/query.js |
function cqOnLoad() { //alert("DEBUG: cqOnLoad"); debug("cqOnLoad: begin"); // register for key-presses document.onkeypress = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form_id); // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list_id).value = currDatabase; } // display the buffer list, exposing buffer 0 refreshBufferList(0); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
||
function cqOnLoad() { //alert("DEBUG: cqOnLoad"); debug("cqOnLoad: begin"); // register for key-presses document.onkeypress = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form_id); // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list_id).value = currDatabase; } // display the buffer list, exposing buffer 0 refreshBufferList(0); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
||
var currDatabase = getCookie(g_cq_database_list_id); | var currDatabase = getCookie(g_cq_eval_list_id); | function cqOnLoad() { //alert("DEBUG: cqOnLoad"); debug("cqOnLoad: begin"); // register for key-presses document.onkeypress = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form_id); // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list_id).value = currDatabase; } // display the buffer list, exposing buffer 0 refreshBufferList(0); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
document.getElementById(g_cq_database_list_id).value = currDatabase; | document.getElementById(g_cq_eval_list_id).value = currDatabase; | function cqOnLoad() { //alert("DEBUG: cqOnLoad"); debug("cqOnLoad: begin"); // register for key-presses document.onkeypress = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form_id); // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list_id).value = currDatabase; } // display the buffer list, exposing buffer 0 refreshBufferList(0); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
refreshBufferList(0); | refreshBufferList(0, "cqOnLoad"); | function cqOnLoad() { //alert("DEBUG: cqOnLoad"); debug("cqOnLoad: begin"); // register for key-presses document.onkeypress = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form_id); // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list_id).value = currDatabase; } // display the buffer list, exposing buffer 0 refreshBufferList(0); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
document.onkeyup = handleKeyUp; | function cqOnLoad() { debug("cqOnLoad: begin"); // check for debug var queryDebug = parseQuery("debug"); if (queryDebug && queryDebug != "false" && queryDebug != "0") DEBUG = true; //debug(navigator.userAgent.toLowerCase()); // register for key-presses document.onkeypress = handleKeyPress; document.onkeyup = handleKeyUp; // recover current db from session cookie var currDatabase = getCookie(g_cq_eval_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_eval_list_id).value = currDatabase; } // recover worksheet (buffers and query history) from session cookie // won't work: cookies get too large //recoverWorksheet(); // set the OS-specific instruction text setInstructionText(); // expose the correct tabs refreshBufferTabs(0); // display the buffer list, exposing buffer 0, and focus refreshBufferList(0, "cqOnLoad"); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/081d9c507c7fe8dce4987711db1a59d3e5fff4ef/cq.js/buggy/cq.js |
|
function cqOnLoad() { debug("cqOnLoad: begin"); // register for key-presses document.onkeypress = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form_id); // display the buffer list, exposing buffer 0 // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list_id).value = currDatabase; } refreshBufferList(0); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/060bfd9298d0dda1cada0ef8d4fc481b37878a48/cq.js/clean/cq.js |
||
function cqOnLoad() { debug("cqOnLoad: begin"); // register for key-presses document.onkeypress = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form_id); // display the buffer list, exposing buffer 0 // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list_id).value = currDatabase; } refreshBufferList(0); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/060bfd9298d0dda1cada0ef8d4fc481b37878a48/cq.js/clean/cq.js |
||
var policy = new PolicyClass("/cq:title", $F("/cq:policy/title"), "head1", $F("/cq:policy/accent-color")); | var policy = new PolicyClass("/cq:title", $F("/cq:policy/title"), "head1", $F("/cq:policy/accent-color")); | function cqOnLoad() { debug.print("cqOnLoad: begin"); // register for key-presses Event.observe(this, "keypress", handleKeyPress); // set up the UI objects gBuffers = new QueryBufferListClass("/cq:input", "/cq:eval-in", "/cq:buffer-list", "/cq:textarea-status"); gBuffers.initHandlers(); gHistory = new QueryHistoryClass("/cq:history", gBuffers); gBufferTabs = new BufferTabsClass("/cq:buffer-tabs", "/cq:buffer-accesskey-text", gBuffers, gHistory); // set the OS-specific instruction text gBufferTabs.setInstructionText(); gSession = new SessionClass(gBufferTabs, "/cq:restore-session"); gSession.restore(); gSession.setAutoSave(); gBufferTabs.setSession(gSession); // enforce local policy, if any var policy = new PolicyClass("/cq:title", $F("/cq:policy/title"), "head1", $F("/cq:policy/accent-color")); policy.enforce(); // display the buffer list, exposing buffer 0, and focus gBuffers.activate(); // once more, to fix widths gBufferTabs.refresh(); resizeFrameset(); // TODO save on unload // looks like we need prototype 1.5 for this: // "$A is not defined" at line 48, in the bind() code.... //Event.observe(parent.window, "unload", // gBufferTabs.unload.bindAsEventListener(gBufferTabs));} | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d247a1b6dacb7417d1b16dd5d23f8786e47c143b/query.js/buggy/query.js |
debug("cqOnLoad: begin"); | debug.print("cqOnLoad: begin"); | function cqOnLoad() { debug("cqOnLoad: begin"); // check for debug var debugStatus = document.getElementById(g_cq_debug_status_id); if (debugStatus != null) debugStatus = debugStatus.value; if (debugStatus != null && debugStatus != "false" && debugStatus != "f" && debugStatus != "0") DEBUG = true; //debug(navigator.userAgent.toLowerCase()); // register for key-presses document.onkeypress = handleKeyPress; // recover current db from session cookie var currDatabase = getCookie(g_cq_eval_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_eval_list_id).value = currDatabase; } // recover worksheet (buffers and query history) from session cookie // won't work: cookies get too large //recoverWorksheet(); // set the OS-specific instruction text setInstructionText(); // expose the correct tabs refreshBufferTabs(0); // display the buffer list, exposing buffer 0, and focus refreshBufferList(0, "cqOnLoad"); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
&& debugStatus != "false" && debugStatus != "f" && debugStatus != "0") DEBUG = true; | && debugStatus != "false" && debugStatus != "f" && debugStatus != "0") { debug.setEnabled(true); } | function cqOnLoad() { debug("cqOnLoad: begin"); // check for debug var debugStatus = document.getElementById(g_cq_debug_status_id); if (debugStatus != null) debugStatus = debugStatus.value; if (debugStatus != null && debugStatus != "false" && debugStatus != "f" && debugStatus != "0") DEBUG = true; //debug(navigator.userAgent.toLowerCase()); // register for key-presses document.onkeypress = handleKeyPress; // recover current db from session cookie var currDatabase = getCookie(g_cq_eval_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_eval_list_id).value = currDatabase; } // recover worksheet (buffers and query history) from session cookie // won't work: cookies get too large //recoverWorksheet(); // set the OS-specific instruction text setInstructionText(); // expose the correct tabs refreshBufferTabs(0); // display the buffer list, exposing buffer 0, and focus refreshBufferList(0, "cqOnLoad"); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
function cqOnLoad() { debug("cqOnLoad: begin"); // check for debug var debugStatus = document.getElementById(g_cq_debug_status_id); if (debugStatus != null) debugStatus = debugStatus.value; if (debugStatus != null && debugStatus != "false" && debugStatus != "f" && debugStatus != "0") DEBUG = true; //debug(navigator.userAgent.toLowerCase()); // register for key-presses document.onkeypress = handleKeyPress; // recover current db from session cookie var currDatabase = getCookie(g_cq_eval_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_eval_list_id).value = currDatabase; } // recover worksheet (buffers and query history) from session cookie // won't work: cookies get too large //recoverWorksheet(); // set the OS-specific instruction text setInstructionText(); // expose the correct tabs refreshBufferTabs(0); // display the buffer list, exposing buffer 0, and focus refreshBufferList(0, "cqOnLoad"); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
||
debug("cqOnLoad: currDatabase = " + currDatabase); | debug.print("cqOnLoad: currDatabase = " + currDatabase); | function cqOnLoad() { debug("cqOnLoad: begin"); // check for debug var debugStatus = document.getElementById(g_cq_debug_status_id); if (debugStatus != null) debugStatus = debugStatus.value; if (debugStatus != null && debugStatus != "false" && debugStatus != "f" && debugStatus != "0") DEBUG = true; //debug(navigator.userAgent.toLowerCase()); // register for key-presses document.onkeypress = handleKeyPress; // recover current db from session cookie var currDatabase = getCookie(g_cq_eval_list_id); if (currDatabase != null) { debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_eval_list_id).value = currDatabase; } // recover worksheet (buffers and query history) from session cookie // won't work: cookies get too large //recoverWorksheet(); // set the OS-specific instruction text setInstructionText(); // expose the correct tabs refreshBufferTabs(0); // display the buffer list, exposing buffer 0, and focus refreshBufferList(0, "cqOnLoad"); resizeFrameset();} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
debug("cqOnLoad: begin"); | function cqOnLoad() { //alert("cqOnLoad"); // register for key-presses document.onkeyup = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form); // display the buffer list, exposing buffer 0 // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list); if (currDatabase != null) { //alert("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list).value = currDatabase; } refreshBufferList(0);} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
|
function cqOnLoad() { //alert("cqOnLoad"); // register for key-presses document.onkeyup = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form); // display the buffer list, exposing buffer 0 // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list); if (currDatabase != null) { //alert("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list).value = currDatabase; } refreshBufferList(0);} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
||
var currDatabase = getCookie(g_cq_database_list); | var currDatabase = getCookie(g_cq_database_list_id); | function cqOnLoad() { //alert("cqOnLoad"); // register for key-presses document.onkeyup = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form); // display the buffer list, exposing buffer 0 // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list); if (currDatabase != null) { //alert("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list).value = currDatabase; } refreshBufferList(0);} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
document.getElementById(g_cq_database_list).value = currDatabase; | debug("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list_id).value = currDatabase; | function cqOnLoad() { //alert("cqOnLoad"); // register for key-presses document.onkeyup = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form); // display the buffer list, exposing buffer 0 // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list); if (currDatabase != null) { //alert("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list).value = currDatabase; } refreshBufferList(0);} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
resizeFrameset(); | function cqOnLoad() { //alert("cqOnLoad"); // register for key-presses document.onkeyup = handleKey; // focusing on the form doesn't seem to be necessary //var x = document.getElementById(g_cq_query_form); // display the buffer list, exposing buffer 0 // recover current db from session cookie var currDatabase = getCookie(g_cq_database_list); if (currDatabase != null) { //alert("cqOnLoad: currDatabase = " + currDatabase); document.getElementById(g_cq_database_list).value = currDatabase; } refreshBufferList(0);} // cqOnLoad | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
|
function cqOnLoad() { debug.print("cqOnLoad: begin"); // register for key-presses Event.observe(this, "keypress", handleKeyPress); // set up the UI objects gBuffers = new QueryBufferListClass("/cq:input", "/cq:eval-in", "/cq:buffer-list", "/cq:textarea-status"); gBuffers.initHandlers(); gHistory = new QueryHistoryClass("/cq:history", gBuffers); gBufferTabs = new BufferTabsClass("/cq:buffer-tabs", "/cq:buffer-accesskey-text", gBuffers, gHistory); // set the OS-specific instruction text gBufferTabs.setInstructionText(); gSession = new SessionClass(gBufferTabs, "/cq:restore-session"); gSession.restore(); gSession.setAutoSave(); gBufferTabs.setSession(gSession); // enforce local policy, if any var policy = new PolicyClass("/cq:title", $F("/cq:policy/title"), "head1", $F("/cq:policy/accent-color")); policy.enforce(); // display the buffer list, exposing buffer 0, and focus gBuffers.activate(); // once more, to fix widths gBufferTabs.refresh(); resizeFrameset(); // TODO save on unload // looks like we need prototype 1.5 for this: // "$A is not defined" at line 48, in the bind() code.... //Event.observe(parent.window, "unload", // gBufferTabs.unload.bindAsEventListener(gBufferTabs));} | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/9c5f02369bb30e42ba4bb68262eabcbd532d7b22/query.js/clean/query.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.