rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
function setRunInterval(radio) { runInterval = radio.value; | function setRunInterval() { runInterval = this.value; | function setRunInterval(radio) { runInterval = radio.value; var stepButton = document.getElementById("stepNext"); if (runInterval == -1) { stepButton.style.visibility = ''; } else { stepButton.style.visibility = 'hidden'; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/fb964683f6b8a8b9685278ec658185a696675c5d/selenium-fitrunner.js/clean/javascript/selenium-fitrunner.js |
function setRunInterval(radio) { runInterval = radio.value; | function setRunInterval() { runInterval = this.value; | function setRunInterval(radio) { runInterval = radio.value; var stepButton = document.getElementById("stepNext"); if (runInterval == -1) { stepButton.style.visibility = ''; } else { stepButton.style.visibility = 'hidden'; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/cd39a743a89031815105f82085130d1c1edc9115/selenium-fitrunner.js/buggy/javascript/selenium-fitrunner.js |
this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); | this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); | setSaturation: function(s) { // get an HSB model, and set the new hue... var hsb = this.asHSB(); hsb.s = s; // convert back to RGB and set values... this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/112978ac3d807e4a8b7e412ef2f585650c0506d8/Color.js/buggy/lib/Rico/Color.js |
this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); | this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); | setSaturation: function(s) { // get an HSB model, and set the new hue... var hsb = this.asHSB(); hsb.s = s; // convert back to RGB and set values... this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/112978ac3d807e4a8b7e412ef2f585650c0506d8/Color.js/buggy/lib/Rico/Color.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 6649 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6649/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 1604 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1604/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 269 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/269/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 6649 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6649/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 2069 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2069/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 5523 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5523/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 1604 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1604/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 2320 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2320/19200c26046dc00f15305e03b7c1d28b4c38c952/dragdrop.js/clean/web/scripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 4687 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4687/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 167 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/167/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 5523 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5523/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 1534 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1534/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 4687 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4687/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 167 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/167/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 269 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/269/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 1534 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1534/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 107 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/107/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 2069 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2069/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } | setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, | 107 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/107/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
this.setRicoCorners(!this.rounded); this.rounded = true; | if (this.map) { this.setRicoCorners(!this.rounded); this.rounded = true; } | setSize:function(size) { OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments); if (this.contentDiv != null) { var contentSize = this.size.clone(); contentSize.h -= (2 * OpenLayers.Popup.AnchoredBubble.CORNER_SIZE); contentSize.h -= (2 * this.padding); this.contentDiv.style.height = contentSize.h + "px"; //size has changed - must redo corners this.setRicoCorners(!this.rounded); this.rounded = true; } }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/e6ef35c17426f232c0857067a7e764b2b7f2b3cb/AnchoredBubble.js/clean/lib/OpenLayers/Popup/AnchoredBubble.js |
this.div.style.width = this.size.w; this.div.style.height = this.size.h; } | this.div.style.width = this.size.w; this.div.style.height = this.size.h; } | setSize:function(size) { if (size != undefined) { this.size = size; } if (this.div != null) { this.div.style.width = this.size.w; this.div.style.height = this.size.h; } }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/bb61e0b358f2a58357f5f9ad67160e851eb390ed/Popup.js/buggy/lib/OpenLayers/Popup.js |
this.div.style.width = this.size.w; this.div.style.height = this.size.h; | this.div.style.width = this.size.w + "px"; this.div.style.height = this.size.h + "px"; | setSize:function(size) { if (size != undefined) { this.size = size; } if (this.div != null) { this.div.style.width = this.size.w; this.div.style.height = this.size.h; } }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/76f38a5a36f1e37eaa123a11df1643ae8a9d3768/Popup.js/clean/lib/OpenLayers/Popup.js |
if (this.contentDiv != null){ this.contentDiv.style.width = this.size.w + "px"; this.contentDiv.style.height = this.size.h + "px"; } | setSize:function(size) { if (size != undefined) { this.size = size; } if (this.div != null) { this.div.style.width = this.size.w + "px"; this.div.style.height = this.size.h + "px"; } }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/c9513913686da3d781ce25e86a18bff799f2eeea/Popup.js/clean/lib/OpenLayers/Popup.js |
|
if (this.contentDiv != null){ this.contentDiv.style.width = this.size.w + "px"; this.contentDiv.style.height = this.size.h + "px"; } | setSize:function(size) { if (size != undefined) { this.size = size; } if (this.div != null) { this.div.style.width = this.size.w + "px"; this.div.style.height = this.size.h + "px"; } }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/c9513913686da3d781ce25e86a18bff799f2eeea/Popup.js/clean/lib/OpenLayers/Popup.js |
|
this.div.style.width = this.size.w; this.div.style.height = this.size.h; | this.div.style.width = this.size.w + "px"; this.div.style.height = this.size.h + "px"; | setSize:function(size) { if (size != undefined) { this.size = size; } if (this.div != null) { this.div.style.width = this.size.w; this.div.style.height = this.size.h; } }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/76f38a5a36f1e37eaa123a11df1643ae8a9d3768/Popup.js/buggy/lib/OpenLayers/Popup.js |
this.setRicoCorners(!this.rounded); this.rounded = true; | if (this.map) { this.setRicoCorners(!this.rounded); this.rounded = true; } | setSize:function(size) { OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments); if (this.contentDiv != null) { var contentSize = this.size.clone(); contentSize.h -= (2 * OpenLayers.Popup.AnchoredBubble.CORNER_SIZE); contentSize.h -= (2 * this.padding); this.contentDiv.style.height = contentSize.h + "px"; //size has changed - must redo corners this.setRicoCorners(!this.rounded); this.rounded = true; } }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/e6ef35c17426f232c0857067a7e764b2b7f2b3cb/AnchoredBubble.js/buggy/lib/OpenLayers/Popup/AnchoredBubble.js |
this.div.style.width = this.size.w; this.div.style.height = this.size.h; } | this.div.style.width = this.size.w; this.div.style.height = this.size.h; } | setSize:function(size) { if (size != undefined) { this.size = size; } if (this.div != null) { this.div.style.width = this.size.w; this.div.style.height = this.size.h; } }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/bb61e0b358f2a58357f5f9ad67160e851eb390ed/Popup.js/clean/lib/OpenLayers/Popup.js |
setSliderValue: function(sliderValue){ | setSliderValue: function(sliderValue){ | setSliderValue: function(sliderValue){ // First check our max and minimum and nearest values sliderValue = this.getNearestValue(sliderValue); if(sliderValue > this.maximum) sliderValue = this.maximum; if(sliderValue < this.minimum) sliderValue = this.minimum; var offsetDiff = (sliderValue - (this.value||this.minimum)) * this.increment; if(this.isVertical()){ this.setCurrentTop(offsetDiff + this.currentTop()); } else { this.setCurrentLeft(offsetDiff + this.currentLeft()); } this.value = sliderValue; this.updateFinished(); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/cbfdecdaa602d7c2b7ff4f3e8c1ced36d4b5ffde/slider.js/clean/src/slider.js |
span.style.height = this.translateToPx(range.end - range.start); | span.style.height = this.translateToPx(range.end - range.start + this.range.start); | setSpan: function(span, range) { if(this.isVertical()) { span.style.top = this.translateToPx(range.start); span.style.height = this.translateToPx(range.end - range.start); } else { span.style.left = this.translateToPx(range.start); span.style.width = this.translateToPx(range.end - range.start); } }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/494190d4567c6410e04682bd371a0b38a21919b5/slider.js/clean/src/slider.js |
span.style.width = this.translateToPx(range.end - range.start); | span.style.width = this.translateToPx(range.end - range.start + this.range.start); | setSpan: function(span, range) { if(this.isVertical()) { span.style.top = this.translateToPx(range.start); span.style.height = this.translateToPx(range.end - range.start); } else { span.style.left = this.translateToPx(range.start); span.style.width = this.translateToPx(range.end - range.start); } }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/494190d4567c6410e04682bd371a0b38a21919b5/slider.js/clean/src/slider.js |
function setStateFolder(isOpen) { var subEntries var totalHeight var fIt = 0 var i=0 | function setStateFolder(isOpen) { var subEntries var totalHeight var fIt = 0 var i=0 | function setStateFolder(isOpen) { var subEntries var totalHeight var fIt = 0 var i=0 var currentOpen if (isOpen == this.isOpen) return if (browserVersion == 2) { totalHeight = 0 for (i=0; i < this.nChildren; i++) totalHeight = totalHeight + this.children[i].navObj.clip.height subEntries = this.subEntries() if (this.isOpen) totalHeight = 0 - totalHeight for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) indexOfEntries[fIt].navObj.moveBy(0, totalHeight) } this.isOpen = isOpen; if (this.getID()!=foldersTree.getID() && PERSERVESTATE && !this.isOpen) //closing { currentOpen = GetCookie("clickedFolder") if (currentOpen != null) { currentOpen = currentOpen.replace(this.getID()+cookieCutter, "") SetCookie("clickedFolder", currentOpen) } } if (!this.isOpen && this.isLastOpenedfolder) { lastOpenedFolder = null; this.isLastOpenedfolder = false; } propagateChangesInState(this) } | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
if (isOpen == this.isOpen) return if (browserVersion == 2) { totalHeight = 0 for (i=0; i < this.nChildren; i++) totalHeight = totalHeight + this.children[i].navObj.clip.height subEntries = this.subEntries() if (this.isOpen) totalHeight = 0 - totalHeight for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) indexOfEntries[fIt].navObj.moveBy(0, totalHeight) } | if (isOpen == this.isOpen) return if (browserVersion == 2) { totalHeight = 0 for (i=0; i < this.nChildren; i++) totalHeight = totalHeight + this.children[i].navObj.clip.height subEntries = this.subEntries() if (this.isOpen) totalHeight = 0 - totalHeight for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) indexOfEntries[fIt].navObj.moveBy(0, totalHeight) } | function setStateFolder(isOpen) { var subEntries var totalHeight var fIt = 0 var i=0 var currentOpen if (isOpen == this.isOpen) return if (browserVersion == 2) { totalHeight = 0 for (i=0; i < this.nChildren; i++) totalHeight = totalHeight + this.children[i].navObj.clip.height subEntries = this.subEntries() if (this.isOpen) totalHeight = 0 - totalHeight for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) indexOfEntries[fIt].navObj.moveBy(0, totalHeight) } this.isOpen = isOpen; if (this.getID()!=foldersTree.getID() && PERSERVESTATE && !this.isOpen) //closing { currentOpen = GetCookie("clickedFolder") if (currentOpen != null) { currentOpen = currentOpen.replace(this.getID()+cookieCutter, "") SetCookie("clickedFolder", currentOpen) } } if (!this.isOpen && this.isLastOpenedfolder) { lastOpenedFolder = null; this.isLastOpenedfolder = false; } propagateChangesInState(this) } | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
function setStateFolder(isOpen) { var subEntries var totalHeight var fIt = 0 var i=0 var currentOpen if (isOpen == this.isOpen) return if (browserVersion == 2) { totalHeight = 0 for (i=0; i < this.nChildren; i++) totalHeight = totalHeight + this.children[i].navObj.clip.height subEntries = this.subEntries() if (this.isOpen) totalHeight = 0 - totalHeight for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) indexOfEntries[fIt].navObj.moveBy(0, totalHeight) } this.isOpen = isOpen; if (this.getID()!=foldersTree.getID() && PERSERVESTATE && !this.isOpen) //closing { currentOpen = GetCookie("clickedFolder") if (currentOpen != null) { currentOpen = currentOpen.replace(this.getID()+cookieCutter, "") SetCookie("clickedFolder", currentOpen) } } if (!this.isOpen && this.isLastOpenedfolder) { lastOpenedFolder = null; this.isLastOpenedfolder = false; } propagateChangesInState(this) } | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
||
propagateChangesInState(this) | propagateChangesInState(this) | function setStateFolder(isOpen) { var subEntries var totalHeight var fIt = 0 var i=0 var currentOpen if (isOpen == this.isOpen) return if (browserVersion == 2) { totalHeight = 0 for (i=0; i < this.nChildren; i++) totalHeight = totalHeight + this.children[i].navObj.clip.height subEntries = this.subEntries() if (this.isOpen) totalHeight = 0 - totalHeight for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) indexOfEntries[fIt].navObj.moveBy(0, totalHeight) } this.isOpen = isOpen; if (this.getID()!=foldersTree.getID() && PERSERVESTATE && !this.isOpen) //closing { currentOpen = GetCookie("clickedFolder") if (currentOpen != null) { currentOpen = currentOpen.replace(this.getID()+cookieCutter, "") SetCookie("clickedFolder", currentOpen) } } if (!this.isOpen && this.isLastOpenedfolder) { lastOpenedFolder = null; this.isLastOpenedfolder = false; } propagateChangesInState(this) } | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
for (name in style) | for (var name in style) | setStyle: function(element, style) { element = $(element); for (name in style) element.style[name.camelize()] = style[name]; }, | 2320 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2320/19200c26046dc00f15305e03b7c1d28b4c38c952/prototype.js/clean/web/scripts/prototype.js |
else this.style[property.camelCase()] = value; | else this.style[property.camelCase()] = (value.push) ? value.rgbToHex() : value; | setStyle: function(property, value){ if (property == 'opacity') this.setOpacity(parseFloat(value)); else this.style[property.camelCase()] = value; return this; }, | 6991 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6991/fcc80ca504adb31cd63f24e4b73ce9e400a788bc/Element.js/buggy/Native/Element.js |
for (name in style) | for (var name in style) | setStyle: function(element, style) { element = $(element); for (name in style) element.style[name.camelize()] = style[name]; }, | 2019 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2019/cb20644c026e010b58d134c622b7dd70eddae16a/prototype.js/buggy/phpmyfaq/inc/js/prototype.js |
else this.style[property.camelCase()] = value; | else this.style[property.camelCase()] = (value.push) ? value.rgbToHex() : value; | setStyle: function(property, value){ if (property == 'opacity') this.setOpacity(parseFloat(value)); else this.style[property.camelCase()] = value; return this; }, | 5409 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5409/fcc80ca504adb31cd63f24e4b73ce9e400a788bc/Element.js/clean/Native/Element.js |
if(element.textContent) { | if (element.textContent) { | function setText(element, text) { if(element.textContent) { element.textContent = text; } else if(element.innerText) { element.innerText = text; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/409c1704b4cf230ddff8734c8f4835b0c22da435/htmlutils.js/clean/code/javascript/core/scripts/htmlutils.js |
} else if(element.innerText) { | } else if (element.innerText) { | function setText(element, text) { if(element.textContent) { element.textContent = text; } else if(element.innerText) { element.innerText = text; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/409c1704b4cf230ddff8734c8f4835b0c22da435/htmlutils.js/clean/code/javascript/core/scripts/htmlutils.js |
this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; | this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"+ctrl('O')+ctrl('U')+ctrl('T')+ctrl('K')+ctrl('P'); | function Settingsmenu(){ var width=18; this.items=new Array(); this.xpos=30; this.ypos=2; this.lpadding="\xb3"; this.rpadding="\xb3"; this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; this.add(top_bar(width),undefined,undefined,"",""); this.add("|User Configuration","U",width); this.add("Minute |Bank","B",width); this.add(bottom_bar(width),undefined,undefined,"",""); this.timeout=100; this.callback=message_callback;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/34f6c69cd3ce42ea1878ef314f794dabc773eb90/lbshell.js/clean/lbshell.js |
this.transforms = this.options.style.parseStyle().map(function(property){ var originalValue = this.element.getStyle(property[0]); | this.transforms = this.style.map(function(pair){ var property = pair[0].underscore().dasherize(), value = pair[1], unit = null; if(value.parseColor('#zzzzzz') != '#zzzzzz') { value = value.parseColor(); unit = 'color'; } else if(property == 'opacity') { value = parseFloat(value); if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout)) this.element.setStyle({zoom: 1}); } else if(Element.CSS_LENGTH.test(value)) var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; var originalValue = this.element.getStyle(property); | setup: function(){ function parseColor(color){ if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; color = color.parseColor(); return $R(0,2).map(function(i){ return parseInt( color.slice(i*2+1,i*2+3), 16 ) }); } this.transforms = this.options.style.parseStyle().map(function(property){ var originalValue = this.element.getStyle(property[0]); return $H({ style: property[0], originalValue: property[1].unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), targetValue: property[1].unit=='color' ? parseColor(property[1].value) : property[1].value, unit: property[1].unit }); }.bind(this)).reject(function(transform){ return ( (transform.originalValue == transform.targetValue) || ( transform.unit != 'color' && (isNaN(transform.originalValue) || isNaN(transform.targetValue)) ) ) }); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/2ee7ad789e4782f0bfb6757c6989a3000962b116/effects.js/clean/src/effects.js |
style: property[0], originalValue: property[1].unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), targetValue: property[1].unit=='color' ? parseColor(property[1].value) : property[1].value, unit: property[1].unit | style: property, originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), targetValue: unit=='color' ? parseColor(value) : value, unit: unit | setup: function(){ function parseColor(color){ if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; color = color.parseColor(); return $R(0,2).map(function(i){ return parseInt( color.slice(i*2+1,i*2+3), 16 ) }); } this.transforms = this.options.style.parseStyle().map(function(property){ var originalValue = this.element.getStyle(property[0]); return $H({ style: property[0], originalValue: property[1].unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), targetValue: property[1].unit=='color' ? parseColor(property[1].value) : property[1].value, unit: property[1].unit }); }.bind(this)).reject(function(transform){ return ( (transform.originalValue == transform.targetValue) || ( transform.unit != 'color' && (isNaN(transform.originalValue) || isNaN(transform.targetValue)) ) ) }); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/2ee7ad789e4782f0bfb6757c6989a3000962b116/effects.js/clean/src/effects.js |
param_default("firstDay", 0); | param_default("dateText", null); param_default("firstDay", null); | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/trunk/cacti/include/js/jscalendar/calendar-setup.js |
if (!(params.flat || params.inputField || params.displayArea || params.button)) { | if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) { | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/trunk/cacti/include/js/jscalendar/calendar-setup.js |
if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/trunk/cacti/include/js/jscalendar/calendar-setup.js |
|
if (update && typeof p.onUpdate == "function") p.onUpdate(cal); | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/trunk/cacti/include/js/jscalendar/calendar-setup.js |
|
cal.parseDate(dateEl.value || dateEl.innerHTML); | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/trunk/cacti/include/js/jscalendar/calendar-setup.js |
|
return cal; | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/trunk/cacti/include/js/jscalendar/calendar-setup.js |
|
param_default("firstDay", 0); | param_default("dateText", null); param_default("firstDay", null); | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/branches/BRANCH_0_8_6/cacti/include/jscalendar/calendar-setup.js |
if (!(params.flat || params.inputField || params.displayArea || params.button)) { | if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) { | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/branches/BRANCH_0_8_6/cacti/include/jscalendar/calendar-setup.js |
if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/branches/BRANCH_0_8_6/cacti/include/jscalendar/calendar-setup.js |
|
if (update && typeof p.onUpdate == "function") p.onUpdate(cal); | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/branches/BRANCH_0_8_6/cacti/include/jscalendar/calendar-setup.js |
|
cal.parseDate(dateEl.value || dateEl.innerHTML); | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/branches/BRANCH_0_8_6/cacti/include/jscalendar/calendar-setup.js |
|
return cal; | Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; param_default("inputField", null); param_default("displayArea", null); param_default("button", null); param_default("eventName", "click"); param_default("ifFormat", "%Y/%m/%d"); param_default("daFormat", "%Y/%m/%d"); param_default("singleClick", true); param_default("disableFunc", null); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); param_default("flat", null); param_default("flatCallback", null); param_default("onSelect", null); param_default("onClose", null); param_default("onUpdate", null); param_default("date", null); param_default("showsTime", false); param_default("timeFormat", "24"); param_default("electric", true); param_default("step", 2); param_default("position", null); param_default("cache", false); param_default("showOthers", false); var tmp = ["inputField", "displayArea", "button"]; for (var i in tmp) { if (typeof params[tmp[i]] == "string") { params[tmp[i]] = document.getElementById(params[tmp[i]]); } } if (!(params.flat || params.inputField || params.displayArea || params.button)) { alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); return false; } function onSelect(cal) { var p = cal.params; var update = (cal.dateClicked || p.electric); if (update && p.flat) { if (typeof p.flatCallback == "function") p.flatCallback(cal); else alert("No flatCallback given -- doing nothing."); return false; } if (update && p.inputField) { p.inputField.value = cal.date.print(p.ifFormat); if (typeof p.inputField.onchange == "function") p.inputField.onchange(); } if (update && p.displayArea) p.displayArea.innerHTML = cal.date.print(p.daFormat); if (update && p.singleClick && cal.dateClicked) cal.callCloseHandler(); if (update && typeof p.onUpdate == "function") p.onUpdate(cal); }; if (params.flat != null) { if (typeof params.flat == "string") params.flat = document.getElementById(params.flat); if (!params.flat) { alert("Calendar.setup:\n Flat specified but can't find parent."); return false; } var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.params = params; cal.weekNumbers = params.weekNumbers; cal.setRange(params.range[0], params.range[1]); cal.setDateStatusHandler(params.dateStatusFunc); cal.create(params.flat); cal.show(); return false; } var triggerEl = params.button || params.displayArea || params.inputField; triggerEl["on" + params.eventName] = function() { var dateEl = params.inputField || params.displayArea; var dateFmt = params.inputField ? params.ifFormat : params.daFormat; var mustCreate = false; var cal = window.calendar; if (!(cal && params.cache)) { window.calendar = cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect, params.onClose || function(cal) { cal.hide(); }); cal.showsTime = params.showsTime; cal.time24 = (params.timeFormat == "24"); cal.weekNumbers = params.weekNumbers; mustCreate = true; } else { if (params.date) cal.setDate(params.date); cal.hide(); } cal.showsOtherMonths = params.showOthers; cal.yearStep = params.step; cal.setRange(params.range[0], params.range[1]); cal.params = params; cal.setDateStatusHandler(params.dateStatusFunc); cal.setDateFormat(dateFmt); if (mustCreate) cal.create(); cal.parseDate(dateEl.value || dateEl.innerHTML); cal.refresh(); if (!params.position) cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); else cal.showAt(params.position[0], params.position[1]); return false; };}; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar-setup.js/clean/branches/BRANCH_0_8_6/cacti/include/jscalendar/calendar-setup.js |
|
return parseInt( ((!color || color=='transparent') ? '#ffffff' : color).parseColor().slice(i*2+1,i*2+3), 16 ) | return parseInt( ((!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) ? '#ffffff' : color).parseColor().slice(i*2+1,i*2+3), 16 ) | setup: function(){ function parseColor(color){ return $R(0,2).map(function(i){ return parseInt( ((!color || color=='transparent') ? '#ffffff' : color).parseColor().slice(i*2+1,i*2+3), 16 ) }); } this.transforms = this.options.style.split(';').map(function(style){ return style.parseStyle().map(function(property){ var originalValue = this.element.getStyle(property[0]); return $H({ style: property[0], originalValue: property[1].unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), targetValue: property[1].unit=='color' ? parseColor(property[1].value) : property[1].value, unit: property[1].unit }); }.bind(this)); }.bind(this)).flatten(); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/639c8645cd6cf62509bf6c5c009d4c1e46315068/effects.js/clean/src/effects.js |
this.commands.push(new Command('assertNotText', 'test', 'regexp:ab[cd]')); | function setUp() { this.formats = new FormatCollection({}); this.commands = []; this.commands.push(new Command('assertTextPresent', 'hello')); this.commands.push(new Command('assertTextNotPresent', 'hello')); this.commands.push(new Command('storeTextPresent', 'test', 'abc')); this.commands.push(new Command('waitForTextPresent', 'test')); this.commands.push(new Command('waitForTextNotPresent', 'test')); this.commands.push(new Command('assertText', 'abc', 'def')); this.commands.push(new Command('assertLocation', 'abc')); this.commands.push(new Command('assertNotLocation', 'abc')); this.commands.push(new Command('type', "theText", "javascript{'abc'}")); this.commands.push(new Command('assertSelectOptions', "theSelect", ",abc,ab\\,c")); this.commands.push(new Command('assertNotLocation', 'abc')); this.commands.push(new Command('storeText', 'abc', 'def')); this.commands.push(new Command('waitForText', 'abc', 'def')); this.commands.push(new Command('waitForNotValue', 'abc', 'regexp:foo.*')); this.commands.push(new Command('waitForNotText', 'abc', 'def')); this.commands.push(new Command('open', 'http://www.google.com/')); this.commands.push(new Command('waitForPageToLoad', '30000')); this.commands.push(new Command('pause', '1000')); this.commands.push(new Comment("line 1\nline 2"));} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/9c787c7e6c12c5505c234cea90865fbee0d58139/format-tests.js/buggy/src/content/tests/unit/format-tests.js |
|
var inst = tinyMCE.instances[editor_id]; | var inst = tinyMCE.instances[editor_id], i; | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { | if (!tinyMCE.isIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); | inst.getBody().setAttribute('id', 'mceSpanFonts'); | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
if (!tinyMCE.isMSIE) | if (!tinyMCE.isIE) | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
if (tinyMCE.isMSIE) { | if (tinyMCE.isIE) { | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
if (!tinyMCE.isMSIE) { | if (!tinyMCE.isIE) { | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
else { content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); | else | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
} | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
|
if (!tinyMCE.isMSIE) | if (!tinyMCE.isIE) | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
if (tinyMCE.isMSIE) { | if (tinyMCE.isIE) { | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
tinyMCE.selectedInstance = inst; | inst.select(); | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } | if (n.nodeType == 3 || n.nodeType == 8) n.nodeValue = n.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)=\"[^\"]*\"', 'gi'), ""); | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
tinyMCE.selectedInstance = inst; | inst.select(); | setupContent : function(editor_id) { var inst = tinyMCE.instances[editor_id]; var doc = inst.getDoc(); var head = doc.getElementsByTagName('head').item(0); var content = inst.startContent; // HTML values get XML encoded in strict mode if (tinyMCE.settings.strict_loading_mode) { content = content.replace(/</g, '<'); content = content.replace(/>/g, '>'); content = content.replace(/"/g, '"'); content = content.replace(/&/g, '&'); } inst.switchSettings(); // Not loaded correctly hit it again, Mozilla bug #997860 if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { // This part will remove the designMode status // Failes first time in Firefox 1.5b2 on Mac try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); return; } if (!head) { window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); return; } // Import theme specific content CSS the user specific tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); // Setup keyboard shortcuts if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); } // Add default shortcuts for gecko if (tinyMCE.isGecko) { inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); } // Setup span styles if (tinyMCE.getParam("convert_fonts_to_spans")) inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); if (tinyMCE.settings['nowrap']) doc.body.style.whiteSpace = "nowrap"; doc.body.dir = this.settings['directionality']; doc.editorId = editor_id; // Add on document element in Mozilla if (!tinyMCE.isMSIE) doc.documentElement.editorId = editor_id; inst.setBaseHREF(tinyMCE.settings['base_href']); // Replace new line characters to BRs if (tinyMCE.settings['convert_newlines_to_brs']) { content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); } // Open closed anchors // content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>'); // Call custom cleanup code content = tinyMCE.storeAwayURLs(content); content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); if (tinyMCE.settings["force_br_newlines"]) doc.styleSheets[0].addRule("p", "margin: 0;"); var body = inst.getBody(); body.editorId = editor_id; } content = tinyMCE.cleanupHTMLCode(content); // Fix for bug #958637 if (!tinyMCE.isMSIE) { var contentElement = inst.getDoc().createElement("body"); var doc = inst.getDoc(); contentElement.innerHTML = content; // Remove weridness! if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); tinyMCE.setInnerHTML(inst.getBody(), content); } tinyMCE.convertAllRelativeURLs(inst.getBody()); } else { if (tinyMCE.settings['cleanup_on_startup']) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; // Setup element references var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) tinyMCE.addEventHandlers(inst); // Add blur handler if (tinyMCE.isMSIE) { tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 // Workaround for drag drop/copy paste base href bug if (!tinyMCE.isOpera) { tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); } } // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; tinyMCE.selectedElement = inst.contentWindow.document.body; // Call custom DOM cleanup tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); tinyMCE._setEventsEnabled(inst.getBody(), false); tinyMCE.cleanupAnchors(inst.getDoc()); if (tinyMCE.getParam("convert_fonts_to_spans")) tinyMCE.convertSpansToFonts(inst.getDoc()); inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); inst.undoRedo.add({ content : inst.startContent }); // Cleanup any mess left from storyAwayURLs if (tinyMCE.isGecko) { // Remove mce_src from textnodes and comments tinyMCE.selectNodes(inst.getBody(), function(n) { if (n.nodeType == 3 || n.nodeType == 8) { n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), ""); n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), ""); } return false; }); } // Cleanup any mess left from storyAwayURLs tinyMCE._removeInternal(inst.getBody()); tinyMCE.selectedInstance = inst; tinyMCE.triggerNodeChange(false, true); }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
for (var index = 0; index < sourceSelect.options.length; index++) { var sourceOption = sourceSelect.options[index]; | for (var sourceIndex = 0, targetIndex = 0; sourceIndex < sourceSelect.options.length; sourceIndex++) { var sourceOption = sourceSelect.options[sourceIndex]; | function setupFolderOptions(sourceSelect, targetSelect, selectedOptionValue, excludedOptionValue) { targetSelect.length = 0; for (var index = 0; index < sourceSelect.options.length; index++) { var sourceOption = sourceSelect.options[index]; if (typeof excludedOptionValue == "undefined" || excludedOptionValue == "" || sourceOption.value.indexOf(excludedOptionValue) != 0) { targetSelect.options[index] = new Option(sourceOption.text, sourceOption.value); targetSelect.options[index].className = sourceOption.className; if (!(typeof selectedOptionValue == "undefined") && targetSelect.options[index].value == selectedOptionValue) { targetSelect.options[index].selected = true; } } }} | 6797 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6797/4d1185d0ef4f75946248bbc63c1ab11a6e13b134/bookmarks.js/buggy/webapp/script/bookmarks.js |
targetSelect.options[index] = new Option(sourceOption.text, sourceOption.value); targetSelect.options[index].className = sourceOption.className; | targetSelect.options[targetIndex] = new Option(sourceOption.text, sourceOption.value); targetSelect.options[targetIndex].className = sourceOption.className; | function setupFolderOptions(sourceSelect, targetSelect, selectedOptionValue, excludedOptionValue) { targetSelect.length = 0; for (var index = 0; index < sourceSelect.options.length; index++) { var sourceOption = sourceSelect.options[index]; if (typeof excludedOptionValue == "undefined" || excludedOptionValue == "" || sourceOption.value.indexOf(excludedOptionValue) != 0) { targetSelect.options[index] = new Option(sourceOption.text, sourceOption.value); targetSelect.options[index].className = sourceOption.className; if (!(typeof selectedOptionValue == "undefined") && targetSelect.options[index].value == selectedOptionValue) { targetSelect.options[index].selected = true; } } }} | 6797 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6797/4d1185d0ef4f75946248bbc63c1ab11a6e13b134/bookmarks.js/buggy/webapp/script/bookmarks.js |
if (!(typeof selectedOptionValue == "undefined") && targetSelect.options[index].value == selectedOptionValue) { targetSelect.options[index].selected = true; | if (!(typeof selectedOptionValue == "undefined") && targetSelect.options[targetIndex].value == selectedOptionValue) { targetSelect.options[targetIndex].selected = true; | function setupFolderOptions(sourceSelect, targetSelect, selectedOptionValue, excludedOptionValue) { targetSelect.length = 0; for (var index = 0; index < sourceSelect.options.length; index++) { var sourceOption = sourceSelect.options[index]; if (typeof excludedOptionValue == "undefined" || excludedOptionValue == "" || sourceOption.value.indexOf(excludedOptionValue) != 0) { targetSelect.options[index] = new Option(sourceOption.text, sourceOption.value); targetSelect.options[index].className = sourceOption.className; if (!(typeof selectedOptionValue == "undefined") && targetSelect.options[index].value == selectedOptionValue) { targetSelect.options[index].selected = true; } } }} | 6797 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6797/4d1185d0ef4f75946248bbc63c1ab11a6e13b134/bookmarks.js/buggy/webapp/script/bookmarks.js |
targetIndex++; | function setupFolderOptions(sourceSelect, targetSelect, selectedOptionValue, excludedOptionValue) { targetSelect.length = 0; for (var index = 0; index < sourceSelect.options.length; index++) { var sourceOption = sourceSelect.options[index]; if (typeof excludedOptionValue == "undefined" || excludedOptionValue == "" || sourceOption.value.indexOf(excludedOptionValue) != 0) { targetSelect.options[index] = new Option(sourceOption.text, sourceOption.value); targetSelect.options[index].className = sourceOption.className; if (!(typeof selectedOptionValue == "undefined") && targetSelect.options[index].value == selectedOptionValue) { targetSelect.options[index].selected = true; } } }} | 6797 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6797/4d1185d0ef4f75946248bbc63c1ab11a6e13b134/bookmarks.js/buggy/webapp/script/bookmarks.js |
|
this.moveTo(); | this.draw(); | setUrl: function(newUrl) { this.url = newUrl; this.moveTo(); }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/3d58bc669814790e7f7cd02571ace1be6bae8d16/Image.js/buggy/lib/OpenLayers/Layer/Image.js |
this.moveTo(); | this.draw(); | setUrl: function(newUrl) { this.url = newUrl; this.moveTo(); }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/3d58bc669814790e7f7cd02571ace1be6bae8d16/Image.js/clean/lib/OpenLayers/Layer/Image.js |
this.activeHandle = this.handles[handleIdx]; this.activeHandleIdx = handleIdx; | this.activeHandleIdx = handleIdx || 0; this.activeHandle = this.handles[this.activeHandleIdx]; | setValue: function(sliderValue, handleIdx){ if(!this.active) { this.activeHandle = this.handles[handleIdx]; this.activeHandleIdx = handleIdx; this.updateStyles(); } handleIdx = handleIdx || this.activeHandleIdx || 0; if(this.initialized && this.restricted) { if((handleIdx>0) && (sliderValue<this.values[handleIdx-1])) sliderValue = this.values[handleIdx-1]; if((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1])) sliderValue = this.values[handleIdx+1]; } sliderValue = this.getNearestValue(sliderValue); this.values[handleIdx] = sliderValue; this.value = this.values[0]; // assure backwards compat this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] = this.translateToPx(sliderValue); this.drawSpans(); if(!this.dragging || !this.event) this.updateFinished(); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/4f110cc725dff674b7f075baf4eb49b2784b2d16/slider.js/clean/src/slider.js |
this.handles[handleIdx].style[ this.isVertical() ? 'top' : 'left'] = | this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] = | setValue: function(sliderValue, handleIdx){ if(!this.active) { this.activeHandle = this.handles[handleIdx]; this.activeHandleIdx = handleIdx; this.updateStyles(); } handleIdx = handleIdx || this.activeHandleIdx || 0; if(this.initialized && this.restricted) { if((handleIdx>0) && (sliderValue<this.values[handleIdx-1])) sliderValue = this.values[handleIdx-1]; if((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1])) sliderValue = this.values[handleIdx+1]; } sliderValue = this.getNearestValue(sliderValue); this.values[handleIdx] = sliderValue; this.value = this.values[0]; // assure backwards compat this.handles[handleIdx].style[ this.isVertical() ? 'top' : 'left'] = this.translateToPx(sliderValue); this.drawSpans(); if(!this.event) this.updateFinished(); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/3ed87f22d21ec76d73f0def750af115212098e0d/slider.js/buggy/src/slider.js |
if(!this.event) this.updateFinished(); | if(!this.dragging || !this.event) this.updateFinished(); | setValue: function(sliderValue, handleIdx){ if(!this.active) { this.activeHandle = this.handles[handleIdx]; this.activeHandleIdx = handleIdx; this.updateStyles(); } handleIdx = handleIdx || this.activeHandleIdx || 0; if(this.initialized && this.restricted) { if((handleIdx>0) && (sliderValue<this.values[handleIdx-1])) sliderValue = this.values[handleIdx-1]; if((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1])) sliderValue = this.values[handleIdx+1]; } sliderValue = this.getNearestValue(sliderValue); this.values[handleIdx] = sliderValue; this.value = this.values[0]; // assure backwards compat this.handles[handleIdx].style[ this.isVertical() ? 'top' : 'left'] = this.translateToPx(sliderValue); this.drawSpans(); if(!this.event) this.updateFinished(); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/3ed87f22d21ec76d73f0def750af115212098e0d/slider.js/buggy/src/slider.js |
this.updateFinished(); | if(!this.event) this.updateFinished(); | setValue: function(sliderValue, handleIdx){ if(!this.active) { this.activeHandle = this.handles[handleIdx]; this.activeHandleIdx = handleIdx; this.updateStyles(); } handleIdx = handleIdx || this.activeHandleIdx || 0; if(this.initialized && this.restricted) { if((handleIdx>0) && (sliderValue<this.values[handleIdx-1])) sliderValue = this.values[handleIdx-1]; if((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1])) sliderValue = this.values[handleIdx+1]; } sliderValue = this.getNearestValue(sliderValue); this.values[handleIdx] = sliderValue; this.value = this.values[0]; // assure backwards compat this.handles[handleIdx].style[ this.isVertical() ? 'top' : 'left'] = this.translateToPx(sliderValue); this.drawSpans(); this.updateFinished(); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/5fff5c73fd536f951b849229b7bded5b9764b5f1/slider.js/buggy/src/slider.js |
setTimeout("reload()", 100); | setTimeout("reload()", 1000); | function setVid(xy){ document.location = "/setVideo?position="+xy; setTimeout("reload()", 100);} | 6281 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6281/bb2e7fd3808882e75421b4a7d4eba0ab56a0d2c7/index.js/clean/tuxbox/enigma/data/htdocs/index.js |
setVisibility: function(visible) { | setVisibility: function(visible, noEvent) { | setVisibility: function(visible) { if (visible != this.getVisibility()) { this.div.style.display = (visible) ? "block" : "none"; if (this.map != null) { if (visible) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); } } this.map.events.triggerEvent("changelayer"); } } }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/f3a072b151fd0fb48097965647921f2ea0396651/Layer.js/buggy/lib/OpenLayers/Layer.js |
if (this.map != null) { if (visible) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); } | if ((visible) && (this.map != null)) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); | setVisibility: function(visible) { if (visible != this.getVisibility()) { this.div.style.display = (visible) ? "block" : "none"; if (this.map != null) { if (visible) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); } } this.map.events.triggerEvent("changelayer"); } } }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/f3a072b151fd0fb48097965647921f2ea0396651/Layer.js/buggy/lib/OpenLayers/Layer.js |
} if ((this.map != null) && ((noEvent == null) || (noEvent == false))) { | setVisibility: function(visible) { if (visible != this.getVisibility()) { this.div.style.display = (visible) ? "block" : "none"; if (this.map != null) { if (visible) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); } } this.map.events.triggerEvent("changelayer"); } } }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/f3a072b151fd0fb48097965647921f2ea0396651/Layer.js/buggy/lib/OpenLayers/Layer.js |
|
setVisibility: function(visible) { | setVisibility: function(visible, noEvent) { | setVisibility: function(visible) { if (visible != this.getVisibility()) { this.div.style.display = (visible) ? "block" : "none"; if (this.map != null) { if (visible) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); } } this.map.events.triggerEvent("changelayer"); } } }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/f3a072b151fd0fb48097965647921f2ea0396651/Layer.js/clean/lib/OpenLayers/Layer.js |
if (this.map != null) { if (visible) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); } | if ((visible) && (this.map != null)) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); | setVisibility: function(visible) { if (visible != this.getVisibility()) { this.div.style.display = (visible) ? "block" : "none"; if (this.map != null) { if (visible) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); } } this.map.events.triggerEvent("changelayer"); } } }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/f3a072b151fd0fb48097965647921f2ea0396651/Layer.js/clean/lib/OpenLayers/Layer.js |
} if ((this.map != null) && ((noEvent == null) || (noEvent == false))) { | setVisibility: function(visible) { if (visible != this.getVisibility()) { this.div.style.display = (visible) ? "block" : "none"; if (this.map != null) { if (visible) { var extent = this.map.getExtent(); if (extent != null) { this.moveTo(this.map.getExtent()); } } this.map.events.triggerEvent("changelayer"); } } }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/f3a072b151fd0fb48097965647921f2ea0396651/Layer.js/clean/lib/OpenLayers/Layer.js |
|
setTimeout("reload()", 100); | setTimeout("reload()", 1000); | function setVol(xy){ document.location = "/setVolume?volume="+xy; setTimeout("reload()", 100);} | 6281 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6281/bb2e7fd3808882e75421b4a7d4eba0ab56a0d2c7/index.js/clean/tuxbox/enigma/data/htdocs/index.js |
parent.update(); | headerUpdate(); | function setVol(xy){ document.location = "setVolume?volume="+xy; if (window.screen.width < 800) setTimeout("reload()", 1000); else parent.update();} | 6281 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6281/620f683f154b716da7999d6e76bf7d5f16f84868/index.js/buggy/tuxbox/enigma/data/htdocs/index.js |
var TinyMCE_InlinePopupsPlugin={getInfo:function(){return{longname:'Inline Popups',author:'Moxiecode Systems',authorurl:'http: | var TinyMCE_InlinePopupsPlugin={getInfo:function(){return{longname:'Inline Popups',author:'Moxiecode Systems AB',authorurl:'http: | var TinyMCE_InlinePopupsPlugin={getInfo:function(){return{longname:'Inline Popups',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};}};tinyMCE.addPlugin("inlinepopups",TinyMCE_InlinePopupsPlugin);TinyMCE_Engine.prototype.orgOpenWindow=TinyMCE_Engine.prototype.openWindow;TinyMCE_Engine.prototype.openWindow=function(template,args){if(args['inline']!="yes"||tinyMCE.isOpera||tinyMCE.getParam("plugins").indexOf('inlinepopups')==-1){mcWindows.selectedWindow=null;args['mce_inside_iframe']=false;this.orgOpenWindow(template,args);return;}var url,resizable,scrollbars;args['mce_inside_iframe']=true;tinyMCE.windowArgs=args;if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];if(!(width=parseInt(template['width'])))width=320;if(!(height=parseInt(template['height'])))height=200;resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";height+=18;for(var name in args){if(typeof(args[name])=='function')continue;url=tinyMCE.replaceVar(url,name,escape(args[name]));}var elm=document.getElementById(this.selectedInstance.editorId+'_parent');var pos=tinyMCE.getAbsPosition(elm);pos.absLeft+=Math.round((elm.firstChild.clientWidth/2)-(width/2));pos.absTop+=Math.round((elm.firstChild.clientHeight/2)-(height/2));mcWindows.open(url,mcWindows.idCounter++,"modal=yes,width="+width+",height="+height+",resizable="+resizable+",scrollbars="+scrollbars+",statusbar="+resizable+",left="+pos.absLeft+",top="+pos.absTop);};TinyMCE_Engine.prototype.orgCloseWindow=TinyMCE_Engine.prototype.closeWindow;TinyMCE_Engine.prototype.closeWindow=function(win){if(mcWindows.selectedWindow!=null)mcWindows.selectedWindow.close();else this.orgCloseWindow(win);};TinyMCE_Engine.prototype.setWindowTitle=function(win_ref,title){for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win_ref.name==win.id+"_iframe")window.frames[win.id+"_iframe"].document.getElementById(win.id+'_title').innerHTML=title;}};function TinyMCE_Windows(){this.settings=new Array();this.windows=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.isSafari=navigator.userAgent.indexOf('Safari')!=-1;this.isMac=navigator.userAgent.indexOf('Mac')!=-1;this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.action="none";this.selectedWindow=null;this.lastSelectedWindow=null;this.zindex=100;this.mouseDownScreenX=0;this.mouseDownScreenY=0;this.mouseDownLayerX=0;this.mouseDownLayerY=0;this.mouseDownWidth=0;this.mouseDownHeight=0;this.idCounter=0;};TinyMCE_Windows.prototype.init=function(settings){this.settings=settings;if(this.isMSIE)this.addEvent(document,"mousemove",mcWindows.eventDispatcher);else this.addEvent(window,"mousemove",mcWindows.eventDispatcher);this.addEvent(document,"mouseup",mcWindows.eventDispatcher);this.doc=document;};TinyMCE_Windows.prototype.getParam=function(name,default_value){var value=null;value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");return value;};TinyMCE_Windows.prototype.eventDispatcher=function(e){e=typeof(e)=="undefined"?window.event:e;if(mcWindows.selectedWindow==null)return;if(mcWindows.isGecko&&e.type=="mousedown"){var elm=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(win.headElement==elm||win.resizeElement==elm){win.focus();break;}}}switch(e.type){case"mousemove":mcWindows.selectedWindow.onMouseMove(e);break;case"mouseup":mcWindows.selectedWindow.onMouseUp(e);break;case"mousedown":mcWindows.selectedWindow.onMouseDown(e);break;case"focus":mcWindows.selectedWindow.onFocus(e);break;}};TinyMCE_Windows.prototype.addEvent=function(obj,name,handler){if(this.isMSIE)obj.attachEvent("on"+name,handler);else obj.addEventListener(name,handler,true);};TinyMCE_Windows.prototype.cancelEvent=function(e){if(this.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};TinyMCE_Windows.prototype.parseFeatures=function(opts){opts=opts.toLowerCase();opts=opts.replace(/;/g,",");opts=opts.replace(/[^0-9a-z=,]/g,"");var optionChunks=opts.split(',');var options=new Array();options['left']="10";options['top']="10";options['width']="300";options['height']="300";options['resizable']="yes";options['minimizable']="yes";options['maximizable']="yes";options['close']="yes";options['movable']="yes";options['statusbar']="yes";options['scrollbars']="auto";options['modal']="no";if(opts=="")return options;for(var i=0;i<optionChunks.length;i++){var parts=optionChunks[i].split('=');if(parts.length==2)options[parts[0]]=parts[1];}options['left']=parseInt(options['left']);options['top']=parseInt(options['top']);options['width']=parseInt(options['width']);options['height']=parseInt(options['height']);return options;};TinyMCE_Windows.prototype.open=function(url,name,features){this.lastSelectedWindow=this.selectedWindow;var win=new TinyMCE_Window();var winDiv,html="",id;var imgPath=this.getParam("images_path");features=this.parseFeatures(features);id="mcWindow_"+name;win.deltaHeight=18;if(features['statusbar']=="yes"){win.deltaHeight+=13;if(this.isMSIE)win.deltaHeight+=1;}width=parseInt(features['width']);height=parseInt(features['height'])-win.deltaHeight;if(this.isMSIE)width-=2;win.id=id;win.url=url;win.name=name;win.features=features;this.windows[name]=win;iframeWidth=width;iframeHeight=height;html+='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';html+='<html>';html+='<head>';html+='<title>Wrapper iframe</title>';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';html+='<link href="'+this.getParam("css_file")+'" rel="stylesheet" type="text/css" />';html+='</head>';html+='<body onload="parent.mcWindows.onLoad(\''+name+'\');">';html+='<div id="'+id+'_container" class="mceWindow">';html+='<div id="'+id+'_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';html+=' <div id="'+id+'_title" class="mceWindowTitle"';html+=' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';html+=' <div class="mceWindowHeadTools">';html+=' <a href="javascript:parent.mcWindows.windows[\''+name+'\'].close();" target="_self" onmousedown="return false;" class="mceWindowClose"><img border="0" src="'+imgPath+'/window_close.gif" /></a>';html+=' </div>';html+='</div><div id="'+id+'_body" class="mceWindowBody" style="width: '+width+'px; height: '+height+'px;">';html+='<iframe id="'+id+'_iframe" name="'+id+'_iframe" frameborder="0" width="'+iframeWidth+'" height="'+iframeHeight+'" src="'+url+'" class="mceWindowBodyIframe" scrolling="'+features['scrollbars']+'"></iframe></div>';if(features['statusbar']=="yes"){html+='<div id="'+id+'_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';if(features['resizable']=="yes"){if(this.isGecko)html+='<div id="'+id+'_resize" class="mceWindowResize"><div style="background-image: url(\''+imgPath+'/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';else html+='<div id="'+id+'_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();" border="0" src="'+imgPath+'/window_resize.gif" /></div>';}html+='</div>';}html+='</div>';html+='</body>';html+='</html>';this.createFloatingIFrame(id,features['left'],features['top'],features['width'],features['height'],html);};TinyMCE_Windows.prototype.setDocumentLock=function(state){if(state){var elm=document.getElementById('mcWindowEventBlocker');if(elm==null){elm=document.createElement("div");elm.id="mcWindowEventBlocker";elm.style.position="absolute";elm.style.left="0";elm.style.top="0";document.body.appendChild(elm);}elm.style.display="none";var imgPath=this.getParam("images_path");var width=document.body.clientWidth;var height=document.body.clientHeight;elm.style.width=width;elm.style.height=height;elm.innerHTML='<img src="'+imgPath+'/spacer.gif" width="'+width+'" height="'+height+'" />';elm.style.zIndex=mcWindows.zindex-1;elm.style.display="block";}else{var elm=document.getElementById('mcWindowEventBlocker');if(mcWindows.windows.length==0)elm.parentNode.removeChild(elm);else elm.style.zIndex=mcWindows.zindex-1;}};TinyMCE_Windows.prototype.onLoad=function(name){var win=mcWindows.windows[name];var id="mcWindow_"+name;var wrapperIframe=window.frames[id+"_iframe"].frames[0];var wrapperDoc=window.frames[id+"_iframe"].document;var doc=window.frames[id+"_iframe"].document;var winDiv=document.getElementById("mcWindow_"+name+"_div");var realIframe=window.frames[id+"_iframe"].frames[0];win.id="mcWindow_"+name;win.winElement=winDiv;win.bodyElement=doc.getElementById(id+'_body');win.iframeElement=doc.getElementById(id+'_iframe');win.headElement=doc.getElementById(id+'_head');win.titleElement=doc.getElementById(id+'_title');win.resizeElement=doc.getElementById(id+'_resize');win.containerElement=doc.getElementById(id+'_container');win.left=win.features['left'];win.top=win.features['top'];win.frame=window.frames[id+'_iframe'].frames[0];win.wrapperFrame=window.frames[id+'_iframe'];win.wrapperIFrameElement=document.getElementById(id+"_iframe");mcWindows.addEvent(win.headElement,"mousedown",mcWindows.eventDispatcher);if(win.resizeElement!=null)mcWindows.addEvent(win.resizeElement,"mousedown",mcWindows.eventDispatcher);if(mcWindows.isMSIE){mcWindows.addEvent(realIframe.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(realIframe,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"focus",mcWindows.eventDispatcher);}for(var i=0;i<window.frames.length;i++){if(!window.frames[i]._hasMouseHandlers){if(mcWindows.isMSIE){mcWindows.addEvent(window.frames[i].document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i].document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(window.frames[i],"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i],"mouseup",mcWindows.eventDispatcher);}window.frames[i]._hasMouseHandlers=true;}}if(mcWindows.isMSIE){mcWindows.addEvent(win.frame.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(win.frame,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"focus",mcWindows.eventDispatcher);}var func=this.getParam("on_open_window","");if(func!="")eval(func+"(win);");win.focus();if(win.features['modal']=="yes")mcWindows.setDocumentLock(true);};TinyMCE_Windows.prototype.createFloatingIFrame=function(id_prefix,left,top,width,height,html){var iframe=document.createElement("iframe");var div=document.createElement("div");width=parseInt(width);height=parseInt(height)+1;div.setAttribute("id",id_prefix+"_div");div.setAttribute("width",width);div.setAttribute("height",(height));div.style.position="absolute";div.style.left=left+"px";div.style.top=top+"px";div.style.width=width+"px";div.style.height=(height)+"px";div.style.backgroundColor="white";div.style.display="none";if(this.isGecko){iframeWidth=width+2;iframeHeight=height+2;}else{iframeWidth=width;iframeHeight=height+1;}iframe.setAttribute("id",id_prefix+"_iframe");iframe.setAttribute("name",id_prefix+"_iframe");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",iframeWidth);iframe.setAttribute("height",iframeHeight);iframe.setAttribute("scrolling","no");iframe.style.width=iframeWidth+"px";iframe.style.height=iframeHeight+"px";iframe.style.backgroundColor="white";div.appendChild(iframe);document.body.appendChild(div);div.innerHTML=div.innerHTML;if(this.isSafari){window.setTimeout(function(){doc=window.frames[id_prefix+'_iframe'].document;doc.open();doc.write(html);doc.close();},10);}else{doc=window.frames[id_prefix+'_iframe'].window.document;doc.open();doc.write(html);doc.close();}div.style.display="block";return div;};function TinyMCE_Window(){};TinyMCE_Window.prototype.focus=function(){if(this!=mcWindows.selectedWindow){this.winElement.style.zIndex=++mcWindows.zindex;mcWindows.lastSelectedWindow=mcWindows.selectedWindow;mcWindows.selectedWindow=this;}};TinyMCE_Window.prototype.minimize=function(){};TinyMCE_Window.prototype.maximize=function(){};TinyMCE_Window.prototype.startResize=function(){mcWindows.action="resize";};TinyMCE_Window.prototype.startMove=function(e){mcWindows.action="move";};TinyMCE_Window.prototype.close=function(){if(this.frame&&this.frame['tinyMCEPopup'])this.frame['tinyMCEPopup'].restoreSelection();if(mcWindows.lastSelectedWindow!=null)mcWindows.lastSelectedWindow.focus();var mcWindowsNew=new Array();for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win.name!=this.name)mcWindowsNew[n]=win;}mcWindows.windows=mcWindowsNew;var e=mcWindows.doc.getElementById(this.id+"_iframe");e.parentNode.removeChild(e);var e=mcWindows.doc.getElementById(this.id+"_div");e.parentNode.removeChild(e);mcWindows.setDocumentLock(false);};TinyMCE_Window.prototype.onMouseMove=function(e){var scrollX=0;var scrollY=0;var dx=e.screenX-mcWindows.mouseDownScreenX;var dy=e.screenY-mcWindows.mouseDownScreenY;switch(mcWindows.action){case"resize":width=mcWindows.mouseDownWidth+(e.screenX-mcWindows.mouseDownScreenX);height=mcWindows.mouseDownHeight+(e.screenY-mcWindows.mouseDownScreenY);width=width<100?100:width;height=height<100?100:height;this.wrapperIFrameElement.style.width=width+2;this.wrapperIFrameElement.style.height=height+2;this.wrapperIFrameElement.width=width+2;this.wrapperIFrameElement.height=height+2;this.winElement.style.width=width;this.winElement.style.height=height;height=height-this.deltaHeight;this.containerElement.style.width=width;this.iframeElement.style.width=width;this.iframeElement.style.height=height;this.bodyElement.style.width=width;this.bodyElement.style.height=height;this.headElement.style.width=width;mcWindows.cancelEvent(e);break;case"move":this.left=mcWindows.mouseDownLayerX+(e.screenX-mcWindows.mouseDownScreenX);this.top=mcWindows.mouseDownLayerY+(e.screenY-mcWindows.mouseDownScreenY);this.winElement.style.left=this.left+"px";this.winElement.style.top=this.top+"px";mcWindows.cancelEvent(e);break;}};function debug(msg){document.getElementById('debug').value+=msg+"\n";}TinyMCE_Window.prototype.onMouseUp=function(e){mcWindows.action="none";};TinyMCE_Window.prototype.onFocus=function(e){var winRef=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(winRef.name==win.id+"_iframe"){win.focus();return;}}};TinyMCE_Window.prototype.onMouseDown=function(e){var elm=mcWindows.isMSIE?this.wrapperFrame.event.srcElement:e.target;var scrollX=0;var scrollY=0;mcWindows.mouseDownScreenX=e.screenX;mcWindows.mouseDownScreenY=e.screenY;mcWindows.mouseDownLayerX=this.left;mcWindows.mouseDownLayerY=this.top;mcWindows.mouseDownWidth=parseInt(this.winElement.style.width);mcWindows.mouseDownHeight=parseInt(this.winElement.style.height);if(this.resizeElement!=null&&elm==this.resizeElement.firstChild)this.startResize(e);else this.startMove(e);mcWindows.cancelEvent(e);};var mcWindows=new TinyMCE_Windows();mcWindows.init({images_path:tinyMCE.baseURL+"/plugins/inlinepopups/images",css_file:tinyMCE.baseURL+"/plugins/inlinepopups/css/inlinepopup.css"}); | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/editor_plugin.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.