Added feature #2474: htmlArea RTE: Add general element properties editing dialogue
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 16 Nov 2010 22:56:00 +0000 (22:56 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 16 Nov 2010 22:56:00 +0000 (22:56 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9415 709f56b5-9817-0410-a4d7-c38de5d9e867

23 files changed:
ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
typo3/sysext/rtehtmlarea/ext_localconf.php
typo3/sysext/rtehtmlarea/ext_tables.php
typo3/sysext/rtehtmlarea/extensions/EditElement/class.tx_rtehtmlarea_editelement.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/EditElement/locallang_csh.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/EditElement/skin/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/EditElement/skin/images/element-edit.png [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/Language/locallang_csh.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml
typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/edit-element.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js
typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/actions/element-edit.png [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/sprites/actions.gif
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/sprites/actions.png
typo3/sysext/rtehtmlarea/locallang_csh.xml
typo3/sysext/t3skin/rtehtmlarea/htmlarea.css
typo3/sysext/t3skin/rtehtmlarea/images/actions/element-edit.png [new file with mode: 0644]
typo3/sysext/t3skin/rtehtmlarea/images/sprites/actions.gif
typo3/sysext/t3skin/rtehtmlarea/images/sprites/actions.png

index b62be10..149b948 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-16  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #2474: htmlArea RTE: Add general element properties editing dialogue
+
 2010-11-16  Jeff Segars  <jeff@webempoweredchurch.org>
 
        * Added feature #7199: Add TypoScript options to remove spaces and file extensions from link text for uploads (Thanks to Steffen Ritter)
index f663e01..9eb0515 100644 (file)
@@ -1,3 +1,7 @@
+2010-11-16  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #2474: htmlArea RTE: Add general element properties editing dialogue
+
 2010-11-12  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Added feature #16365: htmlArea RTE: Delete compressed files when clearing RTE cache
index 22171c0..8cea1ba 100644 (file)
@@ -568,7 +568,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        bar, left, center, right, justifyfull,
                        bar, orderedlist, unorderedlist, definitionlist, definitionitem, outdent, indent,  bar, lefttoright, righttoleft, language, showlanguagemarks,
                        bar, textcolor, bgcolor, textindicator,
-                       bar, emoticon, insertcharacter, link, unlink, image, table,' . (($this->thisConfig['hideTableOperationsInToolbar'] && is_array($this->thisConfig['buttons.']) && is_array($this->thisConfig['buttons.']['toggleborders.']) && $this->thisConfig['buttons.']['toggleborders.']['keepInToolbar']) ? ' toggleborders,': '') . ' user, acronym, bar, findreplace, spellcheck,
+                       bar, editelement, emoticon, insertcharacter, link, unlink, image, table,' . (($this->thisConfig['hideTableOperationsInToolbar'] && is_array($this->thisConfig['buttons.']) && is_array($this->thisConfig['buttons.']['toggleborders.']) && $this->thisConfig['buttons.']['toggleborders.']['keepInToolbar']) ? ' toggleborders,': '') . ' user, acronym, bar, findreplace, spellcheck,
                        bar, chMode, inserttag, removeformat, bar, copy, cut, paste, pastetoggle, pastebehaviour, bar, undo, redo, bar, showhelp, about, linebreak,
                        ' . ($this->thisConfig['hideTableOperationsInToolbar'] ? '': 'bar, toggleborders,') . ' bar, tableproperties, tablerestyle, bar, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, bar,
                        columnproperties, columninsertbefore, columninsertafter, columndelete, columnsplit, bar,
index f96ec83..6d43f5d 100644 (file)
@@ -104,6 +104,11 @@ $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins'] = array();
        // Editor Mode configuration
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['EditorMode'] = array();
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['EditorMode']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/EditorMode/class.tx_rtehtmlarea_editormode.php:&tx_rtehtmlarea_editormode';
+       // General Element configuration
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['EditElement'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['EditElement']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/EditElement/class.tx_rtehtmlarea_editelement.php:&tx_rtehtmlarea_editelement';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['EditElement']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['EditElement']['disableInFE'] = 0;
        // Inline Elements configuration
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultInline'] = array();
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultInline']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultInline/class.tx_rtehtmlarea_defaultinline.php:&tx_rtehtmlarea_defaultinline';
index cb340a6..3bc3374 100644 (file)
@@ -26,8 +26,10 @@ if (!defined ('TYPO3_MODE'))         die ('Access denied.');
                // Add contextual help files
        $htmlAreaRteContextHelpFiles = array(
                'General' => 'EXT:' . $_EXTKEY . '/locallang_csh.xml',
-               'RemoveFormat' => 'EXT:' . $_EXTKEY . '/extensions/RemoveFormat/locallang_csh.xml',
+               'EditElement' => 'EXT:' . $_EXTKEY . '/extensions/EditElement/locallang_csh.xml',
+               'Language' => 'EXT:' . $_EXTKEY . '/extensions/Language/locallang_csh.xml',
                'PlainText' => 'EXT:' . $_EXTKEY . '/extensions/PlainText/locallang_csh.xml',
+               'RemoveFormat' => 'EXT:' . $_EXTKEY . '/extensions/RemoveFormat/locallang_csh.xml',
        );
        foreach ($htmlAreaRteContextHelpFiles as $key => $file) {
                t3lib_extMgm::addLLrefForTCAdescr('xEXT_' . $_EXTKEY . '_' . $key, $file);
diff --git a/typo3/sysext/rtehtmlarea/extensions/EditElement/class.tx_rtehtmlarea_editelement.php b/typo3/sysext/rtehtmlarea/extensions/EditElement/class.tx_rtehtmlarea_editelement.php
new file mode 100644 (file)
index 0000000..7ac3eff
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Edit Element extension for htmlArea RTE
+ *
+ * @author Stanislas Rolland <typo3(arobas)sjbr.ca>
+ *
+ * TYPO3 SVN ID: $Id: class.tx_rtehtmlarea_editelement.php $
+ *
+ */
+class tx_rtehtmlarea_editelement extends tx_rtehtmlarea_api {
+
+       protected $extensionKey = 'rtehtmlarea';                // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'EditElement';                  // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = '';            // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = 'extensions/EditElement/skin/htmlarea.css';             // Path to the skin (css) file relative to the extension dir
+       protected $htmlAreaRTE;                                 // Reference to the invoking object
+       protected $thisConfig;                                  // Reference to RTE PageTSConfig
+       protected $toolbar;                                     // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                                  // Frontend language array
+               // The comma-separated list of names of prerequisite plugins
+       protected $requiredPlugins = 'BlockStyle,TextStyle,Language';
+       protected $pluginButtons = 'editelement';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'editelement'   => 'EditElement',
+               );
+       protected $acronymIndex = 0;
+       protected $abbreviationIndex = 0;
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return      string          JS configuration for registered plugins
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               $registerRTEinJavascriptString = '';
+               return $registerRTEinJavascriptString;
+       }
+}
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/EditElement/class.tx_rtehtmlarea_editelement.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/EditElement/class.tx_rtehtmlarea_editelement.php']);
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/EditElement/locallang_csh.xml b/typo3/sysext/rtehtmlarea/extensions/EditElement/locallang_csh.xml
new file mode 100644 (file)
index 0000000..048d922
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+       <meta type="array">
+               <description>CSH for Edit Element Extension of htmlArea RTE</description>
+               <type>CSH</type>
+               <csh_table>xEXT_rtehtmlarea_EditElement</csh_table>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index=".alttitle">htmlArea RTE &gt; Edit Element</label>
+                       <label index=".description">The "Edit element" dialogue allows to edit the general attributes of an element in the RTE editing area.</label>
+                       <label index=".details">Clicking the "Edit element" icon in the RTE tool bar opens a dialogue that allows to edit the general attributes of an element.
+The dialogue allows to edit the id, title, class, lang and dir attributes of the element. It also allows to specify handlers for keyboard and mouse events.</label>
+                       <label index=".image">EXT:rtehtmlarea/extensions/EditElement/skin/images/element-edit.png</label>
+                       <label index=".image_descr">"Edit element" icon in the editor tool bar.</label>
+                       <label index=".seeAlso">xEXT_rtehtmlarea_EditElement:id,
+xEXT_rtehtmlarea_EditElement:title,
+xEXT_rtehtmlarea_EditElement:className,
+xEXT_rtehtmlarea_Language:languageCombo,
+xEXT_rtehtmlarea_Language:directionCombo,
+xEXT_rtehtmlarea_EditElement:events
+</label>
+                       <label index="id.alttitle">Id attribute</label>
+                       <label index="id.description">Enter or edit the value of the id attribute of the element.</label>
+                       <label index="title.alttitle">Title attribute</label>
+                       <label index="title.description">Enter or edit the value of the title attribute of the element.</label>
+                       <label index="className.alttitle">Class attribute</label>
+                       <label index="className.description">Choose a CSS class selector to be assigned to the element.</label>
+                       <label index="events.alttitle">Event handlers</label>
+                       <label index="events.description">Using this fieldset, edit handlers for keyboard and mouse events.</label>
+                       <label index="onkeydown.alttitle">Onkeydown event handler</label>
+                       <label index="onkeydown.description">Enter or edit the script to be run when a key is pressed.</label>
+                       <label index="onkeypress.alttitle">Onkeypress event handler</label>
+                       <label index="onkeypress.description">Enter or edit the script to be run when a key is pressed and released.</label>
+                       <label index="onkeyup.alttitle">Onkeyup event handler</label>
+                       <label index="onkeyup.description">Enter or edit the script to be run when a key is pressed and released.</label>
+                       <label index="onclick.alttitle">Onclick event handler</label>
+                       <label index="onclick.description">Enter or edit the script to be run on a mouse click.</label>
+                       <label index="ondblclick.alttitle">Ondblclick event handler</label>
+                       <label index="ondblclick.description">Enter or edit the script to be run on a mouse double-click.</label>
+                       <label index="onmousedown.alttitle">Onmousedown event handler</label>
+                       <label index="onmousedown.description">Enter or edit the script to be run when a mouse button is pressed.</label>
+                       <label index="onmousemove.alttitle">Onmousemove event handler</label>
+                       <label index="onmousemove.description">Enter or edit the script to be run when the mouse pointer moves.</label>
+                       <label index="onmouseout.alttitle">Onmouseout event handler</label>
+                       <label index="onmouseout.description">Enter or edit the script to be run when mouse pointer moves out of the element.</label>
+                       <label index="onmouseover.alttitle">Onmouseover event handler</label>
+                       <label index="onmouseover.description">Enter or edit the script to be run when mouse pointer moves over the element.</label>
+                       <label index="onmouseup.alttitle">Onmouseup event handler</label>
+                       <label index="onmouseup.description">Enter or edit the script to be run when a mouse button is released.</label>
+               </languageKey>
+       </data>
+</T3locallang>
diff --git a/typo3/sysext/rtehtmlarea/extensions/EditElement/skin/htmlarea.css b/typo3/sysext/rtehtmlarea/extensions/EditElement/skin/htmlarea.css
new file mode 100644 (file)
index 0000000..467df54
--- /dev/null
@@ -0,0 +1,6 @@
+/* Selectors for the Edit Element extension of htmlArea RTE */
+/* TYPO3 SVN ID: $Id: htmlarea.css $ */
+.htmlarea-action-element-edit {
+       background-image: url('images/element-edit.png') !important;
+       background-position: 0 0 !important;
+}
diff --git a/typo3/sysext/rtehtmlarea/extensions/EditElement/skin/images/element-edit.png b/typo3/sysext/rtehtmlarea/extensions/EditElement/skin/images/element-edit.png
new file mode 100644 (file)
index 0000000..75b1272
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/EditElement/skin/images/element-edit.png differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/Language/locallang_csh.xml b/typo3/sysext/rtehtmlarea/extensions/Language/locallang_csh.xml
new file mode 100644 (file)
index 0000000..54af52e
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+       <meta type="array">
+               <description>CSH for Language Extension of htmlArea RTE</description>
+               <type>CSH</type>
+               <csh_table>xEXT_rtehtmlarea_Language</csh_table>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index=".alttitle">htmlArea RTE &gt; Language</label>
+                       <label index=".description">The Language feature allows to edit the language and text direction attributes of an element in the RTE editing area.</label>
+                       <label index=".details">The following items may appear in the RTE toolbar:
+- a selector box that allows to assign the language of contents of an element;
+- two buttons that allow to set the direction of text;
+- another button that allows to make the language marks visible wittin the RTE editing area.
+The language selector box may also appear in some dialogues along with a text direction selector box.</label>
+                       <label index=".image">EXT:rtehtmlarea/extensions/Language/skin/images/left_to_right.gif,
+EXT:rtehtmlarea/extensions/Language/skin/images/right_to_left.gif,
+EXT:rtehtmlarea/extensions/Language/skin/images/show-language-marks.gif</label>
+                       <label index=".image_descr">"Left to right" icon in the editor tool bar.
+"Right to left" icon in the editor tool bar.
+"Show language marks" icon in the editor tool bar.
+</label>
+                       <label index=".seeAlso">xEXT_rtehtmlarea_Language:languageCombo,
+xEXT_rtehtmlarea_Language:directionCombo,
+</label>
+                       <label index="languageCombo.alttitle">Language of contents</label>
+                       <label index="languageCombo.description">Select the language of the contents of the element.</label>
+                       <label index="languageCombo.details">The language selector box may appear in the RTE toolbar and in some dialogues.
+The selector shows the language currently assigned to the current element, if any.
+Selecting a language assigns it to the element. If a language was already assigned to the element, it is replaced by the newly selected language.
+Any currently assigned language may be removed by selecting the "Remove language mark" item at the top of the list of the selector box.</label>
+                       <label index="directionCombo.alttitle">Direction of text</label>
+                       <label index="directionCombo.description">Select the direction of text within the contents of the element.</label>
+                       <label index="directionCombo.details">The text direction selector box may appear in some dialogues.
+The selector shows the direction of text currently set on the current element, if any.
+Selecting a direction sets it on the element. If a direction was already set on the element, it is replaced by the newly selected direction.
+Any currently set direction may be removed by selecting the "Not set" item at the top of the list of the selector box.</label>
+               </languageKey>
+       </data>
+</T3locallang>
index b697257..1e1b148 100644 (file)
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <T3locallang>
        <meta type="array">
-               <description>Labels for dialogs of htmlArea RTE</description>
+               <description>Labels for dialogues of htmlArea RTE</description>
                <type>module</type>
        </meta>
        <data type="array">
                <languageKey index="default" type="array">
                        <label index="OK">OK</label>
                        <label index="Cancel">Cancel</label>
+                       <label index="Delete">Delete</label>
                        <label index="Close">Close</label>
                        <label index="Not set">Not set</label>
                        <label index="General">General</label>
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/edit-element.js b/typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/edit-element.js
new file mode 100644 (file)
index 0000000..97ae864
--- /dev/null
@@ -0,0 +1,482 @@
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/*
+ * EditElement plugin for htmlArea RTE
+ *
+ * TYPO3 SVN ID: $Id: acronym.js 8087 2010-07-04 20:18:10Z stan $
+ */
+HTMLArea.EditElement = HTMLArea.Plugin.extend({
+       constructor: function(editor, pluginName) {
+               this.base(editor, pluginName);
+       },
+       /*
+        * This function gets called by the class constructor
+        */
+       configurePlugin: function(editor) {
+               this.pageTSConfiguration = this.editorConfiguration.buttons.editelement;
+               this.removedFieldsets = (this.pageTSConfiguration && this.pageTSConfiguration.removeFieldsets) ? this.pageTSConfiguration.removeFieldsets : '';
+               this.properties = (this.pageTSConfiguration && this.pageTSConfiguration.properties) ? this.pageTSConfiguration.properties : '';
+               this.removedProperties = (this.properties && this.properties.removed) ? this.properties.removed : '';
+               /*
+                * Registering plugin "About" information
+                */
+               var pluginInformation = {
+                       version         : '1.0',
+                       developer       : 'Stanislas Rolland',
+                       developerUrl    : 'http://www.sjbr.ca/',
+                       copyrightOwner  : 'Stanislas Rolland',
+                       sponsor         : 'SJBR',
+                       sponsorUrl      : 'http://www.sjbr.ca/',
+                       license         : 'GPL'
+               };
+               this.registerPluginInformation(pluginInformation);
+               /*
+                * Registering the button
+                */
+               var buttonId = 'EditElement';
+               var buttonConfiguration = {
+                       id              : buttonId,
+                       tooltip         : this.localize('editElement'),
+                       action          : 'onButtonPress',
+                       dialog          : true,
+                       iconCls         : 'htmlarea-action-element-edit'
+               };
+               this.registerButton(buttonConfiguration);
+               return true;
+       },
+       /*
+        * Sets of default configuration values for dialogue form fields
+        */
+       configDefaults: {
+               combo: {
+                       editable: true,
+                       selectOnFocus: true,
+                       typeAhead: true,
+                       triggerAction: 'all',
+                       forceSelection: true,
+                       mode: 'local',
+                       valueField: 'value',
+                       displayField: 'text',
+                       helpIcon: true,
+                       tpl: '<tpl for="."><div ext:qtip="{value}" style="text-align:left;font-size:11px;" class="x-combo-list-item">{text}</div></tpl>'
+               }
+       },
+       /*
+        * This function gets called when the button was pressed
+        *
+        * @param       object          editor: the editor instance
+        * @param       string          id: the button id or the key
+        *
+        * @return      boolean         false if action is completed
+        */
+       onButtonPress: function(editor, id) {
+                       // Could be a button or its hotkey
+               var buttonId = this.translateHotKey(id);
+               buttonId = buttonId ? buttonId : id;
+                       // Get the parent element of the current selection
+               this.element = this.editor.getParentElement();
+               if (this.element && !/^body$/i.test(this.element.nodeName)) {
+                               // Open the dialogue window
+                       this.openDialogue(
+                               buttonId,
+                               'editElement',
+                               this.getWindowDimensions(
+                                       {
+                                               width: 450
+                                       },
+                                       buttonId
+                               ),
+                               this.buildTabItemsConfig(this.element),
+                               this.buildButtonsConfig(this.element, this.okHandler, this.deleteHandler)
+                       );
+               }
+               return false;
+       },
+       /*
+        * Open the dialogue window
+        *
+        * @param       string          buttonId: the button id
+        * @param       string          title: the window title
+        * @param       object          dimensions: the opening dimensions of the window
+        * @param       object          tabItems: the configuration of the tabbed panel
+        * @param       object          buttonsConfig: the configuration of the buttons
+        *
+        * @return      void
+        */
+       openDialogue: function (buttonId, title, dimensions, tabItems, buttonsConfig) {
+               this.dialog = new Ext.Window({
+                       title: this.getHelpTip('', title),
+                       cls: 'htmlarea-window',
+                       border: false,
+                       width: dimensions.width,
+                       height: 'auto',
+                               // As of ExtJS 3.1, JS error with IE when the window is resizable
+                       resizable: !Ext.isIE,
+                       iconCls: this.getButton(buttonId).iconCls,
+                       listeners: {
+                               render: {
+                                       fn: this.enableContextHelp
+                               },
+                               close: {
+                                       fn: this.onClose,
+                                       scope: this
+                               }
+                       },
+                       items: {
+                               xtype: 'tabpanel',
+                               activeTab: 0,
+                               defaults: {
+                                       xtype: 'container',
+                                       layout: 'form',
+                                       defaults: {
+                                               labelWidth: 150
+                                       }
+                               },
+                               listeners: {
+                                       tabchange: {
+                                               fn: this.syncHeight,
+                                               scope: this
+                                       }
+                               },
+                               items: tabItems
+                       },
+                       buttons: buttonsConfig
+               });
+               this.show();
+       },
+       /*
+        * Build the dialogue tab items config
+        *
+        * @param       object          element: the element being edited, if any
+        *
+        * @return      object          the tab items configuration
+        */
+       buildTabItemsConfig: function (element) {
+               var tabItems = [];
+               var generalTabItemConfig = [];
+               if (this.removedFieldsets.indexOf('identification') == -1) {
+                       this.addConfigElement(this.buildIdentificationFieldsetConfig(element), generalTabItemConfig);
+               }
+               if (this.removedFieldsets.indexOf('style') == -1 && this.removedProperties.indexOf('className') == -1) {
+                       this.addConfigElement(this.buildClassFieldsetConfig(element), generalTabItemConfig);
+               }
+               tabItems.push({
+                       title: this.localize('general'),
+                       itemId: 'general',
+                       items: generalTabItemConfig
+               });
+               if (this.removedFieldsets.indexOf('language') == -1 && this.getPluginInstance('Language')) {
+                       var languageTabItemConfig = [];
+                       this.addConfigElement(this.buildLanguageFieldsetConfig(element), languageTabItemConfig);
+                       tabItems.push({
+                               title: this.localize('Language'),
+                               itemId: 'language',
+                               items: languageTabItemConfig
+                       });
+               }
+               if (this.removedFieldsets.indexOf('events') == -1) {
+                       var eventsTabItemConfig = [];
+                       this.addConfigElement(this.buildEventsFieldsetConfig(element), eventsTabItemConfig);
+                       tabItems.push({
+                               title: this.localize('events'),
+                               itemId: 'events',
+                               items: eventsTabItemConfig
+                       });
+               }
+               return tabItems;
+       },
+       /*
+        * This function builds the configuration object for the Identification fieldset
+        *
+        * @param       object          element: the element being edited, if any
+        *
+        * @return      object          the fieldset configuration object
+        */
+       buildIdentificationFieldsetConfig: function (element) {
+               var itemsConfig = [];
+               if (this.removedProperties.indexOf('id') == -1) {
+                       itemsConfig.push({
+                               itemId: 'id',
+                               fieldLabel: this.getHelpTip('id', 'id'),
+                               value: element ? element.getAttribute('id') : '',
+                               width: ((this.properties['id'] && this.properties['id'].width) ? this.properties['id'].width : 300)
+                       });
+               }
+               if (this.removedProperties.indexOf('title') == -1) {
+                       itemsConfig.push({
+                               itemId: 'title',
+                               fieldLabel: this.getHelpTip('title', 'title'),
+                               value: element ? element.getAttribute('title') : '',
+                               width: ((this.properties['title'] && this.properties['title'].width) ? this.properties['title'].width : 300)
+                       });
+               }
+               return {
+                       xtype: 'fieldset',
+                       title: this.localize('identification'),
+                       defaultType: 'textfield',
+                       labelWidth: 100,
+                       defaults: {
+                               labelSeparator: ':'
+                       },
+                       items: itemsConfig
+               };
+       },
+       /*
+        * This function builds the configuration object for the CSS Class fieldset
+        *
+        * @param       object          element: the element being edited, if any
+        *
+        * @return      object          the fieldset configuration object
+        */
+       buildClassFieldsetConfig: function (element) {
+               var itemsConfig = [];
+               var stylingCombo = this.buildStylingField('className', 'className', 'className');
+               this.setStyleOptions(stylingCombo, element);
+               itemsConfig.push(stylingCombo);
+               return {
+                       xtype: 'fieldset',
+                       title: this.localize('className'),
+                       labelWidth: 100,
+                       defaults: {
+                               labelSeparator: ':'
+                       },
+                       items: itemsConfig
+               };
+       },
+       /*
+        * This function builds a style selection field
+        *
+        * @param       string          fieldName: the name of the field
+        * @param       string          fieldLabel: the label for the field
+        * @param       string          cshKey: the csh key
+        *
+        * @return      object          the style selection field object
+        */
+       buildStylingField: function (fieldName, fieldLabel, cshKey) {
+               return new Ext.form.ComboBox(Ext.apply({
+                       xtype: 'combo',
+                       itemId: fieldName,
+                       fieldLabel: this.getHelpTip(fieldLabel, cshKey),
+                       width: ((this.properties['className'] && this.properties['className'].width) ? this.properties['className'].width : 300),
+                       store: new Ext.data.ArrayStore({
+                               autoDestroy:  true,
+                               fields: [ { name: 'text'}, { name: 'value'}, { name: 'style'} ],
+                               data: [[this.localize('No style'), 'none']]
+                       })
+                       }, {
+                       tpl: '<tpl for="."><div ext:qtip="{value}" style="{style}text-align:left;font-size:11px;" class="x-combo-list-item">{text}</div></tpl>'
+                       }, this.configDefaults['combo']
+               ));
+       },
+       /*
+        * This function populates the class store and sets the selected option
+        *
+        * @param       object:         comboBox: the combobox object
+        * @param       object          element: the element being edited, if any
+        *
+        * @return      object          the fieldset configuration object
+        */
+       setStyleOptions: function (comboBox, element) {
+               var nodeName = element.nodeName.toLowerCase();
+               this.stylePlugin = this.getPluginInstance(HTMLArea.isBlockElement(element) ? 'BlockStyle' : 'TextStyle');
+               if (comboBox && this.stylePlugin) {
+                       var classNames = HTMLArea.DOM.getClassNames(element);
+                       this.stylePlugin.buildDropDownOptions(comboBox, nodeName);
+                       this.stylePlugin.setSelectedOption(comboBox, classNames, 'noUnknown');
+               }
+       },
+       /*
+        * This function builds the configuration object for the Language fieldset
+        *
+        * @param       object          element: the element being edited, if any
+        *
+        * @return      object          the fieldset configuration object
+        */
+       buildLanguageFieldsetConfig: function (element) {
+               var itemsConfig = [];
+               var languagePlugin = this.getPluginInstance('Language');
+               if (this.removedProperties.indexOf('language') == -1) {
+                       var selectedLanguage = !Ext.isEmpty(element) ? languagePlugin.getLanguageAttribute(element) : 'none';
+                       function initLanguageStore (store) {
+                               if (selectedLanguage !== 'none') {
+                                       store.removeAt(0);
+                                       store.insert(0, new store.recordType({
+                                               text: languagePlugin.localize('Remove language mark'),
+                                               value: 'none'
+                                       }));
+                               }
+                       }
+                       var languageStore = new Ext.data.JsonStore({
+                               autoDestroy:  true,
+                               autoLoad: true,
+                               root: 'options',
+                               fields: [ { name: 'text'}, { name: 'value'} ],
+                               url: this.getDropDownConfiguration('Language').dataUrl,
+                               listeners: {
+                                       load: initLanguageStore
+                               }
+                       });
+                       itemsConfig.push(Ext.apply({
+                               xtype: 'combo',
+                               fieldLabel: languagePlugin.getHelpTip('languageCombo', 'Language'),
+                               itemId: 'lang',
+                               store: languageStore,
+                               width: ((this.properties['language'] && this.properties['language'].width) ? this.properties['language'].width : 200),
+                               value: selectedLanguage
+                       }, this.configDefaults['combo']));
+               }
+               if (this.removedProperties.indexOf('direction') == -1) {
+                       itemsConfig.push(Ext.apply({
+                               xtype: 'combo',
+                               fieldLabel: languagePlugin.getHelpTip('directionCombo', 'Text direction'),
+                               itemId: 'dir',
+                               store: new Ext.data.ArrayStore({
+                                       autoDestroy:  true,
+                                       fields: [ { name: 'text'}, { name: 'value'}],
+                                       data: [
+                                               [languagePlugin.localize('Not set'), 'not set'],
+                                               [languagePlugin.localize('RightToLeft'), 'rtl'],
+                                               [languagePlugin.localize('LeftToRight'), 'ltr']
+                                       ]
+                               }),
+                               width: ((this.properties['direction'] && this.properties['dirrection'].width) ? this.properties['direction'].width : 200),
+                               value: !Ext.isEmpty(element) && element.dir ? element.dir : 'not set'
+                       }, this.configDefaults['combo']));
+               }
+               return {
+                       xtype: 'fieldset',
+                       title: this.localize('Language'),
+                       labelWidth: 100,
+                       defaults: {
+                               labelSeparator: ':'
+                       },
+                       items: itemsConfig
+               };
+       },
+       /*
+        * This function builds the configuration object for the Events fieldset
+        *
+        * @param       object          element: the element being edited, if any
+        *
+        * @return      object          the fieldset configuration object
+        */
+       buildEventsFieldsetConfig: function (element) {
+               var itemsConfig = [];
+               var events = ['onkeydown', 'onkeypress', 'onkeyup', 'onclick', 'ondblclick', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup'];
+               if (!/^(base|bdo|br|frame|frameset|head|html|iframe|meta|param|script|style|title)$/i.test(element.nodeName)) {
+                       Ext.each(events, function (event) {
+                               if (this.removedProperties.indexOf(event) == -1) {
+                                       itemsConfig.push({
+                                               itemId: event,
+                                               fieldLabel: this.getHelpTip(event, event),
+                                               value: element ? element.getAttribute(event) : ''
+                                       });
+                               }
+                       }, this);
+               }
+               return itemsConfig.length ? {
+                       xtype: 'fieldset',
+                       title: this.getHelpTip('events', 'events'),
+                       defaultType: 'textfield',
+                       labelWidth: 100,
+                       defaults: {
+                               labelSeparator: ':',
+                               width: ((this.properties['event'] && this.properties['event'].width) ? this.properties['event'].width : 300)
+                       },
+                       items: itemsConfig
+               } : null;
+       },
+       /*
+        * Build the dialogue buttons config
+        *
+        * @param       object          element: the element being edited, if any
+        * @param       function        okHandler: the handler for the ok button
+        * @param       function        deleteHandler: the handler for the delete button
+        *
+        * @return      object          the buttons configuration
+        */
+       buildButtonsConfig: function (element, okHandler, deleteHandler) {
+               var buttonsConfig = [this.buildButtonConfig('OK', okHandler)];
+               if (element) {
+                       buttonsConfig.push(this.buildButtonConfig('Delete', deleteHandler));
+               }
+               buttonsConfig.push(this.buildButtonConfig('Cancel', this.onCancel));
+               return buttonsConfig;
+       },
+       /*
+        * Handler when the ok button is pressed
+        */
+       okHandler: function (button, event) {
+               this.restoreSelection();
+               var textFields = this.dialog.findByType('textfield');
+               Ext.each(textFields, function (field) {
+                       this.element.setAttribute(field.getItemId(), field.getValue());
+               }, this);
+               var comboFields = this.dialog.findByType('combo');
+               Ext.each(comboFields, function (field) {
+                       var itemId = field.getItemId();
+                       var value = field.getValue();
+                       switch (itemId) {
+                               case 'className':
+                                       this.stylePlugin.applyClassChange(this.element, value);
+                                       break;
+                               case 'lang':
+                                       this.getPluginInstance('Language').setLanguageAttributes(this.element, value);
+                                       break;
+                               case 'dir':
+                                       this.element.setAttribute(itemId, (value == 'not set') ? '' : value);
+                                       break;
+                       }
+               }, this);
+               this.close();
+               event.stopEvent();
+       },
+       /*
+        * Handler when the delete button is pressed
+        */
+       deleteHandler: function (button, event) {
+               this.restoreSelection();
+               if (this.element) {
+                               // Delete the element
+                       HTMLArea.removeFromParent(this.element);
+               }
+               this.close();
+               event.stopEvent();
+       },
+       /*
+        * This function gets called when the toolbar is updated
+        */
+       onUpdateToolbar: function (button, mode, selectionEmpty, ancestors) {
+               if ((mode === 'wysiwyg') && this.editor.isEditable()) {
+                               // Disable the button if the first ancestor is the document body
+                       button.setDisabled(!ancestors.length || /^body$/i.test(ancestors[0].nodeName));
+                       if (this.dialog) {
+                               this.dialog.focus();
+                       }
+               }
+       }
+});
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/locallang.xml b/typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/locallang.xml
new file mode 100644 (file)
index 0000000..b60b82e
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- TYPO3 SVN ID: $Id: locallang.xml 6940 2010-02-21 15:56:10Z stan $ -->
+<T3locallang>
+       <meta type="array">
+               <description>Labels for Edit Element plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index="editElement">Edit element</label>
+                       <label index="general">General</label>
+                       <label index="identification">Identification</label>
+                       <label index="id">Id</label>
+                       <label index="title">Title</label>
+                       <label index="className">Class</label>
+                       <label index="events">Events</label>
+                       <label index="onkeydown">Onkeydown</label>
+                       <label index="onkeypress">Onkeypress</label>
+                       <label index="onkeyup">Onkeyup</label>
+                       <label index="onclick">Onclick</label>
+                       <label index="ondblclick">Ondblclick</label>
+                       <label index="onmousedown">Onmousedown</label>
+                       <label index="onmousemove">Onmousemove</label>
+                       <label index="onmouseout">Onmouseout</label>
+                       <label index="onmouseover">Onmouseover</label>
+                       <label index="onmouseup">Onmouseup</label>
+               </languageKey>
+       </data>
+</T3locallang>
\ No newline at end of file
index 99288c1..2fc036c 100644 (file)
@@ -81,7 +81,7 @@ HTMLArea.TextStyle = HTMLArea.Plugin.extend({
                /*
                 * Regular expression to check if an element is an inline elment
                 */
-               this.REInlineTags = /^(abbr|acronym|b|bdo|big|cite|code|del|dfn|em|i|ins|kbd|q|samp|small|span|strike|strong|sub|sup|tt|u|var)$/;
+               this.REInlineTags = /^(a|abbr|acronym|b|bdo|big|cite|code|del|dfn|em|i|img|ins|kbd|q|samp|small|span|strike|strong|sub|sup|tt|u|var)$/;
                
                        // Allowed attributes on inline elements
                this.allowedAttributes = new Array("id", "title", "lang", "xml:lang", "dir", "class");
@@ -92,7 +92,7 @@ HTMLArea.TextStyle = HTMLArea.Plugin.extend({
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : '2.0',
+                       version         : '2.1',
                        developer       : 'Stanislas Rolland',
                        developerUrl    : 'http://www.sjbr.ca/',
                        copyrightOwner  : 'Stanislas Rolland',
@@ -193,19 +193,25 @@ HTMLArea.TextStyle = HTMLArea.Plugin.extend({
                                }
                        }
                } else {
-                               // Add or remove class
-                       if (parent && !HTMLArea.isBlockElement(parent)) {
-                               if (className === "none" && parent.className && /\S/.test(parent.className)) {
-                                       classNames = parent.className.trim().split(" ");
-                                       HTMLArea.DOM.removeClass(parent, classNames[classNames.length-1]);
-                               }
-                               if (className !== "none") {
-                                       HTMLArea.DOM.addClass(parent, className);
-                               }
-                                       // Remove the span tag if it has no more attribute
-                               if ((parent.nodeName.toLowerCase() === "span") && !HTMLArea.hasAllowedAttributes(parent, this.allowedAttributes)) {
-                                       editor.removeMarkup(parent);
-                               }
+                       this.applyClassChange(parent, className);
+               }
+       },
+       /*
+        * This function applies the class change to the node
+        */
+       applyClassChange: function (node, className) {
+                       // Add or remove class
+               if (node && !HTMLArea.isBlockElement(node)) {
+                       if (className === 'none' && node.className && /\S/.test(node.className)) {
+                               classNames = node.className.trim().split(' ');
+                               HTMLArea.DOM.removeClass(node, classNames[classNames.length-1]);
+                       }
+                       if (className !== 'none') {
+                               HTMLArea.DOM.addClass(node, className);
+                       }
+                               // Remove the span tag if it has no more attribute
+                       if (/^span$/i.test(node.nodeName) && !HTMLArea.hasAllowedAttributes(node, this.allowedAttributes)) {
+                               this.editor.removeMarkup(node);
                        }
                }
        },
@@ -323,34 +329,62 @@ HTMLArea.TextStyle = HTMLArea.Plugin.extend({
                dropDown.setValue('none');
        },
        /*
+        * This function builds the options to be displayed in the dropDown box
+        */
+       buildDropDownOptions: function (dropDown, nodeName) {
+               var store = dropDown.getStore();
+               this.initializeDropDown(dropDown);
+               if (this.textStyles.isReady) {
+                       var allowedClasses = {};
+                       if (this.REInlineTags.test(nodeName)) {
+                               if (Ext.isDefined(this.cssArray[nodeName])) {
+                                       allowedClasses = this.cssArray[nodeName];
+                               } else if (this.showTagFreeClasses && Ext.isDefined(this.cssArray['all'])) {
+                                       allowedClasses = this.cssArray['all'];
+                               }
+                       }
+                       Ext.iterate(allowedClasses, function (cssClass, value) {
+                               store.add(new store.recordType({
+                                       text: value,
+                                       value: cssClass,
+                                       style: (!this.editor.config.disablePCexamples && HTMLArea.classesValues && HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) ? HTMLArea.classesValues[cssClass] : null
+                               }));
+                       }, this);
+               }
+       },
+       /*
         * This function sets the selected option of the dropDown box
         */
        setSelectedOption: function (dropDown, classNames, noUnknown, defaultClass) {
                var store = dropDown.getStore();
-               var index = store.findExact('value', classNames[classNames.length-1]);
-               if (index != -1) {
-                       dropDown.setValue(classNames[classNames.length-1]);
-                       if (!defaultClass) {
-                               store.getAt(0).set('text', this.localize('Remove style'));
+               dropDown.setValue('none');
+               if (classNames.length) {
+                       var index = store.findExact('value', classNames[classNames.length-1]);
+                       if (index != -1) {
+                               dropDown.setValue(classNames[classNames.length-1]);
+                               if (!defaultClass) {
+                                       store.getAt(0).set('text', this.localize('Remove style'));
+                               }
                        }
-               }
-               if (index == -1 && !noUnknown) {
-                       store.add(new store.recordType({
-                               text: this.localize('Unknown style'),
-                               value: classNames[classNames.length-1]
-                       }));
-                       index = store.getCount()-1;
-                       dropDown.setValue(classNames[classNames.length-1]);
-                       if (!defaultClass) {
-                               store.getAt(0).set('text', this.localize('Remove style'));
+                       if (index == -1 && !noUnknown) {
+                               store.add(new store.recordType({
+                                       text: this.localize('Unknown style'),
+                                       value: classNames[classNames.length-1]
+                               }));
+                               index = store.getCount()-1;
+                               dropDown.setValue(classNames[classNames.length-1]);
+                               if (!defaultClass) {
+                                       store.getAt(0).set('text', this.localize('Remove style'));
+                               }
                        }
+                       store.each(function (option) {
+                               if (("," + classNames.join(",") + ",").indexOf("," + option.get('value') + ",") != -1 && store.indexOf(option) != index) {
+                                       store.removeAt(store.indexOf(option));
+                               }
+                               return true;
+                       });
                }
-               store.each(function (option) {
-                       if (("," + classNames.join(",") + ",").indexOf("," + option.get('value') + ",") != -1 && store.indexOf(option) != index) {
-                               store.removeAt(store.indexOf(option));
-                       }
-                       return true;
-               });
+               dropDown.setDisabled(!(store.getCount()>1));
        },
        /*
         * This function updates the current value of the dropdown list
@@ -359,25 +393,7 @@ HTMLArea.TextStyle = HTMLArea.Plugin.extend({
                var editor = this.editor;
                var dropDown = this.getButton(dropDownId);
                if (dropDown) {
-                       var store = dropDown.getStore();
-                       this.initializeDropDown(dropDown);
-                       if (this.textStyles.isReady) {
-                               var allowedClasses = {};
-                               if (this.REInlineTags.test(nodeName)) {
-                                       if (Ext.isDefined(this.cssArray[nodeName])) {
-                                               allowedClasses = this.cssArray[nodeName];
-                                       } else if (this.showTagFreeClasses && Ext.isDefined(this.cssArray['all'])) {
-                                               allowedClasses = this.cssArray['all'];
-                                       }
-                               }
-                               Ext.iterate(allowedClasses, function (cssClass, value) {
-                                       store.add(new store.recordType({
-                                               text: value,
-                                               value: cssClass,
-                                               style: (!this.editor.config.disablePCexamples && HTMLArea.classesValues && HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) ? HTMLArea.classesValues[cssClass] : null
-                                       }));
-                               }, this);
-                       }
+                       this.buildDropDownOptions(dropDown, nodeName);
                        if (classNames.length && (selectionEmpty || fullNodeSelected)) {
                                this.setSelectedOption(dropDown, classNames);
                        }
index cc34a92..4333d2b 100644 (file)
@@ -468,55 +468,56 @@ body.ext-ie6 .htmlarea-context-menu .x-menu-item-icon {
 .htmlarea-action-deleted-text{ background-position: 0 -1566px !important; }
 .htmlarea-action-editor-show-about{ background-position: 0 -1624px !important; }
 .htmlarea-action-editor-toggle-mode{ background-position: 0 -1682px !important; }
-.htmlarea-action-emphasis{ background-position: 0 -1740px !important; }
-.htmlarea-action-find-replace{ background-position: 0 -1798px !important; }
-.htmlarea-action-horizontal-rule-insert{ background-position: 0 -1856px !important; }
-.htmlarea-action-image-edit{ background-position: 0 -1914px !important; }
-.htmlarea-action-indent{ background-position: 0 -1972px !important; }
-.htmlarea-action-inserted-text{ background-position: 0 -2030px !important; }
-.htmlarea-action-italic{ background-position: 0 -2088px !important; }
-.htmlarea-action-justify-center{ background-position: 0 -2146px !important; }
-.htmlarea-action-justify-full{ background-position: 0 -2204px !important; }
-.htmlarea-action-justify-left{ background-position: 0 -2262px !important; }
-.htmlarea-action-justify-right{ background-position: 0 -2320px !important; }
-.htmlarea-action-keyboard{ background-position: 0 -2378px !important; }
-.htmlarea-action-language-marks-show{ background-position: 0 -2436px !important; }
-.htmlarea-action-link-edit{ background-position: 0 -2494px !important; }
-.htmlarea-action-mono-spaced{ background-position: 0 -2552px !important; }
-.htmlarea-action-ordered-list{ background-position: 0 -2610px !important; }
-.htmlarea-action-outdent{ background-position: 0 -2668px !important; }
-.htmlarea-action-paragraph-insert-after{ background-position: 0 -2726px !important; }
-.htmlarea-action-paragraph-insert-before{ background-position: 0 -2784px !important; }
-.htmlarea-action-paste-behaviour{ background-position: 0 -2842px !important; }
-.htmlarea-action-paste-toggle{ background-position: 0 -2900px !important; }
-.htmlarea-action-paste{ background-position: 0 -2958px !important; }
-.htmlarea-action-quotation{ background-position: 0 -3016px !important; }
-.htmlarea-action-redo{ background-position: 0 -3074px !important; }
-.htmlarea-action-remove-format{ background-position: 0 -3132px !important; }
-.htmlarea-action-row-delete{ background-position: 0 -3190px !important; }
-.htmlarea-action-row-edit-properties{ background-position: 0 -3248px !important; }
-.htmlarea-action-row-insert-above{ background-position: 0 -3306px !important; }
-.htmlarea-action-row-insert-under{ background-position: 0 -3364px !important; }
-.htmlarea-action-row-split{ background-position: 0 -3422px !important; }
-.htmlarea-action-sample{ background-position: 0 -3480px !important; }
-.htmlarea-action-small{ background-position: 0 -3538px !important; }
-.htmlarea-action-smiley-insert{ background-position: 0 -3596px !important; }
-.htmlarea-action-span{ background-position: 0 -3654px !important; }
-.htmlarea-action-spell-check{ background-position: 0 -3712px !important; }
-.htmlarea-action-strike-through{ background-position: 0 -3770px !important; }
-.htmlarea-action-strong{ background-position: 0 -3828px !important; }
-.htmlarea-action-subscript{ background-position: 0 -3886px !important; }
-.htmlarea-action-superscript{ background-position: 0 -3944px !important; }
-.htmlarea-action-table-edit-properties{ background-position: 0 -4002px !important; }
-.htmlarea-action-table-insert{ background-position: 0 -4060px !important; }
-.htmlarea-action-table-restyle{ background-position: 0 -4118px !important; }
-.htmlarea-action-table-show-borders{ background-position: 0 -4176px !important; }
-.htmlarea-action-tag-insert{ background-position: 0 -4234px !important; }
-.htmlarea-action-text-direction-left-to-right{ background-position: 0 -4292px !important; }
-.htmlarea-action-text-direction-right-to-left{ background-position: 0 -4350px !important; }
-.htmlarea-action-underline{ background-position: 0 -4408px !important; }
-.htmlarea-action-undo{ background-position: 0 -4466px !important; }
-.htmlarea-action-unlink{ background-position: 0 -4524px !important; }
-.htmlarea-action-unordered-list{ background-position: 0 -4582px !important; }
-.htmlarea-action-user-element-edit{ background-position: 0 -4640px !important; }
-.htmlarea-action-variable{ background-position: 0 -4698px !important; }
+.htmlarea-action-element-edit{ background-position: 0 -1740px !important; }
+.htmlarea-action-emphasis{ background-position: 0 -1798px !important; }
+.htmlarea-action-find-replace{ background-position: 0 -1856px !important; }
+.htmlarea-action-horizontal-rule-insert{ background-position: 0 -1914px !important; }
+.htmlarea-action-image-edit{ background-position: 0 -1972px !important; }
+.htmlarea-action-indent{ background-position: 0 -2030px !important; }
+.htmlarea-action-inserted-text{ background-position: 0 -2088px !important; }
+.htmlarea-action-italic{ background-position: 0 -2146px !important; }
+.htmlarea-action-justify-center{ background-position: 0 -2204px !important; }
+.htmlarea-action-justify-full{ background-position: 0 -2262px !important; }
+.htmlarea-action-justify-left{ background-position: 0 -2320px !important; }
+.htmlarea-action-justify-right{ background-position: 0 -2378px !important; }
+.htmlarea-action-keyboard{ background-position: 0 -2436px !important; }
+.htmlarea-action-language-marks-show{ background-position: 0 -2494px !important; }
+.htmlarea-action-link-edit{ background-position: 0 -2552px !important; }
+.htmlarea-action-mono-spaced{ background-position: 0 -2610px !important; }
+.htmlarea-action-ordered-list{ background-position: 0 -2668px !important; }
+.htmlarea-action-outdent{ background-position: 0 -2726px !important; }
+.htmlarea-action-paragraph-insert-after{ background-position: 0 -2784px !important; }
+.htmlarea-action-paragraph-insert-before{ background-position: 0 -2842px !important; }
+.htmlarea-action-paste-behaviour{ background-position: 0 -2900px !important; }
+.htmlarea-action-paste-toggle{ background-position: 0 -2958px !important; }
+.htmlarea-action-paste{ background-position: 0 -3016px !important; }
+.htmlarea-action-quotation{ background-position: 0 -3074px !important; }
+.htmlarea-action-redo{ background-position: 0 -3132px !important; }
+.htmlarea-action-remove-format{ background-position: 0 -3190px !important; }
+.htmlarea-action-row-delete{ background-position: 0 -3248px !important; }
+.htmlarea-action-row-edit-properties{ background-position: 0 -3306px !important; }
+.htmlarea-action-row-insert-above{ background-position: 0 -3364px !important; }
+.htmlarea-action-row-insert-under{ background-position: 0 -3422px !important; }
+.htmlarea-action-row-split{ background-position: 0 -3480px !important; }
+.htmlarea-action-sample{ background-position: 0 -3538px !important; }
+.htmlarea-action-small{ background-position: 0 -3596px !important; }
+.htmlarea-action-smiley-insert{ background-position: 0 -3654px !important; }
+.htmlarea-action-span{ background-position: 0 -3712px !important; }
+.htmlarea-action-spell-check{ background-position: 0 -3770px !important; }
+.htmlarea-action-strike-through{ background-position: 0 -3828px !important; }
+.htmlarea-action-strong{ background-position: 0 -3886px !important; }
+.htmlarea-action-subscript{ background-position: 0 -3944px !important; }
+.htmlarea-action-superscript{ background-position: 0 -4002px !important; }
+.htmlarea-action-table-edit-properties{ background-position: 0 -4060px !important; }
+.htmlarea-action-table-insert{ background-position: 0 -4118px !important; }
+.htmlarea-action-table-restyle{ background-position: 0 -4176px !important; }
+.htmlarea-action-table-show-borders{ background-position: 0 -4234px !important; }
+.htmlarea-action-tag-insert{ background-position: 0 -4292px !important; }
+.htmlarea-action-text-direction-left-to-right{ background-position: 0 -4350px !important; }
+.htmlarea-action-text-direction-right-to-left{ background-position: 0 -4408px !important; }
+.htmlarea-action-underline{ background-position: 0 -4466px !important; }
+.htmlarea-action-undo{ background-position: 0 -4524px !important; }
+.htmlarea-action-unlink{ background-position: 0 -4582px !important; }
+.htmlarea-action-unordered-list{ background-position: 0 -4640px !important; }
+.htmlarea-action-user-element-edit{ background-position: 0 -4698px !important; }
+.htmlarea-action-variable{ background-position: 0 -4756px !important; }
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/actions/element-edit.png b/typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/actions/element-edit.png
new file mode 100644 (file)
index 0000000..75b1272
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/actions/element-edit.png differ
index c2c4abd..2d3e5ad 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/sprites/actions.gif and b/typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/sprites/actions.gif differ
index 733977f..12cb1c1 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/sprites/actions.png and b/typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/sprites/actions.png differ
index 384e37e..be0edc2 100644 (file)
                        <label index=".alttitle">htmlArea RTE</label>
                        <label index=".description">htmlArea RTE is a free, open-source, ExtJS-based editor for &lt;textarea&gt; fields featuring tight integration with TYPO3.</label>
                        <label index=".details">htmlArea RTE supports the following browsers: Firefox 1.5+, SeaMonkey 1.0+, Safari 3.0.4+, Google Chrome 1.0+ and Opera 9.62+ on any platform, and Internet Explorer 6.0+ on Windows.</label>
-                       <label index=".seeAlso">xEXT_rtehtmlarea_General:beUserSettings,xEXT_rtehtmlarea_PlainText,xEXT_rtehtmlarea_RemoveFormat</label>
+                       <label index=".seeAlso">xEXT_rtehtmlarea_General:beUserSettings,
+xEXT_rtehtmlarea_EditElement,
+xEXT_rtehtmlarea_Language,
+xEXT_rtehtmlarea_PlainText,
+xEXT_rtehtmlarea_RemoveFormat
+</label>
                        <label index="beUserSettings.alttitle">BE User settings</label>
                        <label index="beUserSettings.description">BE User settings let you specify some options of the RTE.</label>
                        <label index="beUserSettings.seeAlso">xEXT_rtehtmlarea_General:rteWidth,xEXT_rtehtmlarea_General:rteHeight,xEXT_rtehtmlarea_General:rteResize,xEXT_rtehtmlarea_General:rteMaxHeight,xEXT_rtehtmlarea_PlainText:behaviour,_MOD_user_setup</label>
index 56ffc32..f871246 100644 (file)
@@ -473,55 +473,56 @@ body.ext-ie6 .htmlarea-context-menu .x-menu-item-icon {
 .htmlarea-action-deleted-text{ background-position: 0 -1566px !important; }
 .htmlarea-action-editor-show-about{ background-position: 0 -1624px !important; }
 .htmlarea-action-editor-toggle-mode{ background-position: 0 -1682px !important; }
-.htmlarea-action-emphasis{ background-position: 0 -1740px !important; }
-.htmlarea-action-find-replace{ background-position: 0 -1798px !important; }
-.htmlarea-action-horizontal-rule-insert{ background-position: 0 -1856px !important; }
-.htmlarea-action-image-edit{ background-position: 0 -1914px !important; }
-.htmlarea-action-indent{ background-position: 0 -1972px !important; }
-.htmlarea-action-inserted-text{ background-position: 0 -2030px !important; }
-.htmlarea-action-italic{ background-position: 0 -2088px !important; }
-.htmlarea-action-justify-center{ background-position: 0 -2146px !important; }
-.htmlarea-action-justify-full{ background-position: 0 -2204px !important; }
-.htmlarea-action-justify-left{ background-position: 0 -2262px !important; }
-.htmlarea-action-justify-right{ background-position: 0 -2320px !important; }
-.htmlarea-action-keyboard{ background-position: 0 -2378px !important; }
-.htmlarea-action-language-marks-show{ background-position: 0 -2436px !important; }
-.htmlarea-action-link-edit{ background-position: 0 -2494px !important; }
-.htmlarea-action-mono-spaced{ background-position: 0 -2552px !important; }
-.htmlarea-action-ordered-list{ background-position: 0 -2610px !important; }
-.htmlarea-action-outdent{ background-position: 0 -2668px !important; }
-.htmlarea-action-paragraph-insert-after{ background-position: 0 -2726px !important; }
-.htmlarea-action-paragraph-insert-before{ background-position: 0 -2784px !important; }
-.htmlarea-action-paste-behaviour{ background-position: 0 -2842px !important; }
-.htmlarea-action-paste-toggle{ background-position: 0 -2900px !important; }
-.htmlarea-action-paste{ background-position: 0 -2958px !important; }
-.htmlarea-action-quotation{ background-position: 0 -3016px !important; }
-.htmlarea-action-redo{ background-position: 0 -3074px !important; }
-.htmlarea-action-remove-format{ background-position: 0 -3132px !important; }
-.htmlarea-action-row-delete{ background-position: 0 -3190px !important; }
-.htmlarea-action-row-edit-properties{ background-position: 0 -3248px !important; }
-.htmlarea-action-row-insert-above{ background-position: 0 -3306px !important; }
-.htmlarea-action-row-insert-under{ background-position: 0 -3364px !important; }
-.htmlarea-action-row-split{ background-position: 0 -3422px !important; }
-.htmlarea-action-sample{ background-position: 0 -3480px !important; }
-.htmlarea-action-small{ background-position: 0 -3538px !important; }
-.htmlarea-action-smiley-insert{ background-position: 0 -3596px !important; }
-.htmlarea-action-span{ background-position: 0 -3654px !important; }
-.htmlarea-action-spell-check{ background-position: 0 -3712px !important; }
-.htmlarea-action-strike-through{ background-position: 0 -3770px !important; }
-.htmlarea-action-strong{ background-position: 0 -3828px !important; }
-.htmlarea-action-subscript{ background-position: 0 -3886px !important; }
-.htmlarea-action-superscript{ background-position: 0 -3944px !important; }
-.htmlarea-action-table-edit-properties{ background-position: 0 -4002px !important; }
-.htmlarea-action-table-insert{ background-position: 0 -4060px !important; }
-.htmlarea-action-table-restyle{ background-position: 0 -4118px !important; }
-.htmlarea-action-table-show-borders{ background-position: 0 -4176px !important; }
-.htmlarea-action-tag-insert{ background-position: 0 -4234px !important; }
-.htmlarea-action-text-direction-left-to-right{ background-position: 0 -4292px !important; }
-.htmlarea-action-text-direction-right-to-left{ background-position: 0 -4350px !important; }
-.htmlarea-action-underline{ background-position: 0 -4408px !important; }
-.htmlarea-action-undo{ background-position: 0 -4466px !important; }
-.htmlarea-action-unlink{ background-position: 0 -4524px !important; }
-.htmlarea-action-unordered-list{ background-position: 0 -4582px !important; }
-.htmlarea-action-user-element-edit{ background-position: 0 -4640px !important; }
-.htmlarea-action-variable{ background-position: 0 -4698px !important; }
+.htmlarea-action-element-edit{ background-position: 0 -1740px !important; }
+.htmlarea-action-emphasis{ background-position: 0 -1798px !important; }
+.htmlarea-action-find-replace{ background-position: 0 -1856px !important; }
+.htmlarea-action-horizontal-rule-insert{ background-position: 0 -1914px !important; }
+.htmlarea-action-image-edit{ background-position: 0 -1972px !important; }
+.htmlarea-action-indent{ background-position: 0 -2030px !important; }
+.htmlarea-action-inserted-text{ background-position: 0 -2088px !important; }
+.htmlarea-action-italic{ background-position: 0 -2146px !important; }
+.htmlarea-action-justify-center{ background-position: 0 -2204px !important; }
+.htmlarea-action-justify-full{ background-position: 0 -2262px !important; }
+.htmlarea-action-justify-left{ background-position: 0 -2320px !important; }
+.htmlarea-action-justify-right{ background-position: 0 -2378px !important; }
+.htmlarea-action-keyboard{ background-position: 0 -2436px !important; }
+.htmlarea-action-language-marks-show{ background-position: 0 -2494px !important; }
+.htmlarea-action-link-edit{ background-position: 0 -2552px !important; }
+.htmlarea-action-mono-spaced{ background-position: 0 -2610px !important; }
+.htmlarea-action-ordered-list{ background-position: 0 -2668px !important; }
+.htmlarea-action-outdent{ background-position: 0 -2726px !important; }
+.htmlarea-action-paragraph-insert-after{ background-position: 0 -2784px !important; }
+.htmlarea-action-paragraph-insert-before{ background-position: 0 -2842px !important; }
+.htmlarea-action-paste-behaviour{ background-position: 0 -2900px !important; }
+.htmlarea-action-paste-toggle{ background-position: 0 -2958px !important; }
+.htmlarea-action-paste{ background-position: 0 -3016px !important; }
+.htmlarea-action-quotation{ background-position: 0 -3074px !important; }
+.htmlarea-action-redo{ background-position: 0 -3132px !important; }
+.htmlarea-action-remove-format{ background-position: 0 -3190px !important; }
+.htmlarea-action-row-delete{ background-position: 0 -3248px !important; }
+.htmlarea-action-row-edit-properties{ background-position: 0 -3306px !important; }
+.htmlarea-action-row-insert-above{ background-position: 0 -3364px !important; }
+.htmlarea-action-row-insert-under{ background-position: 0 -3422px !important; }
+.htmlarea-action-row-split{ background-position: 0 -3480px !important; }
+.htmlarea-action-sample{ background-position: 0 -3538px !important; }
+.htmlarea-action-small{ background-position: 0 -3596px !important; }
+.htmlarea-action-smiley-insert{ background-position: 0 -3654px !important; }
+.htmlarea-action-span{ background-position: 0 -3712px !important; }
+.htmlarea-action-spell-check{ background-position: 0 -3770px !important; }
+.htmlarea-action-strike-through{ background-position: 0 -3828px !important; }
+.htmlarea-action-strong{ background-position: 0 -3886px !important; }
+.htmlarea-action-subscript{ background-position: 0 -3944px !important; }
+.htmlarea-action-superscript{ background-position: 0 -4002px !important; }
+.htmlarea-action-table-edit-properties{ background-position: 0 -4060px !important; }
+.htmlarea-action-table-insert{ background-position: 0 -4118px !important; }
+.htmlarea-action-table-restyle{ background-position: 0 -4176px !important; }
+.htmlarea-action-table-show-borders{ background-position: 0 -4234px !important; }
+.htmlarea-action-tag-insert{ background-position: 0 -4292px !important; }
+.htmlarea-action-text-direction-left-to-right{ background-position: 0 -4350px !important; }
+.htmlarea-action-text-direction-right-to-left{ background-position: 0 -4408px !important; }
+.htmlarea-action-underline{ background-position: 0 -4466px !important; }
+.htmlarea-action-undo{ background-position: 0 -4524px !important; }
+.htmlarea-action-unlink{ background-position: 0 -4582px !important; }
+.htmlarea-action-unordered-list{ background-position: 0 -4640px !important; }
+.htmlarea-action-user-element-edit{ background-position: 0 -4698px !important; }
+.htmlarea-action-variable{ background-position: 0 -4756px !important; }
diff --git a/typo3/sysext/t3skin/rtehtmlarea/images/actions/element-edit.png b/typo3/sysext/t3skin/rtehtmlarea/images/actions/element-edit.png
new file mode 100644 (file)
index 0000000..75b1272
Binary files /dev/null and b/typo3/sysext/t3skin/rtehtmlarea/images/actions/element-edit.png differ
index c2c4abd..2d3e5ad 100644 (file)
Binary files a/typo3/sysext/t3skin/rtehtmlarea/images/sprites/actions.gif and b/typo3/sysext/t3skin/rtehtmlarea/images/sprites/actions.gif differ
index 733977f..12cb1c1 100644 (file)
Binary files a/typo3/sysext/t3skin/rtehtmlarea/images/sprites/actions.png and b/typo3/sysext/t3skin/rtehtmlarea/images/sprites/actions.png differ