Bug #19961 » rtehtmlarea_bugfix_10337_trunk.patch
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail) | ||
---|---|---|
_editor_debug_mode = ' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['enableDebugMode'] ? 'true' : 'false') . ';
|
||
_editor_compressed_scripts = ' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['enableCompressedScripts'] ? 'true' : 'false') . ';'
|
||
. (($this->client['BROWSER'] == 'gecko') ? ('
|
||
_editor_mozAllowClipboard_url = "' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['mozAllowClipboardURL'] ? $TYPO3_CONF_VARS['EXTCONF'][$this->ID]['mozAllowClipboardURL'] : '') . '";')
|
||
RTEarea[0].enableMozillaExtension = ' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['enableMozillaExtension'] ?'true' : 'false') . ';
|
||
RTEarea[0].mozillaAllowClipboardURL = "' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['mozAllowClipboardURL'] ? $TYPO3_CONF_VARS['EXTCONF'][$this->ID]['mozAllowClipboardURL'] : '') . '";')
|
||
: '') . '
|
||
}
|
||
/*]]>*/
|
||
... | ... | |
RTEarea[editornumber]["disablePCexamples"] = ' . (trim($this->thisConfig['disablePCexamples'])?'true':'false') . ';
|
||
RTEarea[editornumber]["showTagFreeClasses"] = ' . (trim($this->thisConfig['showTagFreeClasses'])?'true':'false') . ';
|
||
RTEarea[editornumber]["useHTTPS"] = ' . ((trim(stristr($this->siteURL, 'https')) || $this->thisConfig['forceHTTPS'])?'true':'false') . ';
|
||
RTEarea[editornumber]["enableMozillaExtension"] = ' . (($this->client['BROWSER'] == 'gecko' && $TYPO3_CONF_VARS['EXTCONF'][$this->ID]['enableMozillaExtension'])?'true':'false') . ';
|
||
RTEarea[editornumber].tceformsNested = ' . (is_object($this->TCEform) && method_exists($this->TCEform, 'getDynNestedStack') ? $this->TCEform->getDynNestedStack(true) : '[]') . ';
|
||
RTEarea[editornumber].dialogueWindows = new Object();
|
||
RTEarea[editornumber].dialogueWindows.defaultPositionFromTop = ' . (isset($this->thisConfig['dialogueWindows.']['defaultPositionFromTop'])? intval($this->thisConfig['dialogueWindows.']['defaultPositionFromTop']) : '100') . ';
|
typo3/sysext/rtehtmlarea/ext_conf_template.txt (copie de travail) | ||
---|---|---|
enableCompressedScripts = 1
|
||
# cat=basic; type=string; label=Url of AllowClipboard Helper: Full absolute Url of the AllowClipboard Helper extension for Mozilla and Firefox.
|
||
mozAllowClipboardURL =
|
||
mozAllowClipboardURL = http://typo3.org/fileadmin/allowclipboardhelper-0.6.xpi
|
typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js (copie de travail) | ||
---|---|---|
};
|
||
/*
|
||
* Paste exception handler
|
||
*/
|
||
HTMLArea.prototype._mozillaPasteException = function(cmdID, UI, param) {
|
||
// Mozilla lauches an exception, but can paste anyway on ctrl-V
|
||
// UI is false on keyboard shortcut, and undefined on button click
|
||
if(typeof(UI) != "undefined") {
|
||
try { this._doc.execCommand(cmdID, UI, param); } catch(e) { }
|
||
if (cmdID == "Paste" && this._toolbarObjects.CleanWord) {
|
||
this._toolbarObjects.CleanWord.cmd(this, "CleanWord");
|
||
}
|
||
} else if (this.config.enableMozillaExtension) {
|
||
if (confirm(HTMLArea.I18N.msg["Allow-Clipboard-Helper-Extension"])) {
|
||
if (InstallTrigger.enabled()) {
|
||
HTMLArea._mozillaXpi = new Object();
|
||
HTMLArea._mozillaXpi["AllowClipboard Helper"] = _editor_mozAllowClipboard_url;
|
||
InstallTrigger.install(HTMLArea._mozillaXpi,HTMLArea._mozillaInstallCallback);
|
||
} else {
|
||
alert(HTMLArea.I18N.msg["Mozilla-Org-Install-Not-Enabled"]);
|
||
HTMLArea._appendToLog("WARNING [HTMLArea::execCommand]: Mozilla install was not enabled.");
|
||
return;
|
||
}
|
||
}
|
||
} else if (confirm(HTMLArea.I18N.msg["Moz-Clipboard"])) {
|
||
window.open("http://mozilla.org/editor/midasdemo/securityprefs.html");
|
||
}
|
||
}
|
||
HTMLArea._mozillaInstallCallback = function(url,returnCode) {
|
||
if (returnCode == 0) {
|
||
if (HTMLArea._mozillaXpi["TYPO3 htmlArea RTE Preferences"]) alert(HTMLArea.I18N.msg["Moz-Extension-Success"]);
|
||
else alert(HTMLArea.I18N.msg["Allow-Clipboard-Helper-Extension-Success"]);
|
||
return;
|
||
} else {
|
||
alert(HTMLArea.I18N.msg["Moz-Extension-Failure"]);
|
||
HTMLArea._appendToLog("WARNING [HTMLArea::execCommand]: Mozilla install return code was: " + returnCode + ".");
|
||
return;
|
||
}
|
||
};
|
||
/*
|
||
* Backspace event handler
|
||
*/
|
||
HTMLArea.prototype._checkBackspace = function() {
|
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) | ||
---|---|---|
* @return string the localization of the label
|
||
*/
|
||
localize : function (label) {
|
||
return this.I18N[label] || HTMLArea.I18N.dialogs[label] || HTMLArea.I18N.tooltips[label];
|
||
return this.I18N[label] || HTMLArea.I18N.dialogs[label] || HTMLArea.I18N.tooltips[label] || HTMLArea.I18N.msg[label];
|
||
},
|
||
/**
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js (copie de travail) | ||
---|---|---|
case "Paste":
|
||
if (buttonId == id) {
|
||
// If we are handling a button, not a hotkey
|
||
this.applyBrowserCommand(buttonId, true);
|
||
this.applyBrowserCommand(buttonId);
|
||
}
|
||
// In FF3, the paste operation will indeed trigger the onPaste even; not in FF2; nor in Opera
|
||
if (HTMLArea.is_opera || (HTMLArea.is_gecko && navigator.productSub < 2008020514)) {
|
||
var cleanLaterFunctRef = this.editor.getPluginInstance("DefaultClean") ? this.editor.getPluginInstance("DefaultClean").cleanLaterFunctRef : (this.editor.getPluginInstance("TYPO3HtmlParser") ? this.editor.getPluginInstance("TYPO3HtmlParser").cleanLaterFunctRef : null);
|
||
var cleanLaterFunctRef = this.getPluginInstance("DefaultClean") ? this.getPluginInstance("DefaultClean").cleanLaterFunctRef : (this.getPluginInstance("TYPO3HtmlParser") ? this.getPluginInstance("TYPO3HtmlParser").cleanLaterFunctRef : null);
|
||
if (cleanLaterFunctRef) {
|
||
window.setTimeout(cleanLaterFunctRef, 50);
|
||
}
|
||
... | ... | |
}
|
||
},
|
||
|
||
applyBrowserCommand : function (buttonId, buttonPress) {
|
||
applyBrowserCommand : function (buttonId) {
|
||
try {
|
||
this.editor._doc.execCommand(buttonId, false, null);
|
||
} catch (e) {
|
||
if (buttonId == "Paste" && HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) {
|
||
this.editor._mozillaPasteException(buttonId, buttonPress, null);
|
||
if (HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) {
|
||
this.mozillaClipboardAccessException();
|
||
}
|
||
}
|
||
},
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
},
|
||
/*
|
||
* Mozilla clipboard access exception handler
|
||
*/
|
||
mozillaClipboardAccessException : function () {
|
||
if (RTEarea[0].enableMozillaExtension) {
|
||
if (confirm(this.localize("Allow-Clipboard-Helper-Extension"))) {
|
||
if (InstallTrigger.enabled()) {
|
||
var mozillaXpi = new Object();
|
||
mozillaXpi["AllowClipboard Helper"] = RTEarea[0].mozillaAllowClipboardURL;
|
||
var mozillaInstallCallback = this.makeFunctionReference("mozillaInstallCallback");
|
||
InstallTrigger.install(mozillaXpi, mozillaInstallCallback);
|
||
} else {
|
||
alert(this.localize("Mozilla-Org-Install-Not-Enabled"));
|
||
this.appendToLog("mozillaClipboardAccessException", "Mozilla install was not enabled.");
|
||
return;
|
||
}
|
||
}
|
||
} else if (confirm(this.localize("Moz-Clipboard"))) {
|
||
window.open("http://mozilla.org/editor/midasdemo/securityprefs.html");
|
||
}
|
||
},
|
||
|
||
/*
|
||
* Mozilla Add-on installer call back
|
||
*/
|
||
mozillaInstallCallback : function (url, returnCode) {
|
||
if (returnCode == 0) {
|
||
alert(this.localize("Allow-Clipboard-Helper-Extension-Success"));
|
||
} else {
|
||
alert(this.localize("Moz-Extension-Failure"));
|
||
this.appendToLog("mozillaInstallCallback", "Mozilla install return code was: " + returnCode + ".");
|
||
}
|
||
return;
|
||
}
|
||
});
|
||
- « Previous
- 1
- 2
- Next »