rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
textField.value = this.getText();
textField.value = text;
createEditField: function(form) { if (this.options.rows == 1 && !this.hasHTMLLineBreaks(this.getText())) { this.options.textarea = false; var textField = document.createElement("input"); textField.type = "text"; textField.name = "value"; textField.value = this.getText(); textField.style.backgroundColor = this.options.highlightcolor; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; form.appendChild(textField); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.name = "value"; textArea.value = this.convertHTMLLineBreaks(this.getText()); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; form.appendChild(textArea); this.editField = textArea; } },
if (size != 0) textField.size = size; form.appendChild(textField);
if (size != 0) textField.size = size;
createEditField: function(form) { if (this.options.rows == 1 && !this.hasHTMLLineBreaks(this.getText())) { this.options.textarea = false; var textField = document.createElement("input"); textField.type = "text"; textField.name = "value"; textField.value = this.getText(); textField.style.backgroundColor = this.options.highlightcolor; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; form.appendChild(textField); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.name = "value"; textArea.value = this.convertHTMLLineBreaks(this.getText()); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; form.appendChild(textArea); this.editField = textArea; } },
textArea.value = this.convertHTMLLineBreaks(this.getText());
textArea.value = this.convertHTMLLineBreaks(text);
createEditField: function(form) { if (this.options.rows == 1 && !this.hasHTMLLineBreaks(this.getText())) { this.options.textarea = false; var textField = document.createElement("input"); textField.type = "text"; textField.name = "value"; textField.value = this.getText(); textField.style.backgroundColor = this.options.highlightcolor; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; form.appendChild(textField); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.name = "value"; textArea.value = this.convertHTMLLineBreaks(this.getText()); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; form.appendChild(textArea); this.editField = textArea; } },
form.appendChild(textArea);
createEditField: function(form) { if (this.options.rows == 1 && !this.hasHTMLLineBreaks(this.getText())) { this.options.textarea = false; var textField = document.createElement("input"); textField.type = "text"; textField.name = "value"; textField.value = this.getText(); textField.style.backgroundColor = this.options.highlightcolor; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; form.appendChild(textField); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.name = "value"; textArea.value = this.convertHTMLLineBreaks(this.getText()); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; form.appendChild(textArea); this.editField = textArea; } },
if(this.options.loadTextURL) { this.loadExternalText(); } this.form.appendChild(this.editField);
createEditField: function(form) { if (this.options.rows == 1 && !this.hasHTMLLineBreaks(this.getText())) { this.options.textarea = false; var textField = document.createElement("input"); textField.type = "text"; textField.name = "value"; textField.value = this.getText(); textField.style.backgroundColor = this.options.highlightcolor; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; form.appendChild(textField); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.name = "value"; textArea.value = this.convertHTMLLineBreaks(this.getText()); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; form.appendChild(textArea); this.editField = textArea; } },
if (this.options.rows == 1) {
if (this.options.rows == 1 && !this.hasHTMLLineBreaks(this.getText())) {
createEditField: function(form) { if (this.options.rows == 1) { this.options.textarea = false; var textField = document.createElement("input"); textField.type = "text"; textField.name = "value"; textField.value = this.getText(); textField.style.backgroundColor = this.options.highlightcolor; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; form.appendChild(textField); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.name = "value"; textArea.value = this.getText(); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; form.appendChild(textArea); this.editField = textArea; } },
textArea.value = this.getText();
textArea.value = this.convertHTMLLineBreaks(this.getText());
createEditField: function(form) { if (this.options.rows == 1) { this.options.textarea = false; var textField = document.createElement("input"); textField.type = "text"; textField.name = "value"; textField.value = this.getText(); textField.style.backgroundColor = this.options.highlightcolor; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; form.appendChild(textField); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.name = "value"; textArea.value = this.getText(); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; form.appendChild(textArea); this.editField = textArea; } },
okButton = document.createElement("input"); okButton.type = "submit"; okButton.value = this.options.okText; this.form.appendChild(okButton);
if (this.options.okButton) { okButton = document.createElement("input"); okButton.type = "submit"; okButton.value = this.options.okText; this.form.appendChild(okButton); }
createForm: function() { this.form = document.createElement("form"); this.form.id = this.options.formId; Element.addClassName(this.form, this.options.formClassName) this.form.onsubmit = this.onSubmit.bind(this); this.createEditField(); if (this.options.textarea) { var br = document.createElement("br"); this.form.appendChild(br); } okButton = document.createElement("input"); okButton.type = "submit"; okButton.value = this.options.okText; this.form.appendChild(okButton); cancelLink = document.createElement("a"); cancelLink.href = "#"; cancelLink.appendChild(document.createTextNode(this.options.cancelText)); cancelLink.onclick = this.onclickCancel.bind(this); this.form.appendChild(cancelLink); },
cancelLink = document.createElement("a"); cancelLink.href = "#"; cancelLink.appendChild(document.createTextNode(this.options.cancelText)); cancelLink.onclick = this.onclickCancel.bind(this); this.form.appendChild(cancelLink);
if (this.options.cancelLink) { cancelLink = document.createElement("a"); cancelLink.href = "#"; cancelLink.appendChild(document.createTextNode(this.options.cancelText)); cancelLink.onclick = this.onclickCancel.bind(this); this.form.appendChild(cancelLink); }
createForm: function() { this.form = document.createElement("form"); this.form.id = this.options.formId; Element.addClassName(this.form, this.options.formClassName) this.form.onsubmit = this.onSubmit.bind(this); this.createEditField(); if (this.options.textarea) { var br = document.createElement("br"); this.form.appendChild(br); } okButton = document.createElement("input"); okButton.type = "submit"; okButton.value = this.options.okText; this.form.appendChild(okButton); cancelLink = document.createElement("a"); cancelLink.href = "#"; cancelLink.appendChild(document.createTextNode(this.options.cancelText)); cancelLink.onclick = this.onclickCancel.bind(this); this.form.appendChild(cancelLink); },
Rico.Color.createFromHex = function(hexCode) {
OpenLayers.Rico.Color.createFromHex = function(hexCode) {
Rico.Color.createFromHex = function(hexCode) { if(hexCode.length==4) { var shortHexCode = hexCode; var hexCode = '#'; for(var i=1;i<4;i++) hexCode += (shortHexCode.charAt(i) + shortHexCode.charAt(i)); } if ( hexCode.indexOf('#') == 0 ) hexCode = hexCode.substring(1); var red = hexCode.substring(0,2); var green = hexCode.substring(2,4); var blue = hexCode.substring(4,6); return new Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) );}
return new Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) );
return new OpenLayers.Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) );
Rico.Color.createFromHex = function(hexCode) { if(hexCode.length==4) { var shortHexCode = hexCode; var hexCode = '#'; for(var i=1;i<4;i++) hexCode += (shortHexCode.charAt(i) + shortHexCode.charAt(i)); } if ( hexCode.indexOf('#') == 0 ) hexCode = hexCode.substring(1); var red = hexCode.substring(0,2); var green = hexCode.substring(2,4); var blue = hexCode.substring(4,6); return new Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) );}
id = "OpenLayersDiv" + (Math.random() * 10000 % 10000);
id = "OpenLayersDiv" + Math.round(Math.random() * 10000);
OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border) { image = document.createElement("img"); //set special properties image.style.alt = id; image.galleryImg = "no"; if (imgURL) { image.src = imgURL; } //set generic properties if (!id) { id = "OpenLayersDiv" + (Math.random() * 10000 % 10000); } if (!position) { position = "relative"; } OpenLayers.Util.modifyDOMElement(image, id, px, sz, position, border); return image;};
image.galleryImg = "no";
OpenLayers.Util.createImage = function(img, sz, xy, position, id, border) { image = document.createElement("img"); if (id) { image.id = id; image.style.alt = id; } if (xy) { image.style.left = xy.x; image.style.top = xy.y; } if (sz) { image.style.width = sz.w; image.style.height = sz.h; } if (position) { image.style.position = position; } else { image.style.position = "relative"; } if (border) { image.style.border = border + "px solid"; } else { image.style.border = 0; } image.style.cursor = "inherit"; image.src = img; return image;};
} else {
} else
function createLinkCommand(url) { if (commandDelay > 0) { window.setTimeout(execCreateLinkCommand, commandCount * commandDelay, url); commandCount++; } else { execCreateLinkCommand(url); }}
}
function createLinkCommand(url) { if (commandDelay > 0) { window.setTimeout(execCreateLinkCommand, commandCount * commandDelay, url); commandCount++; } else { execCreateLinkCommand(url); }}
this.ovmap = new OpenLayers.Map(this.mapDiv.id, {controls: [], maxResolution: 'auto'});
var options = OpenLayers.Util.extend( {controls: [], maxResolution: 'auto'}, this.mapOptions); this.ovmap = new OpenLayers.Map(this.mapDiv.id, options);
createMap: function() { // create the overview map this.ovmap = new OpenLayers.Map(this.mapDiv.id, {controls: [], maxResolution: 'auto'}); this.ovmap.addLayers(this.layers); this.ovmap.zoomToMaxExtent(); // check extent rectangle border width this.wComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle, 'border-left-width')) + parseInt(OpenLayers.Element.getStyle(this.extentRectangle, 'border-right-width')); this.wComp = (this.wComp) ? this.wComp : 2; this.hComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle, 'border-top-width')) + parseInt(OpenLayers.Element.getStyle(this.extentRectangle, 'border-bottom-width')); this.hComp = (this.hComp) ? this.hComp : 2; },
: new OpenLayers.Pixel(0,0);
: null;
createMarker: function() { var imgLocation = OpenLayers.Util.getImagesLocation(); if (this.lonlat != null) { var imgURL = (this.data.iconURL) ? this.data.iconURL : imgLocation + "marker.png"; var imgSize = (this.data.iconSize) ? this.data.iconSize : new OpenLayers.Size(25, 25); var imgOffset = (this.data.iconOffset) ? this.data.iconOffset : new OpenLayers.Pixel(0,0); this.icon = new OpenLayers.Icon(imgURL, imgSize, imgOffset); this.marker = new OpenLayers.Marker(this.lonlat, this.icon); } return this.marker; },
if (isIE) { return new IEPageBot(windowObject); } else { return new MozillaPageBot(windowObject);
switch (browserName) { case "Microsoft Internet Explorer": return new IEPageBot(windowObject); case "Konqueror": return new KonquerorPageBot(windowObject); default: return new MozillaPageBot(windowObject);
function createPageBot(windowObject) { if (isIE) { return new IEPageBot(windowObject); } else { return new MozillaPageBot(windowObject); }}
return this.popup;
createPopup: function() { if (this.lonlat != null) { if (this.marker) { var anchorSize = this.marker.icon.size; } this.popup = new OpenLayers.Popup.AnchoredBubble(this.id + "_popup", this.lonlat, this.data.popupSize, this.data.popupContentHTML, anchorSize); } },
setTimeout(cronjob, that.getRefresh);
setTimeout(cronjob, that.getRefresh());
var cronjob = function () { var last = cron[id]; if(!last || last == lasttime) { that.refreshDocument(doc); lasttime = new Date().valueOf(); cron[id] = lasttime; setTimeout(cronjob, that.getRefresh); } };
cumulativeOffset: function(element) {
Position.cumulativeOffset = function(element) {
cumulativeOffset: function(element) { var valueT = 0, valueL = 0; do { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; element = element.offsetParent; } while (element); return [valueL, valueT]; },
},
}
cumulativeOffset: function(element) { var valueT = 0, valueL = 0; do { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; element = element.offsetParent; } while (element); return [valueL, valueT]; },
parseInt(this.element.style.left || '0'), parseInt(this.element.style.top || '0')]);
parseInt(Element.getStyle(this.element,'left') || '0'), parseInt(Element.getStyle(this.element,'top') || '0')]);
currentDelta: function() { return([ parseInt(this.element.style.left || '0'), parseInt(this.element.style.top || '0')]); },
var result = false;
var result = true;
function CustomValidatorEvaluateIsValid (validator){ var InitialValue = validator.getAttribute ("initialvalue"); var ControlToValidate = validator.getAttribute ("controltovalidate"); var evaluationfunc = validator.getAttribute ("clientvalidationfunction"); var ctrl_value = ValidatorTrim (ValidatorGetValue (ControlToValidate)); var result = false; if (evaluationfunc && evaluationfunc != "") { args = {Value:ctrl_value, IsValid:false}; eval (evaluationfunc + "(validator, args)"); result = args.IsValid; } if (result) { ValidatorSucceeded (validator); return true; } else { ValidatorFailed (validator); return false; }}
this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent,0));
this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent,0));
darken: function(percent) { var hsb = this.asHSB(); this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent,0)); },
el._current = el.firstChild.data;
el._current = el.innerHTML;
Calendar.dayMouseDown = function(ev) { var el = Calendar.getElement(ev); if (el.disabled) { return false; } var cal = el.calendar; cal.activeDiv = el; Calendar._C = cal; if (el.navtype != 300) with (Calendar) { if (el.navtype == 50) { el._current = el.firstChild.data; addEvent(document, "mousemove", tableMouseOver); } else addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver); addClass(el, "hilite active"); addEvent(document, "mouseup", tableMouseUp); } else if (cal.isPopup) { cal._dragStart(ev); } if (el.navtype == -1 || el.navtype == 1) { if (cal.timeout) clearTimeout(cal.timeout); cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250); } else if (el.navtype == -2 || el.navtype == 2) { if (cal.timeout) clearTimeout(cal.timeout); cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250); } else { cal.timeout = null; } return Calendar.stopEvent(ev);};
if (isRelated(el, ev) || _C || el.disabled) {
if (isRelated(el, ev) || _C || el.disabled)
Calendar.dayMouseOut = function(ev) { with (Calendar) { var el = getElement(ev); if (isRelated(el, ev) || _C || el.disabled) { return false; } removeClass(el, "hilite"); if (el.caldate) { removeClass(el.parentNode, "rowhilite"); } el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"]; return stopEvent(ev); }};
}
Calendar.dayMouseOut = function(ev) { with (Calendar) { var el = getElement(ev); if (isRelated(el, ev) || _C || el.disabled) { return false; } removeClass(el, "hilite"); if (el.caldate) { removeClass(el.parentNode, "rowhilite"); } el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"]; return stopEvent(ev); }};
if (el.caldate) {
if (el.caldate)
Calendar.dayMouseOut = function(ev) { with (Calendar) { var el = getElement(ev); if (isRelated(el, ev) || _C || el.disabled) { return false; } removeClass(el, "hilite"); if (el.caldate) { removeClass(el.parentNode, "rowhilite"); } el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"]; return stopEvent(ev); }};
} el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"];
if (el.calendar) el.calendar.tooltips.innerHTML = _TT["SEL_DATE"];
Calendar.dayMouseOut = function(ev) { with (Calendar) { var el = getElement(ev); if (isRelated(el, ev) || _C || el.disabled) { return false; } removeClass(el, "hilite"); if (el.caldate) { removeClass(el.parentNode, "rowhilite"); } el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"]; return stopEvent(ev); }};
el.calendar.tooltips.firstChild.data = el.ttip;
el.calendar.tooltips.innerHTML = el.ttip;
Calendar.dayMouseOver = function(ev) { var el = Calendar.getElement(ev); if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) { return false; } if (el.ttip) { if (el.ttip.substr(0, 1) == "_") { el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1); } el.calendar.tooltips.firstChild.data = el.ttip; } if (el.navtype != 300) { Calendar.addClass(el, "hilite"); if (el.caldate) { Calendar.addClass(el.parentNode, "rowhilite"); } } return Calendar.stopEvent(ev);};
Element.Class.remove(drop.element, drop.hoverclass);
if(drop.hoverclass) Element.Class.remove(drop.element, drop.hoverclass);
deactivate: function(drop) { Element.Class.remove(drop.element, drop.hoverclass); this.last_active = null; },
this.log(message, "debug");
this.log("debug", message);
debug: function(message) { this.log(message, "debug"); },
try { return Firebug.Console.logFormatted(arguments); } catch(e) { return null; }
if (that.preferences.data.debug) { try { return Firebug.Console.logFormatted(arguments); } catch(e) { return null; } }
that.debug = function() { try { return Firebug.Console.logFormatted(arguments); } catch(e) { return null; } };
subScriptLoader.loadSubScript('chrome: subScriptLoader.loadSubScript('chrome: subScriptLoader.loadSubScript('chrome:
function Debugger() { this.log = new Log("Debugger"); var self = this; this.init = function() { if (this.runner != null) { // already initialized return; } this.log.debug("init"); this.paused = false; this.runner = new Object(); recorder.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = recorder.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-api.js', this.runner); if (recorder.options.userExtensionsURL) { try { subScriptLoader.loadSubScript(recorder.options.userExtensionsURL, this.runner); } catch (error) { this.log.error("error loading user-extensions.js: " + error); } } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-browserbot.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.logFrame = new LogFrame(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { self.paused = true; return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }}
self.paused = true;
function Debugger() { var self = this; this.init = function() { if (this.runner != null) { // already initialized return; } this.paused = false; this.runner = new Object(); recorder.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = recorder.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-api.js', this.runner); if (recorder.options.userExtensionsURL) { subScriptLoader.loadSubScript(recorder.options.userExtensionsURL, this.runner); } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-browserbot.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.logFrame = new LogFrame(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }}
if (!navigator.userAgent.match(/ rv:1\.8\.0/)) {
if (isFirefox2()) {
function Debugger(editor) { this.log = new Log("Debugger"); this.editor = editor; var self = this; this.init = function() { if (this.runner != null) { // already initialized return; } this.log.debug("init"); this.paused = false; this.runner = new Object(); this.runner.editor = this.editor; this.editor.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = this.editor.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); if (!navigator.userAgent.match(/ rv:1\.8\.0/)) { // Not Firefox 1.5 (Gecko 1.8.0) // In Firefox 2.0, it seems that methods added to Object or String does not work in subscripts, // so we'll load prototype.js and htmlutils.js again // (Tested on Firefox 2.0 RC2) this.runner.eval = function(str, arg) { return eval(str); } this.runner.window = window; this.runner.Element = window.Element; this.runner.Event = window.Event; subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/lib/prototype.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/htmlutils.js', this.runner); } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-api.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-browserbot.js', this.runner); if (this.editor.options.userExtensionsURL) { try { ExtensionsLoader.loadSubScript(subScriptLoader, this.editor.options.userExtensionsURL, this.runner); } catch (error) { this.log.error("error loading user-extensions.js: " + error); } } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.editor.infoPanel.logView.setLog(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { self.paused = true; return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }}
this.runner.eval = function(str, arg) { return eval(str); }
this.runner.eval = doEval;
function Debugger(editor) { this.log = new Log("Debugger"); this.editor = editor; var self = this; this.init = function() { if (this.runner != null) { // already initialized return; } this.log.debug("init"); this.paused = false; this.runner = new Object(); this.runner.editor = this.editor; this.editor.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = this.editor.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); if (!navigator.userAgent.match(/ rv:1\.8\.0/)) { // Not Firefox 1.5 (Gecko 1.8.0) // In Firefox 2.0, it seems that methods added to Object or String does not work in subscripts, // so we'll load prototype.js and htmlutils.js again // (Tested on Firefox 2.0 RC2) this.runner.eval = function(str, arg) { return eval(str); } this.runner.window = window; this.runner.Element = window.Element; this.runner.Event = window.Event; subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/lib/prototype.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/htmlutils.js', this.runner); } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-api.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-browserbot.js', this.runner); if (this.editor.options.userExtensionsURL) { try { ExtensionsLoader.loadSubScript(subScriptLoader, this.editor.options.userExtensionsURL, this.runner); } catch (error) { this.log.error("error loading user-extensions.js: " + error); } } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.editor.infoPanel.logView.setLog(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { self.paused = true; return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }}
this.runner.eval = function(str) { return eval(str); }
function Debugger(editor) { this.log = new Log("Debugger"); this.editor = editor; var self = this; this.init = function() { if (this.runner != null) { // already initialized return; } this.log.debug("init"); this.paused = false; this.runner = new Object(); this.runner.editor = this.editor; this.editor.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = this.editor.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); if (!navigator.userAgent.match(/ rv:1\.8\.0/)) { // Not Firefox 1.5 (Gecko 1.8.0) // In Firefox 2.0, it seems that methods added to Object or String does not work in subscripts, // so we'll load prototype.js and htmlutils.js again // (Tested on Firefox 2.0 RC2) this.runner.window = window; this.runner.Element = window.Element; this.runner.Event = window.Event; subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/lib/prototype.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/htmlutils.js', this.runner); } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-api.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-browserbot.js', this.runner); if (this.editor.options.userExtensionsURL) { try { ExtensionsLoader.loadSubScript(subScriptLoader, this.editor.options.userExtensionsURL, this.runner); } catch (error) { this.log.error("error loading user-extensions.js: " + error); } } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.editor.infoPanel.logView.setLog(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { self.paused = true; return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }}
return -1;
return false;
function decode_base64( what ){ var base64_decodetable = new Array ( 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255 ); var result = ""; var len = what.length; var x, y; var ptr = 0; while( !isNaN( x = what.charCodeAt( ptr++ ) ) ) { if( ( x > 127 ) || (( x = base64_decodetable[x] ) == 255) ) return -1; if( ( isNaN( y = what.charCodeAt( ptr++ ) ) ) || (( y = base64_decodetable[y] ) == 255) ) return -1; result += String.fromCharCode( (x << 2) | (y >> 4) ); if( (x = what.charCodeAt( ptr++ )) == 61 ) { if( (what.charCodeAt( ptr++ ) != 61) || (!isNaN(what.charCodeAt( ptr ) ) ) ) return -1; } else { if( ( x > 127 ) || (( x = base64_decodetable[x] ) == 255) ) return -1; result += String.fromCharCode( (y << 4) | (x >> 2) ); if( (y = what.charCodeAt( ptr++ )) == 61 ) { if( !isNaN(what.charCodeAt( ptr ) ) ) return -1; } else { if( (y > 127) || ((y = base64_decodetable[y]) == 255) ) return -1; result += String.fromCharCode( (x << 6) | y ); } } } return result;}
if (data.length>0) { switch(type) { case 'S':
switch(type) { case 'S': if (data) {
DecodeObject: function(string, emptyReturnsNull, sep) { var obj=new Object; if (!string) { if (emptyReturnsNull) { return null; } return obj; } if (!sep) { sep="&"; } var ss=string.split(sep); for(var i=0;i<ss.length;i++) { var s=ss[i]; var idx=s.indexOf('='); f_core.Assert(idx>0, "Bad format ! '"+s+"'."); var name=s.substring(0, idx); name=name.replace(/\+/g, ' '); name=decodeURIComponent(name); idx++; var type=s.charAt(idx++); var data=s.substring(idx); if (data.length>0) { switch(type) { case 'S': data=data.replace(/\+/g, ' '); data=decodeURIComponent(data); break; case 'L': data=null; break; case 'T': data=true; break; case 'F': data=false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!data) { data=parseFloat(type); break; } case '-': data=parseFloat(type+data); break; default: f_core.Error(f_core, "Unknown type '"+type+"' !"); data=undefined; } } obj[name]=data; } return obj; },
case 'L': data=null; break; case 'T': data=true; break; case 'F': data=false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!data) { data=parseFloat(type); break; }
} case '-': data=-parseFloat(data); break;
DecodeObject: function(string, emptyReturnsNull, sep) { var obj=new Object; if (!string) { if (emptyReturnsNull) { return null; } return obj; } if (!sep) { sep="&"; } var ss=string.split(sep); for(var i=0;i<ss.length;i++) { var s=ss[i]; var idx=s.indexOf('='); f_core.Assert(idx>0, "Bad format ! '"+s+"'."); var name=s.substring(0, idx); name=name.replace(/\+/g, ' '); name=decodeURIComponent(name); idx++; var type=s.charAt(idx++); var data=s.substring(idx); if (data.length>0) { switch(type) { case 'S': data=data.replace(/\+/g, ' '); data=decodeURIComponent(data); break; case 'L': data=null; break; case 'T': data=true; break; case 'F': data=false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!data) { data=parseFloat(type); break; } case '-': data=parseFloat(type+data); break; default: f_core.Error(f_core, "Unknown type '"+type+"' !"); data=undefined; } } obj[name]=data; } return obj; },
case '-': data=parseFloat(type+data); break; default: f_core.Error(f_core, "Unknown type '"+type+"' !"); data=undefined; }
default: f_core.Error(f_core, "Unknown type '"+type+"' !"); data=undefined;
DecodeObject: function(string, emptyReturnsNull, sep) { var obj=new Object; if (!string) { if (emptyReturnsNull) { return null; } return obj; } if (!sep) { sep="&"; } var ss=string.split(sep); for(var i=0;i<ss.length;i++) { var s=ss[i]; var idx=s.indexOf('='); f_core.Assert(idx>0, "Bad format ! '"+s+"'."); var name=s.substring(0, idx); name=name.replace(/\+/g, ' '); name=decodeURIComponent(name); idx++; var type=s.charAt(idx++); var data=s.substring(idx); if (data.length>0) { switch(type) { case 'S': data=data.replace(/\+/g, ' '); data=decodeURIComponent(data); break; case 'L': data=null; break; case 'T': data=true; break; case 'F': data=false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!data) { data=parseFloat(type); break; } case '-': data=parseFloat(type+data); break; default: f_core.Error(f_core, "Unknown type '"+type+"' !"); data=undefined; } } obj[name]=data; } return obj; },
f_core.Debug(f_core, "Deserialize attribute '"+name+"' = '"+data+"'");
DecodeObject: function(string, emptyReturnsNull, sep) { var obj=new Object; if (!string) { if (emptyReturnsNull) { return null; } return obj; } if (!sep) { sep="&"; } var ss=string.split(sep); for(var i=0;i<ss.length;i++) { var s=ss[i]; var idx=s.indexOf('='); f_core.Assert(idx>0, "Bad format ! '"+s+"'."); var name=s.substring(0, idx); name=name.replace(/\+/g, ' '); name=decodeURIComponent(name); idx++; var type=s.charAt(idx++); var data=s.substring(idx); if (data.length>0) { switch(type) { case 'S': data=data.replace(/\+/g, ' '); data=decodeURIComponent(data); break; case 'L': data=null; break; case 'T': data=true; break; case 'F': data=false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!data) { data=parseFloat(type); break; } case '-': data=parseFloat(type+data); break; default: f_core.Error(f_core, "Unknown type '"+type+"' !"); data=undefined; } } obj[name]=data; } return obj; },
text = text.replace(/<br\s*\\?>/i, "\n");
text = text.replace(/<br\s*\/?>/gi, "\n");
function decodeText(text) { var escapeXml = options.escapeXmlEntities; var r; text = text.replace(/<br\s*\\?>/i, "\n"); if (escapeXml == 'always' || escapeXml == 'partial' || escapeXml == 'html') { text = text.replace(/&lt;/g, '<'); text = text.replace(/&gt;/g, '>'); } if (escapeXml == 'html') { text = text.replace(/&nbsp;/g, "\xA0"); text = text.replace(/&#(\d+);/g, function(str, p1) { return String.fromCharCode(parseInt(p1)); }); text = text.replace(/&#x([0-9a-f]+);/gi, function(str, p1) { return String.fromCharCode(parseInt(p1, 16)); }); text = text.replace(/ +/g, " "); // truncate multiple spaces to single space text = text.replace(/\xA0/g, " "); } if (escapeXml == 'always' || escapeXml == 'html') { text = text.replace(/&apos;/g, "'"); text = text.replace(/&quot;/g, '"'); text = text.replace(/&amp;/g, '&'); } if ('true' == options.escapeDollar) { text = text.replace(/([^\\])\$\{/g, '$1$$$${'); // replace ${...} to $${...} text = text.replace(/^\$\{/g, '$$$${'); // replace ${...} to $${...} text = text.replace(/\\\$\{/g, '$${'); // replace \${...} to ${...} } text = text.replace(/^\s+/, ""); text = text.replace(/\s+$/, ""); return text;}
text = text.replace(/\xA0/g, " ");
function decodeText(text) { var escapeXml = options.escapeXmlEntities; var r; text = text.replace(/<br\s*\\?>/i, "\n"); if (escapeXml == 'always' || escapeXml == 'partial' || escapeXml == 'html') { text = text.replace(/&lt;/g, '<'); text = text.replace(/&gt;/g, '>'); } if (escapeXml == 'html') { text = text.replace(/&nbsp;/g, "\xA0"); text = text.replace(/&#(\d+);/g, function(str, p1) { return String.fromCharCode(parseInt(p1)); }); text = text.replace(/&#x([0-9a-f]+);/gi, function(str, p1) { return String.fromCharCode(parseInt(p1, 16)); }); text = text.replace(/ +/g, " "); // truncate multiple spaces to single space } if (escapeXml == 'always' || escapeXml == 'html') { text = text.replace(/&apos;/g, "'"); text = text.replace(/&quot;/g, '"'); text = text.replace(/&amp;/g, '&'); } if ('true' == options.escapeDollar) { text = text.replace(/([^\\])\$\{/g, '$1$$$${'); // replace ${...} to $${...} text = text.replace(/^\$\{/g, '$$$${'); // replace ${...} to $${...} text = text.replace(/\\\$\{/g, '$${'); // replace \${...} to ${...} } text = text.replace(/^\s+/, ""); text = text.replace(/\s+$/, ""); return text;}
text = text.replace(/ +/g, " ");
function decodeText(text) { var escapeXml = options.escapeXmlEntities; var r; text = text.replace(/<br\s*\\?>/i, "\n"); if (escapeXml == 'always' || escapeXml == 'partial' || escapeXml == 'html') { text = text.replace(/&lt;/g, '<'); text = text.replace(/&gt;/g, '>'); } if (escapeXml == 'html') { text = text.replace(/&nbsp;/g, "\xA0"); text = text.replace(/&#(\d+);/g, function(str, p1) { return String.fromCharCode(parseInt(p1)); }); text = text.replace(/&#x([0-9a-f]+);/gi, function(str, p1) { return String.fromCharCode(parseInt(p1, 16)); }); } if (escapeXml == 'always' || escapeXml == 'html') { text = text.replace(/&apos;/g, "'"); text = text.replace(/&quot;/g, '"'); text = text.replace(/&amp;/g, '&'); } if ('true' == options.escapeDollar) { text = text.replace(/([^\\])\$\{/g, '$1$$$${'); // replace ${...} to $${...} text = text.replace(/^\$\{/g, '$$$${'); // replace ${...} to $${...} text = text.replace(/\\\$\{/g, '$${'); // replace \${...} to ${...} } text = text.replace(/^\s+/, ""); text = text.replace(/\s+$/, ""); return text;}
if (!Event.isLeftClick(evt)) return;
defaultClick: function (evt) { var notAfterDrag = !this.performedDrag; this.performedDrag = false; return notAfterDrag; },
this.performedDrag = false;
defaultDblClick: function (evt) { this.switchModeTo("pan"); var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); this.map.setCenter(newCenter, this.map.zoom + 2); },
this.zoomIn(); this.setCenter(newCenter);
this.setCenter(newCenter, this.zoom + 1);
defaultDblClick: function (evt) { var newCenter = this.getLatLonFromPixel( evt.xy ); this.zoomIn(); this.setCenter(newCenter); },
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
var offset = function(size) { return OpenLayers.Pixel(-(size.w/2), -size.h); };
OpenLayers.Marker.defaultIcon = function() { var url = OpenLayers.Util.getImagesLocation() + "marker.png"; var size = new OpenLayers.Size(21, 25); var offset = new OpenLayers.Pixel(-(size.w/2), -size.h); return new OpenLayers.Icon(url, size, offset); };
var resolution = this.getResolution();
var slide = this.getResolution() * 50;
defaultKeyDown: function (evt) { var resolution = this.getResolution(); var center = this.getCenter(); var newCenter = center.copyOf(); switch(evt.keyCode) { case Event.KEY_LEFT: newCenter.add( -(resolution * 50), 0); break; case Event.KEY_RIGHT: newCenter.add( (resolution * 50), 0); break; case Event.KEY_UP: newCenter.add( 0, (resolution * 50)); break; case Event.KEY_DOWN: newCenter.add( 0, -(resolution * 50)); break; } if (!newCenter.equals(center)) { this.setCenter(newCenter); Event.stop(evt); } },
newCenter.add( -(resolution * 50), 0);
newCenter.add( -slide, 0);
defaultKeyDown: function (evt) { var resolution = this.getResolution(); var center = this.getCenter(); var newCenter = center.copyOf(); switch(evt.keyCode) { case Event.KEY_LEFT: newCenter.add( -(resolution * 50), 0); break; case Event.KEY_RIGHT: newCenter.add( (resolution * 50), 0); break; case Event.KEY_UP: newCenter.add( 0, (resolution * 50)); break; case Event.KEY_DOWN: newCenter.add( 0, -(resolution * 50)); break; } if (!newCenter.equals(center)) { this.setCenter(newCenter); Event.stop(evt); } },
newCenter.add( (resolution * 50), 0);
newCenter.add( slide, 0);
defaultKeyDown: function (evt) { var resolution = this.getResolution(); var center = this.getCenter(); var newCenter = center.copyOf(); switch(evt.keyCode) { case Event.KEY_LEFT: newCenter.add( -(resolution * 50), 0); break; case Event.KEY_RIGHT: newCenter.add( (resolution * 50), 0); break; case Event.KEY_UP: newCenter.add( 0, (resolution * 50)); break; case Event.KEY_DOWN: newCenter.add( 0, -(resolution * 50)); break; } if (!newCenter.equals(center)) { this.setCenter(newCenter); Event.stop(evt); } },
newCenter.add( 0, (resolution * 50));
newCenter.add( 0, slide);
defaultKeyDown: function (evt) { var resolution = this.getResolution(); var center = this.getCenter(); var newCenter = center.copyOf(); switch(evt.keyCode) { case Event.KEY_LEFT: newCenter.add( -(resolution * 50), 0); break; case Event.KEY_RIGHT: newCenter.add( (resolution * 50), 0); break; case Event.KEY_UP: newCenter.add( 0, (resolution * 50)); break; case Event.KEY_DOWN: newCenter.add( 0, -(resolution * 50)); break; } if (!newCenter.equals(center)) { this.setCenter(newCenter); Event.stop(evt); } },
newCenter.add( 0, -(resolution * 50));
newCenter.add( 0, -slide);
defaultKeyDown: function (evt) { var resolution = this.getResolution(); var center = this.getCenter(); var newCenter = center.copyOf(); switch(evt.keyCode) { case Event.KEY_LEFT: newCenter.add( -(resolution * 50), 0); break; case Event.KEY_RIGHT: newCenter.add( (resolution * 50), 0); break; case Event.KEY_UP: newCenter.add( 0, (resolution * 50)); break; case Event.KEY_DOWN: newCenter.add( 0, -(resolution * 50)); break; } if (!newCenter.equals(center)) { this.setCenter(newCenter); Event.stop(evt); } },
var slide = this.getResolution() * this.slideFactor; var center = this.getCenter();
var slide = this.map.getResolution() * this.slideFactor; var center = this.map.getCenter();
defaultKeyDown: function (evt) { var slide = this.getResolution() * this.slideFactor; var center = this.getCenter(); var newCenter = center.copyOf(); switch(evt.keyCode) { case Event.KEY_LEFT: newCenter.add( -slide, 0); break; case Event.KEY_RIGHT: newCenter.add( slide, 0); break; case Event.KEY_UP: newCenter.add( 0, slide); break; case Event.KEY_DOWN: newCenter.add( 0, -slide); break; } if (!newCenter.equals(center)) { this.setCenter(newCenter); Event.stop(evt); } },
this.setCenter(newCenter);
this.map.setCenter(newCenter);
defaultKeyDown: function (evt) { var slide = this.getResolution() * this.slideFactor; var center = this.getCenter(); var newCenter = center.copyOf(); switch(evt.keyCode) { case Event.KEY_LEFT: newCenter.add( -slide, 0); break; case Event.KEY_RIGHT: newCenter.add( slide, 0); break; case Event.KEY_UP: newCenter.add( 0, slide); break; case Event.KEY_DOWN: newCenter.add( 0, -slide); break; } if (!newCenter.equals(center)) { this.setCenter(newCenter); Event.stop(evt); } },
} else { this.map.div.style.cursor = "move";
defaultMouseDown: function (evt) { this.mouseDragStart = evt.xy.copyOf(); if (evt.shiftKey) { this.map.div.style.cursor = "crosshair"; this.zoomBox = OpenLayers.Util.createDiv('zoomBox', this.mouseDragStart, null, null, "absolute", "2px solid red"); this.zoomBox.style.backgroundColor = "white"; this.zoomBox.style.filter = "alpha(opacity=50)"; // IE this.zoomBox.style.opacity = "0.50"; this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; this.map.viewPortDiv.appendChild(this.zoomBox); } else { this.map.div.style.cursor = "move"; } Event.stop(evt); },
this.zoomBox.style.filter = "alpha(opacity=35)"; this.zoomBox.style.opacity = "0.35";
this.zoomBox.style.filter = "alpha(opacity=50)"; this.zoomBox.style.opacity = "0.50";
defaultMouseDown: function (evt) { this.mouseDragStart = evt.xy.copyOf(); if (evt.shiftKey) { this.map.div.style.cursor = "crosshair"; this.zoomBox = OpenLayers.Util.createDiv('zoomBox'); this.zoomBox.style.border = '2px solid red'; this.zoomBox.style.backgroundColor = "white"; this.zoomBox.style.filter = "alpha(opacity=35)"; // IE this.zoomBox.style.opacity = "0.35"; this.zoomBox.style.position="absolute"; this.zoomBox.style.zIndex=1000; this.zoomBox.style.top=this.mouseDragStart.y; this.zoomBox.style.left=this.mouseDragStart.x; this.map.viewPortDiv.appendChild(this.zoomBox); } else { this.map.div.style.cursor = "move"; } Event.stop(evt); },
this.zoomBox.style.zIndex=1000;
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
defaultMouseDown: function (evt) { this.mouseDragStart = evt.xy.copyOf(); if (evt.shiftKey) { this.map.div.style.cursor = "crosshair"; this.zoomBox = OpenLayers.Util.createDiv('zoomBox'); this.zoomBox.style.border = '2px solid red'; this.zoomBox.style.backgroundColor = "white"; this.zoomBox.style.filter = "alpha(opacity=35)"; // IE this.zoomBox.style.opacity = "0.35"; this.zoomBox.style.position="absolute"; this.zoomBox.style.zIndex=1000; this.zoomBox.style.top=this.mouseDragStart.y; this.zoomBox.style.left=this.mouseDragStart.x; this.map.viewPortDiv.appendChild(this.zoomBox); } else { this.map.div.style.cursor = "move"; } Event.stop(evt); },
if (!Event.isLeftClick(evt)) return;
defaultMouseDown: function (evt) { this.mouseDragStart = evt.xy.copyOf(); this.performedDrag = false; if (evt.shiftKey) { this.map.div.style.cursor = "crosshair"; this.zoomBox = OpenLayers.Util.createDiv('zoomBox', this.mouseDragStart, null, null, "absolute", "2px solid red"); this.zoomBox.style.backgroundColor = "white"; this.zoomBox.style.filter = "alpha(opacity=50)"; // IE this.zoomBox.style.opacity = "0.50"; this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; this.map.viewPortDiv.appendChild(this.zoomBox); } document.onselectstart=function() { return false; } Event.stop(evt); },
if (evt.shiftKey) {
if (evt.shiftKey && this.mode !="zoombox") {
defaultMouseDown: function (evt) { this.mouseDragStart = evt.xy.copyOf(); if (evt.shiftKey) { this.switchModeTo("zoombox"); } else if (evt.altKey) { this.switchModeTo("measure"); } switch (this.mode) { case "zoombox": this.map.div.style.cursor = "crosshair"; this.zoomBox = OpenLayers.Util.createDiv('zoomBox', this.mouseDragStart, null, null, "absolute", "2px solid red"); this.zoomBox.style.backgroundColor = "white"; this.zoomBox.style.filter = "alpha(opacity=50)"; // IE this.zoomBox.style.opacity = "0.50"; this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; this.map.viewPortDiv.appendChild(this.zoomBox); break; case "measure": break; default: this.map.div.style.cursor = "move"; break; } Event.stop(evt); },
} else if (evt.altKey) {
} else if (evt.altKey && this.mode !="measure") {
defaultMouseDown: function (evt) { this.mouseDragStart = evt.xy.copyOf(); if (evt.shiftKey) { this.switchModeTo("zoombox"); } else if (evt.altKey) { this.switchModeTo("measure"); } switch (this.mode) { case "zoombox": this.map.div.style.cursor = "crosshair"; this.zoomBox = OpenLayers.Util.createDiv('zoomBox', this.mouseDragStart, null, null, "absolute", "2px solid red"); this.zoomBox.style.backgroundColor = "white"; this.zoomBox.style.filter = "alpha(opacity=50)"; // IE this.zoomBox.style.opacity = "0.50"; this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; this.map.viewPortDiv.appendChild(this.zoomBox); break; case "measure": break; default: this.map.div.style.cursor = "move"; break; } Event.stop(evt); },
this.performedDrag = true;
defaultMouseMove: function (evt) { if (this.mouseDragStart != null) { if (this.zoomBox) { var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); this.zoomBox.style.width = deltaX+"px"; this.zoomBox.style.height = deltaY+"px"; if (evt.xy.x < this.mouseDragStart.x) { this.zoomBox.style.left = evt.xy.x+"px"; } if (evt.xy.y < this.mouseDragStart.y) { this.zoomBox.style.top = evt.xy.y+"px"; } } else { var deltaX = this.mouseDragStart.x - evt.xy.x; var deltaY = this.mouseDragStart.y - evt.xy.y; var size = this.map.getSize(); var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, size.h / 2 + deltaY); var newCenter = this.map.getLonLatFromScreenPx( newXY ); this.map.setCenter(newCenter, null, true); this.mouseDragStart = evt.xy.copyOf(); } } },
this.performedDrag = true;
defaultMouseMove: function (evt) { if (this.mouseDragStart != null) { switch (this.mode) { case "zoombox": var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); this.zoomBox.style.width = deltaX+"px"; this.zoomBox.style.height = deltaY+"px"; if (evt.xy.x < this.mouseDragStart.x) { this.zoomBox.style.left = evt.xy.x+"px"; } if (evt.xy.y < this.mouseDragStart.y) { this.zoomBox.style.top = evt.xy.y+"px"; } break; default: var deltaX = this.mouseDragStart.x - evt.xy.x; var deltaY = this.mouseDragStart.y - evt.xy.y; var size = this.map.getSize(); var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, size.h / 2 + deltaY); var newCenter = this.map.getLonLatFromViewPortPx( newXY ); this.map.setCenter(newCenter, null, true); this.mouseDragStart = evt.xy.clone(); } } },
this.mousePosition = evt.xy.clone();
defaultMouseMove: function (evt) { if (this.mouseDragStart != null) { if (this.zoomBox) { var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); this.zoomBox.style.width = Math.max(1, deltaX) + "px"; this.zoomBox.style.height = Math.max(1, deltaY) + "px"; if (evt.xy.x < this.mouseDragStart.x) { this.zoomBox.style.left = evt.xy.x+"px"; } if (evt.xy.y < this.mouseDragStart.y) { this.zoomBox.style.top = evt.xy.y+"px"; } } else { var deltaX = this.mouseDragStart.x - evt.xy.x; var deltaY = this.mouseDragStart.y - evt.xy.y; var size = this.map.getSize(); var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, size.h / 2 + deltaY); var newCenter = this.map.getLonLatFromViewPortPx( newXY ); this.map.setCenter(newCenter, null, true); this.mouseDragStart = evt.xy.clone(); this.map.div.style.cursor = "move"; } this.performedDrag = true; } },
this.defaultMouseUp(evt);
if (this.zoomBox) { this.removeZoomBox(); } this.mouseDragStart = null;
defaultMouseOut: function (evt) { if (this.mouseDragStart != null && OpenLayers.Util.mouseLeft(evt, this.map.div)) { this.defaultMouseUp(evt); } },
}
},
defaultMouseUp: function (evt) { if (this.zoomBox) { var start = this.map.getLonLatFromPixel( this.mouseDragStart ); var end = this.map.getLonLatFromPixel( evt.xy ); var top = Math.max(start.lat, end.lat); var bottom = Math.min(start.lat, end.lat); var left = Math.min(start.lon, end.lon); var right = Math.max(start.lon, end.lon); var bounds = new OpenLayers.Bounds(left, bottom, right, top); var zoom = this.map.getZoomForExtent(bounds); this.map.setCenter(new OpenLayers.LonLat( (start.lon + end.lon) / 2, (start.lat + end.lat) / 2 ), zoom); this.map.viewPortDiv.removeChild(document.getElementById("zoomBox")); this.zoomBox = null; } this.mouseDragStart = null; this.map.div.style.cursor = "default"; }
this.map.setCenter(this.map.center);
if (this.performedDrag) { this.map.setCenter(this.map.center); }
defaultMouseUp: function (evt) { if (!Event.isLeftClick(evt)) return; switch (this.mode) { case "zoombox": var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); var end = this.map.getLonLatFromViewPortPx( evt.xy ); var top = Math.max(start.lat, end.lat); var bottom = Math.min(start.lat, end.lat); var left = Math.min(start.lon, end.lon); var right = Math.max(start.lon, end.lon); var bounds = new OpenLayers.Bounds(left, bottom, right, top); var zoom = this.map.getZoomForExtent(bounds); this.map.setCenter(new OpenLayers.LonLat( (start.lon + end.lon) / 2, (start.lat + end.lat) / 2 ), zoom); this.map.viewPortDiv.removeChild(document.getElementById("zoomBox")); this.zoomBox = null; this.leaveMode(); break; case "pan": this.map.setCenter(this.map.center); } document.onselectstart = null; this.mouseDragStart = null; this.map.div.style.cursor = "default"; },
if (!Event.isLeftClick(evt)) return;
defaultMouseUp: function (evt) { if (this.zoomBox) { var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); var end = this.map.getLonLatFromViewPortPx( evt.xy ); var top = Math.max(start.lat, end.lat); var bottom = Math.min(start.lat, end.lat); var left = Math.min(start.lon, end.lon); var right = Math.max(start.lon, end.lon); var bounds = new OpenLayers.Bounds(left, bottom, right, top); var zoom = this.map.getZoomForExtent(bounds); this.map.setCenter(new OpenLayers.LonLat( (start.lon + end.lon) / 2, (start.lat + end.lat) / 2 ), zoom); this.map.viewPortDiv.removeChild(document.getElementById("zoomBox")); this.zoomBox = null; } else { this.map.setCenter(this.map.center); } document.onselectstart=null; this.mouseDragStart = null; this.map.div.style.cursor = "default"; },
if (!Event.isLeftClick(evt)) return;
defaultMouseUp: function (evt) { switch (this.mode) { case "zoombox": var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); var end = this.map.getLonLatFromViewPortPx( evt.xy ); var top = Math.max(start.lat, end.lat); var bottom = Math.min(start.lat, end.lat); var left = Math.min(start.lon, end.lon); var right = Math.max(start.lon, end.lon); var bounds = new OpenLayers.Bounds(left, bottom, right, top); var zoom = this.map.getZoomForExtent(bounds); this.map.setCenter(new OpenLayers.LonLat( (start.lon + end.lon) / 2, (start.lat + end.lat) / 2 ), zoom); this.map.viewPortDiv.removeChild(document.getElementById("zoomBox")); this.zoomBox = null; this.leaveMode(); break; case "pan": this.map.setCenter(this.map.center); } document.onselectstart = null; this.mouseDragStart = null; this.map.div.style.cursor = "default"; },
defaultWheelDown: function() { this.map.zoomOut();
defaultWheelDown: function(evt) { if (this.map.getZoom() > 0) { this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), this.map.getZoom() - 1); }
defaultWheelDown: function() { this.map.zoomOut(); },
defaultWheelUp: function() { this.map.zoomIn();
defaultWheelUp: function(evt) { if (this.map.getZoom() <= this.map.getNumZoomLevels()) { this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), this.map.getZoom() + 1); }
defaultWheelUp: function() { this.map.zoomIn(); },
tinyMCE.importPluginLanguagePack('searchreplace','en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_SearchReplacePlugin={getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems',authorurl:'http:
tinyMCE.importPluginLanguagePack('searchreplace');var TinyMCE_SearchReplacePlugin={getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',authorurl:'http:
tinyMCE.importPluginLanguagePack('searchreplace','en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_SearchReplacePlugin={getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){inst.addShortcut('ctrl','f','lang_searchreplace_search_desc','mceSearch',true);},getControlHTML:function(cn){switch(cn){case"search":return tinyMCE.getButtonHTML(cn,'lang_searchreplace_search_desc','{$pluginurl}/images/search.gif','mceSearch',true);case"replace":return tinyMCE.getButtonHTML(cn,'lang_searchreplace_replace_desc','{$pluginurl}/images/replace.gif','mceSearchReplace',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){var instance=tinyMCE.getInstanceById(editor_id);function defValue(key,default_value){value[key]=typeof(value[key])=="undefined"?default_value:value[key];}function replaceSel(search_str,str,back){instance.execCommand('mceInsertContent',false,str);}if(!value)value=new Array();defValue("editor_id",editor_id);defValue("searchstring","");defValue("replacestring",null);defValue("replacemode","none");defValue("casesensitive",false);defValue("backwards",false);defValue("wrap",false);defValue("wholeword",false);defValue("inline","yes");switch(command){case"mceResetSearch":tinyMCE.lastSearchRng=null;return true;case"mceSearch":if(user_interface){var template=new Array();if(value['replacestring']!=null){template['file']='../../plugins/searchreplace/replace.htm';template['width']=320;template['height']=100+(tinyMCE.isNS7?20:0);template['width']+=tinyMCE.getLang('lang_searchreplace_replace_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_replace_delta_height',0);}else{template['file']='../../plugins/searchreplace/search.htm';template['width']=310;template['height']=105+(tinyMCE.isNS7?25:0);template['width']+=tinyMCE.getLang('lang_searchreplace_search_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_replace_delta_height',0);}instance.execCommand('SelectAll');if(tinyMCE.isMSIE){var r=instance.selection.getRng();r.collapse(true);r.select();}else instance.selection.getSel().collapseToStart();tinyMCE.openWindow(template,value);}else{var win=tinyMCE.getInstanceById(editor_id).contentWindow;var doc=tinyMCE.getInstanceById(editor_id).contentWindow.document;var body=tinyMCE.getInstanceById(editor_id).contentWindow.document.body;if(body.innerHTML==""){alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true;}if(value['replacemode']=="current"){replaceSel(value['string'],value['replacestring'],value['backwards']);value['replacemode']="none";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}if(tinyMCE.isMSIE){var rng=tinyMCE.lastSearchRng?tinyMCE.lastSearchRng:doc.selection.createRange();var flags=0;if(value['wholeword'])flags=flags|2;if(value['casesensitive'])flags=flags|4;if(!rng.findText){alert('This operation is currently not supported by this browser.');return true;}if(value['replacemode']=="all"){while(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(false);replaceSel(value['string'],value['replacestring'],value['backwards']);}alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(value['backwards']);tinyMCE.lastSearchRng=rng;}else alert(tinyMCE.getLang('lang_searchreplace_notfound'));}else{if(value['replacemode']=="all"){while(win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))replaceSel(value['string'],value['replacestring'],value['backwards']);alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(!win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))alert(tinyMCE.getLang('lang_searchreplace_notfound'));}}return true;case"mceSearchReplace":value['replacestring']="";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}return false;}};tinyMCE.addPlugin("searchreplace",TinyMCE_SearchReplacePlugin);
delete document.channelselector.channel.options[i];
document.channelselector.channel.options[i] = null;
function deleteChannelOptions(){ var j = document.channelselector.channel.options.length; for (var i = j - 1 ; i >= 0; i--) delete document.channelselector.channel.options[i];}
document.cookie = name + &#34;=&#34; + ((path) ? &#34;; path=&#34; + path : &#34;&#34;) + ((domain) ? &#34;; domain=&#34; + domain : &#34;&#34;) + &#34;; expires=Thu, 01-Jan-70 00:00:01 GMT&#34;;
document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
function deleteCookie(name, path, domain) { if (getCookie(name)) { document.cookie = name + &#34;=&#34; + ((path) ? &#34;; path=&#34; + path : &#34;&#34;) + ((domain) ? &#34;; domain=&#34; + domain : &#34;&#34;) + &#34;; expires=Thu, 01-Jan-70 00:00:01 GMT&#34;; }}
function deleteMovie(xy)
function deleteMovie()
function deleteMovie(xy){ if (confirmAction('Do you really want to delete this movie?')) { document.location = "/cgi-bin/deleteMovie?ref="+xy; setTimeout("reload()", 3000); }}
document.location = "/cgi-bin/deleteMovie?ref="+xy;
var selChannel = document.channelselector.channel.selectedIndex; var channel = document.channelselector.channel.options[selChannel].value; document.location = "/cgi-bin/deleteMovie?ref="+channel;
function deleteMovie(xy){ if (confirmAction('Do you really want to delete this movie?')) { document.location = "/cgi-bin/deleteMovie?ref="+xy; setTimeout("reload()", 3000); }}
currentChannel = selChannel;
function deleteMovie(xy){ if (confirmAction('Do you really want to delete this movie?')) { if (window.screen.width < 800) { document.location = "cgi-bin/deleteMovie?ref="+xy; } else { var selChannel = document.channelselector.channel.selectedIndex; var channel = ""; if (selChannel >= 0) { channel = document.channelselector.channel.options[selChannel].value; document.location = "cgi-bin/deleteMovie?ref="+channel; setTimeout("reload()", 3000); } else alert("Please select a movie first!"); } }}
Element.remove(row);
if (null != row) { Element.remove(row); }
this.deleteSession = function(uri, context) { // delete the session debug.print("deleteSession: " + uri); if (confirm("Are you sure you want to delete this session?")) { // call session-delete var req = new Ajax.Request(deleteUrl, { method: 'post', parameters: 'URI=' + uri, asynchronous: false, onFailure: reportError }); // delete the item from the DOM // context will be the button var row = context.parentNode.parentNode; Element.remove(row); } }
function deleteTimerEvent()
function deleteTimerEvent(xy)
function deleteTimerEvent(){ win=window.open("/deleteTimerEvent", "switchStatus", "width=1, height=1, left=0, top=0"); win.focus(); parent.setTimeout("reload()", 500);}
win=window.open("/deleteTimerEvent", "switchStatus", "width=1, height=1, left=0, top=0");
win=window.open("/deleteTimerEvent?"+xy, "switchStatus", "width=1, height=1, left=0, top=0");
function deleteTimerEvent(){ win=window.open("/deleteTimerEvent", "switchStatus", "width=1, height=1, left=0, top=0"); win.focus(); parent.setTimeout("reload()", 500);}
document.location = "/deleteTimerEvent?"+xy; setTimeout("reload()", 500);
NewWindow('/deleteTimerEvent?'+xy, 'deleteTimer', '300', '150', 'no', '5000'); setTimeout("reload()", 2000);
function deleteTimerEvent(xy){ document.location = "/deleteTimerEvent?"+xy; setTimeout("reload()", 500);}
NewWindow('/deleteTimerEvent?'+xy, 'deleteTimer', '300', '150', 'no', '5000'); setTimeout("reload()", 2000);
NewWindow('/deleteTimerEvent?'+xy, 'deleteTimer', '300', '150', 'no');
function deleteTimerEvent(xy){ NewWindow('/deleteTimerEvent?'+xy, 'deleteTimer', '300', '150', 'no', '5000'); setTimeout("reload()", 2000);}
props.push(prop + " -> " + object[prop]);
try { props.push(prop + " -> " + object[prop]); } catch (e) { props.push(prop + " -> [htmlutils: ack! couldn't read this property! (Permission Denied?)]"); }
function describe(object, delimiter) { var props = new Array(); for (var prop in object) { props.push(prop + " -> " + object[prop]); } return props.join(delimiter || '\n');}
function describe(object) {
function describe(object, delimiter) {
function describe(object) { var props = new Array(); for (var prop in object) { props.push(prop + " -> " + object[prop]); } return props.join('\n');}
return props.join('\n');
return props.join(delimiter || '\n');
function describe(object) { var props = new Array(); for (var prop in object) { props.push(prop + " -> " + object[prop]); } return props.join('\n');}
document.getElementById("description").innerHTML = '<p>' + msg + '</p><p>On success, you will see a series of "<span class="pass">PASS</span>" messages, followed by "<span class="pass">TEST COMPLETE</span>".</p>';
var span = document.createElement("span"); span.innerHTML = '<p>' + msg + '</p><p>On success, you will see a series of "<span class="pass">PASS</span>" messages, followed by "<span class="pass">TEST COMPLETE</span>".</p>'; var description = document.getElementById("description"); if (description.firstChild) description.replaceChild(span, description.firstChild); else description.appendChild(span);
function description(msg){ document.getElementById("description").innerHTML = '<p>' + msg + '</p><p>On success, you will see a series of "<span class="pass">PASS</span>" messages, followed by "<span class="pass">TEST COMPLETE</span>".</p>';}
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
OpenLayers.Layer.EventPane.prototype.destroy.apply(this, arguments);
destroy: function() { this.gmap = null; OpenLayers.Layer.prototype.destroy.apply(this, arguments); },
if ((this.img != null) && (this.img.parentNode == this.layer.div)) { this.layer.div.removeChild(this.img);
if ((this.imgDiv != null) && (this.imgDiv.parentNode == this.layer.div)) { this.layer.div.removeChild(this.imgDiv);
destroy: function() { if ((this.img != null) && (this.img.parentNode == this.layer.div)) { this.layer.div.removeChild(this.img); } this.img = null; OpenLayers.Tile.prototype.destroy.apply(this, arguments); },
this.img = null;
this.imgDiv = null;
destroy: function() { if ((this.img != null) && (this.img.parentNode == this.layer.div)) { this.layer.div.removeChild(this.img); } this.img = null; OpenLayers.Tile.prototype.destroy.apply(this, arguments); },
if (this.popup != null) { this.layer.map.removePopup(this.popup);
if ((this.layer != null) && (this.layer.map != null)) { if (this.popup != null) { this.layer.map.removePopup(this.popup); }
destroy: function() { //remove the popup from the map if (this.popup != null) { this.layer.map.removePopup(this.popup); } this.events = null; this.layer = null; this.id = null; this.lonlat = null; this.data = null; if (this.marker != null) { this.marker.destroy(); this.marker = null; } if (this.popup != null) { this.popup.destroy(); this.popup = null; } },
this.marker = null,
this.marker = null;
destroy: function() { this.events = null; this.layer = null; this.id = null; this.lonlat = null; this.data = null; if (this.marker != null) { this.marker.destroy(); this.marker = null, } if (this.popup != null) { this.popup.destroy(); this.popup = null; } }, /** * @returns A Marker Object created from the 'lonlat' and 'icon' properties * set in this.data. If no 'lonlat' is set, returns null. If no * 'icon' is set, OpenLayers.Marker() will load the default image * @type OpenLayers.Marker */ createMarker: function() { var marker = null; if (this.lonlat != null) { this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon); } return this.marker; },
createMarker: function() { var marker = null; if (this.lonlat != null) { this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon); } return this.marker; },
destroy: function() { this.events = null; this.layer = null; this.id = null; this.lonlat = null; this.data = null; if (this.marker != null) { this.marker.destroy(); this.marker = null, } if (this.popup != null) { this.popup.destroy(); this.popup = null; } }, /** * @returns A Marker Object created from the 'lonlat' and 'icon' properties * set in this.data. If no 'lonlat' is set, returns null. If no * 'icon' is set, OpenLayers.Marker() will load the default image * @type OpenLayers.Marker */ createMarker: function() { var marker = null; if (this.lonlat != null) { this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon); } return this.marker; },
Event.stopObserving(document, "mouseup", this.eventMouseUp); Event.stopObserving(document, "mousemove", this.eventMouseMove); Event.stopObserving(document, "keypress", this.eventKeypress);
this.unregisterEvents();
destroy: function() { Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); Event.stopObserving(document, "mouseup", this.eventMouseUp); Event.stopObserving(document, "mousemove", this.eventMouseMove); Event.stopObserving(document, "keypress", this.eventKeypress); },
this.layer.div.removeChild(this.img);
if (this.img.parentNode == this.layer.div) { this.layer.div.removeChild(this.img); }
destroy: function() { this.layer.div.removeChild(this.img); this.img = null; },
for(var i=0; i< this.layers.length; i++) { this.layers[i].destroy(); } this.layers = null; for(var i=0; i< this.controls.length; i++) { this.controls[i].destroy(); } this.controls = null;
if (this.layers != null) { for(var i=0; i< this.layers.length; i++) { this.layers[i].destroy(); } this.layers = null; } if (this.controls != null) { for(var i=0; i< this.controls.length; i++) { this.controls[i].destroy(); } this.controls = null; }
destroy:function() { for(var i=0; i< this.layers.length; i++) { this.layers[i].destroy(); } this.layers = null; for(var i=0; i< this.controls.length; i++) { this.controls[i].destroy(); } this.controls = null; },
this.handle.removeEvent('mousedown', this.start.bindWithEvent(this));
this.handle.removeEvent('mousedown', this.bound.start);
detach: function(){ this.handle.removeEvent('mousedown', this.start.bindWithEvent(this)); },
this.handles[i].removeEvent('mousedown', this.start.bindWithEvent(this, el));
this.handles[i].removeEvent('mousedown', this.bound.start[i]);
detach: function(){ this.elements.each(function(el, i){ this.handles[i].removeEvent('mousedown', this.start.bindWithEvent(this, el)); }, this); },