Project

General

Profile

Bug #23620 ยป rtehtmlarea_bugfix_15820_trunk.patch

Administrator Admin, 2010-09-27 07:41

View differences:

typo3/sysext/rtehtmlarea/htmlarea/locallang_msg.xml (copie de travail)
<label index="Moz-Extension-Success">The installation was successful. You need to exit and restart your browser for the change to take effect.</label>
<label index="Moz-Extension-Failure">Sorry, the installation failed.</label>
<label index="Moz-Extension-Install-Not-Enabled">The installation cannot be performed. Please change your browser preferences in order to allow installation of sofware from this site.</label>
<label index="Allow-Clipboard-Helper-Extension">For security reasons, unprivileged applications cannot access the clipboard. Click OK to install a component that will enable you to specify the sites or pages that will be allowed to access the clipboard and perform copy, cut and paste operations.</label>
<label index="Mozilla-Org-Install-Not-Enabled">The installation cannot be performed. Please change your browser preferences in order to allow installation of sofware from http://ftp.mozilla.org.</label>
<label index="Allow-Clipboard-Helper-Extension">For security reasons, unprivileged applications cannot access the clipboard. Click YES to install a component that will enable you to specify the sites or pages that will be allowed to access the clipboard and perform copy, cut and paste operations.</label>
<label index="Mozilla-Org-Install-Not-Enabled">The installation cannot be performed. Please change your browser preferences in order to allow installation of sofware from http://addons.mozilla.org.</label>
<label index="Allow-Clipboard-Helper-Extension-Success">The installation was successful. You need to exit and restart your browser for the change to take effect. Afterwards, use the AllowClipboard Helper from the tools menu to allow specific sites to use the clipboard.</label>
</languageKey>
</data>
typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js (copie de travail)
* Mozilla clipboard access exception handler
*/
mozillaClipboardAccessException: function () {
if (this.buttonsConfiguration.paste && this.buttonsConfiguration.paste.mozillaAllowClipboardURL) {
if (confirm(this.localize('Allow-Clipboard-Helper-Extension'))) {
if (InstallTrigger.enabled()) {
var mozillaXpi = new Object();
mozillaXpi['AllowClipboard Helper'] = this.buttonsConfiguration.paste.mozillaAllowClipboardURL;
InstallTrigger.install(mozillaXpi, this.mozillaInstallCallback);
} else {
alert(this.localize('Mozilla-Org-Install-Not-Enabled'));
this.appendToLog('mozillaClipboardAccessException', 'Mozilla install was not enabled.');
return;
if (InstallTrigger && this.buttonsConfiguration.paste && this.buttonsConfiguration.paste.mozillaAllowClipboardURL) {
Ext.MessageBox.confirm('', this.localize('Allow-Clipboard-Helper-Extension'), function (button) {
if (button == 'yes') {
if (InstallTrigger.enabled()) {
var self = this;
function mozillaInstallCallback(url, returnCode) {
if (returnCode == 0) {
Ext.MessageBox.alert('', self.localize('Allow-Clipboard-Helper-Extension-Success'));
} else {
Ext.MessageBox.alert('', self.localize('Moz-Extension-Failure'));
self.appendToLog('mozillaInstallCallback', 'Mozilla install return code was: ' + returnCode + '.');
}
return;
}
var mozillaXpi = new Object();
mozillaXpi['AllowClipboard Helper'] = this.buttonsConfiguration.paste.mozillaAllowClipboardURL;
InstallTrigger.install(mozillaXpi, mozillaInstallCallback);
} else {
Ext.MessageBox.alert('', this.localize('Mozilla-Org-Install-Not-Enabled'));
this.appendToLog('mozillaClipboardAccessException', 'Mozilla install was not enabled.');
}
}
}, this);
} else {
Ext.MessageBox.confirm('', this.localize('Moz-Clipboard'), function (button) {
if (button == 'yes') {
window.open('http://mozilla.org/editor/midasdemo/securityprefs.html');
}
}, this);
if (!InstallTrigger) {
this.appendToLog('mozillaClipboardAccessException', 'Firefox InstallTrigger was not defined.');
}
} 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;
}
});
    (1-1/1)