rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
layer.map = null; | removeLayer: function(layer) { if (layer.isFixed) { this.viewPortDiv.removeChild(layer.div); } else { this.layerContainerDiv.removeChild(layer.div); } this.layers.remove(layer); if (this.baseLayer == layer) { this.baseLayer = null; for(i=0; i < this.layers.length; i++) { if ( (this.baseLayer == null) && (this.layers[i].isBaseLayer()) ) { this.baseLayer = this.layers[i]; continue; } } } layer.map = null; this.events.triggerEvent("removelayer"); }, |
|
var inst = tinyMCE.getInstanceById(editor_id); | var inst = tinyMCE.getInstanceById(editor_id), h, re, ot, tn; | removeMCEControl : function(editor_id) { var inst = tinyMCE.getInstanceById(editor_id); if (inst) { inst.switchSettings(); editor_id = inst.editorId; var html = tinyMCE.getContent(editor_id); // Remove editor instance from instances array var tmpInstances = new Array(); for (var instanceName in tinyMCE.instances) { var instance = tinyMCE.instances[instanceName]; if (!tinyMCE.isInstance(instance)) continue; if (instanceName != editor_id) tmpInstances[instanceName] = instance; } tinyMCE.instances = tmpInstances; tinyMCE.selectedElement = null; tinyMCE.selectedInstance = null; // Remove element var replaceElement = document.getElementById(editor_id + "_parent"); var oldTargetElement = inst.oldTargetElement; var targetName = oldTargetElement.nodeName.toLowerCase(); if (targetName == "textarea" || targetName == "input") { // Just show the old text area replaceElement.parentNode.removeChild(replaceElement); oldTargetElement.style.display = "inline"; oldTargetElement.value = html; } else { oldTargetElement.innerHTML = html; oldTargetElement.style.display = 'block'; replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement); replaceElement.parentNode.removeChild(replaceElement); } } }, |
var html = tinyMCE.getContent(editor_id); | h = tinyMCE.getContent(editor_id); | removeMCEControl : function(editor_id) { var inst = tinyMCE.getInstanceById(editor_id); if (inst) { inst.switchSettings(); editor_id = inst.editorId; var html = tinyMCE.getContent(editor_id); // Remove editor instance from instances array var tmpInstances = new Array(); for (var instanceName in tinyMCE.instances) { var instance = tinyMCE.instances[instanceName]; if (!tinyMCE.isInstance(instance)) continue; if (instanceName != editor_id) tmpInstances[instanceName] = instance; } tinyMCE.instances = tmpInstances; tinyMCE.selectedElement = null; tinyMCE.selectedInstance = null; // Remove element var replaceElement = document.getElementById(editor_id + "_parent"); var oldTargetElement = inst.oldTargetElement; var targetName = oldTargetElement.nodeName.toLowerCase(); if (targetName == "textarea" || targetName == "input") { // Just show the old text area replaceElement.parentNode.removeChild(replaceElement); oldTargetElement.style.display = "inline"; oldTargetElement.value = html; } else { oldTargetElement.innerHTML = html; oldTargetElement.style.display = 'block'; replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement); replaceElement.parentNode.removeChild(replaceElement); } } }, |
var tmpInstances = new Array(); for (var instanceName in tinyMCE.instances) { var instance = tinyMCE.instances[instanceName]; if (!tinyMCE.isInstance(instance)) continue; if (instanceName != editor_id) tmpInstances[instanceName] = instance; } tinyMCE.instances = tmpInstances; | this.removeInstance(inst); | removeMCEControl : function(editor_id) { var inst = tinyMCE.getInstanceById(editor_id); if (inst) { inst.switchSettings(); editor_id = inst.editorId; var html = tinyMCE.getContent(editor_id); // Remove editor instance from instances array var tmpInstances = new Array(); for (var instanceName in tinyMCE.instances) { var instance = tinyMCE.instances[instanceName]; if (!tinyMCE.isInstance(instance)) continue; if (instanceName != editor_id) tmpInstances[instanceName] = instance; } tinyMCE.instances = tmpInstances; tinyMCE.selectedElement = null; tinyMCE.selectedInstance = null; // Remove element var replaceElement = document.getElementById(editor_id + "_parent"); var oldTargetElement = inst.oldTargetElement; var targetName = oldTargetElement.nodeName.toLowerCase(); if (targetName == "textarea" || targetName == "input") { // Just show the old text area replaceElement.parentNode.removeChild(replaceElement); oldTargetElement.style.display = "inline"; oldTargetElement.value = html; } else { oldTargetElement.innerHTML = html; oldTargetElement.style.display = 'block'; replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement); replaceElement.parentNode.removeChild(replaceElement); } } }, |
var replaceElement = document.getElementById(editor_id + "_parent"); var oldTargetElement = inst.oldTargetElement; var targetName = oldTargetElement.nodeName.toLowerCase(); | re = document.getElementById(editor_id + "_parent"); ot = inst.oldTargetElement; tn = ot.nodeName.toLowerCase(); | removeMCEControl : function(editor_id) { var inst = tinyMCE.getInstanceById(editor_id); if (inst) { inst.switchSettings(); editor_id = inst.editorId; var html = tinyMCE.getContent(editor_id); // Remove editor instance from instances array var tmpInstances = new Array(); for (var instanceName in tinyMCE.instances) { var instance = tinyMCE.instances[instanceName]; if (!tinyMCE.isInstance(instance)) continue; if (instanceName != editor_id) tmpInstances[instanceName] = instance; } tinyMCE.instances = tmpInstances; tinyMCE.selectedElement = null; tinyMCE.selectedInstance = null; // Remove element var replaceElement = document.getElementById(editor_id + "_parent"); var oldTargetElement = inst.oldTargetElement; var targetName = oldTargetElement.nodeName.toLowerCase(); if (targetName == "textarea" || targetName == "input") { // Just show the old text area replaceElement.parentNode.removeChild(replaceElement); oldTargetElement.style.display = "inline"; oldTargetElement.value = html; } else { oldTargetElement.innerHTML = html; oldTargetElement.style.display = 'block'; replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement); replaceElement.parentNode.removeChild(replaceElement); } } }, |
if (targetName == "textarea" || targetName == "input") { replaceElement.parentNode.removeChild(replaceElement); oldTargetElement.style.display = "inline"; oldTargetElement.value = html; | if (tn == "textarea" || tn == "input") { re.parentNode.removeChild(re); ot.style.display = "inline"; ot.value = h; | removeMCEControl : function(editor_id) { var inst = tinyMCE.getInstanceById(editor_id); if (inst) { inst.switchSettings(); editor_id = inst.editorId; var html = tinyMCE.getContent(editor_id); // Remove editor instance from instances array var tmpInstances = new Array(); for (var instanceName in tinyMCE.instances) { var instance = tinyMCE.instances[instanceName]; if (!tinyMCE.isInstance(instance)) continue; if (instanceName != editor_id) tmpInstances[instanceName] = instance; } tinyMCE.instances = tmpInstances; tinyMCE.selectedElement = null; tinyMCE.selectedInstance = null; // Remove element var replaceElement = document.getElementById(editor_id + "_parent"); var oldTargetElement = inst.oldTargetElement; var targetName = oldTargetElement.nodeName.toLowerCase(); if (targetName == "textarea" || targetName == "input") { // Just show the old text area replaceElement.parentNode.removeChild(replaceElement); oldTargetElement.style.display = "inline"; oldTargetElement.value = html; } else { oldTargetElement.innerHTML = html; oldTargetElement.style.display = 'block'; replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement); replaceElement.parentNode.removeChild(replaceElement); } } }, |
oldTargetElement.innerHTML = html; oldTargetElement.style.display = 'block'; replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement); replaceElement.parentNode.removeChild(replaceElement); | ot.innerHTML = h; ot.style.display = 'block'; re.parentNode.insertBefore(ot, re); re.parentNode.removeChild(re); | removeMCEControl : function(editor_id) { var inst = tinyMCE.getInstanceById(editor_id); if (inst) { inst.switchSettings(); editor_id = inst.editorId; var html = tinyMCE.getContent(editor_id); // Remove editor instance from instances array var tmpInstances = new Array(); for (var instanceName in tinyMCE.instances) { var instance = tinyMCE.instances[instanceName]; if (!tinyMCE.isInstance(instance)) continue; if (instanceName != editor_id) tmpInstances[instanceName] = instance; } tinyMCE.instances = tmpInstances; tinyMCE.selectedElement = null; tinyMCE.selectedInstance = null; // Remove element var replaceElement = document.getElementById(editor_id + "_parent"); var oldTargetElement = inst.oldTargetElement; var targetName = oldTargetElement.nodeName.toLowerCase(); if (targetName == "textarea" || targetName == "input") { // Just show the old text area replaceElement.parentNode.removeChild(replaceElement); oldTargetElement.style.display = "inline"; oldTargetElement.value = html; } else { oldTargetElement.innerHTML = html; oldTargetElement.style.display = 'block'; replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement); replaceElement.parentNode.removeChild(replaceElement); } } }, |
removeObserver: function(observer) { | removeObserver: function(element) { | removeObserver: function(observer) { for(var i = 0; i < this.observers.length; i++) if(this.observers[i] = observer) this.observers.splice(i,1); }, |
if(this.observers[i] = observer) | if(this.observers[i].element && (this.observers[i].element == element)) | removeObserver: function(observer) { for(var i = 0; i < this.observers.length; i++) if(this.observers[i] = observer) this.observers.splice(i,1); }, |
for(var i = 0; i < this.observers.length; i++) if(this.observers[i].element && (this.observers[i].element == element)) this.observers.splice(i,1); | this.observers = this.observers.reject( function(o) { return o.element==element }); | removeObserver: function(element) { // element instead of obsever fixes mem leaks for(var i = 0; i < this.observers.length; i++) if(this.observers[i].element && (this.observers[i].element == element)) this.observers.splice(i,1); }, |
str = str.replace(/<\/?span\s*([^>]*)>/gi, ""); | str = str.replace(/<span class="wikilink">\s*([\s\S]+?)<\/span>/g,'$1'); str = str.replace(/<span class="wikiexternallink">\s*([\s\S]+?)<\/span>/g,'$1'); | WikiEditor.prototype.removeSpecialHtmlTags = function(str) { str = str.replace(/<div class="paragraph">([\s\S]+?)<\/div>/g,'$1'); str = str.replace(/<p class="paragraph">\s*([\s\S]+?)<\/p>/g,'$1'); str = str.replace(/<\/?span\s*([^>]*)>/gi, ""); str = str.replace(/<\/?p[^>]*>/gi, ""); str = str.replace(/<br \/>/g, '\r\n') return str;} |
str = str.replace(/<br \/>/g, '\r\n') | str = str.replace(/<br \/>/g, '\r\n'); | WikiEditor.prototype.removeSpecialHtmlTags = function(str) { str = str.replace(/<div class="paragraph">([\s\S]+?)<\/div>/g,'$1'); str = str.replace(/<p class="paragraph">\s*([\s\S]+?)<\/p>/g,'$1'); str = str.replace(/<span class="wikilink">\s*([\s\S]+?)<\/span>/g,'$1'); str = str.replace(/<span class="wikiexternallink">\s*([\s\S]+?)<\/span>/g,'$1'); str = str.replace(/<\/?p[^>]*>/gi, ""); str = str.replace(/<br \/>/g, '\r\n') return str;} |
function removeStyleClass(element, className) { if (hasStyleClass(element, className)) element.className = element.className.replace(className, ""); | Element.prototype.removeStyleClass = function(className) { if(this.hasStyleClass(className)) this.className = this.className.replace(className, ""); | function removeStyleClass(element, className){ if (hasStyleClass(element, className)) element.className = element.className.replace(className, "");} |
if ( isNaN(response) ) { alert(response); } | if ( isNaN(response) ) { ajaxDel.myResponseElement.innerHTML = response; return false; } | function removeThisItem(id) { var response = ajaxDel.response; if ( isNaN(response) ) { alert(response); } response = parseInt(response, 10); if ( -1 == response ) { ajaxDel.myResponseElement.innerHTML = "You don't have permission to do that."; } else if ( 0 == response ) { ajaxDel.myResponseElement.interHTML = "Something odd happened. Try refreshing the page? Either that or what you tried to delete never existed in the first place."; } else if ( 1 == response ) { theItem = document.getElementById(id); Fat.fade_element(id,null,700,'#FF3333'); setTimeout('theItem.parentNode.removeChild(theItem)', 705); var pos = getListPos(id); listItems.splice(pos,1); recolorList(pos); ajaxDel.myResponseElement.parentNode.removeChild(ajaxDel.myResponseElement); }} |
this.position = pos; | render: function(pos) { if(this.state == 'idle') { this.state = 'running'; this.event('beforeSetup'); if(this.setup) this.setup(); this.event('afterSetup'); } if(this.options.transition) pos = this.options.transition(pos); pos *= (this.options.to-this.options.from); pos += this.options.from; this.event('beforeUpdate'); if(this.update) this.update(pos); this.event('afterUpdate'); }, |
|
Element.Class.add(this.get_entry(i),"selected") : Element.Class.remove(this.get_entry(i),"selected"); | Element.addClassName(this.get_entry(i),"selected") : Element.removeClassName(this.get_entry(i),"selected"); | render: function() { if(this.entry_count > 0) { for (var i = 0; i < this.entry_count; i++) this.index==i ? Element.Class.add(this.get_entry(i),"selected") : Element.Class.remove(this.get_entry(i),"selected"); if(this.has_focus) { if(this.get_current_entry().scrollIntoView) this.get_current_entry().scrollIntoView(false); this.show(); this.active = true; } } else this.hide(); }, |
pos += this.options.from; if(this.options.beforeUpdate) this.options.beforeUpdate(this); | pos += this.options.from; this.position = pos; this.event('beforeUpdate'); | render: function(pos) { if(this.options.transition) pos = this.options.transition(pos); pos *= (this.options.to-this.options.from); pos += this.options.from; if(this.options.beforeUpdate) this.options.beforeUpdate(this); if(this.update) this.update(pos); if(this.options.afterUpdate) this.options.afterUpdate(this); }, |
if(this.options.afterUpdate) this.options.afterUpdate(this); | this.event('afterUpdate'); | render: function(pos) { if(this.options.transition) pos = this.options.transition(pos); pos *= (this.options.to-this.options.from); pos += this.options.from; if(this.options.beforeUpdate) this.options.beforeUpdate(this); if(this.update) this.update(pos); if(this.options.afterUpdate) this.options.afterUpdate(this); }, |
} else this.hide(); | } else { this.active = false; this.hide(); } | render: function() { if(this.entryCount > 0) { for (var i = 0; i < this.entryCount; i++) this.index==i ? Element.addClassName(this.getEntry(i),"selected") : Element.removeClassName(this.getEntry(i),"selected"); if(this.hasFocus) { this.show(); this.active = true; } } else this.hide(); }, |
if(this.entry_count > 0) { for (var i = 0; i < this.entry_count; i++) | if(this.entryCount > 0) { for (var i = 0; i < this.entryCount; i++) | render: function() { if(this.entry_count > 0) { for (var i = 0; i < this.entry_count; i++) this.index==i ? Element.addClassName(this.get_entry(i),"selected") : Element.removeClassName(this.get_entry(i),"selected"); if(this.has_focus) { if(this.get_current_entry().scrollIntoView) this.get_current_entry().scrollIntoView(false); this.show(); this.active = true; } } else this.hide(); }, |
Element.addClassName(this.get_entry(i),"selected") : Element.removeClassName(this.get_entry(i),"selected"); | Element.addClassName(this.getEntry(i),"selected") : Element.removeClassName(this.getEntry(i),"selected"); | render: function() { if(this.entry_count > 0) { for (var i = 0; i < this.entry_count; i++) this.index==i ? Element.addClassName(this.get_entry(i),"selected") : Element.removeClassName(this.get_entry(i),"selected"); if(this.has_focus) { if(this.get_current_entry().scrollIntoView) this.get_current_entry().scrollIntoView(false); this.show(); this.active = true; } } else this.hide(); }, |
if(this.has_focus) { if(this.get_current_entry().scrollIntoView) this.get_current_entry().scrollIntoView(false); | if(this.hasFocus) { | render: function() { if(this.entry_count > 0) { for (var i = 0; i < this.entry_count; i++) this.index==i ? Element.addClassName(this.get_entry(i),"selected") : Element.removeClassName(this.get_entry(i),"selected"); if(this.has_focus) { if(this.get_current_entry().scrollIntoView) this.get_current_entry().scrollIntoView(false); this.show(); this.active = true; } } else this.hide(); }, |
if(this.options.transition) pos = this.options.transition(pos); pos *= (this.options.to-this.options.from); pos += this.options.from; this.position = pos; this.event('beforeUpdate'); if(this.update) this.update(pos); this.event('afterUpdate'); | if(this.state == 'running') { if(this.options.transition) pos = this.options.transition(pos); pos *= (this.options.to-this.options.from); pos += this.options.from; this.position = pos; this.event('beforeUpdate'); if(this.update) this.update(pos); this.event('afterUpdate'); } | render: function(pos) { if(this.state == 'idle') { this.state = 'running'; this.event('beforeSetup'); if(this.setup) this.setup(); this.event('afterSetup'); } if(this.options.transition) pos = this.options.transition(pos); pos *= (this.options.to-this.options.from); pos += this.options.from; this.position = pos; this.event('beforeUpdate'); if(this.update) this.update(pos); this.event('afterUpdate'); }, |
element.parentNode.replaceChild(document.createTextNode("\n"), element) | element.parentNode.replaceChild(element.ownerDocument.createTextNode("\n"), element) | function renderWhitespaceInTextContent(element) { // Remove non-visible newlines in text nodes if (element.nodeType == Node.TEXT_NODE) { element.data = element.data.replace(/\n|\r|\t/g, " "); return; } // Don't modify PRE elements if (element.tagName == "PRE") { return; } // Handle inline element that force newlines if (tagIs(element, ["BR", "HR"])) { // Replace this element with a newline text element element.parentNode.replaceChild(document.createTextNode("\n"), element) } for (var i = 0; i < element.childNodes.length; i++) { var child = element.childNodes.item(i) renderWhitespaceInTextContent(child); } // Handle block elements that introduce newlines// -- From HTML spec://<!ENTITY % block// "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |// BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS"> if (tagIs(element, ["P", "DIV"])) { element.appendChild(document.createTextNode("\n"), element) }} |
element.appendChild(document.createTextNode("\n"), element) | element.appendChild(element.ownerDocument.createTextNode("\n"), element) | function renderWhitespaceInTextContent(element) { // Remove non-visible newlines in text nodes if (element.nodeType == Node.TEXT_NODE) { element.data = element.data.replace(/\n|\r|\t/g, " "); return; } // Don't modify PRE elements if (element.tagName == "PRE") { return; } // Handle inline element that force newlines if (tagIs(element, ["BR", "HR"])) { // Replace this element with a newline text element element.parentNode.replaceChild(document.createTextNode("\n"), element) } for (var i = 0; i < element.childNodes.length; i++) { var child = element.childNodes.item(i) renderWhitespaceInTextContent(child); } // Handle block elements that introduce newlines// -- From HTML spec://<!ENTITY % block// "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |// BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS"> if (tagIs(element, ["P", "DIV"])) { element.appendChild(document.createTextNode("\n"), element) }} |
if (tinyMCE.isMSIE && !tinyMCE.isOpera) | var s, b, ex; if (tinyMCE.isRealIE) | repaint : function() { if (tinyMCE.isMSIE && !tinyMCE.isOpera) return; try { var s = this.selection; var b = s.getBookmark(true); this.getBody().style.display = 'none'; this.getDoc().execCommand('selectall', false, null); this.getSel().collapseToStart(); this.getBody().style.display = 'block'; s.moveToBookmark(b); } catch (ex) { // Ignore } }, |
var s = this.selection; var b = s.getBookmark(true); | s = this.selection; b = s.getBookmark(true); | repaint : function() { if (tinyMCE.isMSIE && !tinyMCE.isOpera) return; try { var s = this.selection; var b = s.getBookmark(true); this.getBody().style.display = 'none'; this.getDoc().execCommand('selectall', false, null); this.getSel().collapseToStart(); this.getBody().style.display = 'block'; s.moveToBookmark(b); } catch (ex) { // Ignore } }, |
instance.execCommand('mceInsertContent', false, str); | inst.execCommand('mceInsertContent', false, str); | function replaceSel(search_str, str, back) { instance.execCommand('mceInsertContent', false, str); } |
pattern = /\$\{(\w+)\}\.(.+)/; var variableIndex = str; var variableFunction=''; if(pattern.test(str)) { pieces = str.split('.'); variableIndex = pieces[0]; variableFunction = pieces[1]; | var stringResult = str; var match; while (match = stringResult.match(/\$\{(\w+)\}/)) { var variable = match[0]; var name = match[1]; var replacement = storedVars[name]; stringResult = stringResult.replace(variable, replacement); | function replaceVariables(str) { //handle the case of ${userid}.toUpper pattern = /\$\{(\w+)\}\.(.+)/; var variableIndex = str; var variableFunction=''; if(pattern.test(str)) { pieces = str.split('.'); variableIndex = pieces[0]; variableFunction = pieces[1]; } regex = /\$\{(\w+)\}/g; var variableValue = variableIndex.replace(regex, function(match, word) { return storedVars[word]; }); if( variableFunction == '') return variableValue; else { return eval("variableValue."+ eval("variableFunction") + "()" ); }} |
regex = /\$\{(\w+)\}/g; var variableValue = variableIndex.replace(regex, function(match, word) { return storedVars[word]; }); if( variableFunction == '') return variableValue; else { return eval("variableValue."+ eval("variableFunction") + "()" ); } | return stringResult; | function replaceVariables(str) { //handle the case of ${userid}.toUpper pattern = /\$\{(\w+)\}\.(.+)/; var variableIndex = str; var variableFunction=''; if(pattern.test(str)) { pieces = str.split('.'); variableIndex = pieces[0]; variableFunction = pieces[1]; } regex = /\$\{(\w+)\}/g; var variableValue = variableIndex.replace(regex, function(match, word) { return storedVars[word]; }); if( variableFunction == '') return variableValue; else { return eval("variableValue."+ eval("variableFunction") + "()" ); }} |
if (!add_marker) { | function report_post(f) { if (state!='reporting') return; /* Not in reporting mode, shouldn't be able to submit */ pass = true// if (!add_marker) {// pass = false// var str = '<b style="color: #ff0000">Please select somewhere</b>'// document.getElementById('show_where').innerHTML = str// document.getElementById('show_where2').innerHTML = str// } else { lng = add_marker.point.x lat = add_marker.point.y// } name = encodeURIComponent(f.name.value) email = encodeURIComponent(f.email.value) report_id = document.getElementById('report_id').value zoom = map.getZoomLevel() if (!name) { pass = false; field_error(f.name, 'nameerror', 'Please give your name') } else field_unerror(f.name, 'nameerror') if (!email) { pass = false; field_error(f.email, 'emailerror', 'Please give your email address') } else field_unerror(f.email, 'emailerror') if (!pass) return; var d = document.getElementById('report_submit') d.value = 'Submitting...'; d.disabled = true var r = GXmlHttp.create(); var url = "/cgi-bin/submit-correction.cgi" var post_data = "name="+name+";email="+email+";id="+report_id+";lng="+lng+";lat="+lat+";zoom="+zoom r.open("POST", url, true); r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") r.onreadystatechange = function(){ if (r.readyState == 4) { x = r.responseXML var d = document.getElementById('report_submit') d.value = 'Submit'; d.disabled = false errors = x.getElementsByTagName('error') if (errors.length) { form = document.getElementById('f2') for (e=0; e<errors.length; e++) { field = errors[e].getAttribute('field') error = GXml.value(errors[e]) var errspan = '' if (field=='email') errspan = 'emailerror2' field_error(form[field], errspan, error) } return; } state = 'reportsuccess' document.getElementById('incorrect_entry').style.display='none' document.getElementById('report_success').style.display='block' map.removeOverlay(add_marker) add_marker = 0 } } r.send(post_data);} |
|
lng = '' lat = '' } else { | function report_post(f) { if (state!='reporting') return; /* Not in reporting mode, shouldn't be able to submit */ pass = true// if (!add_marker) {// pass = false// var str = '<b style="color: #ff0000">Please select somewhere</b>'// document.getElementById('show_where').innerHTML = str// document.getElementById('show_where2').innerHTML = str// } else { lng = add_marker.point.x lat = add_marker.point.y// } name = encodeURIComponent(f.name.value) email = encodeURIComponent(f.email.value) report_id = document.getElementById('report_id').value zoom = map.getZoomLevel() if (!name) { pass = false; field_error(f.name, 'nameerror', 'Please give your name') } else field_unerror(f.name, 'nameerror') if (!email) { pass = false; field_error(f.email, 'emailerror', 'Please give your email address') } else field_unerror(f.email, 'emailerror') if (!pass) return; var d = document.getElementById('report_submit') d.value = 'Submitting...'; d.disabled = true var r = GXmlHttp.create(); var url = "/cgi-bin/submit-correction.cgi" var post_data = "name="+name+";email="+email+";id="+report_id+";lng="+lng+";lat="+lat+";zoom="+zoom r.open("POST", url, true); r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") r.onreadystatechange = function(){ if (r.readyState == 4) { x = r.responseXML var d = document.getElementById('report_submit') d.value = 'Submit'; d.disabled = false errors = x.getElementsByTagName('error') if (errors.length) { form = document.getElementById('f2') for (e=0; e<errors.length; e++) { field = errors[e].getAttribute('field') error = GXml.value(errors[e]) var errspan = '' if (field=='email') errspan = 'emailerror2' field_error(form[field], errspan, error) } return; } state = 'reportsuccess' document.getElementById('incorrect_entry').style.display='none' document.getElementById('report_success').style.display='block' map.removeOverlay(add_marker) add_marker = 0 } } r.send(post_data);} |
|
} | function report_post(f) { if (state!='reporting') return; /* Not in reporting mode, shouldn't be able to submit */ pass = true// if (!add_marker) {// pass = false// var str = '<b style="color: #ff0000">Please select somewhere</b>'// document.getElementById('show_where').innerHTML = str// document.getElementById('show_where2').innerHTML = str// } else { lng = add_marker.point.x lat = add_marker.point.y// } name = encodeURIComponent(f.name.value) email = encodeURIComponent(f.email.value) report_id = document.getElementById('report_id').value zoom = map.getZoomLevel() if (!name) { pass = false; field_error(f.name, 'nameerror', 'Please give your name') } else field_unerror(f.name, 'nameerror') if (!email) { pass = false; field_error(f.email, 'emailerror', 'Please give your email address') } else field_unerror(f.email, 'emailerror') if (!pass) return; var d = document.getElementById('report_submit') d.value = 'Submitting...'; d.disabled = true var r = GXmlHttp.create(); var url = "/cgi-bin/submit-correction.cgi" var post_data = "name="+name+";email="+email+";id="+report_id+";lng="+lng+";lat="+lat+";zoom="+zoom r.open("POST", url, true); r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") r.onreadystatechange = function(){ if (r.readyState == 4) { x = r.responseXML var d = document.getElementById('report_submit') d.value = 'Submit'; d.disabled = false errors = x.getElementsByTagName('error') if (errors.length) { form = document.getElementById('f2') for (e=0; e<errors.length; e++) { field = errors[e].getAttribute('field') error = GXml.value(errors[e]) var errspan = '' if (field=='email') errspan = 'emailerror2' field_error(form[field], errspan, error) } return; } state = 'reportsuccess' document.getElementById('incorrect_entry').style.display='none' document.getElementById('report_success').style.display='block' map.removeOverlay(add_marker) add_marker = 0 } } r.send(post_data);} |
|
debug.print("reportError: " + req); debug.print("reportError: " + resp); | debug.print("reportError: req = " + req); debug.print("reportError: resp = " + resp); debug.setEnabled(old); | function reportError(req, resp) { debug.setEnabled(true); debug.print("reportError: " + req); debug.print("reportError: " + resp);} |
if (this.options.method == 'get') url += '?' + parameters; this.transport.open(this.options.method, url, | this.url = url; if (this.options.method == 'get') this.url += '?' + parameters; Ajax.Responders.dispatch('onCreate', this, this.transport); this.transport.open(this.options.method, this.url, | request: function(url) { var parameters = this.options.parameters || ''; if (parameters.length > 0) parameters += '&_='; try { if (this.options.method == 'get') url += '?' + parameters; this.transport.open(this.options.method, url, this.options.asynchronous); if (this.options.asynchronous) { this.transport.onreadystatechange = this.onStateChange.bind(this); setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); } this.setRequestHeaders(); var body = this.options.postBody ? this.options.postBody : parameters; this.transport.send(this.options.method == 'post' ? body : null); } catch (e) { } }, |
case 'element': this.options.postBody = $(this.options.postBody).toQueryString(); break; case 'object': this.options.postBody = Object.toQueryString(this.options.postBody); break; case 'string': break; default: this.options.postBody = null; | case 'element': data = $(this.options.postBody).toQueryString(); break; case 'object': data = Object.toQueryString(this.options.postBody); break; case 'string': data = this.options.postBody; | request: function(){ switch ($type(this.options.postBody)){ case 'element': this.options.postBody = $(this.options.postBody).toQueryString(); break; case 'object': this.options.postBody = Object.toQueryString(this.options.postBody); break; case 'string': break; default: this.options.postBody = null; } return this.send(this.url, this.options.postBody); }, |
return this.send(this.url, this.options.postBody); | if (this._method) data = (data) ? [this._method, data].join('&') : this._method; this.setHeader('X-Requested-With', 'XMLHttpRequest'); return this.send(this.url, data); | request: function(){ switch ($type(this.options.postBody)){ case 'element': this.options.postBody = $(this.options.postBody).toQueryString(); break; case 'object': this.options.postBody = Object.toQueryString(this.options.postBody); break; case 'string': break; default: this.options.postBody = null; } return this.send(this.url, this.options.postBody); }, |
url += '?' + parameters; | this.url += '?' + parameters; | request: function(url) { var parameters = this.options.parameters || ''; if (parameters.length > 0) parameters += '&_='; try { if (this.options.method == 'get') url += '?' + parameters; this.transport.open(this.options.method, url, this.options.asynchronous); if (this.options.asynchronous) { this.transport.onreadystatechange = this.onStateChange.bind(this); setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); } this.setRequestHeaders(); var body = this.options.postBody ? this.options.postBody : parameters; this.transport.send(this.options.method == 'post' ? body : null); } catch (e) { } }, |
this.transport.open(this.options.method, url, | Ajax.Responders.dispatch('onCreate', this, this.transport); this.transport.open(this.options.method, this.url, | request: function(url) { var parameters = this.options.parameters || ''; if (parameters.length > 0) parameters += '&_='; try { if (this.options.method == 'get') url += '?' + parameters; this.transport.open(this.options.method, url, this.options.asynchronous); if (this.options.asynchronous) { this.transport.onreadystatechange = this.onStateChange.bind(this); setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); } this.setRequestHeaders(); var body = this.options.postBody ? this.options.postBody : parameters; this.transport.send(this.options.method == 'post' ? body : null); } catch (e) { } }, |
var resultFeatures = OpenLayers.Util.getNodes(doc, "gml:featureMember"); | var resultFeatures = doc.getElementsByTagName("featureMember"); | requestSuccess:function(request) { var doc = request.responseXML; if (!doc || request.fileType!="XML") { doc = OpenLayers.parseXMLString(request.responseText); } var resultFeatures = OpenLayers.Util.getNodes(doc, "gml:featureMember"); //clear old featureList this.features = new Array(); for (var i=0; i < resultFeatures.length; i++) { var feature = new this.layer.featureClass(this.layer, resultFeatures[i]); this.features.append(feature); } }, |
ol.Log.info(this.CLASS_NAME + " found " + | ol.Log.info(this.grid.name + " found " + | requestSuccess:function(request) { var doc = request.responseXML; if (!doc || request.fileType!="XML") { doc = ol.Application.parseXMLString(request.responseText); } var resultFeatures = ol.Application.getNodes(doc, "gml:featureMember"); ol.Log.info(this.CLASS_NAME + " found " + resultFeatures.length + " features"); //clear old featureList this.features = new Array(); for (var i=0; i < resultFeatures.length; i++) { //create new Feature and add it var newFeature = new ol.Feature(resultFeatures[i]); //add new marker var newMarker = this._createMarker(newFeature); this._addMarker(newMarker); //save reference to the feature and marker this.featureList[i] = new ol.Tile.WFS.FeatureItem( newFeature, newMarker); } if (this.ds.markers != null) { this.ds.markers.redraw(); } }, |
var newFeature = new ol.Feature(resultFeatures[i]); | var feature = new ol.Feature(resultFeatures[i]); | requestSuccess:function(request) { var doc = request.responseXML; if (!doc || request.fileType!="XML") { doc = ol.Application.parseXMLString(request.responseText); } var resultFeatures = ol.Application.getNodes(doc, "gml:featureMember"); ol.Log.info(this.CLASS_NAME + " found " + resultFeatures.length + " features"); //clear old featureList this.features = new Array(); for (var i=0; i < resultFeatures.length; i++) { //create new Feature and add it var newFeature = new ol.Feature(resultFeatures[i]); //add new marker var newMarker = this._createMarker(newFeature); this._addMarker(newMarker); //save reference to the feature and marker this.featureList[i] = new ol.Tile.WFS.FeatureItem( newFeature, newMarker); } if (this.ds.markers != null) { this.ds.markers.redraw(); } }, |
var newMarker = this._createMarker(newFeature); this._addMarker(newMarker); | var icon = new OpenLayers.Icon(feature.markerImage, feature.size); | requestSuccess:function(request) { var doc = request.responseXML; if (!doc || request.fileType!="XML") { doc = ol.Application.parseXMLString(request.responseText); } var resultFeatures = ol.Application.getNodes(doc, "gml:featureMember"); ol.Log.info(this.CLASS_NAME + " found " + resultFeatures.length + " features"); //clear old featureList this.features = new Array(); for (var i=0; i < resultFeatures.length; i++) { //create new Feature and add it var newFeature = new ol.Feature(resultFeatures[i]); //add new marker var newMarker = this._createMarker(newFeature); this._addMarker(newMarker); //save reference to the feature and marker this.featureList[i] = new ol.Tile.WFS.FeatureItem( newFeature, newMarker); } if (this.ds.markers != null) { this.ds.markers.redraw(); } }, |
this.featureList[i] = new ol.Tile.WFS.FeatureItem( newFeature, newMarker); | var marker = new OpenLayers.Marker(icon, feature.lonlat); | requestSuccess:function(request) { var doc = request.responseXML; if (!doc || request.fileType!="XML") { doc = ol.Application.parseXMLString(request.responseText); } var resultFeatures = ol.Application.getNodes(doc, "gml:featureMember"); ol.Log.info(this.CLASS_NAME + " found " + resultFeatures.length + " features"); //clear old featureList this.features = new Array(); for (var i=0; i < resultFeatures.length; i++) { //create new Feature and add it var newFeature = new ol.Feature(resultFeatures[i]); //add new marker var newMarker = this._createMarker(newFeature); this._addMarker(newMarker); //save reference to the feature and marker this.featureList[i] = new ol.Tile.WFS.FeatureItem( newFeature, newMarker); } if (this.ds.markers != null) { this.ds.markers.redraw(); } }, |
if (this.ds.markers != null) { this.ds.markers.redraw(); } | requestSuccess:function(request) { var doc = request.responseXML; if (!doc || request.fileType!="XML") { doc = ol.Application.parseXMLString(request.responseText); } var resultFeatures = ol.Application.getNodes(doc, "gml:featureMember"); ol.Log.info(this.CLASS_NAME + " found " + resultFeatures.length + " features"); //clear old featureList this.features = new Array(); for (var i=0; i < resultFeatures.length; i++) { //create new Feature and add it var newFeature = new ol.Feature(resultFeatures[i]); //add new marker var newMarker = this._createMarker(newFeature); this._addMarker(newMarker); //save reference to the feature and marker this.featureList[i] = new ol.Tile.WFS.FeatureItem( newFeature, newMarker); } if (this.ds.markers != null) { this.ds.markers.redraw(); } }, |
|
this.commandRows.each(function(row) { | for (var i = 0; i < this.commandRows.length; i++) { var row = this.commandRows[i]; | reset: function() { /** * reset the test to runnable state */ this.nextCommandRowIndex = 0; this.setStatus(''); this.commandRows.each(function(row) { row.reset(); }); // remove any additional fake "error" row added to the end of the document var errorElement = this.testDocument.getElementById('error'); if (errorElement) { Element.remove(errorElement); } }, |
}); | } | reset: function() { /** * reset the test to runnable state */ this.nextCommandRowIndex = 0; this.setStatus(''); this.commandRows.each(function(row) { row.reset(); }); // remove any additional fake "error" row added to the end of the document var errorElement = this.testDocument.getElementById('error'); if (errorElement) { Element.remove(errorElement); } }, |
Element.remove(errorElement); | errorElement.parentNode.removeChild(errorElement); | reset: function() { /** * reset the test to runnable state */ this.nextCommandRowIndex = 0; this.setStatus(''); this.commandRows.each(function(row) { row.reset(); }); // remove any additional fake "error" row added to the end of the document var errorElement = this.testDocument.getElementById('error'); if (errorElement) { Element.remove(errorElement); } }, |
kinds = parent.frames["navigationFrame"].document.getElementById("kinds") | kinds = parent.navigationFrame.document.getElementById("kinds") | function resetKinds() { kinds = parent.frames["navigationFrame"].document.getElementById("kinds") kinds.selectedIndex = 0;} |
debug("resizeBuffers: " + x + "," + y); | debug.print("resizeBuffers: " + x + "," + y); | function resizeBuffers(x, y) { debug("resizeBuffers: " + x + "," + y); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; // parent of all the textareas var theParent = document.getElementById(g_cq_buffers_area_id); for (var i = 0; i < theParent.childNodes.length; i++) { theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { //debug("resizeBuffers: " + theBuffer); theBuffer.cols += x; theBuffer.rows += y; } }} |
var theParent = document.getElementById(g_cq_buffers_area_id); | function resizeBuffers(x, y) { debug("resizeBuffers: " + x + "," + y); // childNodes.length will return some non-buffer elements, too! var theBuffer = null; for (var i = 0; i < theParent.childNodes.length; i++) { theBuffer = getBuffer(i); // not there? skip it if (theBuffer != null) { //debug("resizeBuffers: " + theBuffer); theBuffer.cols += x; theBuffer.rows += y; } }} |
|
rows = 20 + visible.offsetTop + visible.offsetHeight; | rows = 17 + visible.offsetTop + visible.offsetHeight; | function resizeFrameset() { var frameset = getFrameset(); if (frameset == null) { debug("resizeFrameset: null frameset"); return; } // set the result-frame height to fill the available space // pick a reasonable default value var rows = 500; // figure out where some well-known element ended up // in this case we'll use the total height of the query form // this might be called from the queryframe or from the parent frameset var visible = document.getElementById(g_cq_query_form_id); if (visible == null) { // hackish var documentNode = window.frames[0].window.document; visible = documentNode.getElementById(g_cq_query_form_id); } if (visible == null) { debug("nothing to resize from!"); return; } debug("resizeFrameset: visible " + visible + ", " + visible.offsetTop + ", " + visible.offsetHeight); // add a smidgen for fudge-factor: // 15px is enough for gecko, but IE6 wants 20px rows = 20 + visible.offsetTop + visible.offsetHeight; frameset.rows = rows + ",*";} // resizeFrameset |
var frameset = parent.document.getElementById(gFramesetId); | var frameset = parent.document.getElementById(kFramesetId); | function resizeFrameset() { var frameset = parent.document.getElementById(gFramesetId); if (frameset == null) { debug.print("resizeFrameset: null frameset"); return; } // set the result-frame height to fill the available space // pick a reasonable default value var rows = 500; // figure out where some well-known element ended up // in this case we'll use the total height of the query form // this might be called from the queryframe or from the parent frameset var visible = $(gQueryFormId); if (visible == null) { // hackish var documentNode = window.frames[0].window.document; visible = documentNode.getElementById(gQueryFormId); } if (visible == null) { debug.print("nothing to resize from!"); return; } debug.print("resizeFrameset: visible " + visible + ", " + visible.offsetTop + ", " + visible.offsetHeight); // add a smidgen for fudge-factor, so we don't activate scrolling: // 15px is enough for gecko, but IE6 wants 17px rows = 17 + visible.offsetTop + visible.offsetHeight; frameset.rows = rows + ",*";} // resizeFrameset |
var visible = $(gQueryFormId); | var visible = $(kQueryFormId); | function resizeFrameset() { var frameset = parent.document.getElementById(gFramesetId); if (frameset == null) { debug.print("resizeFrameset: null frameset"); return; } // set the result-frame height to fill the available space // pick a reasonable default value var rows = 500; // figure out where some well-known element ended up // in this case we'll use the total height of the query form // this might be called from the queryframe or from the parent frameset var visible = $(gQueryFormId); if (visible == null) { // hackish var documentNode = window.frames[0].window.document; visible = documentNode.getElementById(gQueryFormId); } if (visible == null) { debug.print("nothing to resize from!"); return; } debug.print("resizeFrameset: visible " + visible + ", " + visible.offsetTop + ", " + visible.offsetHeight); // add a smidgen for fudge-factor, so we don't activate scrolling: // 15px is enough for gecko, but IE6 wants 17px rows = 17 + visible.offsetTop + visible.offsetHeight; frameset.rows = rows + ",*";} // resizeFrameset |
visible = documentNode.getElementById(gQueryFormId); | visible = documentNode.getElementById(kQueryFormId); | function resizeFrameset() { var frameset = parent.document.getElementById(gFramesetId); if (frameset == null) { debug.print("resizeFrameset: null frameset"); return; } // set the result-frame height to fill the available space // pick a reasonable default value var rows = 500; // figure out where some well-known element ended up // in this case we'll use the total height of the query form // this might be called from the queryframe or from the parent frameset var visible = $(gQueryFormId); if (visible == null) { // hackish var documentNode = window.frames[0].window.document; visible = documentNode.getElementById(gQueryFormId); } if (visible == null) { debug.print("nothing to resize from!"); return; } debug.print("resizeFrameset: visible " + visible + ", " + visible.offsetTop + ", " + visible.offsetHeight); // add a smidgen for fudge-factor, so we don't activate scrolling: // 15px is enough for gecko, but IE6 wants 17px rows = 17 + visible.offsetTop + visible.offsetHeight; frameset.rows = rows + ",*";} // resizeFrameset |
debug("resizeFrameset: null frameset"); | debug.print("resizeFrameset: null frameset"); | function resizeFrameset() { var frameset = getFrameset(); if (frameset == null) { debug("resizeFrameset: null frameset"); return; } // set the result-frame height to fill the available space // pick a reasonable default value var rows = 500; // figure out where some well-known element ended up // in this case we'll use the total height of the query form // this might be called from the queryframe or from the parent frameset var visible = document.getElementById(g_cq_query_form_id); if (visible == null) { // hackish var documentNode = window.frames[0].window.document; visible = documentNode.getElementById(g_cq_query_form_id); } if (visible == null) { debug("nothing to resize from!"); return; } debug("resizeFrameset: visible " + visible + ", " + visible.offsetTop + ", " + visible.offsetHeight); // add a smidgen for fudge-factor, so we don't activate scrolling: // 15px is enough for gecko, but IE6 wants 17px rows = 17 + visible.offsetTop + visible.offsetHeight; frameset.rows = rows + ",*";} // resizeFrameset |
debug("nothing to resize from!"); | debug.print("nothing to resize from!"); | function resizeFrameset() { var frameset = getFrameset(); if (frameset == null) { debug("resizeFrameset: null frameset"); return; } // set the result-frame height to fill the available space // pick a reasonable default value var rows = 500; // figure out where some well-known element ended up // in this case we'll use the total height of the query form // this might be called from the queryframe or from the parent frameset var visible = document.getElementById(g_cq_query_form_id); if (visible == null) { // hackish var documentNode = window.frames[0].window.document; visible = documentNode.getElementById(g_cq_query_form_id); } if (visible == null) { debug("nothing to resize from!"); return; } debug("resizeFrameset: visible " + visible + ", " + visible.offsetTop + ", " + visible.offsetHeight); // add a smidgen for fudge-factor, so we don't activate scrolling: // 15px is enough for gecko, but IE6 wants 17px rows = 17 + visible.offsetTop + visible.offsetHeight; frameset.rows = rows + ",*";} // resizeFrameset |
debug("resizeFrameset: visible " + visible | debug.print("resizeFrameset: visible " + visible | function resizeFrameset() { var frameset = getFrameset(); if (frameset == null) { debug("resizeFrameset: null frameset"); return; } // set the result-frame height to fill the available space // pick a reasonable default value var rows = 500; // figure out where some well-known element ended up // in this case we'll use the total height of the query form // this might be called from the queryframe or from the parent frameset var visible = document.getElementById(g_cq_query_form_id); if (visible == null) { // hackish var documentNode = window.frames[0].window.document; visible = documentNode.getElementById(g_cq_query_form_id); } if (visible == null) { debug("nothing to resize from!"); return; } debug("resizeFrameset: visible " + visible + ", " + visible.offsetTop + ", " + visible.offsetHeight); // add a smidgen for fudge-factor, so we don't activate scrolling: // 15px is enough for gecko, but IE6 wants 17px rows = 17 + visible.offsetTop + visible.offsetHeight; frameset.rows = rows + ",*";} // resizeFrameset |
document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px'; | el.style.height = Math.abs(wHeight) + 'px'; el.style.width = Math.abs(wWidth) + 'px'; | function resizeInputs() { if (!tinyMCE.isMSIE) { wHeight = self.innerHeight-80; wWidth = self.innerWidth-16; } else { wHeight = document.body.clientHeight - 80; wWidth = document.body.clientWidth - 16; } document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';} |
if (!requestUrl) { | if (requestUrl == undefined) { | function resolve() { selector = cocoon.getComponent("org.apache.lenya.ac.AccessControllerResolverSelector"); resolver = selector.select(Packages.org.apache.lenya.ac.AccessControllerResolver.DEFAULT_RESOLVER); if (!requestUrl) { requestUrl = cocoon.parameters["requestUri"]; } if (!contextPath) { contextPath = cocoon.parameters["contextPath"]; } var webappUrl = Packages.org.apache.lenya.util.ServletHelper.getWebappURI(contextPath, requestUrl); var accessController = resolver.resolveAccessController(webappUrl); accreditableManager = accessController.getAccreditableManager();} |
if (!contextPath) { | if (contextPath == undefined) { | function resolve() { selector = cocoon.getComponent("org.apache.lenya.ac.AccessControllerResolverSelector"); resolver = selector.select(Packages.org.apache.lenya.ac.AccessControllerResolver.DEFAULT_RESOLVER); if (!requestUrl) { requestUrl = cocoon.parameters["requestUri"]; } if (!contextPath) { contextPath = cocoon.parameters["contextPath"]; } var webappUrl = Packages.org.apache.lenya.util.ServletHelper.getWebappURI(contextPath, requestUrl); var accessController = resolver.resolveAccessController(webappUrl); accreditableManager = accessController.getAccreditableManager();} |
|| this.options['on' + this.responseIsSuccess() ? 'Success' : 'Failure'] | || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + this.responseIsSuccess() ? 'Success' : 'Failure'] || Prototype.emptyFunction)(this.transport); (this.options['on' + event] || Prototype.emptyFunction)(this.transport); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
Ajax.Responders.dispatch('on' + event, this, transport, json); | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; var transport = this.transport, json = this.evalJSON(); if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(transport, json); (this.options['on' + event] || Prototype.emptyFunction)(transport, json); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
|
var transport = this.transport, json = this.evalJSON(); | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; var transport = this.transport, json = this.evalJSON(); if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(transport, json); (this.options['on' + event] || Prototype.emptyFunction)(transport, json); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
|
|| Prototype.emptyFunction)(transport, json); | || Prototype.emptyFunction)(this.transport); | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; var transport = this.transport, json = this.evalJSON(); if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(transport, json); (this.options['on' + event] || Prototype.emptyFunction)(transport, json); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
(this.options['on' + event] || Prototype.emptyFunction)(transport, json); | (this.options['on' + event] || Prototype.emptyFunction)(this.transport); | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; var transport = this.transport, json = this.evalJSON(); if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(transport, json); (this.options['on' + event] || Prototype.emptyFunction)(transport, json); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
|| Prototype.emptyFunction)(this.transport); | || Prototype.emptyFunction)(transport, json); | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(this.transport); (this.options['on' + event] || Prototype.emptyFunction)(this.transport); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
(this.options['on' + event] || Prototype.emptyFunction)(this.transport); | (this.options['on' + event] || Prototype.emptyFunction)(transport, json); | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(this.transport); (this.options['on' + event] || Prototype.emptyFunction)(this.transport); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
|| this.options['on' + this.responseIsSuccess() ? 'Success' : 'Failure'] || Prototype.emptyFunction)(this.transport); | || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(transport, json); | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + this.responseIsSuccess() ? 'Success' : 'Failure'] || Prototype.emptyFunction)(this.transport); (this.options['on' + event] || Prototype.emptyFunction)(this.transport); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
(this.options['on' + event] || Prototype.emptyFunction)(this.transport); | (this.options['on' + event] || Prototype.emptyFunction)(transport, json); Ajax.Responders.dispatch('on' + event, this, transport, json); | respondToReadyState: function(readyState) { var event = Ajax.Request.Events[readyState]; if (event == 'Complete') (this.options['on' + this.transport.status] || this.options['on' + this.responseIsSuccess() ? 'Success' : 'Failure'] || Prototype.emptyFunction)(this.transport); (this.options['on' + event] || Prototype.emptyFunction)(this.transport); /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ if (event == 'Complete') this.transport.onreadystatechange = Prototype.emptyFunction; } |
debug.print(label + "restoring " + i + " " + query); | this.restore = function() { var restore = $(this.restoreId); var label = "SessionClass.restore: "; debug.print(label + restore + " " + restore.hasChildNodes()); //alert(label + restore + " " + restore.hasChildNodes()); if (null == restore) { debug.print(label + "null restore"); this.tabs.refresh(); return; } // handle session uri cookie var uri = restore.getAttribute('uri'); if (null != uri) { this.syncDisabled = false; setCookie(gSessionUriCookie, uri); debug.print(label + "set session cookie = " + uri); } else { debug.print(label + "missing session uri!"); this.syncDisabled = true; } // handle exposed tab var activeTab = restore.getAttribute('active-tab'); this.tabs.refresh(activeTab); if (restore.hasChildNodes()) { var children = restore.childNodes; debug.print(label + "children = " + children); var queries = null; var query = null; var source = null; // first div is the buffers var buffers = children[0]; debug.print(label + "buffers = " + buffers); // handle rows and cols (global) this.buffers.setRows(buffers.getAttribute('rows')); this.buffers.setCols(buffers.getAttribute('cols')); queries = buffers.childNodes; debug.print(label + "queries = " + queries); debug.print(label + "restoring buffers " + queries.length); for (var i = 0; i < queries.length; i++) { //debug.print(label + "restoring " + i + " " + queries[i]); query = queries[i].firstChild.nodeValue; debug.print(label + "restoring " + i + " " + query); // handle content-source (per buffer) source = queries[i].getAttribute('content-source'); debug.print(label + "restoring " + i + " source = " + query); this.buffers.add(query, source); } // reactivate active buffer var active = buffers.getAttribute('active'); debug.print(label + "buffers active = " + active); this.buffers.activate(active); // second div is the history var history = children[1]; queries = history.childNodes; debug.print(label + "restoring history " + queries.length); // restore in reverse order for (var i = queries.length; i > 0; i--) { query = queries[ i - 1 ].firstChild.nodeValue; debug.print(label + "restoring " + i + " " + query); this.history.add(query); } } } |
|
debug.print(label + "restoring " + i + " source = " + query); | debug.print(label + "restoring " + i + " source = " + source); | this.restore = function() { var restore = $(this.restoreId); var label = "SessionClass.restore: "; debug.print(label + restore + " " + restore.hasChildNodes()); //alert(label + restore + " " + restore.hasChildNodes()); if (null == restore) { debug.print(label + "null restore"); this.tabs.refresh(); return; } // handle session uri cookie var uri = restore.getAttribute('uri'); if (null != uri) { this.syncDisabled = false; setCookie(gSessionUriCookie, uri); debug.print(label + "set session cookie = " + uri); } else { debug.print(label + "missing session uri!"); this.syncDisabled = true; } // handle exposed tab var activeTab = restore.getAttribute('active-tab'); this.tabs.refresh(activeTab); if (restore.hasChildNodes()) { var children = restore.childNodes; debug.print(label + "children = " + children); var queries = null; var query = null; var source = null; // first div is the buffers var buffers = children[0]; debug.print(label + "buffers = " + buffers); // handle rows and cols (global) this.buffers.setRows(buffers.getAttribute('rows')); this.buffers.setCols(buffers.getAttribute('cols')); queries = buffers.childNodes; debug.print(label + "queries = " + queries); debug.print(label + "restoring buffers " + queries.length); for (var i = 0; i < queries.length; i++) { //debug.print(label + "restoring " + i + " " + queries[i]); query = queries[i].firstChild.nodeValue; debug.print(label + "restoring " + i + " " + query); // handle content-source (per buffer) source = queries[i].getAttribute('content-source'); debug.print(label + "restoring " + i + " source = " + query); this.buffers.add(query, source); } // reactivate active buffer var active = buffers.getAttribute('active'); debug.print(label + "buffers active = " + active); this.buffers.activate(active); // second div is the history var history = children[1]; queries = history.childNodes; debug.print(label + "restoring history " + queries.length); // restore in reverse order for (var i = queries.length; i > 0; i--) { query = queries[ i - 1 ].firstChild.nodeValue; debug.print(label + "restoring " + i + " " + query); this.history.add(query); } } } |
query = queries[i].firstChild.nodeValue; | debug.print(label + "restoring " + i + queries[i]); query = queries[i].hasChildNodes() ? queries[i].firstChild.nodeValue : null; | this.restore = function() { var restore = $(this.restoreId); var label = "SessionClass.restore: "; debug.print(label + restore + " " + restore.hasChildNodes()); //alert(label + restore + " " + restore.hasChildNodes()); if (null == restore) { debug.print(label + "null restore"); this.tabs.refresh(); return; } // handle session uri cookie var uri = restore.getAttribute('uri'); if (null != uri) { this.syncDisabled = false; setCookie(gSessionUriCookie, uri); debug.print(label + "set session cookie = " + uri); } else { debug.print(label + "missing session uri!"); this.syncDisabled = true; } // handle exposed tab var activeTab = restore.getAttribute('active-tab'); this.tabs.refresh(activeTab); if (restore.hasChildNodes()) { var children = restore.childNodes; debug.print(label + "children = " + children); var queries = null; var query = null; var source = null; // first div is the buffers var buffers = children[0]; debug.print(label + "buffers = " + buffers); // handle rows and cols (global) this.buffers.setRows(buffers.getAttribute('rows')); this.buffers.setCols(buffers.getAttribute('cols')); queries = buffers.childNodes; debug.print(label + "queries = " + queries); debug.print(label + "restoring buffers " + queries.length); for (var i = 0; i < queries.length; i++) { query = queries[i].firstChild.nodeValue; //debug.print(label + "restoring " + i + " " + query); // handle content-source (per buffer) source = queries[i].getAttribute('content-source'); debug.print(label + "restoring " + i + " source = " + source); this.buffers.add(query, source); } // reactivate active buffer var active = buffers.getAttribute('active'); debug.print(label + "buffers active = " + active); this.buffers.activate(active); // second div is the history var history = children[1]; queries = history.childNodes; debug.print(label + "restoring history " + queries.length); // restore in reverse order for (var i = queries.length; i > 0; i--) { query = queries[ i - 1 ].firstChild.nodeValue; //debug.print(label + "restoring " + i + " " + query); this.history.add(query); } } } |
this._handleCommandError(e); this._testComplete(); return; | if (!this._handleCommandError(e)) { this._testComplete(); } else { this.continueTest(); } | resume: function() { /** * Select the next command and continue the test. */ LOG.debug("currentTest.resume() - actually execute"); try { selenium.browserbot.runScheduledPollers(); this._executeCurrentCommand(); this.continueTestWhenConditionIsTrue(); } catch (e) { this._handleCommandError(e); this._testComplete(); return; } }, |
this.waitForConditionStart = new Date().getTime(); | this.resume = function() { try { this.executeCurrentCommand(); this.continueTestWhenConditionIsTrue(); } catch (e) { this.handleCommandError(e); this.testComplete(); return; } }; |
|
this.testComplete(); | this._testComplete(); | resume : function() { LOG.debug("currentTest.resume() - actually execute"); try { selenium.browserbot.runScheduledPollers(); this._executeCurrentCommand(); this.waitForConditionStart = new Date().getTime(); this.continueTestWhenConditionIsTrue(); } catch (e) { this._handleCommandError(e); this.testComplete(); return; } }, |
pauseOnNextStatement = false; steppingOut = false; steppingOver = false; steppingStack = 0; | function resume(){ if (currentRow) { removeStyleClass(currentRow, "current"); currentRow = null; } if (currentStack) { var stackframeTable = document.getElementById("stackframeTable"); stackframeTable.innerHTML = ""; // clear the content currentStack = null; } DebuggerDocument.resume();} |
|
removeStyleClass(currentRow, "current"); | currentRow.removeStyleClass("current"); | function resume(){ if (currentRow) { removeStyleClass(currentRow, "current"); currentRow = null; } var stackframeTable = document.getElementById("stackframeTable"); stackframeTable.innerHTML = ""; // clear the content var variablesTable = document.getElementById("variablesTable"); variablesTable.innerHTML = ""; // clear the content currentStack = null; currentCallFrame = null; pauseOnNextStatement = false; pausedWhileLeavingFrame = false; steppingOut = false; steppingOver = false; steppingStack = 0; DebuggerDocument.resume();} |
pausedWhileLeavingFrame = false; | function resume(){ if (currentRow) { removeStyleClass(currentRow, "current"); currentRow = null; } var stackframeTable = document.getElementById("stackframeTable"); stackframeTable.innerHTML = ""; // clear the content var variablesTable = document.getElementById("variablesTable"); variablesTable.innerHTML = ""; // clear the content currentStack = null; currentCallFrame = null; pauseOnNextStatement = false; steppingOut = false; steppingOver = false; steppingStack = 0; DebuggerDocument.resume();} |
|
if (currentStack) { var stackframeTable = document.getElementById("stackframeTable"); stackframeTable.innerHTML = ""; currentStack = null; } | var stackframeTable = document.getElementById("stackframeTable"); stackframeTable.innerHTML = ""; var variablesTable = document.getElementById("variablesTable"); variablesTable.innerHTML = ""; currentStack = null; currentCallFrame = null; | function resume(){ if (currentRow) { removeStyleClass(currentRow, "current"); currentRow = null; } if (currentStack) { var stackframeTable = document.getElementById("stackframeTable"); stackframeTable.innerHTML = ""; // clear the content currentStack = null; } pauseOnNextStatement = false; steppingOut = false; steppingOver = false; steppingStack = 0; DebuggerDocument.resume();} |
var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; | var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) }; | var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; |
map.centerAndZoom(new GPoint(-4.218750, 54.724620), 12); | map.centerAndZoom(new GPoint(-4.218750, 34.724620), 16); | function revert() { if (!map) return true; show_recent_places(); map.closeInfoWindow() map.resetCenterScreen() map.centerAndZoom(new GPoint(-4.218750, 54.724620), 12); return false;} |
new Effect2.MoveBy(element, -top_offset, -left_offset, {duration:0.4}); | new Effect.MoveBy(element, -top_offset, -left_offset, {duration:0.4}); | reverteffect: function(element, top_offset, left_offset) { new Effect2.MoveBy(element, -top_offset, -left_offset, {duration:0.4}); }, |
Draggable._revertCache[element] = new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, queue: {scope:'_draggable', position:'end'} }); | new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, queue: {scope:'_draggable', position:'end'} }); | reverteffect: function(element, top_offset, left_offset) { var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; Draggable._revertCache[element] = new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, queue: {scope:'_draggable', position:'end'} }); }, |
element._revert = new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur}); | Draggable._revertCache[element] = new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur}); | reverteffect: function(element, top_offset, left_offset) { var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; element._revert = new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur}); }, |
new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur}); | new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, queue: {scope:'_draggable', position:'end'} }); | reverteffect: function(element, top_offset, left_offset) { var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; Draggable._revertCache[element] = new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur}); }, |
new Effect.MoveBy(element, -top_offset, -left_offset, {duration:0.4}); | var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur}); | reverteffect: function(element, top_offset, left_offset) { new Effect.MoveBy(element, -top_offset, -left_offset, {duration:0.4}); }, |
new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur}); | element._revert = new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur}); | reverteffect: function(element, top_offset, left_offset) { var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur}); }, |
return new Array(0, 0, v); | if(v > 0) return new Array(0, 0, v); return new Array(0, 255, 0); | function rgb_string_to_hsv(rgb_str){ // Expected input is on form "#rrggbb" var r = hex_to_int(rgb_str.substring(1, 3)); var g = hex_to_int(rgb_str.substring(3, 5)); var b = hex_to_int(rgb_str.substring(5, 7)); var min, max, delta; var h, s, v; min = Math.min(r, g, b); max = Math.max(r, g, b); delta = max - min; v = max; if (max > 0 && delta > 0) { s = Math.round(255.0 * delta / max); } else { return new Array(0, 0, v); } if (r == max) { h = 1.0 * (g - b) / delta; } else if (g == max) { h = 2 + 1.0 * (b - r) / delta; } else { h = 4 + 1.0 * (r - g) / delta; } h = h * 60.0; if (h < 0) h += 360.0; return new Array(Math.round(h * 255.0 / 360.0), s, v);} |
var rgb = this.match(/\d{1,3}/g); if (!rgb || rgb.length < 3) return false; if (rgb[3] && rgb[3] == 0) return 'transparent'; | if (this.length < 3) return false; if (this[3] && this[3] == 0) return 'transparent'; | rgbToHex: function(array){ var rgb = this.match(/\d{1,3}/g); if (!rgb || rgb.length < 3) return false; if (rgb[3] && rgb[3] == 0) return 'transparent'; var hex = []; for (var i = 0; i < 3; i++){ var bit = (rgb[i]-0).toString(16); hex.push(bit.length == 1 ? '0'+bit : bit); } return array ? hex : '#'+hex.join(''); }, |
var bit = (rgb[i]-0).toString(16); | var bit = (this[i]-0).toString(16); | rgbToHex: function(array){ var rgb = this.match(/\d{1,3}/g); if (!rgb || rgb.length < 3) return false; if (rgb[3] && rgb[3] == 0) return 'transparent'; var hex = []; for (var i = 0; i < 3; i++){ var bit = (rgb[i]-0).toString(16); hex.push(bit.length == 1 ? '0'+bit : bit); } return array ? hex : '#'+hex.join(''); }, |
Rico.Color.RGBtoHSB = function(r, g, b) { | OpenLayers.Rico.Color.RGBtoHSB = function(r, g, b) { | Rico.Color.RGBtoHSB = function(r, g, b) { var hue; var saturation; var brightness; var cmax = (r > g) ? r : g; if (b > cmax) cmax = b; var cmin = (r < g) ? r : g; if (b < cmin) cmin = b; brightness = cmax / 255.0; if (cmax != 0) saturation = (cmax - cmin)/cmax; else saturation = 0; if (saturation == 0) hue = 0; else { var redc = (cmax - r)/(cmax - cmin); var greenc = (cmax - g)/(cmax - cmin); var bluec = (cmax - b)/(cmax - cmin); if (r == cmax) hue = bluec - greenc; else if (g == cmax) hue = 2.0 + redc - bluec; else hue = 4.0 + greenc - redc; hue = hue / 6.0; if (hue < 0) hue = hue + 1.0; } return { h : hue, s : saturation, b : brightness };} |
script=script.replace(/^\s*(.*?)\s*$/, "$1"); | script=f_core.Trim(script); | run: function() { try { var bundles=classLoader._bundles; for(;;) { var loads=this._loads; if (loads.length>0) { var bundleName=loads.shift(); // alert("Load bundle "+bundleName); if (bundles[bundleName]) { continue; } var url=f_env.ComputeJavaScriptURI(bundleName); f_core.Debug("f_asyncClassLoader", "Load script '"+bundleName+"' url='"+url+"'."); var interactive=this; var doc=this._htmlNode.ownerDocument; var script=doc.createElement("SCRIPT"); script.type=f_httpRequest.JAVASCRIPT_MIME_TYPE; script.src=url; script.defer=false; script.charset="UTF-8"; if (f_core.IsInternetExplorer()) { script.onreadystatechange=function() { switch(script.readyState) { case "loaded": case "interactive": case "complete": break; default: // alert("State "+script.readyState); f_core.Debug("f_asyncClassLoader", "Script '"+url+"' state="+script.readyState); return; } script.onreadystatechange=null; f_core.Debug("f_asyncClassLoader", "Script '"+url+"' loaded."); try { interactive.run(); } catch (x) { f_core.Error("f_asyncClassLoader", "Run async script throws exception.", x); } }; } else { script.onload=function() { // alert("URL "+url+" loaded !"); f_core.Debug("f_asyncClassLoader", "Script '"+url+"' loaded."); script.onload=null; try { interactive.run(); } catch (x) { f_core.Error("f_asyncClassLoader", "Run async script throws exception.", x); } }; } doc.body.appendChild(script); return; } if (this._scripts.length>0) { var script=this._scripts.shift(); // alert("Eval script: "+script); script=script.replace(/^\s*(.*?)\s*$/, "$1"); // Pour eviter un anti-virus plutot indelicat ! if (script.indexOf("<!--")==0) { var v=script.indexOf("//-->"); if (v>0) { f_core.Debug("f_asyncClassLoader", "Simplify script '"+script+"'."); script=script.substring(v+5); } } f_core.Debug("f_asyncClassLoader", "Eval script '"+script+"'."); if (script.length>0) { try { eval(script); } catch (x) { f_core.Error("f_asyncClassLoader", "Eval throws exception; script='"+script+"'.", x); } } continue; } f_core.Debug("f_asyncClassLoader", "End of scripts evaluation."); // alert("Fin !"); classLoader._interactiveMode=undefined; classLoader._postLoad(this); return; } } catch (x) { f_core.Error("f_asyncClassLoader", "Async script loading exception.", x); } } |
f_core.Debug("f_asyncClassLoader", "Simplify script '"+script+"'."); | var newScript=script.substring(5, v); newScript=f_core.Trim(newScript); f_core.Debug("f_asyncClassLoader", "Simplify script '"+script+"' newScript='"+newScript+"'."); | run: function() { try { var bundles=classLoader._bundles; for(;;) { var loads=this._loads; if (loads.length>0) { var bundleName=loads.shift(); // alert("Load bundle "+bundleName); if (bundles[bundleName]) { continue; } var url=f_env.ComputeJavaScriptURI(bundleName); f_core.Debug("f_asyncClassLoader", "Load script '"+bundleName+"' url='"+url+"'."); var interactive=this; var doc=this._htmlNode.ownerDocument; var script=doc.createElement("SCRIPT"); script.type=f_httpRequest.JAVASCRIPT_MIME_TYPE; script.src=url; script.defer=false; script.charset="UTF-8"; if (f_core.IsInternetExplorer()) { script.onreadystatechange=function() { switch(script.readyState) { case "loaded": case "interactive": case "complete": break; default: // alert("State "+script.readyState); f_core.Debug("f_asyncClassLoader", "Script '"+url+"' state="+script.readyState); return; } script.onreadystatechange=null; f_core.Debug("f_asyncClassLoader", "Script '"+url+"' loaded."); try { interactive.run(); } catch (x) { f_core.Error("f_asyncClassLoader", "Run async script throws exception.", x); } }; } else { script.onload=function() { // alert("URL "+url+" loaded !"); f_core.Debug("f_asyncClassLoader", "Script '"+url+"' loaded."); script.onload=null; try { interactive.run(); } catch (x) { f_core.Error("f_asyncClassLoader", "Run async script throws exception.", x); } }; } doc.body.appendChild(script); return; } if (this._scripts.length>0) { var script=this._scripts.shift(); // alert("Eval script: "+script); script=script.replace(/^\s*(.*?)\s*$/, "$1"); // Pour eviter un anti-virus plutot indelicat ! if (script.indexOf("<!--")==0) { var v=script.indexOf("//-->"); if (v>0) { f_core.Debug("f_asyncClassLoader", "Simplify script '"+script+"'."); script=script.substring(v+5); } } f_core.Debug("f_asyncClassLoader", "Eval script '"+script+"'."); if (script.length>0) { try { eval(script); } catch (x) { f_core.Error("f_asyncClassLoader", "Eval throws exception; script='"+script+"'.", x); } } continue; } f_core.Debug("f_asyncClassLoader", "End of scripts evaluation."); // alert("Fin !"); classLoader._interactiveMode=undefined; classLoader._postLoad(this); return; } } catch (x) { f_core.Error("f_asyncClassLoader", "Async script loading exception.", x); } } |
script=script.substring(v+5); | script=newScript; | run: function() { try { var bundles=classLoader._bundles; for(;;) { var loads=this._loads; if (loads.length>0) { var bundleName=loads.shift(); // alert("Load bundle "+bundleName); if (bundles[bundleName]) { continue; } var url=f_env.ComputeJavaScriptURI(bundleName); f_core.Debug("f_asyncClassLoader", "Load script '"+bundleName+"' url='"+url+"'."); var interactive=this; var doc=this._htmlNode.ownerDocument; var script=doc.createElement("SCRIPT"); script.type=f_httpRequest.JAVASCRIPT_MIME_TYPE; script.src=url; script.defer=false; script.charset="UTF-8"; if (f_core.IsInternetExplorer()) { script.onreadystatechange=function() { switch(script.readyState) { case "loaded": case "interactive": case "complete": break; default: // alert("State "+script.readyState); f_core.Debug("f_asyncClassLoader", "Script '"+url+"' state="+script.readyState); return; } script.onreadystatechange=null; f_core.Debug("f_asyncClassLoader", "Script '"+url+"' loaded."); try { interactive.run(); } catch (x) { f_core.Error("f_asyncClassLoader", "Run async script throws exception.", x); } }; } else { script.onload=function() { // alert("URL "+url+" loaded !"); f_core.Debug("f_asyncClassLoader", "Script '"+url+"' loaded."); script.onload=null; try { interactive.run(); } catch (x) { f_core.Error("f_asyncClassLoader", "Run async script throws exception.", x); } }; } doc.body.appendChild(script); return; } if (this._scripts.length>0) { var script=this._scripts.shift(); // alert("Eval script: "+script); script=script.replace(/^\s*(.*?)\s*$/, "$1"); // Pour eviter un anti-virus plutot indelicat ! if (script.indexOf("<!--")==0) { var v=script.indexOf("//-->"); if (v>0) { f_core.Debug("f_asyncClassLoader", "Simplify script '"+script+"'."); script=script.substring(v+5); } } f_core.Debug("f_asyncClassLoader", "Eval script '"+script+"'."); if (script.length>0) { try { eval(script); } catch (x) { f_core.Error("f_asyncClassLoader", "Eval throws exception; script='"+script+"'.", x); } } continue; } f_core.Debug("f_asyncClassLoader", "End of scripts evaluation."); // alert("Fin !"); classLoader._interactiveMode=undefined; classLoader._postLoad(this); return; } } catch (x) { f_core.Error("f_asyncClassLoader", "Async script loading exception.", x); } } |
repaint(); | this.repaint(); | function run() { while (killme != null) { try {Thread.sleep(100);} catch (e){} repaint(); } killme = null;} |
function runMenu(strURL){ location.href=strURL; | function runMenu(strURL) { if (strURL.charAt(0) == '%') window.open(strURL.substr(1)); else location.href = strURL; | function runMenu(strURL){ location.href=strURL;} |
this.htmlTestSuite.runNextTestInSuite(); | this.getTestSuite().runNextTestInSuite(); | runNextTest: function () { if (!this.runAllTests) { return; } this.htmlTestSuite.runNextTestInSuite(); }, |
getTestFrame().src = testLink.href; | getExecutionContext().open(testLink.href, getTestFrame()); | function runNextTest() { if (!runAllTests) return; suiteTable = getIframeDocument(getSuiteFrame()).getElementsByTagName("table")[0]; // Do not change the row color of the first row if(currentTestRow > 0) { // Make the previous row green or red depending if the test passed or failed if(testFailed) setCellColor(suiteTable.rows, currentTestRow, 0, failColor); else setCellColor(suiteTable.rows, currentTestRow, 0, passColor); // Set the results from the previous test run setResultsData(suiteTable, currentTestRow); } currentTestRow++; // If we are done with all of the tests, set the title bar as pass or fail if(currentTestRow >= suiteTable.rows.length) { if(suiteFailed) setCellColor(suiteTable.rows, 0, 0, failColor); else setCellColor(suiteTable.rows, 0, 0, passColor); // If this is an automated run (i.e., build script), then submit // the test results by posting to a form if (isAutomatedRun()) postTestResults(suiteFailed, suiteTable); } else { // Make the current row blue setCellColor(suiteTable.rows, currentTestRow, 0, workingColor); testLink = suiteTable.rows[currentTestRow].cells[0].getElementsByTagName("a")[0]; testLink.focus(); addLoadListener(getTestFrame(), startTest); getTestFrame().src = testLink.href; }} |
testFrame.src = "about:blank"; testFrame.src = testLink.href; | browserbot.setIFrameLocation(testFrame, testLink.href); | function runNextTest() { if (!runAllTests) return; suiteTable = getIframeDocument(getSuiteFrame()).getElementsByTagName("table")[0]; // Do not change the row color of the first row if(currentTestRow > 0) { // Make the previous row green or red depending if the test passed or failed if(testFailed) setCellColor(suiteTable.rows, currentTestRow, 0, failColor); else setCellColor(suiteTable.rows, currentTestRow, 0, passColor); // Set the results from the previous test run setResultsData(suiteTable, currentTestRow); } currentTestRow++; // If we are done with all of the tests, set the title bar as pass or fail if(currentTestRow >= suiteTable.rows.length) { if(suiteFailed) setCellColor(suiteTable.rows, 0, 0, failColor); else setCellColor(suiteTable.rows, 0, 0, passColor); // If this is an automated run (i.e., build script), then submit // the test results by posting to a form if (isAutomatedRun()) postTestResults(suiteFailed, suiteTable); } else { // Make the current row blue setCellColor(suiteTable.rows, currentTestRow, 0, workingColor); testLink = suiteTable.rows[currentTestRow].cells[0].getElementsByTagName("a")[0]; testLink.focus(); var testFrame = getTestFrame(); addLoadListener(testFrame, startTest); // Window doesn't fire onload event when setting src to the current value, // so we set it to blank first. testFrame.src = "about:blank"; testFrame.src = testLink.href; }} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.