Index: typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
===================================================================
--- typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (révision 9343)
+++ typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail)
@@ -568,7 +568,7 @@
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: typo3/sysext/rtehtmlarea/ext_localconf.php
===================================================================
--- typo3/sysext/rtehtmlarea/ext_localconf.php (révision 9345)
+++ typo3/sysext/rtehtmlarea/ext_localconf.php (copie de travail)
@@ -104,6 +104,11 @@
// 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: typo3/sysext/rtehtmlarea/ext_tables.php
===================================================================
--- typo3/sysext/rtehtmlarea/ext_tables.php (révision 9345)
+++ typo3/sysext/rtehtmlarea/ext_tables.php (copie de travail)
@@ -26,8 +26,10 @@
// Add contextual help files
$htmlAreaRteContextHelpFiles = array(
'General' => 'EXT:' . $_EXTKEY . '/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',
- 'PlainText' => 'EXT:' . $_EXTKEY . '/extensions/PlainText/locallang_csh.xml',
);
foreach ($htmlAreaRteContextHelpFiles as $key => $file) {
t3lib_extMgm::addLLrefForTCAdescr('xEXT_' . $_EXTKEY . '_' . $key, $file);
Index: typo3/sysext/rtehtmlarea/extensions/EditElement/class.tx_rtehtmlarea_editelement.php
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/EditElement/class.tx_rtehtmlarea_editelement.php (révision 0)
+++ typo3/sysext/rtehtmlarea/extensions/EditElement/class.tx_rtehtmlarea_editelement.php (révision 0)
@@ -0,0 +1,69 @@
+
+* 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 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
Index: typo3/sysext/rtehtmlarea/extensions/EditElement/locallang_csh.xml
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/EditElement/locallang_csh.xml (révision 0)
+++ typo3/sysext/rtehtmlarea/extensions/EditElement/locallang_csh.xml (révision 0)
@@ -0,0 +1,53 @@
+
+
+
+ CSH for Edit Element Extension of htmlArea RTE
+ CSH
+ xEXT_rtehtmlarea_EditElement
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: typo3/sysext/rtehtmlarea/extensions/EditElement/skin/htmlarea.css
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/EditElement/skin/htmlarea.css (révision 0)
+++ typo3/sysext/rtehtmlarea/extensions/EditElement/skin/htmlarea.css (révision 0)
@@ -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;
+}
Index: typo3/sysext/rtehtmlarea/extensions/EditElement/skin/images/element-edit.png
===================================================================
Impossible d'afficher : fichier considéré comme binaire.
svn:mime-type = application/octet-stream
Modification de propriétés sur typo3\sysext\rtehtmlarea\extensions\EditElement\skin\images\element-edit.png
___________________________________________________________________
Ajouté : svn:mime-type
+ application/octet-stream
Index: typo3/sysext/rtehtmlarea/extensions/Language/locallang_csh.xml
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/Language/locallang_csh.xml (révision 0)
+++ typo3/sysext/rtehtmlarea/extensions/Language/locallang_csh.xml (révision 0)
@@ -0,0 +1,41 @@
+
+
+
+ CSH for Language Extension of htmlArea RTE
+ CSH
+ xEXT_rtehtmlarea_Language
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml (révision 9343)
+++ typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml (copie de travail)
@@ -1,13 +1,14 @@
- Labels for dialogs of htmlArea RTE
+ Labels for dialogues of htmlArea RTEmodule
+
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/edit-element.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/edit-element.js (révision 0)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/EditElement/edit-element.js (révision 0)
@@ -0,0 +1,482 @@
+/***************************************************************
+* Copyright notice
+*
+* (c) 2010 Stanislas Rolland
+* 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: '
{text}
'
+ }
+ },
+ /*
+ * 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: '