rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
subScriptLoader.loadSubScript('chrome: subScriptLoader.loadSubScript('chrome: subScriptLoader.loadSubScript('chrome:
this.init = function() { if (this.runner != null) { // already initialized return; } this.log.debug("init"); this.paused = false; this.runner = new Object(); recorder.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = recorder.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-api.js', this.runner); if (recorder.options.userExtensionsURL) { try { subScriptLoader.loadSubScript(recorder.options.userExtensionsURL, this.runner); } catch (error) { this.log.error("error loading user-extensions.js: " + error); } } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-browserbot.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.logFrame = new LogFrame(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { self.paused = true; return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }
init : function(o, oRoot, minX, maxX, minY, maxY,
init : function(o, h, oRoot, minX, maxX, minY, maxY,
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper) { o.onmousedown = HopDrag.start; o.hmode = bSwapHorzRef ? false : true ; o.vmode = bSwapVertRef ? false : true ; o.root = oRoot && oRoot != null ? oRoot : o ; if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px"; if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px"; if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px"; if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px"; o.minX = typeof minX != 'undefined' ? minX : null; o.minY = typeof minY != 'undefined' ? minY : null; o.maxX = typeof maxX != 'undefined' ? maxX : null; o.maxY = typeof maxY != 'undefined' ? maxY : null; o.xMapper = fXMapper ? fXMapper : null; o.yMapper = fYMapper ? fYMapper : null; o.root.onDragStart = new Function(); o.root.onDragEnd = new Function(); o.root.onDrag = new Function(); },
o.onmousedown = HopDrag.start;
o.hop_handle = h; h.hop_window = o; h.onmousedown = HopDrag.start;
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper) { o.onmousedown = HopDrag.start; o.hmode = bSwapHorzRef ? false : true ; o.vmode = bSwapVertRef ? false : true ; o.root = oRoot && oRoot != null ? oRoot : o ; if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px"; if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px"; if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px"; if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px"; o.minX = typeof minX != 'undefined' ? minX : null; o.minY = typeof minY != 'undefined' ? minY : null; o.maxX = typeof maxX != 'undefined' ? maxX : null; o.maxY = typeof maxY != 'undefined' ? maxY : null; o.xMapper = fXMapper ? fXMapper : null; o.yMapper = fYMapper ? fYMapper : null; o.root.onDragStart = new Function(); o.root.onDragEnd = new Function(); o.root.onDrag = new Function(); },
self.paused = true;
this.init = function() { if (this.runner != null) { // already initialized return; } this.paused = false; this.runner = new Object(); recorder.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = recorder.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-api.js', this.runner); if (recorder.options.userExtensionsURL) { subScriptLoader.loadSubScript(recorder.options.userExtensionsURL, this.runner); } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-browserbot.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.logFrame = new LogFrame(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }
if (!navigator.userAgent.match(/ rv:1\.8\.0/)) {
if (isFirefox2()) {
this.init = function() { if (this.runner != null) { // already initialized return; } this.log.debug("init"); this.paused = false; this.runner = new Object(); this.runner.editor = this.editor; this.editor.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = this.editor.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); if (!navigator.userAgent.match(/ rv:1\.8\.0/)) { // Not Firefox 1.5 (Gecko 1.8.0) // In Firefox 2.0, it seems that methods added to Object or String does not work in subscripts, // so we'll load prototype.js and htmlutils.js again // (Tested on Firefox 2.0 RC2) this.runner.eval = function(str, arg) { return eval(str); } this.runner.window = window; this.runner.Element = window.Element; this.runner.Event = window.Event; subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/lib/prototype.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/htmlutils.js', this.runner); } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-api.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-browserbot.js', this.runner); if (this.editor.options.userExtensionsURL) { try { ExtensionsLoader.loadSubScript(subScriptLoader, this.editor.options.userExtensionsURL, this.runner); } catch (error) { this.log.error("error loading user-extensions.js: " + error); } } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.editor.infoPanel.logView.setLog(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { self.paused = true; return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }
this.runner.eval = function(str, arg) { return eval(str); }
this.runner.eval = doEval;
this.init = function() { if (this.runner != null) { // already initialized return; } this.log.debug("init"); this.paused = false; this.runner = new Object(); this.runner.editor = this.editor; this.editor.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = this.editor.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); if (!navigator.userAgent.match(/ rv:1\.8\.0/)) { // Not Firefox 1.5 (Gecko 1.8.0) // In Firefox 2.0, it seems that methods added to Object or String does not work in subscripts, // so we'll load prototype.js and htmlutils.js again // (Tested on Firefox 2.0 RC2) this.runner.eval = function(str, arg) { return eval(str); } this.runner.window = window; this.runner.Element = window.Element; this.runner.Event = window.Event; subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/lib/prototype.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/htmlutils.js', this.runner); } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-api.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-browserbot.js', this.runner); if (this.editor.options.userExtensionsURL) { try { ExtensionsLoader.loadSubScript(subScriptLoader, this.editor.options.userExtensionsURL, this.runner); } catch (error) { this.log.error("error loading user-extensions.js: " + error); } } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.editor.infoPanel.logView.setLog(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { self.paused = true; return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }
for (var i=0; i<fieldsets.length; i++) { var fs = fieldsets[i];
for (var i = 0, fs; fs = fieldsets[i]; i++) {
init: function() { var fieldsets = document.getElementsByTagName('fieldset'); var collapsed_seen = false; for (var i=0; i<fieldsets.length; i++) { var fs = fieldsets[i]; // Collapse this fieldset if it has the correct class, and if it // doesn't have any errors. (Collapsing shouldn't apply in the case // of error messages.) if (fs.className.match(CollapsedFieldsets.collapse_re) && !CollapsedFieldsets.fieldset_has_errors(fs)) { collapsed_seen = true; // Give it an additional class, used by CSS to hide it. fs.className += ' ' + CollapsedFieldsets.collapsed_class; // Get plural verbose name of object. var verbose_name = fs.getElementsByTagName('h2')[0].innerHTML; // <div class="form-row collapse-toggle" id="fieldsetcollapser1"> // <a href="javascript:toggleDisplay;">Show section priorities&hellip;</a> // </div> var div = document.createElement('div'); // Give it a hook so we can remove it later. div.id = 'fieldsetcollapser' + i; div.className = 'form-row collapse-toggle'; // CSS hook var collapse_link = document.createElement('a'); collapse_link.setAttribute('href', 'javascript:CollapsedFieldsets.display(' + i + ');'); collapse_link.appendChild(document.createTextNode('Show ' + verbose_name)); div.appendChild(collapse_link); fs.appendChild(div); } } if (collapsed_seen) { // Expand all collapsed fieldsets when form is submitted. addEvent(findForm(document.getElementsByTagName('fieldset')[0]), 'submit', function() { CollapsedFieldsets.uncollapse_all(); }); } },
var verbose_name = fs.getElementsByTagName('h2')[0].innerHTML; var div = document.createElement('div'); div.id = 'fieldsetcollapser' + i; div.className = 'form-row collapse-toggle';
init: function() { var fieldsets = document.getElementsByTagName('fieldset'); var collapsed_seen = false; for (var i=0; i<fieldsets.length; i++) { var fs = fieldsets[i]; // Collapse this fieldset if it has the correct class, and if it // doesn't have any errors. (Collapsing shouldn't apply in the case // of error messages.) if (fs.className.match(CollapsedFieldsets.collapse_re) && !CollapsedFieldsets.fieldset_has_errors(fs)) { collapsed_seen = true; // Give it an additional class, used by CSS to hide it. fs.className += ' ' + CollapsedFieldsets.collapsed_class; // Get plural verbose name of object. var verbose_name = fs.getElementsByTagName('h2')[0].innerHTML; // <div class="form-row collapse-toggle" id="fieldsetcollapser1"> // <a href="javascript:toggleDisplay;">Show section priorities&hellip;</a> // </div> var div = document.createElement('div'); // Give it a hook so we can remove it later. div.id = 'fieldsetcollapser' + i; div.className = 'form-row collapse-toggle'; // CSS hook var collapse_link = document.createElement('a'); collapse_link.setAttribute('href', 'javascript:CollapsedFieldsets.display(' + i + ');'); collapse_link.appendChild(document.createTextNode('Show ' + verbose_name)); div.appendChild(collapse_link); fs.appendChild(div); } } if (collapsed_seen) { // Expand all collapsed fieldsets when form is submitted. addEvent(findForm(document.getElementsByTagName('fieldset')[0]), 'submit', function() { CollapsedFieldsets.uncollapse_all(); }); } },
collapse_link.setAttribute('href', 'javascript:CollapsedFieldsets.display(' + i + ');'); collapse_link.appendChild(document.createTextNode('Show ' + verbose_name)); div.appendChild(collapse_link); fs.appendChild(div);
collapse_link.className = 'collapse-toggle'; collapse_link.id = 'fieldsetcollapser' + i; collapse_link.onclick = new Function('CollapsedFieldsets.show('+i+'); return false;'); collapse_link.href = '#'; collapse_link.innerHTML = 'Show'; var h2 = fs.getElementsByTagName('h2')[0]; h2.appendChild(document.createTextNode(' (')); h2.appendChild(collapse_link); h2.appendChild(document.createTextNode(')'));
init: function() { var fieldsets = document.getElementsByTagName('fieldset'); var collapsed_seen = false; for (var i=0; i<fieldsets.length; i++) { var fs = fieldsets[i]; // Collapse this fieldset if it has the correct class, and if it // doesn't have any errors. (Collapsing shouldn't apply in the case // of error messages.) if (fs.className.match(CollapsedFieldsets.collapse_re) && !CollapsedFieldsets.fieldset_has_errors(fs)) { collapsed_seen = true; // Give it an additional class, used by CSS to hide it. fs.className += ' ' + CollapsedFieldsets.collapsed_class; // Get plural verbose name of object. var verbose_name = fs.getElementsByTagName('h2')[0].innerHTML; // <div class="form-row collapse-toggle" id="fieldsetcollapser1"> // <a href="javascript:toggleDisplay;">Show section priorities&hellip;</a> // </div> var div = document.createElement('div'); // Give it a hook so we can remove it later. div.id = 'fieldsetcollapser' + i; div.className = 'form-row collapse-toggle'; // CSS hook var collapse_link = document.createElement('a'); collapse_link.setAttribute('href', 'javascript:CollapsedFieldsets.display(' + i + ');'); collapse_link.appendChild(document.createTextNode('Show ' + verbose_name)); div.appendChild(collapse_link); fs.appendChild(div); } } if (collapsed_seen) { // Expand all collapsed fieldsets when form is submitted. addEvent(findForm(document.getElementsByTagName('fieldset')[0]), 'submit', function() { CollapsedFieldsets.uncollapse_all(); }); } },
this.runner.eval = function(str) { return eval(str); }
this.init = function() { if (this.runner != null) { // already initialized return; } this.log.debug("init"); this.paused = false; this.runner = new Object(); this.runner.editor = this.editor; this.editor.testCaseListeners.push(function(testCase) { self.runner.testCase = testCase; }); this.runner.testCase = this.editor.testCase; const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/selenium-logging.js', this.runner); if (!navigator.userAgent.match(/ rv:1\.8\.0/)) { // Not Firefox 1.5 (Gecko 1.8.0) // In Firefox 2.0, it seems that methods added to Object or String does not work in subscripts, // so we'll load prototype.js and htmlutils.js again // (Tested on Firefox 2.0 RC2) this.runner.window = window; this.runner.Element = window.Element; this.runner.Event = window.Event; subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/lib/prototype.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/htmlutils.js', this.runner); } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-api.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js', this.runner); subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium/scripts/selenium-browserbot.js', this.runner); if (this.editor.options.userExtensionsURL) { try { ExtensionsLoader.loadSubScript(subScriptLoader, this.editor.options.userExtensionsURL, this.runner); } catch (error) { this.log.error("error loading user-extensions.js: " + error); } } subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); this.editor.infoPanel.logView.setLog(this.runner.LOG); this.runner.getInterval = function() { if (self.runner.testCase.debugContext.currentCommand().breakpoint) { self.paused = true; return -1; } else if (self.paused) { return -1; } else { return document.getElementById("runInterval").selectedItem.value; } } }
if (previous) previous.syncModel(true);
function init() { if (!this.recorderInitialized) { log.info("initializing"); this.recorderInitialized = true; this.setOptions(optionsManager.load()); //this.options.load(); this.eventManager = new EventManager(this); this.treeView = new TreeView(this, document, document.getElementById("commands")); this.sourceView = new SourceView(this, document.getElementById("source")); this.testCaseListeners = new Array(); this.setTestCase = function(testCase) { this.testCase = testCase; for (var i = 0; i < this.testCaseListeners.length; i++) { this.testCaseListeners[i](this.testCase); } }; this.setTestCase(new TestCase()); this.testCaseListeners.push(function(testCase) { recorder.view.testCase = testCase }); this.toggleView = function(view) { log.debug("toggle view"); if (this.view != null) { this.view.onHide(); } this.view = view; this.view.testCase = this.testCase; this.view.refresh(); }; initOptions(); this.toggleView(this.treeView); var controller = { supportsCommand : function(cmd) { switch (cmd) { case "cmd_close": case "cmd_open": case "cmd_save": case "cmd_selenium_play": case "cmd_selenium_pause": case "cmd_selenium_step": return true; default: return false; } }, isCommandEnabled : function(cmd){ switch (cmd) { case "cmd_close": case "cmd_open": case "cmd_save": return true; case "cmd_selenium_play": return self.state != 'playing'; case "cmd_selenium_pause": return self.state == 'playing' || self.state == 'paused'; case "cmd_selenium_step": return self.state == 'paused'; default: return false; } }, doCommand : function(cmd) { switch (cmd) { case "cmd_close": if (confirmClose()) { window.close(); } break; case "cmd_save": saveTestCase(); break; case "cmd_open": loadTestCase(); break; case "cmd_selenium_play": seleniumDebugger.start(); break; case "cmd_selenium_pause": if (self.state == 'paused') { seleniumDebugger.doContinue(); } else { seleniumDebugger.pause(); } break; case "cmd_selenium_step": seleniumDebugger.doContinue(true); break; default: } }, onEvent : function(evt) {} }; window.controllers.appendController(controller); document.commandDispatcher.updateCommands("selenium-ide-state"); log.info("initialized"); setTimeout("afterInit()", 500); }}
resize(150,50); setFont(new Font("TimesRoman",Font.BOLD,36)); s = getParameter("text");
this.resize(150,50); this.setFont(new Font("TimesRoman",Font.BOLD,36)); s = this.getParameter("text");
function init() { resize(150,50); setFont(new Font("TimesRoman",Font.BOLD,36)); s = getParameter("text"); if (s == null) { s = "Rhino"; } separated = s.split('');}
} else if (href.search(/file:(\/\/\/\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); document.forms[0].filepath.value = href.replace(/file:(\/\/\/\/\/)/gi, ""); } else if (href.search(/file:(\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); alert(href.replace(/file:(\/\/)/gi, "")); document.forms[0].filepath.value = href.replace(/file:(\/\/)/gi, "");
function init() { var text = tinyMCE.getWindowArg('text').toString(); var href = tinyMCE.getWindowArg('href').toString(); document.forms[0].wiki_text.value = text; document.forms[0].web_text.value = text; document.forms[0].attach_text.value = text; document.forms[0].email_text.value = text; if ((href != null) && (href != "")) { if (href.search(/(https?|ftp):\/\/[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#\/%=~_|]/gi)>-1) { mcTabs.displayTab('web_tab','web_panel'); document.forms[0].web_page.value = href; } else if (href.search(/wikiattachment:-:(.*?)/gi) > -1) { mcTabs.displayTab('attachments_tab','attachments_panel'); document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, "").replace(/%20/gi, " "); } else if (href.search(/mailto:(.*?)/gi) > -1) { mcTabs.displayTab('email_tab','email_panel') document.forms[0].email.value = href.replace(/mailto:/gi, ""); } else { mcTabs.displayTab('wiki_tab','wiki_panel'); var space = "", whref = href; if (href.indexOf(".") > -1) { space = href.substring(0, href.indexOf(".")); whref = href.substring(href.indexOf(".") + 1, href.length); } document.forms[0].wiki_space.value = space; document.forms[0].wiki_page.value = whref; } } document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); var className = tinyMCE.getWindowArg('className'); var editor_id = tinyMCE.getWindowArg('editor_id');}
var cols = 2, rows = 2, border = 0, cellpadding = "", cellspacing = "";
var cols = 2, rows = 2, border = tinyMCE.getParam('table_default_border', '0'), cellpadding = tinyMCE.getParam('table_default_cellpadding', ''), cellspacing = tinyMCE.getParam('table_default_cellspacing', '');
function init() { tinyMCEPopup.resizeToInnerSize(); document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); var cols = 2, rows = 2, border = 0, cellpadding = "", cellspacing = ""; var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = ""; var inst = tinyMCE.selectedInstance; var formObj = document.forms[0]; var elm = tinyMCE.getParentElement(inst.getFocusElement(), "table"); tinyMCE.tableElm = elm; action = tinyMCE.getWindowArg('action'); if (action == null) action = tinyMCE.tableElm ? "update" : "insert"; if (tinyMCE.tableElm && action != "insert") { var rowsAr = tinyMCE.tableElm.rows; var cols = 0; for (var i=0; i<rowsAr.length; i++) if (rowsAr[i].cells.length > cols) cols = rowsAr[i].cells.length; cols = cols; rows = rowsAr.length; st = tinyMCE.parseStyle(tinyMCE.getAttrib(tinyMCE.tableElm, "style")); border = trimSize(getStyle(elm, 'border', 'borderWidth')); cellpadding = tinyMCE.getAttrib(tinyMCE.tableElm, 'cellpadding', ""); cellspacing = tinyMCE.getAttrib(tinyMCE.tableElm, 'cellspacing', ""); width = trimSize(getStyle(elm, 'width', 'width')); height = trimSize(getStyle(elm, 'height', 'height')); bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); align = tinyMCE.getAttrib(tinyMCE.tableElm, 'align', align); className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(tinyMCE.tableElm, 'class'), false); id = tinyMCE.getAttrib(tinyMCE.tableElm, 'id'); summary = tinyMCE.getAttrib(tinyMCE.tableElm, 'summary'); style = tinyMCE.serializeStyle(st); dir = tinyMCE.getAttrib(tinyMCE.tableElm, 'dir'); lang = tinyMCE.getAttrib(tinyMCE.tableElm, 'lang'); background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); orgTableWidth = width; orgTableHeight = height; action = "update"; } addClassesToList('class', "table_styles"); // Update form selectByValue(formObj, 'align', align); selectByValue(formObj, 'class', className); formObj.cols.value = cols; formObj.rows.value = rows; formObj.border.value = border; formObj.cellpadding.value = cellpadding; formObj.cellspacing.value = cellspacing; formObj.width.value = width; formObj.height.value = height; formObj.bordercolor.value = bordercolor; formObj.bgcolor.value = bgcolor; formObj.id.value = id; formObj.summary.value = summary; formObj.style.value = style; formObj.dir.value = dir; formObj.lang.value = lang; formObj.backgroundimage.value = background; formObj.insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true); updateColor('bordercolor_pick', 'bordercolor'); updateColor('bgcolor_pick', 'bgcolor'); // Resize some elements if (isVisible('backgroundimagebrowser')) document.getElementById('backgroundimage').style.width = '180px'; // Disable some fields in update mode if (action == "update") { formObj.cols.disabled = true; formObj.rows.disabled = true; }}
alert(href.replace(/file:(\/\/)/gi, ""));
function init() { var text = tinyMCE.getWindowArg('text').toString(); var href = tinyMCE.getWindowArg('href').toString(); document.forms[0].wiki_text.value = text; document.forms[0].web_text.value = text; document.forms[0].file_text.value = text; document.forms[0].attach_text.value = text; document.forms[0].email_text.value = text; if ((href != null) && (href != "")) { if (href.search(/(https?|ftp):\/\/[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#\/%=~_|]/gi)>-1) { mcTabs.displayTab('web_tab','web_panel'); document.forms[0].web_page.value = href; } else if (href.search(/wikiattachment:-:(.*?)/gi) > -1) { mcTabs.displayTab('attachments_tab','attachments_panel'); document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, "").replace(/%20/gi, " "); } else if (href.search(/mailto:(.*?)/gi) > -1) { mcTabs.displayTab('email_tab','email_panel') document.forms[0].email.value = href.replace(/mailto:/gi, ""); } else if (href.search(/file:(\/\/\/\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); document.forms[0].filepath.value = href.replace(/file:(\/\/\/\/\/)/gi, ""); } else if (href.search(/file:(\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); alert(href.replace(/file:(\/\/)/gi, "")); document.forms[0].filepath.value = href.replace(/file:(\/\/)/gi, ""); } else { mcTabs.displayTab('wiki_tab','wiki_panel'); var space = "", whref = href; if (href.indexOf(".") > -1) { space = href.substring(0, href.indexOf(".")); whref = href.substring(href.indexOf(".") + 1, href.length); } document.forms[0].wiki_space.value = space; document.forms[0].wiki_page.value = whref; } } document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); var className = tinyMCE.getWindowArg('className'); var editor_id = tinyMCE.getWindowArg('editor_id');}
document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, "").replace(/%20/gi, " ");
document.forms[0].attach_file.value = href.replace(/wikiattachment:-:/gi, "").replace(/%20/gi, " ");
function init() { var text = tinyMCE.getWindowArg('text').toString(); var href = tinyMCE.getWindowArg('href').toString(); document.forms[0].wiki_text.value = text; document.forms[0].web_text.value = text; document.forms[0].file_text.value = text; document.forms[0].attach_text.value = text; document.forms[0].email_text.value = text; if ((href != null) && (href != "")) { if (href.search(/(https?|ftp):\/\/[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#\/%=~_|]/gi)>-1) { mcTabs.displayTab('web_tab','web_panel'); document.forms[0].web_page.value = href; } else if (href.search(/wikiattachment:-:(.*?)/gi) > -1) { mcTabs.displayTab('attachments_tab','attachments_panel'); document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, "").replace(/%20/gi, " "); } else if (href.search(/mailto:(.*?)/gi) > -1) { mcTabs.displayTab('email_tab','email_panel') document.forms[0].email.value = href.replace(/mailto:/gi, ""); } else if (href.search(/file:(\/\/\/\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); document.forms[0].filepath.value = href.replace(/file:(\/\/\/\/\/)/gi, ""); } else if (href.search(/file:(\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); document.forms[0].filepath.value = href.replace(/file:(\/\/)/gi, ""); } else { mcTabs.displayTab('wiki_tab','wiki_panel'); var space = "", whref = href; if (href.indexOf(".") > -1) { space = href.substring(0, href.indexOf(".")); whref = href.substring(href.indexOf(".") + 1, href.length); } document.forms[0].wiki_space.value = space; document.forms[0].wiki_page.value = whref; } } document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); var className = tinyMCE.getWindowArg('className'); var editor_id = tinyMCE.getWindowArg('editor_id');}
document.forms[0].filepath.value = href.replace(/file:(\/\/\/\/\/)/gi, "");
function init() { var text = tinyMCE.getWindowArg('text').toString(); var href = tinyMCE.getWindowArg('href').toString(); document.forms[0].wiki_text.value = text; document.forms[0].web_text.value = text; document.forms[0].file_text.value = text; document.forms[0].attach_text.value = text; document.forms[0].email_text.value = text; if ((href != null) && (href != "")) { if (href.search(/(https?|ftp):\/\/[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#\/%=~_|]/gi)>-1) { mcTabs.displayTab('web_tab','web_panel'); document.forms[0].web_page.value = href; } else if (href.search(/wikiattachment:-:(.*?)/gi) > -1) { mcTabs.displayTab('attachments_tab','attachments_panel'); document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, "").replace(/%20/gi, " "); } else if (href.search(/mailto:(.*?)/gi) > -1) { mcTabs.displayTab('email_tab','email_panel') document.forms[0].email.value = href.replace(/mailto:/gi, ""); } else if (href.search(/file:(\/\/\/\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); document.forms[0].filepath.value = href.replace(/file:(\/\/\/\/\/)/gi, ""); } else if (href.search(/file:(\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); document.forms[0].filepath.value = href.replace(/file:(\/\/)/gi, ""); } else { mcTabs.displayTab('wiki_tab','wiki_panel'); var space = "", whref = href; if (href.indexOf(".") > -1) { space = href.substring(0, href.indexOf(".")); whref = href.substring(href.indexOf(".") + 1, href.length); } document.forms[0].wiki_space.value = space; document.forms[0].wiki_page.value = whref; } } document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); var className = tinyMCE.getWindowArg('className'); var editor_id = tinyMCE.getWindowArg('editor_id');}
document.forms[0].filepath.value = href.replace(/file:(\/\/)/gi, "");
function init() { var text = tinyMCE.getWindowArg('text').toString(); var href = tinyMCE.getWindowArg('href').toString(); document.forms[0].wiki_text.value = text; document.forms[0].web_text.value = text; document.forms[0].file_text.value = text; document.forms[0].attach_text.value = text; document.forms[0].email_text.value = text; if ((href != null) && (href != "")) { if (href.search(/(https?|ftp):\/\/[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#\/%=~_|]/gi)>-1) { mcTabs.displayTab('web_tab','web_panel'); document.forms[0].web_page.value = href; } else if (href.search(/wikiattachment:-:(.*?)/gi) > -1) { mcTabs.displayTab('attachments_tab','attachments_panel'); document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, "").replace(/%20/gi, " "); } else if (href.search(/mailto:(.*?)/gi) > -1) { mcTabs.displayTab('email_tab','email_panel') document.forms[0].email.value = href.replace(/mailto:/gi, ""); } else if (href.search(/file:(\/\/\/\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); document.forms[0].filepath.value = href.replace(/file:(\/\/\/\/\/)/gi, ""); } else if (href.search(/file:(\/\/)(.*?)/gi) > -1) { mcTabs.displayTab('file_tab','file_panel'); document.forms[0].filepath.value = href.replace(/file:(\/\/)/gi, ""); } else { mcTabs.displayTab('wiki_tab','wiki_panel'); var space = "", whref = href; if (href.indexOf(".") > -1) { space = href.substring(0, href.indexOf(".")); whref = href.substring(href.indexOf(".") + 1, href.length); } document.forms[0].wiki_space.value = space; document.forms[0].wiki_page.value = whref; } } document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); var className = tinyMCE.getWindowArg('className'); var editor_id = tinyMCE.getWindowArg('editor_id');}
document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, "");
document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, "").replace(/%20/gi, " ");
function init() { var text = tinyMCE.getWindowArg('text').toString(); var href = tinyMCE.getWindowArg('href').toString(); document.forms[0].wiki_text.value = text; document.forms[0].web_text.value = text; document.forms[0].attach_text.value = text; document.forms[0].email_text.value = text; if ((href != null) && (href != "")) { if (href.search(/(https?|ftp):\/\/[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#\/%=~_|]/gi)>-1) { mcTabs.displayTab('web_tab','web_panel'); document.forms[0].web_page.value = href; } else if (href.search(/wikiattachment:-:(.*?)/gi) > -1) { mcTabs.displayTab('attachments_tab','attachments_panel'); document.forms[0].attach.value = href.replace(/wikiattachment:-:/gi, ""); } else if (href.search(/mailto:(.*?)/gi) > -1) { mcTabs.displayTab('email_tab','email_panel') document.forms[0].email.value = href.replace(/mailto:/gi, ""); } else { mcTabs.displayTab('wiki_tab','wiki_panel'); var space = "", whref = href; if (href.indexOf(".") > -1) { space = href.substring(0, href.indexOf(".")); whref = href.substring(href.indexOf(".") + 1, href.length); } document.forms[0].wiki_space.value = space; document.forms[0].wiki_page.value = whref; } } document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); var className = tinyMCE.getWindowArg('className'); var editor_id = tinyMCE.getWindowArg('editor_id');}
tinyMCEPopup.resizeToInnerSize();
function init() { var formObj = document.forms[0]; formObj.width.value = tinyMCE.getWindowArg('width'); formObj.size.value = tinyMCE.getWindowArg('size'); formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true); if (tinyMCE.getWindowArg('noshade')) { formObj.noshade.checked = true; } if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) { formObj.width2.value = "%"; formObj.width.value = formObj.width.value.substring(0,formObj.width.value.length-1); }}
var ce = document.getElementById('container');
var ce = document.getElementById('container'), h;
function init() { var ce = document.getElementById('container'); ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); tinyMCEPopup.resizeToInnerSize(); document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); TinyMCE_EditableSelects.init(); setupFormData(); showDisabledControls();}
h = getBrowserHTML('background_image_browser','background_image','image','advimage'); document.getElementById("background_image_browser").innerHTML = h;
function init() { var ce = document.getElementById('container'); ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); tinyMCEPopup.resizeToInnerSize(); document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); TinyMCE_EditableSelects.init(); setupFormData(); showDisabledControls();}
document.forms[0].href.value = tinyMCE.getWindowArg('src');;
var href = tinyMCE.getWindowArg('src') document.forms[0].href.value = href.replace(/%20/gi, " ");
function init() { editor_id = tinyMCE.getWindowArg('editor_id'); document.forms[0].href.value = tinyMCE.getWindowArg('src');; document.forms[0].width.value = tinyMCE.getWindowArg('width'); document.forms[0].height.value = tinyMCE.getWindowArg('height'); for (var i=0; i<document.forms[0].align.options.length; i++) { if (document.forms[0].align.options[i].value == tinyMCE.getWindowArg('align')) document.forms[0].align.options.selectedIndex = i; } document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);}
this.addExternalProcessor((/{\s*attach\s*:\s*(.*?)(\|(.*?))?}/i), 'convertAttachmentExternal');
this.addExternalProcessorBefore("convertTableExternal", (/{\s*attach\s*:\s*(.*?)(\|(.*?))?}/i), 'convertAttachmentExternal');
WikiEditor.prototype.initAttachmentsPlugin = function() { if(!this.isPluginLoaded('core')) { alert("Attachment Plugin: You must load the core syntax plugin before!"); return; } this.addExternalProcessorBefore("convertTableExternal", (/{\s*image\s*:\s*(.*?)(\|(.*?))?(\|(.*?))?(\|(.*?))?}/i), 'convertImageExternal'); this.addInternalProcessor((/<img\s*([^>]*)(class=\"wikiimage\")\s*([^>]*)\/>/i), 'convertImageInternal'); this.addExternalProcessor((/{\s*attach\s*:\s*(.*?)(\|(.*?))?}/i), 'convertAttachmentExternal'); this.addInternalProcessorBefore('convertLinkInternal', (/<a\s*href=\"wikiattachment:-:(.*?)\"\s*([^>]*)>(.*?)<\/a>/i), 'convertAttachmentInternal'); this.addToolbarHandler('handleAttachmentsButtons'); this.addCommand('wikiAttachment', 'attachmentCommand'); this.addCommand('mceImage', 'imageCommand');}
this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal');
this.addInternalProcessor((/<p[^>]*>&nbsp;<\/p>/gi), ""); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal');
WikiEditor.prototype.initCorePlugin = function() { // External/Internal conversion setup this.addExternalProcessor((/^\s*(1(\.1)*)\s+([^\r\n]*)$/im), 'convertHeadingExternal'); this.addInternalProcessor((/\s*<h3\s*([^>]*)>([\s\S]+?)<\/h3>/i), 'convertHeadingInternal'); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal'); this.addInternalProcessor((/\s*<(ul|ol)\s*([^>]*)>/i), 'convertListInternal'); this.addExternalProcessor((/^s*----(\-)*\s*$/gim), '<hr class="line" \/>'); this.addInternalProcessor((/<hr[^>]*>/gi), '----'); // Must remove the html tag format so it won't interfere with paragraph conversion this.addExternalProcessor((/<%([\s\S]+?)%>/ig), '&lt;%$1%&gt;'); this.addExternalProcessor((/((\s|\S)*)/i), 'convertParagraphExternal'); this.addInternalProcessor((/<\s*p\s*([^>]*)>(.*?)<\s*\/\s*p\s*>/gi), '\r\n$2\r\n'); this.addExternalProcessor((/\[(.*?)(>(.*?))?\]/i), 'convertLinkExternal'); this.addInternalProcessor((/<a\s*([^>]*)(class=\"wikiexternallink\"|class=\"wikilink\")\s*([^>]*)>(.*?)<\/a>/i), 'convertLinkInternal'); this.addExternalProcessor((/\{table\}([\s\S]+?)\{table\}/i), 'convertTableExternal'); this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal'); this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>'); this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>'); this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*'); this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>'); this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~'); this.addExternalProcessor((/--(.+?)--/gi), '<strike class="strike">$1<\/strike>'); this.addInternalProcessor((/<strike[^>]*>(.*?)<\/strike>/gi), '--$1--'); this.addInternalProcessor((/[#$][a-zA-Z0-9-_.]+\(([^&)]*&quot;[^)]*)+?\)/i), 'convertVelocityScriptsInternal'); this.addInternalProcessor((/&lt;%([\s\S]+?)%&gt;/i), 'convertGroovyScriptsInternal'); //this.addInternalProcessor((/&nbsp;(?!\|)/gi), ""); var charStr = "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "?||||||" + "|||" + // Commercial symbols: "?||||?||" + "||" + //Other characters ">|<|&|\""; var characterEntityStr = "&Agrave;|&Aacute;|&Acirc;|&Atilde;|&Auml;|&Aring;|" + "&AElig;|&Ccedil;|&Egrave;|&Eacute;|&Ecirc;|&Euml;|" + "&Igrave;|&Iacute;|&Icirc;|&Iuml;|&Ntilde;|&Ograve;|" + "&Oacute;|&Ocirc;|&Otilde;|&Ouml;|&Oslash;|&Ugrave;|" + "&Uacute;|&Ucirc;|&Uuml;|&szlig;|&agrave;|&aacute;|" + "&acirc;|&atilde;|&auml;|&aring;|&aelig;|&ccedil;|" + "&egrave;|&eacute;|&ecirc;|&euml;|&igrave;|&iacute;|" + "&icirc;|&iuml;|&ntilde;|&ograve;|&oacute;|&ocirc;|" + "&oelig;|&otilde;|&ouml;|&oslash;|&ugrave;|&uacute;|" + "&ucirc;|&uuml;|&yuml;|" + // Commercial symbols: "&trade;|&copy;|&reg;|&cent;|&euro;|&yen;|" + "&pound;|&curren;|" + //Other characters "&gt;|&lt;|&amp;|&quot;" var characterEntitys = characterEntityStr.split("|"); var chars = charStr.split("|"); for (var i= 0; i< characterEntitys.length; i++) { var regExp = new RegExp(characterEntitys[i],'g'); this.addInternalProcessor((regExp), chars[i]); } this.setHtmlTagRemover('removeHtmlTags_Groovy'); this.setHtmlTagRemover('removeSpecialHtmlTags'); // Toolbar handlers this.addToolbarHandler('handleTextButtons'); this.addToolbarHandler('handleListButtons'); this.addToolbarHandler('handleIndentButtons'); this.addToolbarHandler('handleUndoButtons'); this.addToolbarHandler('handleTitlesList'); this.addToolbarHandler('handleLinkButtons'); this.addToolbarHandler('handleTableButtons'); // Add Comands and Fix Commands(workarounds) this.addCommand('Title', 'titleCommand'); this.addFixCommand('Title', 'fixTitle'); this.addFixCommand("InsertUnorderedList", 'fixInsertUnorderedList'); this.addFixCommand("Indent", 'fixInsertUnorderedList');}
"?||||||" +
"||||||" +
WikiEditor.prototype.initCorePlugin = function() { // External/Internal conversion setup this.addExternalProcessor((/^\s*(1(\.1)*)\s+([^\r\n]*)$/im), 'convertHeadingExternal'); this.addInternalProcessor((/\s*<h3\s*([^>]*)>([\s\S]+?)<\/h3>/i), 'convertHeadingInternal'); this.addInternalProcessor((/<p[^>]*>&nbsp;<\/p>/gi), ""); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal'); this.addInternalProcessor((/\s*<(ul|ol)\s*([^>]*)>/i), 'convertListInternal'); this.addExternalProcessor((/^s*----(\-)*\s*$/gim), '<hr class="line" \/>'); this.addInternalProcessor((/<hr[^>]*>/gi), '----'); // Must remove the html tag format so it won't interfere with paragraph conversion this.addExternalProcessor((/<%([\s\S]+?)%>/ig), '&lt;%$1%&gt;'); this.addExternalProcessor((/\{style:\s*(.*?)\}([\s\S]+?)\{style\}/i), 'convertStyleExternal'); this.addInternalProcessor((/<(font|span|div)\s*(.*?)>([\s\S]+?)<\/(font|span|div)>/i), 'convertStyleInternal'); this.addExternalProcessor((/((\s|\S)*)/i), 'convertParagraphExternal'); this.addInternalProcessor((/<\s*p\s*([^>]*)>(.*?)<\s*\/\s*p\s*>/gi), '\r\n$2\r\n'); this.addExternalProcessor((/\[(.*?)(>(.*?))?\]/i), 'convertLinkExternal'); this.addInternalProcessor((/<a\s*([^>]*)(class=\"wikiexternallink\"|class=\"wikilink\")\s*([^>]*)>(.*?)<\/a>/i), 'convertLinkInternal'); this.addExternalProcessor((/\{table\}([\s\S]+?)\{table\}/i), 'convertTableExternal'); this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal'); this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>'); this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>'); this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*'); this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>'); this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~'); this.addExternalProcessor((/--(.+?)--/gi), '<strike class="strike">$1<\/strike>'); this.addInternalProcessor((/<strike[^>]*>(.*?)<\/strike>/gi), '--$1--'); this.addInternalProcessor((/[#$][a-zA-Z0-9-_.]+\(([^&)]*&quot;[^)]*)+?\)/i), 'convertVelocityScriptsInternal'); this.addInternalProcessor((/&lt;%([\s\S]+?)%&gt;/i), 'convertGroovyScriptsInternal'); //this.addInternalProcessor((/&nbsp;(?!\|)/gi), ""); var charStr = "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "?||||||" + "|||" + // Commercial symbols: "?||||?||" + "||" + //Other characters ">|<|&|\""; var characterEntityStr = "&Agrave;|&Aacute;|&Acirc;|&Atilde;|&Auml;|&Aring;|" + "&AElig;|&Ccedil;|&Egrave;|&Eacute;|&Ecirc;|&Euml;|" + "&Igrave;|&Iacute;|&Icirc;|&Iuml;|&Ntilde;|&Ograve;|" + "&Oacute;|&Ocirc;|&Otilde;|&Ouml;|&Oslash;|&Ugrave;|" + "&Uacute;|&Ucirc;|&Uuml;|&szlig;|&agrave;|&aacute;|" + "&acirc;|&atilde;|&auml;|&aring;|&aelig;|&ccedil;|" + "&egrave;|&eacute;|&ecirc;|&euml;|&igrave;|&iacute;|" + "&icirc;|&iuml;|&ntilde;|&ograve;|&oacute;|&ocirc;|" + "&oelig;|&otilde;|&ouml;|&oslash;|&ugrave;|&uacute;|" + "&ucirc;|&uuml;|&yuml;|" + // Commercial symbols: "&trade;|&copy;|&reg;|&cent;|&euro;|&yen;|" + "&pound;|&curren;|" + //Other characters "&gt;|&lt;|&amp;|&quot;" var characterEntitys = characterEntityStr.split("|"); var chars = charStr.split("|"); for (var i= 0; i< characterEntitys.length; i++) { var regExp = new RegExp(characterEntitys[i],'g'); this.addInternalProcessor((regExp), chars[i]); } this.setHtmlTagRemover('removeHtmlTags_Groovy'); this.setHtmlTagRemover('removeSpecialHtmlTags'); // Toolbar handlers this.addToolbarHandler('handleTextButtons'); this.addToolbarHandler('handleListButtons'); this.addToolbarHandler('handleIndentButtons'); this.addToolbarHandler('handleUndoButtons'); this.addToolbarHandler('handleTitlesList'); this.addToolbarHandler('handleLinkButtons'); this.addToolbarHandler('handleTableButtons'); // Add Comands and Fix Commands(workarounds) this.addCommand('Title', 'titleCommand'); this.addFixCommand('Title', 'fixTitle'); this.addFixCommand("InsertUnorderedList", 'fixInsertUnorderedList'); this.addFixCommand("Indent", 'fixInsertUnorderedList');}
"?||||?||" +
"||||||" +
WikiEditor.prototype.initCorePlugin = function() { // External/Internal conversion setup this.addExternalProcessor((/^\s*(1(\.1)*)\s+([^\r\n]*)$/im), 'convertHeadingExternal'); this.addInternalProcessor((/\s*<h3\s*([^>]*)>([\s\S]+?)<\/h3>/i), 'convertHeadingInternal'); this.addInternalProcessor((/<p[^>]*>&nbsp;<\/p>/gi), ""); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal'); this.addInternalProcessor((/\s*<(ul|ol)\s*([^>]*)>/i), 'convertListInternal'); this.addExternalProcessor((/^s*----(\-)*\s*$/gim), '<hr class="line" \/>'); this.addInternalProcessor((/<hr[^>]*>/gi), '----'); // Must remove the html tag format so it won't interfere with paragraph conversion this.addExternalProcessor((/<%([\s\S]+?)%>/ig), '&lt;%$1%&gt;'); this.addExternalProcessor((/\{style:\s*(.*?)\}([\s\S]+?)\{style\}/i), 'convertStyleExternal'); this.addInternalProcessor((/<(font|span|div)\s*(.*?)>([\s\S]+?)<\/(font|span|div)>/i), 'convertStyleInternal'); this.addExternalProcessor((/((\s|\S)*)/i), 'convertParagraphExternal'); this.addInternalProcessor((/<\s*p\s*([^>]*)>(.*?)<\s*\/\s*p\s*>/gi), '\r\n$2\r\n'); this.addExternalProcessor((/\[(.*?)(>(.*?))?\]/i), 'convertLinkExternal'); this.addInternalProcessor((/<a\s*([^>]*)(class=\"wikiexternallink\"|class=\"wikilink\")\s*([^>]*)>(.*?)<\/a>/i), 'convertLinkInternal'); this.addExternalProcessor((/\{table\}([\s\S]+?)\{table\}/i), 'convertTableExternal'); this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal'); this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>'); this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>'); this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*'); this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>'); this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~'); this.addExternalProcessor((/--(.+?)--/gi), '<strike class="strike">$1<\/strike>'); this.addInternalProcessor((/<strike[^>]*>(.*?)<\/strike>/gi), '--$1--'); this.addInternalProcessor((/[#$][a-zA-Z0-9-_.]+\(([^&)]*&quot;[^)]*)+?\)/i), 'convertVelocityScriptsInternal'); this.addInternalProcessor((/&lt;%([\s\S]+?)%&gt;/i), 'convertGroovyScriptsInternal'); //this.addInternalProcessor((/&nbsp;(?!\|)/gi), ""); var charStr = "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "?||||||" + "|||" + // Commercial symbols: "?||||?||" + "||" + //Other characters ">|<|&|\""; var characterEntityStr = "&Agrave;|&Aacute;|&Acirc;|&Atilde;|&Auml;|&Aring;|" + "&AElig;|&Ccedil;|&Egrave;|&Eacute;|&Ecirc;|&Euml;|" + "&Igrave;|&Iacute;|&Icirc;|&Iuml;|&Ntilde;|&Ograve;|" + "&Oacute;|&Ocirc;|&Otilde;|&Ouml;|&Oslash;|&Ugrave;|" + "&Uacute;|&Ucirc;|&Uuml;|&szlig;|&agrave;|&aacute;|" + "&acirc;|&atilde;|&auml;|&aring;|&aelig;|&ccedil;|" + "&egrave;|&eacute;|&ecirc;|&euml;|&igrave;|&iacute;|" + "&icirc;|&iuml;|&ntilde;|&ograve;|&oacute;|&ocirc;|" + "&oelig;|&otilde;|&ouml;|&oslash;|&ugrave;|&uacute;|" + "&ucirc;|&uuml;|&yuml;|" + // Commercial symbols: "&trade;|&copy;|&reg;|&cent;|&euro;|&yen;|" + "&pound;|&curren;|" + //Other characters "&gt;|&lt;|&amp;|&quot;" var characterEntitys = characterEntityStr.split("|"); var chars = charStr.split("|"); for (var i= 0; i< characterEntitys.length; i++) { var regExp = new RegExp(characterEntitys[i],'g'); this.addInternalProcessor((regExp), chars[i]); } this.setHtmlTagRemover('removeHtmlTags_Groovy'); this.setHtmlTagRemover('removeSpecialHtmlTags'); // Toolbar handlers this.addToolbarHandler('handleTextButtons'); this.addToolbarHandler('handleListButtons'); this.addToolbarHandler('handleIndentButtons'); this.addToolbarHandler('handleUndoButtons'); this.addToolbarHandler('handleTitlesList'); this.addToolbarHandler('handleLinkButtons'); this.addToolbarHandler('handleTableButtons'); // Add Comands and Fix Commands(workarounds) this.addCommand('Title', 'titleCommand'); this.addFixCommand('Title', 'fixTitle'); this.addFixCommand("InsertUnorderedList", 'fixInsertUnorderedList'); this.addFixCommand("Indent", 'fixInsertUnorderedList');}
this.addExternalProcessor((/\{style:\s*(.*?)\}([\s\S]+?)\{style\}/i), 'convertStyleExternal'); this.addInternalProcessor((/<(font|span|div)\s*(.*?)>([\s\S]+?)<\/(font|span|div)>/i), 'convertStyleInternal');
this.addExternalProcessorBefore('convertTableExternal', (/\{style:\s*(.*?)\}([\s\S]+?)\{style\}/i), 'convertStyleExternal'); this.addInternalProcessorBefore('convertTableInternal', (/<(font|span|div)\s*(.*?)>([\s\S]+?)<\/(font|span|div)>/i), 'convertStyleInternal');
WikiEditor.prototype.initCorePlugin = function() { // External/Internal conversion setup this.addExternalProcessor((/^\s*(1(\.1)*)\s+([^\r\n]*)$/im), 'convertHeadingExternal'); this.addInternalProcessor((/\s*<h3\s*([^>]*)>([\s\S]+?)<\/h3>/i), 'convertHeadingInternal'); this.addInternalProcessor((/<p[^>]*>&nbsp;<\/p>/gi), ""); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal'); this.addInternalProcessor((/\s*<(ul|ol)\s*([^>]*)>/i), 'convertListInternal'); this.addExternalProcessor((/^s*----(\-)*\s*$/gim), '<hr class="line" \/>'); this.addInternalProcessor((/<hr[^>]*>/gi), '----'); // Must remove the html tag format so it won't interfere with paragraph conversion this.addExternalProcessor((/<%([\s\S]+?)%>/ig), '&lt;%$1%&gt;'); this.addExternalProcessor((/((\s|\S)*)/i), 'convertParagraphExternal'); this.addInternalProcessor((/<\s*p\s*([^>]*)>(.*?)<\s*\/\s*p\s*>/gi), '\r\n$2\r\n'); this.addExternalProcessor((/\[(.*?)(>(.*?))?(>(.*?))?\]/i), 'convertLinkExternal'); this.addInternalProcessor((/<a\s*([^>]*)(class=\"wikiexternallink\"|class=\"wikilink\")\s*([^>]*)>(.*?)<\/a>/i), 'convertLinkInternal'); this.addExternalProcessor((/\{table\}([\s\S]+?)\{table\}/i), 'convertTableExternal'); this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal'); this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>'); this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>'); this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*'); this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>'); this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~'); this.addExternalProcessor((/--(.+?)--/gi), '<strike class="strike">$1<\/strike>'); this.addInternalProcessor((/<strike[^>]*>(.*?)<\/strike>/gi), '--$1--'); this.addInternalProcessor((/[#$][a-zA-Z0-9-_.]+\(([^&)]*&quot;[^)]*)+?\)/i), 'convertVelocityScriptsInternal'); this.addInternalProcessor((/&lt;%([\s\S]+?)%&gt;/i), 'convertGroovyScriptsInternal'); this.addExternalProcessor((/\{style:\s*(.*?)\}([\s\S]+?)\{style\}/i), 'convertStyleExternal'); this.addInternalProcessor((/<(font|span|div)\s*(.*?)>([\s\S]+?)<\/(font|span|div)>/i), 'convertStyleInternal'); //this.addInternalProcessor((/&nbsp;(?!\|)/gi), ""); this.setHtmlTagRemover('removeHtmlTags_Groovy'); this.setHtmlTagRemover('removeSpecialHtmlTags'); // Toolbar handlers this.addToolbarHandler('handleTextButtons'); this.addToolbarHandler('handleListButtons'); this.addToolbarHandler('handleIndentButtons'); this.addToolbarHandler('handleUndoButtons'); this.addToolbarHandler('handleTitlesList'); this.addToolbarHandler('handleLinkButtons'); this.addToolbarHandler('handleTableButtons'); // Add Comands and Fix Commands(workarounds) this.addCommand('Title', 'titleCommand'); this.addFixCommand('Title', 'fixTitle'); this.addFixCommand("InsertUnorderedList", 'fixInsertUnorderedList'); this.addFixCommand("Indent", 'fixInsertUnorderedList');}
this.addInternalProcessor((/&nbsp;(?!\|)/gi), "");
WikiEditor.prototype.initCorePlugin = function() { // External/Internal conversion setup this.addExternalProcessor((/^\s*(1(\.1)*)\s+([^\r\n]*)$/im), 'convertHeadingExternal'); this.addInternalProcessor((/\s*<h3\s*([^>]*)>([\s\S]+?)<\/h3>/i), 'convertHeadingInternal'); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal'); this.addInternalProcessor((/\s*<(ul|ol)\s*([^>]*)>/i), 'convertListInternal'); this.addExternalProcessor((/^s*----(\-)*\s*$/gim), '<hr class="line" \/>'); this.addInternalProcessor((/<hr[^>]*>/gi), '----'); // Must remove the html tag format so it won't interfere with paragraph conversion this.addExternalProcessor((/<%([\s\S]+?)%>/ig), '&lt;%$1%&gt;'); this.addExternalProcessor((/((\s|\S)*)/i), 'convertParagraphExternal'); this.addInternalProcessor((/<\s*p\s*([^>]*)>(.*?)<\s*\/\s*p\s*>/gi), '\r\n$2\r\n'); this.addExternalProcessor((/\[(.*?)(>(.*?))?\]/i), 'convertLinkExternal'); this.addInternalProcessor((/<a\s*([^>]*)(class=\"wikiexternallink\"|class=\"wikilink\")\s*([^>]*)>(.*?)<\/a>/i), 'convertLinkInternal'); this.addExternalProcessor((/\{table\}([\s\S]+?)\{table\}/i), 'convertTableExternal'); this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal'); this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>'); this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>'); this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*'); this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>'); this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~'); this.addExternalProcessor((/--(.+?)--/gi), '<strike class="strike">$1<\/strike>'); this.addInternalProcessor((/<strike[^>]*>(.*?)<\/strike>/gi), '--$1--'); this.addInternalProcessor((/[#$][a-zA-Z0-9-_.]+\(([^&)]*&quot;[^)]*)+?\)/i), 'convertVelocityScriptsInternal'); this.addInternalProcessor((/&lt;%([\s\S]+?)%&gt;/i), 'convertGroovyScriptsInternal'); // Remove &nbsp;'s this.addInternalProcessor((/&nbsp;(?!\|)/gi), ""); var charStr = "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "?||||||" + "|||" + // Commercial symbols: "?||||?||" + "||" + //Other characters ">|<|&|\""; var characterEntityStr = "&Agrave;|&Aacute;|&Acirc;|&Atilde;|&Auml;|&Aring;|" + "&AElig;|&Ccedil;|&Egrave;|&Eacute;|&Ecirc;|&Euml;|" + "&Igrave;|&Iacute;|&Icirc;|&Iuml;|&Ntilde;|&Ograve;|" + "&Oacute;|&Ocirc;|&Otilde;|&Ouml;|&Oslash;|&Ugrave;|" + "&Uacute;|&Ucirc;|&Uuml;|&szlig;|&agrave;|&aacute;|" + "&acirc;|&atilde;|&auml;|&aring;|&aelig;|&ccedil;|" + "&egrave;|&eacute;|&ecirc;|&euml;|&igrave;|&iacute;|" + "&icirc;|&iuml;|&ntilde;|&ograve;|&oacute;|&ocirc;|" + "&oelig;|&otilde;|&ouml;|&oslash;|&ugrave;|&uacute;|" + "&ucirc;|&uuml;|&yuml;|" + // Commercial symbols: "&trade;|&copy;|&reg;|&cent;|&euro;|&yen;|" + "&pound;|&curren;|" + //Other characters "&gt;|&lt;|&amp;|&quot;" var characterEntitys = characterEntityStr.split("|"); var chars = charStr.split("|"); for (var i= 0; i< characterEntitys.length; i++) { var regExp = new RegExp(characterEntitys[i],'g'); this.addInternalProcessor((regExp), chars[i]); } this.setHtmlTagRemover('removeHtmlTags_Groovy'); this.setHtmlTagRemover('removeSpecialHtmlTags'); // Toolbar handlers this.addToolbarHandler('handleTextButtons'); this.addToolbarHandler('handleListButtons'); this.addToolbarHandler('handleIndentButtons'); this.addToolbarHandler('handleUndoButtons'); this.addToolbarHandler('handleTitlesList'); this.addToolbarHandler('handleLinkButtons'); this.addToolbarHandler('handleTableButtons'); // Add Comands and Fix Commands(workarounds) this.addCommand('Title', 'titleCommand'); this.addFixCommand('Title', 'fixTitle'); this.addFixCommand("InsertUnorderedList", 'fixInsertUnorderedList'); this.addFixCommand("Indent", 'fixInsertUnorderedList');}
"?||||||" +
"||||||" +
WikiEditor.prototype.initCorePlugin = function() { // External/Internal conversion setup this.addExternalProcessor((/^\s*(1(\.1)*)\s+([^\r\n]*)$/im), 'convertHeadingExternal'); this.addInternalProcessor((/\s*<h3\s*([^>]*)>([\s\S]+?)<\/h3>/i), 'convertHeadingInternal'); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal'); this.addInternalProcessor((/\s*<(ul|ol)\s*([^>]*)>/i), 'convertListInternal'); this.addExternalProcessor((/^s*----(\-)*\s*$/gim), '<hr class="line" \/>'); this.addInternalProcessor((/<hr[^>]*>/gi), '----'); // Must remove the html tag format so it won't interfere with paragraph conversion this.addExternalProcessor((/<%([\s\S]+?)%>/ig), '&lt;%$1%&gt;'); this.addExternalProcessor((/((\s|\S)*)/i), 'convertParagraphExternal'); this.addInternalProcessor((/<\s*p\s*([^>]*)>(.*?)<\s*\/\s*p\s*>/gi), '\r\n$2\r\n'); this.addExternalProcessor((/\[(.*?)(>(.*?))?\]/i), 'convertLinkExternal'); this.addInternalProcessor((/<a\s*([^>]*)(class=\"wikiexternallink\"|class=\"wikilink\")\s*([^>]*)>(.*?)<\/a>/i), 'convertLinkInternal'); // Must convert external images inside table before convert the table this.addExternalProcessor((/{\s*image\s*:\s*(.*?)(\|(.*?))?(\|(.*?))?(\|(.*?))?}/i), 'convertImageExternal'); this.addExternalProcessor((/\{table\}([\s\S]+?)\{table\}/i), 'convertTableExternal'); this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal'); this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>'); this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>'); this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*'); this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>'); this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~'); this.addExternalProcessor((/--(.+?)--/gi), '<strike class="strike">$1<\/strike>'); this.addInternalProcessor((/<strike[^>]*>(.*?)<\/strike>/gi), '--$1--'); this.addInternalProcessor((/[#$][a-zA-Z0-9-_.]+\(([^&)]*&quot;[^)]*)+?\)/i), 'convertVelocityScriptsInternal'); this.addInternalProcessor((/&lt;%([\s\S]+?)%&gt;/i), 'convertGroovyScriptsInternal'); // Remove &nbsp;'s this.addInternalProcessor((/&nbsp;(?!\|)/gi), ""); var charStr = "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "?||||||" + "|||" + // Commercial symbols: "?||||?||" + "||" + //Other characters ">|<|&|\""; var characterEntityStr = "&Agrave;|&Aacute;|&Acirc;|&Atilde;|&Auml;|&Aring;|" + "&AElig;|&Ccedil;|&Egrave;|&Eacute;|&Ecirc;|&Euml;|" + "&Igrave;|&Iacute;|&Icirc;|&Iuml;|&Ntilde;|&Ograve;|" + "&Oacute;|&Ocirc;|&Otilde;|&Ouml;|&Oslash;|&Ugrave;|" + "&Uacute;|&Ucirc;|&Uuml;|&szlig;|&agrave;|&aacute;|" + "&acirc;|&atilde;|&auml;|&aring;|&aelig;|&ccedil;|" + "&egrave;|&eacute;|&ecirc;|&euml;|&igrave;|&iacute;|" + "&icirc;|&iuml;|&ntilde;|&ograve;|&oacute;|&ocirc;|" + "&oelig;|&otilde;|&ouml;|&oslash;|&ugrave;|&uacute;|" + "&ucirc;|&uuml;|&yuml;|" + // Commercial symbols: "&trade;|&copy;|&reg;|&cent;|&euro;|&yen;|" + "&pound;|&curren;|" + //Other characters "&gt;|&lt;|&amp;|&quot;" var characterEntitys = characterEntityStr.split("|"); var chars = charStr.split("|"); for (var i= 0; i< characterEntitys.length; i++) { var regExp = new RegExp(characterEntitys[i],'g'); this.addInternalProcessor((regExp), chars[i]); } this.setHtmlTagRemover('removeHtmlTags_Groovy'); this.setHtmlTagRemover('removeSpecialHtmlTags'); // Toolbar handlers this.addToolbarHandler('handleTextButtons'); this.addToolbarHandler('handleListButtons'); this.addToolbarHandler('handleIndentButtons'); this.addToolbarHandler('handleUndoButtons'); this.addToolbarHandler('handleTitlesList'); this.addToolbarHandler('handleLinkButtons'); this.addToolbarHandler('handleTableButtons'); // Add Comands and Fix Commands(workarounds) this.addCommand('Title', 'titleCommand'); this.addFixCommand('Title', 'fixTitle'); this.addFixCommand("InsertUnorderedList", 'fixInsertUnorderedList'); this.addFixCommand("Indent", 'fixInsertUnorderedList');}
"?||||?||" +
"||||||" +
WikiEditor.prototype.initCorePlugin = function() { // External/Internal conversion setup this.addExternalProcessor((/^\s*(1(\.1)*)\s+([^\r\n]*)$/im), 'convertHeadingExternal'); this.addInternalProcessor((/\s*<h3\s*([^>]*)>([\s\S]+?)<\/h3>/i), 'convertHeadingInternal'); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal'); this.addInternalProcessor((/\s*<(ul|ol)\s*([^>]*)>/i), 'convertListInternal'); this.addExternalProcessor((/^s*----(\-)*\s*$/gim), '<hr class="line" \/>'); this.addInternalProcessor((/<hr[^>]*>/gi), '----'); // Must remove the html tag format so it won't interfere with paragraph conversion this.addExternalProcessor((/<%([\s\S]+?)%>/ig), '&lt;%$1%&gt;'); this.addExternalProcessor((/((\s|\S)*)/i), 'convertParagraphExternal'); this.addInternalProcessor((/<\s*p\s*([^>]*)>(.*?)<\s*\/\s*p\s*>/gi), '\r\n$2\r\n'); this.addExternalProcessor((/\[(.*?)(>(.*?))?\]/i), 'convertLinkExternal'); this.addInternalProcessor((/<a\s*([^>]*)(class=\"wikiexternallink\"|class=\"wikilink\")\s*([^>]*)>(.*?)<\/a>/i), 'convertLinkInternal'); // Must convert external images inside table before convert the table this.addExternalProcessor((/{\s*image\s*:\s*(.*?)(\|(.*?))?(\|(.*?))?(\|(.*?))?}/i), 'convertImageExternal'); this.addExternalProcessor((/\{table\}([\s\S]+?)\{table\}/i), 'convertTableExternal'); this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal'); this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>'); this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>'); this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*'); this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>'); this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~'); this.addExternalProcessor((/--(.+?)--/gi), '<strike class="strike">$1<\/strike>'); this.addInternalProcessor((/<strike[^>]*>(.*?)<\/strike>/gi), '--$1--'); this.addInternalProcessor((/[#$][a-zA-Z0-9-_.]+\(([^&)]*&quot;[^)]*)+?\)/i), 'convertVelocityScriptsInternal'); this.addInternalProcessor((/&lt;%([\s\S]+?)%&gt;/i), 'convertGroovyScriptsInternal'); // Remove &nbsp;'s this.addInternalProcessor((/&nbsp;(?!\|)/gi), ""); var charStr = "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "||||||" + "?||||||" + "|||" + // Commercial symbols: "?||||?||" + "||" + //Other characters ">|<|&|\""; var characterEntityStr = "&Agrave;|&Aacute;|&Acirc;|&Atilde;|&Auml;|&Aring;|" + "&AElig;|&Ccedil;|&Egrave;|&Eacute;|&Ecirc;|&Euml;|" + "&Igrave;|&Iacute;|&Icirc;|&Iuml;|&Ntilde;|&Ograve;|" + "&Oacute;|&Ocirc;|&Otilde;|&Ouml;|&Oslash;|&Ugrave;|" + "&Uacute;|&Ucirc;|&Uuml;|&szlig;|&agrave;|&aacute;|" + "&acirc;|&atilde;|&auml;|&aring;|&aelig;|&ccedil;|" + "&egrave;|&eacute;|&ecirc;|&euml;|&igrave;|&iacute;|" + "&icirc;|&iuml;|&ntilde;|&ograve;|&oacute;|&ocirc;|" + "&oelig;|&otilde;|&ouml;|&oslash;|&ugrave;|&uacute;|" + "&ucirc;|&uuml;|&yuml;|" + // Commercial symbols: "&trade;|&copy;|&reg;|&cent;|&euro;|&yen;|" + "&pound;|&curren;|" + //Other characters "&gt;|&lt;|&amp;|&quot;" var characterEntitys = characterEntityStr.split("|"); var chars = charStr.split("|"); for (var i= 0; i< characterEntitys.length; i++) { var regExp = new RegExp(characterEntitys[i],'g'); this.addInternalProcessor((regExp), chars[i]); } this.setHtmlTagRemover('removeHtmlTags_Groovy'); this.setHtmlTagRemover('removeSpecialHtmlTags'); // Toolbar handlers this.addToolbarHandler('handleTextButtons'); this.addToolbarHandler('handleListButtons'); this.addToolbarHandler('handleIndentButtons'); this.addToolbarHandler('handleUndoButtons'); this.addToolbarHandler('handleTitlesList'); this.addToolbarHandler('handleLinkButtons'); this.addToolbarHandler('handleTableButtons'); // Add Comands and Fix Commands(workarounds) this.addCommand('Title', 'titleCommand'); this.addFixCommand('Title', 'fixTitle'); this.addFixCommand("InsertUnorderedList", 'fixInsertUnorderedList'); this.addFixCommand("Indent", 'fixInsertUnorderedList');}
this.addExternalProcessor((/\{style:\s*(.*?)\}([\s\S]+?)\{style\}/i), 'convertStyleExternal'); this.addInternalProcessor((/<(font|span|div)\s*(.*?)>([\s\S]+?)<\/(font|span|div)>/i), 'convertStyleInternal');
WikiEditor.prototype.initCorePlugin = function() { // External/Internal conversion setup this.addExternalProcessor((/^\s*(1(\.1)*)\s+([^\r\n]*)$/im), 'convertHeadingExternal'); this.addInternalProcessor((/\s*<h3\s*([^>]*)>([\s\S]+?)<\/h3>/i), 'convertHeadingInternal'); this.addInternalProcessor((/<p[^>]*>&nbsp;<\/p>/gi), ""); this.addExternalProcessor((/^\s*((\*+)|#)\s+([^\r\n]+)$/im), 'convertListExternal'); this.addInternalProcessor((/\s*<(ul|ol)\s*([^>]*)>/i), 'convertListInternal'); this.addExternalProcessor((/^s*----(\-)*\s*$/gim), '<hr class="line" \/>'); this.addInternalProcessor((/<hr[^>]*>/gi), '----'); // Must remove the html tag format so it won't interfere with paragraph conversion this.addExternalProcessor((/<%([\s\S]+?)%>/ig), '&lt;%$1%&gt;'); this.addExternalProcessor((/\{style:\s*(.*?)\}([\s\S]+?)\{style\}/i), 'convertStyleExternal'); this.addInternalProcessor((/<(font|span|div)\s*(.*?)>([\s\S]+?)<\/(font|span|div)>/i), 'convertStyleInternal'); this.addExternalProcessor((/((\s|\S)*)/i), 'convertParagraphExternal'); this.addInternalProcessor((/<\s*p\s*([^>]*)>(.*?)<\s*\/\s*p\s*>/gi), '\r\n$2\r\n'); this.addExternalProcessor((/\[(.*?)(>(.*?))?(>(.*?))?\]/i), 'convertLinkExternal'); this.addInternalProcessor((/<a\s*([^>]*)(class=\"wikiexternallink\"|class=\"wikilink\")\s*([^>]*)>(.*?)<\/a>/i), 'convertLinkInternal'); this.addExternalProcessor((/\{table\}([\s\S]+?)\{table\}/i), 'convertTableExternal'); this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal'); this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>'); this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>'); this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*'); this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>'); this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~'); this.addExternalProcessor((/--(.+?)--/gi), '<strike class="strike">$1<\/strike>'); this.addInternalProcessor((/<strike[^>]*>(.*?)<\/strike>/gi), '--$1--'); this.addInternalProcessor((/[#$][a-zA-Z0-9-_.]+\(([^&)]*&quot;[^)]*)+?\)/i), 'convertVelocityScriptsInternal'); this.addInternalProcessor((/&lt;%([\s\S]+?)%&gt;/i), 'convertGroovyScriptsInternal'); //this.addInternalProcessor((/&nbsp;(?!\|)/gi), ""); this.setHtmlTagRemover('removeHtmlTags_Groovy'); this.setHtmlTagRemover('removeSpecialHtmlTags'); // Toolbar handlers this.addToolbarHandler('handleTextButtons'); this.addToolbarHandler('handleListButtons'); this.addToolbarHandler('handleIndentButtons'); this.addToolbarHandler('handleUndoButtons'); this.addToolbarHandler('handleTitlesList'); this.addToolbarHandler('handleLinkButtons'); this.addToolbarHandler('handleTableButtons'); // Add Comands and Fix Commands(workarounds) this.addCommand('Title', 'titleCommand'); this.addFixCommand('Title', 'fixTitle'); this.addFixCommand("InsertUnorderedList", 'fixInsertUnorderedList'); this.addFixCommand("Indent", 'fixInsertUnorderedList');}
if(Draggable._revertCache[this.element]) { Draggable._revertCache[this.element].cancel(); Draggable._revertCache[this.element] = null; }
initDrag: function(event) { if(typeof Draggable._dragging[this.element] != 'undefined' && Draggable._dragging[this.element]) return; if(Event.isLeftClick(event)) { // abort on form elements, fixes a Firefox issue var src = Event.element(event); if(src.tagName && ( src.tagName=='INPUT' || src.tagName=='SELECT' || src.tagName=='OPTION' || src.tagName=='BUTTON' || src.tagName=='TEXTAREA')) return; if(Draggable._revertCache[this.element]) { Draggable._revertCache[this.element].cancel(); Draggable._revertCache[this.element] = null; } var pointer = [Event.pointerX(event), Event.pointerY(event)]; var pos = Position.cumulativeOffset(this.element); this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); Draggables.activate(this); Event.stop(event); } },
if(this.element._revert) { this.element._revert.cancel(); this.element._revert = null;
if(Draggable._revertCache[this.element]) { Draggable._revertCache[this.element].cancel(); Draggable._revertCache[this.element] = null;
initDrag: function(event) { if(Event.isLeftClick(event)) { // abort on form elements, fixes a Firefox issue var src = Event.element(event); if(src.tagName && ( src.tagName=='INPUT' || src.tagName=='SELECT' || src.tagName=='OPTION' || src.tagName=='BUTTON' || src.tagName=='TEXTAREA')) return; if(this.element._revert) { this.element._revert.cancel(); this.element._revert = null; } var pointer = [Event.pointerX(event), Event.pointerY(event)]; var pos = Position.cumulativeOffset(this.element); this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); Draggables.activate(this); Event.stop(event); } },
if(typeof Draggable._dragging[this.element] != undefined && Draggable._dragging[this.element]) return;
initDrag: function(event) { if(Event.isLeftClick(event)) { // abort on form elements, fixes a Firefox issue var src = Event.element(event); if(src.tagName && ( src.tagName=='INPUT' || src.tagName=='SELECT' || src.tagName=='OPTION' || src.tagName=='BUTTON' || src.tagName=='TEXTAREA')) return; if(Draggable._revertCache[this.element]) { Draggable._revertCache[this.element].cancel(); Draggable._revertCache[this.element] = null; } var pointer = [Event.pointerX(event), Event.pointerY(event)]; var pos = Position.cumulativeOffset(this.element); this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); Draggables.activate(this); Event.stop(event); } },
if(this.element._revert) { this.element._revert.cancel(); this.element._revert = null; }
initDrag: function(event) { if(Event.isLeftClick(event)) { // abort on form elements, fixes a Firefox issue var src = Event.element(event); if(src.tagName && ( src.tagName=='INPUT' || src.tagName=='SELECT' || src.tagName=='BUTTON' || src.tagName=='TEXTAREA')) return; var pointer = [Event.pointerX(event), Event.pointerY(event)]; var pos = Position.cumulativeOffset(this.element); this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); Draggables.activate(this); Event.stop(event); } },
if(typeof Draggable._dragging[this.element] != undefined &&
if(typeof Draggable._dragging[this.element] != 'undefined' &&
initDrag: function(event) { if(typeof Draggable._dragging[this.element] != undefined && Draggable._dragging[this.element]) return; if(Event.isLeftClick(event)) { // abort on form elements, fixes a Firefox issue var src = Event.element(event); if(src.tagName && ( src.tagName=='INPUT' || src.tagName=='SELECT' || src.tagName=='OPTION' || src.tagName=='BUTTON' || src.tagName=='TEXTAREA')) return; if(Draggable._revertCache[this.element]) { Draggable._revertCache[this.element].cancel(); Draggable._revertCache[this.element] = null; } var pointer = [Event.pointerX(event), Event.pointerY(event)]; var pos = Position.cumulativeOffset(this.element); this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); Draggables.activate(this); Event.stop(event); } },
src.tagName=='OPTION' ||
initDrag: function(event) { if(Event.isLeftClick(event)) { // abort on form elements, fixes a Firefox issue var src = Event.element(event); if(src.tagName && ( src.tagName=='INPUT' || src.tagName=='SELECT' || src.tagName=='BUTTON' || src.tagName=='TEXTAREA')) return; if(this.element._revert) { this.element._revert.cancel(); this.element._revert = null; } var pointer = [Event.pointerX(event), Event.pointerY(event)]; var pos = Position.cumulativeOffset(this.element); this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); Draggables.activate(this); Event.stop(event); } },
if (!base) { base = "gm_script"; }
this.initFilename = function(script) { var index = {}; var base = script.name.replace(/[^A-Z0-9_]/gi, "").toLowerCase(); // 24 is a totally arbitrary max length if (base.length > 24) { base = base.substring(0, 24); } for (var i = 0; i < this.scripts.length; i++) { index[this.scripts[i].filename] = this.scripts[i]; } if (!index[base + ".user.js"]) { script.filename = base + ".user.js"; return; } for (var count = 1; count < Number.MAX_VALUE; count++) { if (!index[base + count + ".user.js"]) { script.filename = base + count + ".user.js"; return; } } throw new Error("doooooooode. get some different user script or something."); }
testLoop.waitingForNext = function() { document.getElementById('continueTest').disabled = false; };
function initialiseTestLoop() { testLoop = new TestLoop(commandFactory); testLoop.getCommandInterval = function() { return runInterval; }; testLoop.firstCommand = nextCommand; testLoop.nextCommand = nextCommand; testLoop.commandStarted = commandStarted; testLoop.commandComplete = commandComplete; testLoop.commandError = commandError; testLoop.testComplete = testComplete; return testLoop;}
OpenLayers.Layer.prototype.initialize.apply(this, arguments);
OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
initialize: function(name, options) { OpenLayers.Layer.prototype.initialize.apply(this, arguments); if (this.maxExtent == null) { this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90); } },
initialize: function(element, update, url, options) { this.element = $(element); this.update = $(update); this.has_focus = false; this.changed = false; this.active = false; this.index = 0; this.entry_count = 0; this.url = url; this.setOptions(options); this.options.asynchronous = true; this.options.onComplete = this.onComplete.bind(this) this.options.frequency = this.options.frequency || 0.4; this.options.min_chars = this.options.min_chars || 1; this.options.method = 'post'; this.options.onShow = this.options.onShow || function(element, update){ if(!update.style.position || update.style.position=='absolute') { update.style.position = 'absolute'; var offsets = Position.cumulativeOffset(element); update.style.left = offsets[0] + 'px'; update.style.top = (offsets[1] + element.offsetHeight) + 'px'; update.style.width = element.offsetWidth + 'px'; } new Effect.Appear(update,{duration:0.3}); }; this.options.onHide = this.options.onHide || function(element, update){ new Effect.Fade(update,{duration:0.3}) }; if(this.options.indicator) this.indicator = $(this.options.indicator); this.observer = null; Element.hide(this.update); Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this)); Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this));
initialize: function(element, update, array, options) { this.base_initialize(element, update, options); this.options.array = array;
initialize: function(element, update, url, options) { this.element = $(element); this.update = $(update); this.has_focus = false; this.changed = false; this.active = false; this.index = 0; this.entry_count = 0; this.url = url; this.setOptions(options); this.options.asynchronous = true; this.options.onComplete = this.onComplete.bind(this) this.options.frequency = this.options.frequency || 0.4; this.options.min_chars = this.options.min_chars || 1; this.options.method = 'post'; this.options.onShow = this.options.onShow || function(element, update){ if(!update.style.position || update.style.position=='absolute') { update.style.position = 'absolute'; var offsets = Position.cumulativeOffset(element); update.style.left = offsets[0] + 'px'; update.style.top = (offsets[1] + element.offsetHeight) + 'px'; update.style.width = element.offsetWidth + 'px'; } new Effect.Appear(update,{duration:0.3}); }; this.options.onHide = this.options.onHide || function(element, update){ new Effect.Fade(update,{duration:0.3}) }; if(this.options.indicator) this.indicator = $(this.options.indicator); this.observer = null; Element.hide(this.update); Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this)); Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this)); },
if (this.maxResolution == null || this.resolution == "auto") {
if (this.maxResolution == null || this.maxResolution == "auto") {
initialize: function (div, options) { Object.extend(this, options); this.div = div = $(div); // the viewPortDiv is the outermost div we modify var id = div.id + "_OpenLayers_ViewPort"; this.viewPortDiv = OpenLayers.Util.createDiv(id, null, null, null, "relative", null, "hidden"); this.viewPortDiv.style.width = "100%"; this.viewPortDiv.style.height = "100%"; this.div.appendChild(this.viewPortDiv); // the layerContainerDiv is the one that holds all the layers id = div.id + "_OpenLayers_Container"; this.layerContainerDiv = OpenLayers.Util.createDiv(id); this.viewPortDiv.appendChild(this.layerContainerDiv); this.events = new OpenLayers.Events(this, div, this.EVENT_TYPES); this.updateSize(); // make the entire maxExtent fix in zoom level 0 by default if (this.maxResolution == null || this.resolution == "auto") { this.maxResolution = Math.max( this.maxExtent.getWidth() / this.size.w, this.maxExtent.getHeight() / this.size.h ); } // update the internal size register whenever the div is resized this.events.register("resize", this, this.updateSize); this.layers = []; if (!this.controls) { this.controls = []; this.addControl(new OpenLayers.Control.MouseDefaults()); this.addControl(new OpenLayers.Control.PanZoom()); } this.popups = new Array(); // always call map.destroy() Event.observe(window, 'unload', this.destroy.bindAsEventListener(this)); },
this.name = name; if (this.div == null) { this.div = OpenLayers.Util.createDiv(); this.div.style.width = "100%"; this.div.style.height = "100%";
if (arguments.length > 0) { this.name = name; if (this.div == null) { this.div = OpenLayers.Util.createDiv(); this.div.style.width = "100%"; this.div.style.height = "100%"; }
initialize: function(name) { this.name = name; if (this.div == null) { this.div = OpenLayers.Util.createDiv(); this.div.style.width = "100%"; this.div.style.height = "100%"; } },
this.controlDiv = OpenLayers.Util.createDiv( div.id + "_OpenLayers_Control" ); this.controlDiv.style.width="100%"; this.controlDiv.style.height="100%"; this.controlDiv.style.zIndex = this.Z_INDEX_BASE["Control"]; this.viewPortDiv.appendChild(this.controlDiv);
initialize: function (div, options) { Object.extend(this, options); this.div = div = $(div); // the viewPortDiv is the outermost div we modify this.viewPortDiv = OpenLayers.Util.createDiv( div.id + "_OpenLayers_ViewPort" ); this.viewPortDiv.style.width = "100%"; this.viewPortDiv.style.height = "100%"; this.viewPortDiv.style.overflow = "hidden"; this.viewPortDiv.style.position = "relative"; this.div.appendChild(this.viewPortDiv); // the controlDiv is the div that all the controls sit on this.controlDiv = OpenLayers.Util.createDiv( div.id + "_OpenLayers_Control" ); this.controlDiv.style.width="100%"; this.controlDiv.style.height="100%"; this.controlDiv.style.zIndex = this.Z_INDEX_BASE["Control"]; this.viewPortDiv.appendChild(this.controlDiv); // the layerContainerDiv is the one that holds all the layers this.layerContainerDiv = OpenLayers.Util.createDiv( div.id + "_OpenLayers_Container" ); this.viewPortDiv.appendChild(this.layerContainerDiv); this.events = new OpenLayers.Events(this, div, this.EVENT_TYPES); this.layers = []; this.controls = []; this.addControl( new OpenLayers.Control.PanZoom() ); this.addControl( new OpenLayers.Control.MouseDefaults() ); // always call map.destroy() Event.observe(window, 'unload', this.destroy.bindAsEventListener(this)); },
initialize: function(element, frequency, callback) { this.frequency = frequency; this.element = $(element); this.callback = callback; this.lastValue = this.getValue(); this.registerCallback();
initialize: function(element) { this.element = $(element); this.start = 153; this.finish = 255; this.current = this.start; this.fade();
initialize: function(element, frequency, callback) { this.frequency = frequency; this.element = $(element); this.callback = callback; this.lastValue = this.getValue(); this.registerCallback(); },
markers = new Array();
this.markers = new Array();
initialize: function(name) { OpenLayers.Layer.prototype.initialize.apply(this, arguments); markers = new Array(); },
this.obj = {}; for (var property in obj) { this.obj[property] = obj[property]; this.length++; }
this.extend(obj);
initialize: function(obj) { this.obj = {}; for (var property in obj) { this.obj[property] = obj[property]; this.length++; } },
initialize: function(element, callback) { this.element = $(element); this.callback = callback;
initialize: function() { this.element = $(arguments[0]); this.callback = arguments[1]; this.trigger = arguments[2];
initialize: function(element, callback) { this.element = $(element); this.callback = callback; this.lastValue = this.getValue(); if (this.element.tagName.toLowerCase() == 'form') this.registerFormCallbacks(); else this.registerCallback(this.element); },
this.registerCallback(this.element);
this.registerCallback(this.element, this.trigger);
initialize: function(element, callback) { this.element = $(element); this.callback = callback; this.lastValue = this.getValue(); if (this.element.tagName.toLowerCase() == 'form') this.registerFormCallbacks(); else this.registerCallback(this.element); },
Event.observe(document, "click", this.onBlur.bindAsEventListener(this));
initialize: function(element, update, url, options) { this.element = $(element); this.update = $(update); this.has_focus = false; this.changed = false; this.active = false; this.index = 0; this.entry_count = 0; this.url = url; this.setOptions(options); this.options.asynchronous = true; this.options.onComplete = this.onComplete.bind(this) this.options.frequency = this.options.frequency || 0.4; this.options.min_chars = this.options.min_chars || 1; this.options.method = 'post'; if(this.options.indicator) this.indicator = $(this.options.indicator); this.observer = null; Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this)); Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this)); Event.observe(document, "click", this.onBlur.bindAsEventListener(this)); },
this.featureClass = featureClass;
if (featureClass != null) this.featureClass = featureClass;
initialize: function(name, url, params, featureClass) { this.featureClass = featureClass; var newArguments = new Array(); if (arguments.length > 0) { //uppercase params params = OpenLayers.Util.upperCaseObject(params); newArguments.push(name, url, params); } OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); OpenLayers.Layer.Markers.prototype.initialize.apply(this, newArguments); if (arguments.length > 0) { OpenLayers.Util.applyDefaults( this.params, OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) ); } },
loadingClassName: 'inplaceeditor-loading',
initialize: function(element, url, options) { this.url = url; this.element = $(element); this.options = Object.extend({ okText: "ok", cancelText: "cancel", savingText: "Saving...", clickToEditText: "Click to edit", okText: "ok", rows: 1, onComplete: function(transport, element) { new Effect.Highlight(element, {startcolor: this.options.highlightcolor}); }, onFailure: function(transport) { alert("Error communicating with the server: " + transport.responseText.stripTags()); }, callback: function(form) { return Form.serialize(form); }, handleLineBreaks: true, loadingText: 'Loading...', savingClassName: 'inplaceeditor-saving', formClassName: 'inplaceeditor-form', highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor, highlightendcolor: "#FFFFFF", externalControl: null, ajaxOptions: {} }, options || {}); if(!this.options.formId && this.element.id) { this.options.formId = this.element.id + "-inplaceeditor"; if ($(this.options.formId)) { // there's already a form with that name, don't specify an id this.options.formId = null; } } if (this.options.externalControl) { this.options.externalControl = $(this.options.externalControl); } this.originalBackground = Element.getStyle(this.element, 'background-color'); if (!this.originalBackground) { this.originalBackground = "transparent"; } this.element.title = this.options.clickToEditText; this.onclickListener = this.enterEditMode.bindAsEventListener(this); this.mouseoverListener = this.enterHover.bindAsEventListener(this); this.mouseoutListener = this.leaveHover.bindAsEventListener(this); Event.observe(this.element, 'click', this.onclickListener); Event.observe(this.element, 'mouseover', this.mouseoverListener); Event.observe(this.element, 'mouseout', this.mouseoutListener); if (this.options.externalControl) { Event.observe(this.options.externalControl, 'click', this.onclickListener); Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener); Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener); } },
OpenLayers.Event.observe(window, "DOMMouseScroll", this.onWheelEvent.bindAsEventListener(this)); OpenLayers.Event.observe(window, "mousewheel", this.onWheelEvent.bindAsEventListener(this)); OpenLayers.Event.observe(document, "mousewheel", this.onWheelEvent.bindAsEventListener(this));
initialize: function() { OpenLayers.Control.prototype.initialize.apply(this, arguments); //register mousewheel events specifically on the window and document OpenLayers.Event.observe(window, "DOMMouseScroll", this.onWheelEvent.bindAsEventListener(this)); OpenLayers.Event.observe(window, "mousewheel", this.onWheelEvent.bindAsEventListener(this)); OpenLayers.Event.observe(document, "mousewheel", this.onWheelEvent.bindAsEventListener(this)); },
Object.extend(this.params, this.DEFAULT_PARAMS);
OpenLayers.Util.applyDefaults( this.params, this.DEFAULT_PARAMS );
initialize: function(name, url, params) { OpenLayers.Layer.Grid.prototype.initialize.apply(this, arguments); Object.extend(this.params, this.DEFAULT_PARAMS); },
this.handle.addEvent('mousedown', this.start.bindWithEvent(this));
this.bound = {'start': this.start.bindWithEvent(this)}; this.handle.addEvent('mousedown', this.bound.start);
initialize: function(el, options){ this.setOptions(this.getOptions(), options); this.element = $(el); this.handle = $(this.options.handle) || this.element; this.mouse = {'start': {}, 'now': {}, 'pos': {}}; this.value = {'start': {}, 'now': {}}; this.handle.addEvent('mousedown', this.start.bindWithEvent(this)); if (this.options.initialize) this.options.initialize.call(this); },
initialize: function (object, element, eventTypes) {
initialize: function (object, element, eventTypes, fallThrough) {
initialize: function (object, element, eventTypes) { this.object = object; this.element = element; this.eventTypes = eventTypes; this.listeners = new Object(); // if eventTypes is specified, create a listeners list for each // custom application event. if (this.eventTypes != null) for (var i = 0; i < this.eventTypes.length; i++) this.listeners[ this.eventTypes[i] ] = new Array(); // if a dom element is specified, add a listeners list // for browser events on the element and register them if (this.element != null) this.attachToElement(element); },
this.fallThrough = fallThrough;
initialize: function (object, element, eventTypes) { this.object = object; this.element = element; this.eventTypes = eventTypes; this.listeners = new Object(); // if eventTypes is specified, create a listeners list for each // custom application event. if (this.eventTypes != null) for (var i = 0; i < this.eventTypes.length; i++) this.listeners[ this.eventTypes[i] ] = new Array(); // if a dom element is specified, add a listeners list // for browser events on the element and register them if (this.element != null) this.attachToElement(element); },
new Effect.Scale(element, 1, { complete: this.hide.bind(this) } );
new Effect.Scale(this.element, 1, { complete: this.hide.bind(this) } );
initialize: function(element) { this.element = $(element); new Effect.Scale(element, 1, { complete: this.hide.bind(this) } ); },
Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this));
initialize: function(element, update, url, options) { this.element = $(element); this.update = $(update); this.has_focus = false; this.changed = false; this.active = false; this.index = 0; this.entry_count = 0; this.url = url; this.setOptions(options); this.options.asynchronous = true; this.options.onComplete = this.onComplete.bind(this) this.options.frequency = this.options.frequency || 0.4; this.options.min_chars = this.options.min_chars || 1; this.options.method = 'post'; if(this.options.indicator) this.indicator = $(this.options.indicator); this.observer = null; Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this)); Event.observe(document, "click", this.onBlur.bindAsEventListener(this)); },
OpenLayers.Tile.prototype.initialize.apply(this, arguments);
OpenLayers.Tile.prototype.initialize.apply(this, newArguments);
initialize: function(layer, position, bounds, urls, size) { var newArguments = [layer, position, bounds, null, size]; OpenLayers.Tile.prototype.initialize.apply(this, arguments); this.urls = urls; this.features = new Array(); },
this.expectedFailure = null; this.expectedFailureType = null;
initialize: function(htmlTestCase, metrics, seleniumCommandFactory) { this.commandFactory = new HtmlRunnerCommandFactory(seleniumCommandFactory, this); this.metrics = metrics; this.htmlTestCase = htmlTestCase; se = selenium; global.se = selenium; this.currentRow = null; this.currentRowIndex = 0; // used for selenium tests in javascript this.currentItem = null; this.commandAgenda = new Array(); this.htmlTestCase.reset(); this.sejsElement = this.htmlTestCase.testDocument.getElementById('sejs'); if (this.sejsElement) { var fname = 'Selenium JavaScript'; parse_result = parse(this.sejsElement.innerHTML, fname, 0); var x2 = new ExecutionContext(GLOBAL_CODE); ExecutionContext.current = x2; execute(parse_result, x2) } },
this.bound = {'start': []};
initialize: function(list, options){ this.setOptions(this.getOptions(), options); this.list = $(list); this.elements = this.list.getChildren(); this.handles = $$(this.options.handles) || this.elements; this.elements.each(function(el, i){ this.handles[i].addEvent('mousedown', this.start.bindWithEvent(this, el)); }, this); },
this.bound.start[i] = this.start.bindWithEvent(this, el);
initialize: function(list, options){ this.setOptions(this.getOptions(), options); this.list = $(list); this.elements = this.list.getChildren(); this.handles = $$(this.options.handles) || this.elements; this.elements.each(function(el, i){ this.handles[i].addEvent('mousedown', this.start.bindWithEvent(this, el)); }, this); },
this.events = new OpenLayers.Events(this, this.icon.image, null);
this.events = new OpenLayers.Events(this, this.icon.imageDiv, null);
initialize: function(lonlat, icon) { this.lonlat = lonlat; this.icon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); this.events = new OpenLayers.Events(this, this.icon.image, null); },
initialize: function() {
initialize: function(direction) {
initialize: function() { OpenLayers.Control.prototype.initialize.apply(this, arguments); this.mode = null; },
this.mode = null;
if (direction) { this.direction = direction; }
initialize: function() { OpenLayers.Control.prototype.initialize.apply(this, arguments); this.mode = null; },
OpenLayers.Layer.prototype.initialize.apply(this, [name]);
var newArguments = arguments; if (arguments.length > 0) { newArguments = [name]; } OpenLayers.Layer.prototype.initialize.apply(this, newArguments);
initialize: function(name, url, params) { OpenLayers.Layer.prototype.initialize.apply(this, [name]); this.url = url; this.params = params; },
this.setSliderValue(parseInt(this.options.sliderValue) || 0);
initialize: function(handle, track, options) { this.handle = $(handle); this.track = $(track); this.options = options || {}; this.axis = this.options.axis || 'horizontal'; this.increment = this.options.increment || 1; this.step = parseInt(this.options.step) || 1; this.value = 0; var defaultMaximum = Math.round(this.track.offsetWidth / this.increment); if(this.isVertical()) defaultMaximum = Math.round(this.track.offsetHeight / this.increment); this.maximum = this.options.maximum || defaultMaximum; this.minimum = this.options.minimum || 0; // Will be used to align the handle onto the track, if necessary this.alignX = parseInt (this.options.alignX) || 0; this.alignY = parseInt (this.options.alignY) || 0; // Zero out the slider position this.setCurrentLeft(Position.cumulativeOffset(this.track)[0] - Position.cumulativeOffset(this.handle)[0] + this.alignX); this.setCurrentTop(this.trackTop() - Position.cumulativeOffset(this.handle)[1] + this.alignY); this.offsetX = 0; this.offsetY = 0; this.originalLeft = this.currentLeft(); this.originalTop = this.currentTop(); this.originalZ = parseInt(this.handle.style.zIndex || "0"); // Prepopulate Slider value this.setSliderValue(parseInt(this.options.sliderValue) || 0); this.active = false; this.dragging = false; this.disabled = false; // FIXME: use css this.handleImage = $(this.options.handleImage) || false; this.handleDisabled = this.options.handleDisabled || false; this.handleEnabled = false; if(this.handleImage) this.handleEnabled = this.handleImage.src || false; if(this.options.disabled) this.setDisabled(); // Value Array this.values = this.options.values || false; // Add method to validate and sort?? Element.makePositioned(this.handle); // fix IE this.eventMouseDown = this.startDrag.bindAsEventListener(this); this.eventMouseUp = this.endDrag.bindAsEventListener(this); this.eventMouseMove = this.update.bindAsEventListener(this); this.eventKeypress = this.keyPress.bindAsEventListener(this); Event.observe(this.handle, "mousedown", this.eventMouseDown); Event.observe(document, "mouseup", this.eventMouseUp); Event.observe(document, "mousemove", this.eventMouseMove); Event.observe(document, "keypress", this.eventKeypress); },
if(this.values) { this.minimum = this.values.min(); this.maximum = this.values.max(); } this.setSliderValue(parseInt(this.options.sliderValue) || this.minimum);
initialize: function(handle, track, options) { this.handle = $(handle); this.track = $(track); this.options = options || {}; this.axis = this.options.axis || 'horizontal'; this.increment = this.options.increment || 1; this.step = parseInt(this.options.step) || 1; this.value = 0; var defaultMaximum = Math.round(this.track.offsetWidth / this.increment); if(this.isVertical()) defaultMaximum = Math.round(this.track.offsetHeight / this.increment); this.maximum = this.options.maximum || defaultMaximum; this.minimum = this.options.minimum || 0; // Will be used to align the handle onto the track, if necessary this.alignX = parseInt (this.options.alignX) || 0; this.alignY = parseInt (this.options.alignY) || 0; // Zero out the slider position this.setCurrentLeft(Position.cumulativeOffset(this.track)[0] - Position.cumulativeOffset(this.handle)[0] + this.alignX); this.setCurrentTop(this.trackTop() - Position.cumulativeOffset(this.handle)[1] + this.alignY); this.offsetX = 0; this.offsetY = 0; this.originalLeft = this.currentLeft(); this.originalTop = this.currentTop(); this.originalZ = parseInt(this.handle.style.zIndex || "0"); // Prepopulate Slider value this.setSliderValue(parseInt(this.options.sliderValue) || 0); this.active = false; this.dragging = false; this.disabled = false; // FIXME: use css this.handleImage = $(this.options.handleImage) || false; this.handleDisabled = this.options.handleDisabled || false; this.handleEnabled = false; if(this.handleImage) this.handleEnabled = this.handleImage.src || false; if(this.options.disabled) this.setDisabled(); // Value Array this.values = this.options.values || false; // Add method to validate and sort?? Element.makePositioned(this.handle); // fix IE this.eventMouseDown = this.startDrag.bindAsEventListener(this); this.eventMouseUp = this.endDrag.bindAsEventListener(this); this.eventMouseMove = this.update.bindAsEventListener(this); this.eventKeypress = this.keyPress.bindAsEventListener(this); Event.observe(this.handle, "mousedown", this.eventMouseDown); Event.observe(document, "mouseup", this.eventMouseUp); Event.observe(document, "mousemove", this.eventMouseMove); Event.observe(document, "keypress", this.eventKeypress); },
this.id = (id ? id : 'f'+Math.Random());
this.id = (id ? id : 'f'+Math.random());
initialize: function(layer, lonlat, data, id) { this.layer = layer; this.lonlat = lonlat; this.data = data; this.id = (id ? id : 'f'+Math.Random()); },
this.parent(options);
this.parent(this.options);
initialize: function(el, options){ this.element = $(el).setStyle('margin', 0); this.wrapper = new Element('div').injectAfter(this.element).setStyle('overflow', 'hidden').adopt(this.element); this.setOptions({'mode': 'vertical'}, options); this.now = []; this.parent(options); },
this.handleLength = this.isVertical() ? this.handles[0].offsetHeight : this.handles[0].offsetWidth;
initialize: function(handle, track, options) { var slider = this; if(handle instanceof Array) { this.handles = handle.collect( function(e) { return $(e) }); } else { this.handles = [$(handle)]; } this.track = $(track); this.options = options || {}; this.axis = this.options.axis || 'horizontal'; this.increment = this.options.increment || 1; this.step = parseInt(this.options.step || '1'); this.range = this.options.range || $R(0,1); this.value = 0; // assure backwards compat this.values = this.handles.map( function() { return 0 }); this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false; this.options.startSpan = $(this.options.startSpan || null); this.options.endSpan = $(this.options.endSpan || null); this.restricted = this.options.restricted || false; this.maximum = this.options.maximum || this.range.end; this.minimum = this.options.minimum || this.range.start; // Will be used to align the handle onto the track, if necessary this.alignX = parseInt(this.options.alignX || '0'); this.alignY = parseInt(this.options.alignY || '0'); this.trackLength = this.maximumOffset() - this.minimumOffset(); this.active = false; this.dragging = false; this.disabled = false; if(this.options.disabled) this.setDisabled(); // Allowed values array this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false; if(this.allowedValues) { this.minimum = this.allowedValues.min(); this.maximum = this.allowedValues.max(); } this.eventMouseDown = this.startDrag.bindAsEventListener(this); this.eventMouseUp = this.endDrag.bindAsEventListener(this); this.eventMouseMove = this.update.bindAsEventListener(this); // Initialize handles in reverse (make sure first handle is active) this.handles.each( function(h,i) { i = slider.handles.length-1-i; slider.setValue(parseFloat( (slider.options.sliderValue instanceof Array ? slider.options.sliderValue[i] : slider.options.sliderValue) || slider.range.start), i); Element.makePositioned(h); // fix IE Event.observe(h, "mousedown", slider.eventMouseDown); }); Event.observe(this.track, "mousedown", this.eventMouseDown); Event.observe(document, "mouseup", this.eventMouseUp); Event.observe(document, "mousemove", this.eventMouseMove); this.initialized = true; },
for (var i = 0; i < this.eventTypes.length; i++) { this.listeners[ this.eventTypes[i] ] = [];
if (eventTypes) { for (var i = 0; i < this.eventTypes.length; i++) { this.listeners[ this.eventTypes[i] ] = []; }
initialize: function (object, div, eventTypes) { this.listeners = {}; this.object = object; this.div = div; this.eventTypes = eventTypes; for (var i = 0; i < this.eventTypes.length; i++) { // create a listener list for every custom application event this.listeners[ this.eventTypes[i] ] = []; } for (var i = 0; i < this.BROWSER_EVENTS.length; i++) { var eventType = this.BROWSER_EVENTS[i]; // every browser event has a corresponding application event // (whether it's listened for or not). this.listeners[ eventType ] = []; Event.observe(div, eventType, this.handleBrowserEvent.bindAsEventListener(this)); } },
type = type || 'rgb';
type = type || (color.push) ? 'rgb' : 'hex';
initialize: function(color, type){ if (color.isColor) return color; type = type || 'rgb'; var rgb, hsb; switch(type){ case 'rgb': rgb = color; hsb = rgb.rgbToHsb(); break; case 'hsb': rgb = color.hsbToRgb(); hsb = color; break; default: rgb = color.hexToRgb(true); hsb = rgb.rgbToHsb(); break; } rgb.hsb = hsb; return Object.extend(rgb, Color.prototype); },
default:
case 'hex':
initialize: function(color, type){ if (color.isColor) return color; type = type || 'rgb'; var rgb, hsb; switch(type){ case 'rgb': rgb = color; hsb = rgb.rgbToHsb(); break; case 'hsb': rgb = color.hsbToRgb(); hsb = color; break; default: rgb = color.hexToRgb(true); hsb = rgb.rgbToHsb(); break; } rgb.hsb = hsb; return Object.extend(rgb, Color.prototype); },
this.isBaseLayer = ((this.params.TRANSPARENT != "true") && (this.params.TRANSPARENT != true));
if ((options == null) ||(options.isBaseLayer == null)) { this.isBaseLayer = ((this.params.TRANSPARENT != "true") && (this.params.TRANSPARENT != true)); }
initialize: function(name, url, params, options) { var newArguments = new Array(); if (arguments.length > 0) { //uppercase params params = OpenLayers.Util.upperCaseObject(params); newArguments.push(name, url, params, options); } OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, newArguments); if (arguments.length > 0) { OpenLayers.Util.applyDefaults( this.params, OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) ); } // if the layer is transparent, it will be an overlay this.isBaseLayer = ((this.params.TRANSPARENT != "true") && (this.params.TRANSPARENT != true)); },
handleLineBreaks: true,
initialize: function(element, url, options) { this.url = url; this.element = $(element); this.options = Object.extend({ okText: "ok", cancelText: "cancel", savingText: "Saving...", clickToEditText: "Click to edit", okText: "ok", rows: 1, onComplete: function(transport, element) { new Effect.Highlight(element, {startcolor: this.options.highlightcolor}); }, onFailure: function(transport) { alert("Error communicating with the server: " + transport.responseText.stripTags()); }, callback: function(form) { return Form.serialize(form); }, loadingText: 'Loading...', savingClassName: 'inplaceeditor-saving', formClassName: 'inplaceeditor-form', highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor, highlightendcolor: "#FFFFFF", externalControl: null, ajaxOptions: {} }, options || {}); if(!this.options.formId && this.element.id) { this.options.formId = this.element.id + "-inplaceeditor"; if ($(this.options.formId)) { // there's already a form with that name, don't specify an id this.options.formId = null; } } if (this.options.externalControl) { this.options.externalControl = $(this.options.externalControl); } this.originalBackground = Element.getStyle(this.element, 'background-color'); if (!this.originalBackground) { this.originalBackground = "transparent"; } this.element.title = this.options.clickToEditText; this.onclickListener = this.enterEditMode.bindAsEventListener(this); this.mouseoverListener = this.enterHover.bindAsEventListener(this); this.mouseoutListener = this.leaveHover.bindAsEventListener(this); Event.observe(this.element, 'click', this.onclickListener); Event.observe(this.element, 'mouseover', this.mouseoverListener); Event.observe(this.element, 'mouseout', this.mouseoutListener); if (this.options.externalControl) { Event.observe(this.options.externalControl, 'click', this.onclickListener); Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener); Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener); } },
this.rightClick = (((this.event.which) && (this.event.which == 3)) || ((this.event.button) && (this.event.button == 2)));
this.rightClick = (((this.event.which) && (this.event.which == 3)) || ((this.event.button) && (this.event.button == 2)) || (navigator.platform.test('Mac') && this.control));
initialize: function(event){ this.event = event || window.event; this.type = this.event.type; this.target = this.event.target || this.event.srcElement; if (this.target.nodeType == 3) this.target = this.target.parentNode; // Safari this.shift = this.event.shiftKey; this.control = this.event.ctrlKey; this.alt = this.event.altKey; this.meta = this.event.metaKey; if (['DOMMouseScroll', 'mousewheel'].test(this.type)){ var wheel = 0; if (this.event.wheelDelta) wheel = this.event.wheelDelta/120; else if (this.event.detail) wheel = -this.event.detail/3; this.wheel = (window.opera) ? -wheel : wheel; } else if (this.type.test('key')){ this.code = this.event.which || this.event.keyCode; var specials = { 'enter': 13, 'up': 38, 'down': 40, 'left': 37, 'right': 39, 'esc': 27, 'space': 32, 'backspace': 8, 'delete': 46 }; for (var name in specials){ if (specials[name] == this.code) var special = name; } this.key = special || String.fromCharCode(this.code).toLowerCase(); } else if (this.type.test('mouse') || this.type == 'click'){ this.page = { 'x': this.event.pageX || this.event.clientX + document.documentElement.scrollLeft, 'y': this.event.pageY || this.event.clientY + document.documentElement.scrollTop }; this.client = { 'x': this.event.pageX ? this.event.pageX - window.pageXOffset : this.event.clientX, 'y': this.event.pageY ? this.event.pageY - window.pageYOffset : this.event.clientY }; this.rightClick = (((this.event.which) && (this.event.which == 3)) || ((this.event.button) && (this.event.button == 2))); switch (this.type){ case 'mouseover': this.relatedTarget = this.event.relatedTarget || this.event.fromElement; break; case 'mouseout': this.relatedTarget = this.event.relatedTarget || this.event.toElement; break; } } },
initialize: function(name, url, params) {
initialize: function(name, url, params, options) {
initialize: function(name, url, params) { var newArguments = new Array(); if (arguments.length > 0) { //uppercase params params = OpenLayers.Util.upperCaseObject(params); newArguments.push(name, url, params); } OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, newArguments); if (arguments.length > 0) { OpenLayers.Util.applyDefaults( this.params, OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) ); } // if the layer is transparent, it will be an overlay this.isBaseLayer = ((this.params.TRANSPARENT != "true") && (this.params.TRANSPARENT != true)); },
newArguments.push(name, url, params);
newArguments.push(name, url, params, options);
initialize: function(name, url, params) { var newArguments = new Array(); if (arguments.length > 0) { //uppercase params params = OpenLayers.Util.upperCaseObject(params); newArguments.push(name, url, params); } OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, newArguments); if (arguments.length > 0) { OpenLayers.Util.applyDefaults( this.params, OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) ); } // if the layer is transparent, it will be an overlay this.isBaseLayer = ((this.params.TRANSPARENT != "true") && (this.params.TRANSPARENT != true)); },
addBreakpointSupport();
addBreakpointSupport(this.document);
initialize : function(testDocument, isJavaScript, commandFactory) { this.commandFactory = commandFactory; this.waitForConditionTimeout = 30 * 1000; // 30 seconds this.isJavaScript = isJavaScript; se = selenium; global.se = selenium; this.document = testDocument; this.document.bgColor = ""; this.currentRow = null; this.currentRowIndex = 0; this.commandRows = new Array(); this.headerRow = null; // used for selenium tests in javascript this.currentItem = null; this.commandAgenda = new Array(); if (this.document.originalBody == undefined) { this.document.originalBody = this.document.body.innerHTML; } else { this.document.body.innerHTML = this.document.originalBody; addBreakpointSupport(); } var tables = this.document.getElementsByTagName("table"); for (var i = 0; i < tables.length; i++) { var candidateRows = tables[i].rows; for (var j = 0; j < candidateRows.length; j++) { if (!this.headerRow) { this.headerRow = candidateRows[j]; } if (isCommandRow(candidateRows[j])) { this._addCommandRow(candidateRows[j]); } } } if (isJavaScript) { var script = this.document.getElementById('sejs') // the script source var fname = 'Selenium JavaScript'; parse_result = parse(script.innerHTML, fname, 0); var x2 = new ExecutionContext(GLOBAL_CODE); ExecutionContext.current = x2; execute(parse_result, x2) } },
OpenLayers.Layer.prototype.initialize.apply(this, [name, options]); if((options == null) || (options.isBaseLayer == null)) { this.isBaseLayer = true; }
initialize: function(name, url, extent, size, options) { this.url = url; this.extent = extent; this.size = size; this.aspectRatio = (this.extent.getHeight() / this.size.h) / (this.extent.getWidth() / this.size.w); OpenLayers.Layer.prototype.initialize.apply(this, [name, options]); // unless explicitly set in options, the layer will be a base layer if((options == null) || (options.isBaseLayer == null)) { this.isBaseLayer = true; } },
Position.prepare(); var offsets = Position.cumulativeOffset(this.element); var max = window.innerHeight ? window.height - window.innerHeight : document.body.scrollHeight - (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight); this.scrollStart = Position.deltaY; this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
initialize: function(element) { this.element = $(element); Position.prepare(); var offsets = Position.cumulativeOffset(this.element); var max = window.innerHeight ? window.height - window.innerHeight : document.body.scrollHeight - (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight); this.scrollStart = Position.deltaY; this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart; this.start(arguments[1] || {}); },
this.lonlat = lonlat; this.icon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); this.events = new OpenLayers.Events(this, this.icon.imageDiv, null);
if (arguments.length > 0) { this.lonlat = lonlat; this.icon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); this.events = new OpenLayers.Events(this, this.icon.imageDiv, null); }
initialize: function(lonlat, icon) { this.lonlat = lonlat; this.icon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); this.events = new OpenLayers.Events(this, this.icon.imageDiv, null); },
this.isBaseLayer = (this.params.TRANSPARENT != "true");
initialize: function(name, url, params, options) { var newArguments = new Array(); if (arguments.length > 0) { //uppercase params params = OpenLayers.Util.upperCaseObject(params); newArguments.push(name, url, params, options); } OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); if (arguments.length > 0) { OpenLayers.Util.applyDefaults( this.params, OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) ); } },
this.mouse = {'start': {}, 'now': {}, 'pos': {}};
this.mouse = {'now': {}, 'pos': {}};
initialize: function(el, options){ this.setOptions(this.getOptions(), options); this.element = $(el); this.handle = $(this.options.handle) || this.element; this.mouse = {'start': {}, 'now': {}, 'pos': {}}; this.value = {'start': {}, 'now': {}}; this.bound = {'start': this.start.bindWithEvent(this)}; this.handle.addEvent('mousedown', this.bound.start); if (this.options.initialize) this.options.initialize.call(this); },
if (options['tileSize']) { this.tileSize = options['tileSize'].copyOf(); } else { this.tileSize = new OpenLayers.Size(256, 256); }
initialize: function(name, url, params, options) { var newArguments = new Array(); if (arguments.length > 0) { //uppercase params params = OpenLayers.Util.upperCaseObject(params); newArguments.push(name, url, params, options); } OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); OpenLayers.Layer.Markers.prototype.initialize.apply(this, newArguments); if (arguments.length > 0) { OpenLayers.Util.applyDefaults( this.params, OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) ); } },
this.isBaseLayer = ((this.params.TRANSPARENT != "true") && (this.params.TRANSPARENT != true));
if ((options == null) || (options.isBaseLayer == null)) { this.isBaseLayer = ((this.params.TRANSPARENT != "true") && (this.params.TRANSPARENT != true)); }
initialize: function(name, url, params, options) { var newArguments = new Array(); if (arguments.length > 0) { //uppercase params params = OpenLayers.Util.upperCaseObject(params); newArguments.push(name, url, params, options); } OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); if (arguments.length > 0) { OpenLayers.Util.applyDefaults( this.params, OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) ); } // if the layer is transparent, it will be an overlay this.isBaseLayer = ((this.params.TRANSPARENT != "true") && (this.params.TRANSPARENT != true)); },
this.image = OpenLayers.Util.createImage(null,
this.image = OpenLayers.Util.createAlphaImageDiv(null,
initialize: function(lonlat, icon, data) { this.icon = icon; this.lonlat = lonlat; this.data = data; this.image = OpenLayers.Util.createImage(null, null, this.icon.size, this.icon.url, "absolute" ); this.events = new OpenLayers.Events(this, this.image, null); //load marker events from data if (this.data != null && this.data.loadEvents != null) { this.data.loadEvents(this); } },
var specials = { 'enter': 13, 'up': 38, 'down': 40, 'left': 37, 'right': 39, 'esc': 27, 'space': 32, 'backspace': 8, 'delete': 46 }; for (var name in specials){ if (specials[name] == this.code) var special = name;
for (var name in Event.keys){ if (Event.keys[name] == this.code) var special = name;
initialize: function(event){ this.event = event || window.event; this.type = this.event.type; this.target = this.event.target || this.event.srcElement; if (this.target.nodeType == 3) this.target = this.target.parentNode; // Safari this.shift = this.event.shiftKey; this.control = this.event.ctrlKey; this.alt = this.event.altKey; this.meta = this.event.metaKey; if (['DOMMouseScroll', 'mousewheel'].test(this.type)){ this.wheel = this.event.wheelDelta ? (this.event.wheelDelta / (window.opera ? -120 : 120)) : -(this.event.detail || 0) / 3; } else if (this.type.test('key')){ this.code = this.event.which || this.event.keyCode; var specials = { 'enter': 13, 'up': 38, 'down': 40, 'left': 37, 'right': 39, 'esc': 27, 'space': 32, 'backspace': 8, 'delete': 46 }; for (var name in specials){ if (specials[name] == this.code) var special = name; } this.key = special || String.fromCharCode(this.code).toLowerCase(); } else if (this.type.test('mouse') || this.type == 'click'){ this.page = { 'x': this.event.pageX || this.event.clientX + document.documentElement.scrollLeft, 'y': this.event.pageY || this.event.clientY + document.documentElement.scrollTop }; this.client = { 'x': this.event.pageX ? this.event.pageX - window.pageXOffset : this.event.clientX, 'y': this.event.pageY ? this.event.pageY - window.pageYOffset : this.event.clientY }; this.rightClick = (this.event.which == 3) || (this.event.button == 2); switch (this.type){ case 'mouseover': this.relatedTarget = this.event.relatedTarget || this.event.fromElement; break; case 'mouseout': this.relatedTarget = this.event.relatedTarget || this.event.toElement; } } },
initialize: function(options){ this.setOptions(this.getOptions(), options); this.transport = window.XMLHttpRequest ? new XMLHttpRequest() : (window.ie ? new ActiveXObject('Microsoft.XMLHTTP') : false); if (this.transport && this.options.initialize) this.options.initialize.call(this);
initialize: function(url, options){ this.addEvent('onSuccess', this.onComplete); this.setOptions(this.moreOptions(), options); if (!['post', 'get'].test(this.options.method)){ this._method = '_method='+this.options.method; this.options.method = 'post'; } this.parent(this.options); this.url = url;
initialize: function(options){ this.setOptions(this.getOptions(), options); this.transport = window.XMLHttpRequest ? new XMLHttpRequest() : (window.ie ? new ActiveXObject('Microsoft.XMLHTTP') : false); if (this.transport && this.options.initialize) this.options.initialize.call(this); },
this.handleLength = this.isVertical() ? this.handles[0].offsetHeight : this.handles[0].offsetWidth;
this.handleLength = this.isVertical() ? (this.handles[0].offsetHeight != 0 ? this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) : (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth : this.handles[0].style.width.replace(/px$/,""));
initialize: function(handle, track, options) { var slider = this; if(handle instanceof Array) { this.handles = handle.collect( function(e) { return $(e) }); } else { this.handles = [$(handle)]; } this.track = $(track); this.options = options || {}; this.axis = this.options.axis || 'horizontal'; this.increment = this.options.increment || 1; this.step = parseInt(this.options.step || '1'); this.range = this.options.range || $R(0,1); this.value = 0; // assure backwards compat this.values = this.handles.map( function() { return 0 }); this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false; this.options.startSpan = $(this.options.startSpan || null); this.options.endSpan = $(this.options.endSpan || null); this.restricted = this.options.restricted || false; this.maximum = this.options.maximum || this.range.end; this.minimum = this.options.minimum || this.range.start; // Will be used to align the handle onto the track, if necessary this.alignX = parseInt(this.options.alignX || '0'); this.alignY = parseInt(this.options.alignY || '0'); this.trackLength = this.maximumOffset() - this.minimumOffset(); this.handleLength = this.isVertical() ? this.handles[0].offsetHeight : this.handles[0].offsetWidth; this.active = false; this.dragging = false; this.disabled = false; if(this.options.disabled) this.setDisabled(); // Allowed values array this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false; if(this.allowedValues) { this.minimum = this.allowedValues.min(); this.maximum = this.allowedValues.max(); } this.eventMouseDown = this.startDrag.bindAsEventListener(this); this.eventMouseUp = this.endDrag.bindAsEventListener(this); this.eventMouseMove = this.update.bindAsEventListener(this); // Initialize handles in reverse (make sure first handle is active) this.handles.each( function(h,i) { i = slider.handles.length-1-i; slider.setValue(parseFloat( (slider.options.sliderValue instanceof Array ? slider.options.sliderValue[i] : slider.options.sliderValue) || slider.range.start), i); Element.makePositioned(h); // fix IE Event.observe(h, "mousedown", slider.eventMouseDown); }); Event.observe(this.track, "mousedown", this.eventMouseDown); Event.observe(document, "mouseup", this.eventMouseUp); Event.observe(document, "mousemove", this.eventMouseMove); this.initialized = true; },
initialize: function(element, update, array, options) { this.base_initialize(element, update, options); this.options.array = array;
initialize: function(element, url, options) { this.url = url; this.element = $(element); this.options = Object.extend({ okText: "ok", cancelText: "cancel", savingText: "Saving...", clickToEditText: "Click to edit", okText: "ok", rows: 1, onComplete: function(transport, element) { new Effect.Highlight(element, {startcolor: this.options.highlightcolor}); }, onFailure: function(transport) { alert("Error communicating with the server: " + transport.responseText.stripTags()); }, callback: function(form) { return Form.serialize(form); }, handleLineBreaks: true, loadingText: 'Loading...', savingClassName: 'inplaceeditor-saving', loadingClassName: 'inplaceeditor-loading', formClassName: 'inplaceeditor-form', highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor, highlightendcolor: "#FFFFFF", externalControl: null, ajaxOptions: {} }, options || {}); if(!this.options.formId && this.element.id) { this.options.formId = this.element.id + "-inplaceeditor"; if ($(this.options.formId)) { this.options.formId = null; } } if (this.options.externalControl) { this.options.externalControl = $(this.options.externalControl); } this.originalBackground = Element.getStyle(this.element, 'background-color'); if (!this.originalBackground) { this.originalBackground = "transparent"; } this.element.title = this.options.clickToEditText; this.onclickListener = this.enterEditMode.bindAsEventListener(this); this.mouseoverListener = this.enterHover.bindAsEventListener(this); this.mouseoutListener = this.leaveHover.bindAsEventListener(this); Event.observe(this.element, 'click', this.onclickListener); Event.observe(this.element, 'mouseover', this.mouseoverListener); Event.observe(this.element, 'mouseout', this.mouseoutListener); if (this.options.externalControl) { Event.observe(this.options.externalControl, 'click', this.onclickListener); Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener); Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener); }
initialize: function(element, update, array, options) { this.base_initialize(element, update, options); this.options.array = array; },
var newArguments = new Array(); if (arguments.length > 0) { newArguments.push(name, options); }
initialize: function(name, url, params, options) { var newArguments = new Array(); if (arguments.length > 0) { //uppercase params params = OpenLayers.Util.upperCaseObject(params); newArguments.push(name, url, params, options); } OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); OpenLayers.Layer.Markers.prototype.initialize.apply(this, newArguments); if (arguments.length > 0) { OpenLayers.Util.applyDefaults( this.params, OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) ); } },
initialize: function(url, size, offset) {
initialize: function(url, size, offset, calculateOffset) { this.url = url;
initialize: function(url, size, offset) { this.size = size; this.url = url; this.offset = (offset) ? offset : new OpenLayers.Pixel(0,0); this.image = OpenLayers.Util.createAlphaImageDiv(null, null, this.size, this.url, "absolute" ); },
this.url = url; this.offset = (offset) ? offset : new OpenLayers.Pixel(0,0);
this.offset = (offset) ? offset : new OpenLayers.Pixel(0,0); this.calculateOffset = calculateOffset;
initialize: function(url, size, offset) { this.size = size; this.url = url; this.offset = (offset) ? offset : new OpenLayers.Pixel(0,0); this.image = OpenLayers.Util.createAlphaImageDiv(null, null, this.size, this.url, "absolute" ); },
this.image = OpenLayers.Util.createAlphaImageDiv(null, null, this.size, this.url, "absolute" );
this.imageDiv = OpenLayers.Util.createAlphaImageDiv();
initialize: function(url, size, offset) { this.size = size; this.url = url; this.offset = (offset) ? offset : new OpenLayers.Pixel(0,0); this.image = OpenLayers.Util.createAlphaImageDiv(null, null, this.size, this.url, "absolute" ); },
if (color.blend && color.mix) return color;
if (color.mix && color.invert) return color;
initialize: function(color){ if (color.blend && color.mix) return color; var rgb = (color.push) ? color : color.hexToRgb(true); return Object.extend(rgb, Color.prototype); },
this.activeColor = OpenLayers.Control.LayerSwitcher.ACTIVE_COLOR; this.nonActiveColor = OpenLayers.Control.LayerSwitcher.NONACTIVE_COLOR; this.backdrops = [];
initialize: function(options) { this.activeColor = OpenLayers.Control.LayerSwitcher.ACTIVE_COLOR; this.nonActiveColor = OpenLayers.Control.LayerSwitcher.NONACTIVE_COLOR; this.backdrops = []; OpenLayers.Control.prototype.initialize.apply(this, arguments); },