Index: typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
===================================================================
--- typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (révision 8930)
+++ typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail)
@@ -364,6 +364,7 @@
if (!$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts']) {
$pageRenderer->enableExtJsDebug();
}
+ $pageRenderer->addJsFile('../t3lib/js/extjs/notifications.js');
/* =======================================
* DRAW THE EDITOR
* =======================================
Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (révision 8932)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
@@ -2572,7 +2572,10 @@
this.document.body.innerHTML = this.getHTML();
} catch(e) {
HTMLArea._appendToLog('[HTMLArea.Editor::setMode]: The HTML document is not well-formed.');
- alert(HTMLArea.I18N.msg['HTML-document-not-well-formed']);
+ TYPO3.Dialog.ErrorDialog({
+ title: 'htmlArea RTE',
+ msg: HTMLArea.I18N.msg['HTML-document-not-well-formed']
+ });
break;
}
this.textAreaContainer.hide();
@@ -3226,7 +3229,7 @@
try {
this.document.execCommand(cmdID, UI, param);
} catch(e) {
- if (this.config.debug) alert(e + "\n\nby execCommand(" + cmdID + ");");
+ HTMLArea._appendToLog('[HTMLArea.Editor::execCommand]: ' + e + 'by execCommand(' + cmdID + ')');
}
}
this.toolbar.update();
@@ -3358,10 +3361,16 @@
try {
return HTMLArea.getHTMLWrapper(root,outputRoot,editor);
} catch(e) {
- HTMLArea._appendToLog("The HTML document is not well-formed.");
- if (!HTMLArea.enableDebugMode) alert(HTMLArea.I18N.msg["HTML-document-not-well-formed"]);
- else return HTMLArea.getHTMLWrapper(root,outputRoot,editor);
- return editor.document.body.innerHTML;
+ HTMLArea._appendToLog('[HTMLArea::getHTML]: The HTML document is not well-formed.');
+ if (!HTMLArea.enableDebugMode) {
+ TYPO3.Dialog.ErrorDialog({
+ title: 'htmlArea RTE',
+ msg: HTMLArea.I18N.msg['HTML-document-not-well-formed']
+ });
+ return editor.document.body.innerHTML;
+ } else {
+ return HTMLArea.getHTMLWrapper(root,outputRoot,editor);
+ }
}
};
Index: typo3/sysext/rtehtmlarea/htmlarea/locallang_msg.xml
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/locallang_msg.xml (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/locallang_msg.xml (copie de travail)
@@ -10,13 +10,13 @@
-
-
+
+
-
+
-
+
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js (copie de travail)
@@ -45,7 +45,7 @@
* Registering plugin "About" information
*/
var pluginInformation = {
- version : '2.0',
+ version : '2.1',
developer : 'Stanislas Rolland',
developerUrl : 'http://www.sjbr.ca/',
copyrightOwner : 'Stanislas Rolland',
@@ -445,37 +445,63 @@
*/
mozillaClipboardAccessException: function () {
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.');
+ TYPO3.Dialog.QuestionDialog({
+ title: this.localize('Allow-Clipboard-Helper-Add-On-Title'),
+ msg: this.localize('Allow-Clipboard-Helper-Extension'),
+ fn: this.installAllowClipboardHelperExtension,
+ scope: this
+ });
+ } else {
+ TYPO3.Dialog.QuestionDialog({
+ title: this.localize('Firefox-Security-Prefs-Question-Title'),
+ msg: this.localize('Moz-Clipboard'),
+ fn: function (button) {
+ if (button == 'yes') {
+ window.open('http://mozilla.org/editor/midasdemo/securityprefs.html');
}
}
- }, 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.');
}
}
+ },
+ /*
+ * Install AllowClipboardHelperExtension
+ *
+ * @param string button: yes or no button was clicked in the dialogue
+ *
+ * @return void
+ */
+ installAllowClipboardHelperExtension: function (button) {
+ if (button == 'yes') {
+ if (InstallTrigger.enabled()) {
+ var self = this;
+ function mozillaInstallCallback(url, returnCode) {
+ if (returnCode == 0) {
+ TYPO3.Dialog.InformationDialog({
+ title: self.localize('Allow-Clipboard-Helper-Add-On-Title'),
+ msg: self.localize('Allow-Clipboard-Helper-Extension-Success')
+ });
+ } else {
+ TYPO3.Dialog.ErrorDialog({
+ title: self.localize('Allow-Clipboard-Helper-Add-On-Title'),
+ msg: self.localize('Moz-Extension-Failure')
+ });
+ self.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install return code was: ' + returnCode + '.');
+ }
+ return false;
+ }
+ var mozillaXpi = new Object();
+ mozillaXpi['AllowClipboard Helper'] = this.buttonsConfiguration.paste.mozillaAllowClipboardURL;
+ InstallTrigger.install(mozillaXpi, mozillaInstallCallback);
+ } else {
+ TYPO3.Dialog.ErrorDialog({
+ title: this.localize('Allow-Clipboard-Helper-Add-On-Title'),
+ msg: this.localize('Mozilla-Org-Install-Not-Enabled')
+ });
+ this.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install was not enabled.');
+ }
+ }
}
});
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/locallang.xml
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/locallang.xml (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/locallang.xml (copie de travail)
@@ -7,10 +7,8 @@
-
-
-
-
+
+
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js (copie de travail)
@@ -405,10 +405,18 @@
try {
window.ipreview.location.replace(url);
} catch (e) {
- Ext.MessageBox.alert('', this.localize('image_url_invalid'), function () { tabPanel.setActiveTab(0); urlField.focus(); });
+ TYPO3.Dialog.InformationDialog({
+ title: this.localize('Image Preview'),
+ msg: this.localize('image_url_invalid'),
+ fn: function () { tabPanel.setActiveTab(0); urlField.focus(); }
+ });
}
} else {
- Ext.MessageBox.alert('', this.localize('image_url_first'), function () { tabPanel.setActiveTab(0); urlField.focus(); });
+ TYPO3.Dialog.InformationDialog({
+ title: this.localize('Image Preview'),
+ msg: this.localize('image_url_first'),
+ fn: function () { tabPanel.setActiveTab(0); urlField.focus(); }
+ });
}
return false;
},
@@ -430,7 +438,11 @@
this.close();
} else {
var tabPanel = this.dialog.find('itemId', 'tabpanel')[0];
- Ext.MessageBox.alert('', this.localize('image_url_required'), function () { tabPanel.setActiveTab(0); urlField.focus(); });
+ TYPO3.Dialog.InformationDialog({
+ title: this.localize('image_url'),
+ msg: this.localize('image_url_required'),
+ fn: function () { tabPanel.setActiveTab(0); urlField.focus(); }
+ });
}
return false;
},
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/locallang.xml
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/locallang.xml (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/locallang.xml (copie de travail)
@@ -14,6 +14,7 @@
+
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js (copie de travail)
@@ -131,7 +131,10 @@
if (!this.link) {
var selection = this.editor._getSelection();
if (this.editor._selectionEmpty(selection)) {
- Ext.MessageBox.alert('', this.localize('Select some text'));
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton(buttonId).tooltip.title,
+ msg: this.localize('Select some text')
+ });
break;
}
this.parameters = {
@@ -293,7 +296,7 @@
onOK: function () {
var hrefField = this.dialog.find('itemId', 'href')[0];
var href = hrefField.getValue().trim();
- if (href) {
+ if (href && href != 'http://') {
var title = this.dialog.find('itemId', 'title')[0].getValue();
var target = this.dialog.find('itemId', 'target')[0].getValue();
if (target == '_other') {
@@ -302,7 +305,11 @@
this.createLink(href, title, target);
this.close();
} else {
- Ext.MessageBox.alert('', this.localize('link_url_required'), function () { hrefField.focus(); });
+ TYPO3.Dialog.InformationDialog({
+ title: this.localize('URL'),
+ msg: this.localize('link_url_required'),
+ fn: function () { hrefField.focus(); }
+ });
}
return false;
},
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/locallang.xml
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/locallang.xml (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/locallang.xml (copie de travail)
@@ -7,6 +7,7 @@
+
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/find-replace.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/find-replace.js (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/find-replace.js (copie de travail)
@@ -272,7 +272,12 @@
*/
requestReplacement: function () {
if (!this.dialog.find('itemId', 'replacement')[0].getValue() && this.dialog.find('itemId', 'replaceAll')[0].getValue()) {
- Ext.MessageBox.alert('', this.localize('Inform a replacement word'));
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('FindReplace').tooltip.title,
+ msg: this.localize('Inform a replacement word'),
+ fn: function () { this.dialog.find('itemId', 'replacement')[0].focus(); },
+ scope: this
+ });
}
this.clearDoc();
},
@@ -281,8 +286,12 @@
*/
onNext: function () {
if (!this.dialog.find('itemId', 'pattern')[0].getValue()) {
- Ext.MessageBox.alert('', this.localize('Enter the text you want to find'));
- this.dialog.find('itemId', 'pattern')[0].focus();
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('FindReplace').tooltip.title,
+ msg: this.localize('Enter the text you want to find'),
+ fn: function () { this.dialog.find('itemId', 'pattern')[0].focus(); },
+ scope: this
+ });
return false;
}
var fields = [
@@ -361,7 +370,12 @@
replace('yes');
return true;
} else {
- Ext.MessageBox.confirm('', this.localize('Substitute this occurrence?'), replace, this);
+ TYPO3.Dialog.QuestionDialog({
+ title: this.getButton('FindReplace').tooltip.title,
+ msg: this.localize('Substitute this occurrence?'),
+ fn: replace,
+ scope: this
+ });
return false;
}
}
@@ -399,8 +413,11 @@
message += '"' + pattern + '" ' + this.localize('not found');
this.disableActions('hiliteall,clear', true);
}
- Ext.MessageBox.minWidth = 300;
- Ext.MessageBox.alert('', message + '.');
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('FindReplace').tooltip.title,
+ msg: message + '.',
+ minWidth: 300
+ });
}
},
/*
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js (copie de travail)
@@ -399,16 +399,23 @@
var insertedTag = this.insertedTag.getValue();
var currentTag = this.tagCombo.getValue();
if (!insertedTag) {
- Ext.MessageBox.alert('', this.localize("Enter the TAG you want to insert"));
- this.insertedTag.focus();
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('InsertTag').tooltip.title,
+ msg: this.localize('Enter the TAG you want to insert'),
+ fn: function () { this.insertedTag.focus(); },
+ scope: this
+ });
event.stopEvent();
return false;
}
if (this.quotes.test(insertedTag)) {
if (this.quotes.test(insertedTag + '"')) {
- Ext.MessageBox.alert('', this.localize("There are some unclosed quote"));
- this.insertedTag.focus();
- this.insertedTag.select();
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('InsertTag').tooltip.title,
+ msg: this.localize('There are some unclosed quote'),
+ fn: function () { this.insertedTag.focus(); this.insertedTag.select(); },
+ scope: this
+ });
event.stopEvent();
return false;
} else {
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js (copie de travail)
@@ -190,7 +190,10 @@
this.applyRequest(params);
this.close();
} else {
- Ext.MessageBox.alert('', this.localize('Select the type of formatting you wish to remove.'));
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('RemoveFormat').tooltip.title,
+ msg: this.localize('Select the type of formatting you wish to remove.')
+ });
}
return false;
},
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-checker.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-checker.js (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-checker.js (copie de travail)
@@ -441,11 +441,16 @@
*/
onCancel: function () {
if (this.modified) {
- Ext.MessageBox.confirm('', this.localize('QUIT_CONFIRMATION'), function (button) {
- if (button == 'yes') {
- this.close();
- }
- }, this);
+ TYPO3.Dialog.QuestionDialog({
+ title: this.getButton('SpellCheck').tooltip.title,
+ msg: this.localize('QUIT_CONFIRMATION'),
+ fn: function (button) {
+ if (button == 'yes') {
+ this.close();
+ }
+ },
+ scope: this
+ });
return false;
} else {
return this.base();
@@ -552,10 +557,17 @@
}
} else {
if (!this.modified) {
- Ext.MessageBox.alert('', this.localize('NO_ERRORS_CLOSING'));
- this.onOK();
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('SpellCheck').tooltip.title,
+ msg: this.localize('NO_ERRORS_CLOSING'),
+ fn: this.onOK,
+ scope: this
+ });
} else {
- Ext.MessageBox.alert('', this.localize('NO_ERRORS'));
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('SpellCheck').tooltip.title,
+ msg: this.localize('NO_ERRORS')
+ });
}
return false;
}
@@ -723,7 +735,10 @@
} while (index != start && this.misspelledWords[index].htmlareaFixed);
if (index == start) {
index = 0;
- Ext.MessageBox.alert('', this.localize('Finished list of mispelled words'));
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('SpellCheck').tooltip.title,
+ msg: this.localize('Finished list of mispelled words')
+ });
}
this.setCurrentWord(this.misspelledWords[index], true);
return false;
@@ -786,14 +801,20 @@
onInfoClick: function () {
var info = this.dialog.getComponent('spell-check-iframe').getEl().dom.contentWindow.spellcheckInfo;
if (!info) {
- Ext.MessageBox.alert('', this.localize('No information available'));
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('SpellCheck').tooltip.title,
+ msg: this.localize('No information available')
+ });
} else {
- var txt = this.localize('Document information') + '
';
+ var txt = '';
Ext.iterate(info, function (key, value) {
- txt += '
' + this.localize(key) + ': ' + value;
+ txt += (txt ? '
' : '') + this.localize(key) + ': ' + value;
}, this);
txt += ' ' + this.localize('seconds');
- Ext.MessageBox.alert('', txt);
+ TYPO3.Dialog.InformationDialog({
+ title: this.localize('Document information'),
+ msg: txt
+ });
}
return false;
}
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (révision 8930)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (copie de travail)
@@ -129,7 +129,7 @@
['cell-insert-before', 'td,th', 'cellinsertbefore', false, 'cell-insert-before'],
['cell-insert-after', 'td,th', 'cellinsertafter', false, 'cell-insert-after'],
['cell-delete', 'td,th', 'celldelete', false, 'cell-delete'],
- ['cell-merge', 'tr', 'cellmerge', false, 'cell-merge'],
+ ['cell-merge', Ext.isGecko? 'tr' : 'td,th', 'cellmerge', false, 'cell-merge'],
['cell-split', 'td,th[colSpan!=1,rowSpan!=1]', 'cellsplit', false, 'cell-split']
],
/*
@@ -398,7 +398,10 @@
if (this.properties.required) {
if (this.properties.required.indexOf('captionOrSummary') != -1) {
if (!/\S/.test(params.f_caption) && !/\S/.test(params.f_summary)) {
- Ext.MessageBox.alert(this.localize('Error'), this.localize('captionOrSummary' + '-required'));
+ TYPO3.Dialog.ErrorDialog({
+ title: this.getButton(this.dialog.arguments.buttonId).tooltip.title,
+ msg: this.localize('captionOrSummary' + '-required')
+ });
var field = this.dialog.find('itemId', 'f_caption')[0];
var tab = field.findParentByType('container');
tab.ownerCt.activate(tab);
@@ -412,7 +415,10 @@
};
Ext.iterate(required, function (item) {
if (!params[item] && this.properties.required.indexOf(required[item]) != -1) {
- Ext.MessageBox.alert(this.localize('Error'), this.localize(required[item] + '-required'));
+ TYPO3.Dialog.ErrorDialog({
+ title: this.getButton(this.dialog.arguments.buttonId).tooltip.title,
+ msg: this.localize(required[item] + '-required')
+ });
var field = this.dialog.find('itemId', item)[0];
var tab = field.findParentByType('container');
tab.ownerCt.activate(tab);
@@ -434,7 +440,10 @@
};
Ext.iterate(required, function (item) {
if (!params[item]) {
- Ext.MessageBox.alert(this.localize('Error'), this.localize(required[item]));
+ TYPO3.Dialog.ErrorDialog({
+ title: this.getButton(this.dialog.arguments.buttonId).tooltip.title,
+ msg: this.localize(required[item])
+ });
var field = this.dialog.find('itemId', item)[0];
var tab = field.findParentByType('container');
tab.ownerCt.activate(tab);
@@ -1038,7 +1047,10 @@
var cell = this.getClosest("td");
if (!cell) var cell = this.getClosest("th");
if (!cell) {
- Ext.MessageBox.alert('', this.localize("Please click into some cell"));
+ TYPO3.Dialog.InformationDialog({
+ title: this.getButton('TO-cell-merge').tooltip.title,
+ msg: this.localize('Please click into some cell')
+ });
break;
}
var tr = cell.parentElement;
@@ -1134,7 +1146,7 @@
this.toggleBorders();
break;
default:
- alert("Button [" + buttonId + "] not yet implemented");
+ break;
}
},
/*
Index: typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php
===================================================================
--- typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php (révision 8930)
+++ typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php (copie de travail)
@@ -220,6 +220,7 @@
}
$pageRenderer->addCssFile($this->siteURL . 't3lib/js/extjs/ux/resize.css');
$pageRenderer->addJsFile($this->siteURL . 't3lib/js/extjs/ux/ext.resizable.js');
+ $pageRenderer->addJsFile($this->siteURL . '/t3lib/js/extjs/notifications.js');
if ($this->TCEform->RTEcounter == 1) {
$this->TCEform->additionalJS_pre['rtehtmlarea-loadJScode'] = $this->loadJScode($this->TCEform->RTEcounter);
}