Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (révision 8251)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
@@ -4442,7 +4442,7 @@
openContainerWindow: function (buttonId, title, dimensions, url) {
this.dialog = new Ext.Window({
id: this.editor.editorId + buttonId,
- title: this.localize(title),
+ title: this.localize(title) || title,
cls: 'htmlarea-window',
width: dimensions.width,
height: dimensions.height,
Index: typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml (révision 8251)
+++ typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml (copie de travail)
@@ -36,6 +36,8 @@
+
+
@@ -70,6 +72,8 @@
+
+
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/ContextMenu/context-menu.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/ContextMenu/context-menu.js (révision 8251)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/ContextMenu/context-menu.js (copie de travail)
@@ -54,7 +54,7 @@
* Registering plugin "About" information
*/
var pluginInformation = {
- version : '3.0',
+ version : '3.1',
developer : 'Mihai Bazon & Stanislas Rolland',
developerUrl : 'http://www.sjbr.ca/',
copyrightOwner : 'dynarch.com & Stanislas Rolland',
@@ -201,6 +201,7 @@
} else if (xtype === 'menuitem') {
var button = this.getButton(menuItem.getItemId());
if (button) {
+ menuItem.setText(button.tooltip.title);
menuItem.setVisible(!button.disabled);
lastIsButton = lastIsButton || !button.disabled;
} else {
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js (révision 8251)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js (copie de travail)
@@ -68,7 +68,7 @@
* Registering plugin "About" information
*/
var pluginInformation = {
- version : '2.0',
+ version : '2.1',
developer : 'Stanislas Rolland',
developerUrl : 'http://www.sjbr.ca/',
copyrightOwner : 'Stanislas Rolland',
@@ -156,7 +156,7 @@
// Open dialogue window
this.openDialogue(
buttonId,
- 'Insert Image',
+ this.getButton(buttonId).tooltip.title,
this.getWindowDimensions(
{
width: 460,
@@ -180,7 +180,7 @@
*/
openDialogue: function (buttonId, title, dimensions, tabItems) {
this.dialog = new Ext.Window({
- title: this.localize(title),
+ title: this.localize(title) || title,
cls: 'htmlarea-window',
border: false,
width: dimensions.width,
@@ -504,5 +504,21 @@
}
});
}
+ },
+ /*
+ * This function gets called when the toolbar is updated
+ */
+ onUpdateToolbar: function (button, mode, selectionEmpty, ancestors) {
+ if (mode === 'wysiwyg' && this.editor.isEditable() && button.itemId === 'InsertImage' && !button.disabled) {
+ var image = this.editor.getParentElement();
+ if (image && !/^img$/i.test(image.nodeName)) {
+ image = null;
+ }
+ if (image) {
+ button.setTooltip({ title: this.localize('Modify image') });
+ } else {
+ button.setTooltip({ title: this.localize('Insert image') });
+ }
+ }
}
});
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js (révision 8251)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js (copie de travail)
@@ -47,7 +47,7 @@
* Registering plugin "About" information
*/
var pluginInformation = {
- version : '2.0',
+ version : '2.1',
developer : 'Stanislas Rolland',
developerUrl : 'http://www.sjbr.ca/',
copyrightOwner : 'Stanislas Rolland',
@@ -149,7 +149,7 @@
// Open dialogue window
this.openDialogue(
buttonId,
- 'Insert/Modify Link',
+ this.getButton(buttonId).tooltip.title,
this.getWindowDimensions(
{
width: 470,
@@ -173,7 +173,7 @@
*/
openDialogue: function (buttonId, title, dimensions) {
this.dialog = new Ext.Window({
- title: this.localize(title),
+ title: this.localize(title) || title,
cls: 'htmlarea-window',
border: false,
width: dimensions.width,
@@ -383,6 +383,18 @@
onUpdateToolbar: function (button, mode, selectionEmpty, ancestors) {
if (mode === 'wysiwyg' && this.editor.isEditable() && button.itemId === 'CreateLink') {
button.setDisabled(selectionEmpty && !button.isInContext(mode, selectionEmpty, ancestors));
+ if (!button.disabled) {
+ var node = this.editor.getParentElement();
+ var el = HTMLArea.getElementObject(node, 'a');
+ if (el != null && /^a$/i.test(el.nodeName)) {
+ node = el;
+ }
+ if (node != null && /^a$/i.test(node.nodeName)) {
+ button.setTooltip({ title: this.localize('Modify link') });
+ } else {
+ button.setTooltip({ title: this.localize('Insert link') });
+ }
+ }
}
}
});
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Image/typo3image.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Image/typo3image.js (révision 8251)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Image/typo3image.js (copie de travail)
@@ -43,7 +43,7 @@
* Registering plugin "About" information
*/
var pluginInformation = {
- version : '2.0',
+ version : '2.1',
developer : 'Stanislas Rolland',
developerUrl : 'http://www.sjbr.ca/',
copyrightOwner : 'Stanislas Rolland',
@@ -89,7 +89,7 @@
}
this.openContainerWindow(
buttonId,
- buttonId + '-Tooltip',
+ this.getButton(buttonId).tooltip.title,
this.getWindowDimensions(
{
width: 610,
@@ -120,5 +120,21 @@
this.editor.iframe.onDrop();
}
this.close();
+ },
+ /*
+ * This function gets called when the toolbar is updated
+ */
+ onUpdateToolbar: function (button, mode, selectionEmpty, ancestors) {
+ if (mode === 'wysiwyg' && this.editor.isEditable() && button.itemId === 'InsertImage' && !button.disabled) {
+ var image = this.editor.getParentElement();
+ if (image && !/^img$/i.test(image.nodeName)) {
+ image = null;
+ }
+ if (image) {
+ button.setTooltip({ title: this.localize('Modify image') });
+ } else {
+ button.setTooltip({ title: this.localize('Insert image') });
+ }
+ }
}
});
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js (révision 8251)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js (copie de travail)
@@ -44,7 +44,7 @@
* Registering plugin "About" information
*/
var pluginInformation = {
- version : '2.0',
+ version : '2.1',
developer : 'Stanislas Rolland',
developerUrl : 'http://www.sjbr.ca/',
copyrightOwner : 'Stanislas Rolland',
@@ -165,7 +165,7 @@
}
this.openContainerWindow(
buttonId,
- buttonId.toLowerCase(),
+ this.getButton(buttonId).tooltip.title,
this.getWindowDimensions(
{
width: 550,
@@ -413,6 +413,18 @@
onUpdateToolbar: function (button, mode, selectionEmpty, ancestors) {
if (mode === 'wysiwyg' && this.editor.isEditable() && button.itemId === 'CreateLink') {
button.setDisabled(selectionEmpty && !button.isInContext(mode, selectionEmpty, ancestors));
+ if (!button.disabled) {
+ var node = this.editor.getParentElement();
+ var el = HTMLArea.getElementObject(node, 'a');
+ if (el != null && /^a$/i.test(el.nodeName)) {
+ node = el;
+ }
+ if (node != null && /^a$/i.test(node.nodeName)) {
+ button.setTooltip({ title: this.localize('Modify link') });
+ } else {
+ button.setTooltip({ title: this.localize('Insert link') });
+ }
+ }
}
}
});