Index: typo3/sysext/rtehtmlarea/doc/manual.sxw =================================================================== Impossible d'afficher : fichier considéré comme binaire. svn:mime-type = application/octet-stream Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js (révision 7150) +++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js (copie de travail) @@ -157,18 +157,24 @@ */ HTMLArea.Editor.prototype.getSelectionType = function(selection) { // By default set the type to "Text". - var type = "Text"; + var type = 'Text'; if (!selection) { var selection = this._getSelection(); } // Check if the actual selection is a Control if (selection && selection.rangeCount == 1) { - var range = selection.getRangeAt(0) ; - if (range.startContainer == range.endContainer - && (range.endOffset - range.startOffset) == 1 - && range.startContainer.nodeType == 1 - && /^(img|hr|li|table|tr|td|embed|object|ol|ul)$/i.test(range.startContainer.childNodes[range.startOffset].nodeName)) { - type = "Control"; + var range = selection.getRangeAt(0); + if (range.startContainer.nodeType == 1) { + if ( + // Gecko + (range.startContainer == range.endContainer && (range.endOffset - range.startOffset) == 1) || + // Opera and WebKit + (range.endContainer.nodeType == 3 && range.endOffset == 0 && range.startContainer.childNodes[range.startOffset].nextSibling == range.endContainer) + ) { + if (/^(img|hr|li|table|tr|td|embed|object|ol|ul|dl)$/i.test(range.startContainer.childNodes[range.startOffset].nodeName)) { + type = 'Control'; + } + } } } return type; Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (révision 7150) +++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) @@ -673,7 +673,18 @@ saveSelection: function (event) { var editor = this.getEditor(); if (editor.document.hasFocus()) { - this.bookmark = editor.getBookmark(editor._createRange(editor._getSelection())); + var selection = editor._getSelection(); + switch (selection.type.toLowerCase()) { + case 'none': + case 'text': + this.bookmark = editor.getBookmark(editor._createRange(selection)); + this.controlRange = null; + break; + case 'control': + this.controlRange = editor._createRange(selection); + this.bookmark = null; + break; + } } }, /* @@ -682,7 +693,7 @@ restoreSelection: function (event) { if (!Ext.isEmpty(this.bookmark) && this.triggered) { var editor = this.getEditor(); - editor.selectRange(editor.moveToBookmark(this.bookmark)); + editor.selectRange(this.bookmark ? editor.moveToBookmark(this.bookmark) : this.controlRange); this.triggered = false; } }, @@ -2011,10 +2022,13 @@ var editor = this.getEditor(); element.blur(); if (!Ext.isIE) { - editor.selectNodeContents(element.ancestor); + if (/^(img)$/i.test(element.ancestor.nodeName)) { + editor.selectNode(element.ancestor); + } else { + editor.selectNodeContents(element.ancestor); + } } else { - var nodeName = element.ancestor.nodeName.toLowerCase(); - if (nodeName == 'table' || nodeName == 'img') { + if (/^(img|table)$/i.test(element.ancestor.nodeName)) { var range = editor.document.body.createControlRange(); range.addElement(element.ancestor); range.select(); @@ -4442,7 +4456,18 @@ saveSelection: function () { // If IE, save the current selection if (Ext.isIE) { - this.bookmark = this.editor.getBookmark(this.editor._createRange(this.editor._getSelection())); + var selection = this.editor._getSelection(); + switch (selection.type.toLowerCase()) { + case 'none': + case 'text': + this.bookmark = this.editor.getBookmark(this.editor._createRange(selection)); + this.controlRange = null; + break; + case 'control': + this.controlRange = this.editor._createRange(selection); + this.bookmark = null; + break; + } } }, /* @@ -4452,7 +4477,10 @@ restoreSelection: function () { // If IE, restore the selection saved when the window was shown if (Ext.isIE) { - this.editor.selectRange(this.editor.moveToBookmark(this.bookmark)); + // Restoring the selection will not work if the inner html was replaced by the plugin + try { + this.editor.selectRange(this.bookmark ? this.editor.moveToBookmark(this.bookmark) : this.controlRange); + } catch (e) {} } }, /* Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js (révision 7150) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js (copie de travail) @@ -1,7 +1,7 @@ /*************************************************************** * Copyright notice * -* (c) 2008-2009 Stanislas Rolland +* (c) 2008-2010 Stanislas Rolland * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is @@ -32,203 +32,475 @@ * TYPO3 SVN ID: $Id$ */ DefaultImage = HTMLArea.Plugin.extend({ - - constructor : function(editor, pluginName) { + constructor: function(editor, pluginName) { this.base(editor, pluginName); }, - /* * This function gets called by the class constructor */ - configurePlugin : function(editor) { - + configurePlugin: function(editor) { this.baseURL = this.editorConfiguration.baseURL; this.pageTSConfiguration = this.editorConfiguration.buttons.image; if (this.pageTSConfiguration && this.pageTSConfiguration.properties && this.pageTSConfiguration.properties.removeItems) { - this.removeItems = this.pageTSConfiguration.properties.removeItems.split(","); - var layout = 0; - var padding = 0; - for (var i = 0, length = this.removeItems.length; i < length; ++i) { - this.removeItems[i] = this.removeItems[i].replace(/(?:^\s+|\s+$)/g, ""); - if (/^(align|border|float)$/i.test(this.removeItems[i])) ++layout; - if (/^(paddingTop|paddingRight|paddingBottom|paddingLeft)$/i.test(this.removeItems[i])) ++padding; + this.removeItems = this.pageTSConfiguration.properties.removeItems.split(','); + var layout = 0; + var padding = 0; + for (var i = 0, n = this.removeItems.length; i < n; ++i) { + this.removeItems[i] = this.removeItems[i].replace(/(?:^\s+|\s+$)/g, ''); + if (/^(align|border|float)$/i.test(this.removeItems[i])) { + ++layout; } - if (layout == 3) this.removeItems[this.removeItems.length] = "layout"; - if (layout == 4) this.removeItems[this.removeItems.length] = "padding"; + if (/^(paddingTop|paddingRight|paddingBottom|paddingLeft)$/i.test(this.removeItems[i])) { + ++padding; + } + } + if (layout == 3) { + this.removeItems.push('layout'); + } + if (layout == 4) { + this.removeItems.push('padding'); + } + this.removeItems = new RegExp( '^(' + this.removeItems.join('|') + ')$', 'i'); + } else { + this.removeItems = new RegExp( '^(none)$', 'i'); } - /* * Registering plugin "About" information */ var pluginInformation = { - version : "1.0", - developer : "Stanislas Rolland", - developerUrl : "http://www.ajbr.ca/", - copyrightOwner : "Stanislas Rolland", - sponsor : "SJBR", - sponsorUrl : "http://www.sjbr.ca/", - license : "GPL" + version : '2.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 = "InsertImage"; + var buttonId = 'InsertImage'; var buttonConfiguration = { id : buttonId, - tooltip : this.localize("insertimage"), - action : "onButtonPress", + tooltip : this.localize('insertimage'), + action : 'onButtonPress', hotKey : (this.pageTSConfiguration ? this.pageTSConfiguration.hotKey : null), dialog : true }; this.registerButton(buttonConfiguration); - return true; }, - /* + * Sets of default configuration values for dialogue form fields + */ + configDefaults: { + combo: { + editable: 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 - * @param object target: the target element of the contextmenu event, when invoked from the context menu * * @return boolean false if action is completed */ - onButtonPress : function(editor, id, target) { - + onButtonPress: function(editor, id) { // Could be a button or its hotkey var buttonId = this.translateHotKey(id); buttonId = buttonId ? buttonId : id; - - var image, outparam = null; - this.editor.focusEditor(); - - if (typeof(target) !== "undefined") { - image = target; - } else { - image = this.editor.getParentElement(); + this.editor.focus(); + this.image = this.editor.getParentElement(); + if (this.image && !/^img$/i.test(this.image.nodeName)) { + this.image = null; } - if (image && !/^img$/i.test(image.nodeName)) { - image = null; - } - if (image) { - outparam = { - f_base : this.baseURL, - f_url : image.getAttribute("src"), - f_alt : image.alt, - f_border : isNaN(parseInt(image.style.borderWidth)) ? "" : parseInt(image.style.borderWidth), - f_align : image.style.verticalAlign, - f_top : isNaN(parseInt(image.style.paddingTop)) ? "" : parseInt(image.style.paddingTop), - f_right : isNaN(parseInt(image.style.paddingRight)) ? "" : parseInt(image.style.paddingRight), - f_bottom : isNaN(parseInt(image.style.paddingBottom)) ? "" : parseInt(image.style.paddingBottom), - f_left : isNaN(parseInt(image.style.paddingLeft)) ? "" : parseInt(image.style.paddingLeft), - f_float : HTMLArea.is_ie ? image.style.styleFloat : image.style.cssFloat + if (this.image) { + this.parameters = { + base: this.baseURL, + url: this.image.getAttribute('src'), + alt: this.image.alt, + border: isNaN(parseInt(this.image.style.borderWidth)) ? '' : parseInt(this.image.style.borderWidth), + align: this.image.style.verticalAlign ? this.image.style.verticalAlign : '', + paddingTop: isNaN(parseInt(this.image.style.paddingTop)) ? '' : parseInt(this.image.style.paddingTop), + paddingRight: isNaN(parseInt(this.image.style.paddingRight)) ? '' : parseInt(this.image.style.paddingRight), + paddingBottom: isNaN(parseInt(this.image.style.paddingBottom)) ? '' : parseInt(this.image.style.paddingBottom), + paddingLeft: isNaN(parseInt(this.image.style.paddingLeft)) ? '' : parseInt(this.image.style.paddingLeft), + cssFloat: Ext.isIE ? this.image.style.styleFloat : this.image.style.cssFloat }; + } else { + this.parameters = { + base: this.baseURL, + url: '', + alt: '', + border: '', + align: '', + paddingTop: '', + paddingRight: '', + paddingBottom: '', + paddingLeft: '', + cssFloat: '' + }; } - this.image = image; - - this.dialog = this.openDialog("InsertImage", this.makeUrlFromPopupName("insert_image"), "insertImage", outparam, {width:600, height:610}); + // Open dialogue window + this.openDialogue( + buttonId, + 'Insert Image', + this.getWindowDimensions( + { + width: 460, + height:300 + }, + buttonId + ), + this.buildTabItems() + ); return false; }, - /* - * Insert the image + * Open the dialogue window * - * @param object param: the returned values + * @param string buttonId: the button id + * @param string title: the window title + * @param integer dimensions: the opening width of the window + * @param object tabItems: the configuration of the tabbed panel * - * @return boolean false + * @return void */ - insertImage : function(param) { - if (typeof(param) != "undefined" && typeof(param.f_url) != "undefined") { - this.editor.focusEditor(); - var image = this.image; - if (!image) { - var selection = this.editor._getSelection(); - var range = this.editor._createRange(selection); - this.editor._doc.execCommand("InsertImage", false, param.f_url); - if (HTMLArea.is_ie) { - image = range.parentElement(); - if (!/^img$/i.test(image.nodeName)) { - image = image.previousSibling; + openDialogue: function (buttonId, title, dimensions, tabItems) { + this.dialog = new Ext.Window({ + title: this.localize(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: buttonId, + listeners: { + close: { + fn: this.onClose, + scope: this + } + }, + items: { + xtype: 'tabpanel', + itemId: 'tabpanel', + activeTab: 0, + defaults: { + xtype: 'container', + layout: 'form', + defaults: { + labelWidth: 100 } - } else { - var selection = this.editor._getSelection(); - var range = this.editor._createRange(selection); - image = range.startContainer; - if (HTMLArea.is_opera) { - image = image.parentNode; + }, + listeners: { + tabchange: { + fn: this.syncHeight, + scope: this } - image = image.lastChild; - while(image && !/^img$/i.test(image.nodeName)) { - image = image.previousSibling; - } - } - } else { - image.src = param.f_url; - } - - for (var field in param) { - if (param.hasOwnProperty(field)) { - var value = param[field]; - switch (field) { - case "f_alt" : - image.alt = value; - break; - case "f_border" : - if (parseInt(value)) { - image.style.borderWidth = parseInt(value)+"px"; - image.style.borderStyle = "solid"; - } else { - image.style.borderWidth = ""; - image.style.borderStyle = "none"; + }, + items: tabItems + }, + buttons: [ + this.buildButtonConfig('OK', this.onOK), + this.buildButtonConfig('Cancel', this.onCancel) + ] + }); + this.show(); + }, + /* + * Build the configuration of the the tab items + * + * @return array the configuration array of tab items + */ + buildTabItems: function () { + var tabItems = []; + // General tab + tabItems.push({ + title: this.localize('General'), + items: [{ + xtype: 'fieldset', + defaultType: 'textfield', + defaults: { + helpIcon: true, + width: 300, + labelSeparator: '' + }, + items: [{ + itemId: 'url', + fieldLabel: this.localize('Image URL:'), + value: this.parameters.url, + helpTitle: this.localize('Enter the image URL here') + },{ + itemId: 'alt', + fieldLabel: this.localize('Alternate text:'), + value: this.parameters.alt, + helpTitle: this.localize('For browsers that dont support images') + } + ] + },{ + xtype: 'fieldset', + title: this.localize('Image Preview'), + items: [{ + // The preview iframe + xtype: 'box', + itemId: 'image-preview', + autoEl: { + name: 'ipreview', + tag: 'iframe', + cls: 'image-preview', + src: this.parameters.url } - break; - case "f_align" : - image.style.verticalAlign = value; - break; - case "f_top" : - if (parseInt(value)) { - image.style.paddingTop = parseInt(value)+"px"; - } else { - image.style.paddingTop = ""; + },{ + xtype: 'button', + minWidth: 150, + text: this.localize('Preview'), + itemId: 'preview', + style: { + marginTop: '5px', + 'float': 'right' + }, + listeners: { + click: { + fn: this.onPreviewClick, + scope: this + } } - break; - case "f_right" : - if (parseInt(value)) { - image.style.paddingRight = parseInt(value)+"px"; - } else { - image.style.paddingRight = ""; + } + ] + } + ] + }); + // Layout tab + if (!this.removeItems.test('layout')) { + tabItems.push({ + title: this.localize('Layout'), + items: [{ + xtype: 'fieldset', + defaultType: 'textfield', + defaults: { + helpIcon: true, + width: 250, + labelSeparator: '' + }, + items: [ + Ext.apply({ + xtype: 'combo', + fieldLabel: this.localize('Image alignment:'), + itemId: 'align', + value: this.parameters.align, + helpTitle: this.localize('Positioning of this image'), + store: new Ext.data.ArrayStore({ + autoDestroy: true, + fields: [ { name: 'text'}, { name: 'value'}], + data: [ + [this.localize('Not set'), ''], + [this.localize('Bottom'), 'bottom'], + [this.localize('Middle'), 'middle'], + [this.localize('Top'), 'top'] + ] + }), + hidden: this.removeItems.test('align'), + hideLabel: this.removeItems.test('align'), + }, this.configDefaults['combo']) + ,{ + itemId: 'border', + fieldLabel: this.localize('Border thickness:'), + width: 100, + value: this.parameters.border, + helpTitle: this.localize('Leave empty for no border'), + hidden: this.removeItems.test('border'), + hideLabel: this.removeItems.test('border') + }, + Ext.apply({ + xtype: 'combo', + fieldLabel: this.localize('Float:'), + itemId: 'cssFloat', + value: this.parameters.cssFloat, + helpTitle: this.localize('Where the image should float'), + store: new Ext.data.ArrayStore({ + autoDestroy: true, + fields: [ { name: 'text'}, { name: 'value'}], + data: [ + [this.localize('Not set'), ''], + [this.localize('Non-floating'), 'none'], + [this.localize('Left'), 'left'], + [this.localize('Right'), 'right'] + ] + }), + hidden: this.removeItems.test('float'), + hideLabel: this.removeItems.test('float') + }, this.configDefaults['combo']) + ] + }] + }); + } + // Padding tab + if (!this.removeItems.test('padding')) { + tabItems.push({ + title: this.localize('Spacing and padding'), + items: [{ + xtype: 'fieldset', + defaultType: 'textfield', + defaults: { + helpIcon: true, + width: 100, + labelSeparator: '' + }, + items: [{ + itemId: 'paddingTop', + fieldLabel: this.localize('Top:'), + value: this.parameters.paddingTop, + helpTitle: this.localize('Top padding'), + hidden: this.removeItems.test('paddingTop'), + hideLabel: this.removeItems.test('paddingTop') + },{ + itemId: 'paddingRight', + fieldLabel: this.localize('Right:'), + value: this.parameters.paddingRight, + helpTitle: this.localize('Right padding'), + hidden: this.removeItems.test('paddingRight'), + hideLabel: this.removeItems.test('paddingRight') + },{ + itemId: 'paddingBottom', + fieldLabel: this.localize('Bottom:'), + value: this.parameters.paddingBottom, + helpTitle: this.localize('Bottom padding'), + hidden: this.removeItems.test('paddingBottom'), + hideLabel: this.removeItems.test('paddingBottom') + },{ + itemId: 'paddingLeft', + fieldLabel: this.localize('Left:'), + value: this.parameters.paddingLeft, + helpTitle: this.localize('Left padding'), + hidden: this.removeItems.test('paddingLeft'), + hideLabel: this.removeItems.test('paddingLeft') } - break; - case "f_bottom" : - if (parseInt(value)) { - image.style.paddingBottom = parseInt(value)+"px"; - } else { - image.style.paddingBottom = ""; - } - break; - case "f_left" : - if (parseInt(value)) { - image.style.paddingLeft = parseInt(value)+"px"; - } else { - image.style.paddingLeft = ""; - } - break; - case "f_float" : - if (HTMLArea.is_ie) { - image.style.styleFloat = value; - } else { - image.style.cssFloat = value; - } - break; - } + ] + }] + }); + } + return tabItems; + }, + /* + * Handler invoked when the Preview button is clicked + */ + onPreviewClick: function () { + var tabPanel = this.dialog.find('itemId', 'tabpanel')[0]; + var urlField = this.dialog.find('itemId', 'url')[0]; + var url = urlField.getValue().trim(); + if (url) { + try { + window.ipreview.location.replace(url); + } catch (e) { + Ext.MessageBox.alert('', this.localize('image_url_invalid'), function () { tabPanel.setActiveTab(0); urlField.focus(); }); + } + } else { + Ext.MessageBox.alert('', this.localize('image_url_first'), function () { tabPanel.setActiveTab(0); urlField.focus(); }); + } + return false; + }, + /* + * Handler invoked when the OK button is clicked + */ + onOK: function () { + var urlField = this.dialog.find('itemId', 'url')[0]; + var url = urlField.getValue().trim(); + if (url) { + var fieldNames = ['url', 'alt', 'align', 'border', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'cssFloat']; + Ext.each(fieldNames, function (fieldName) { + var field = this.dialog.find('itemId', fieldName)[0]; + if (field && !field.hidden) { + this.parameters[fieldName] = field.getValue(); } + }, this); + this.insertImage(); + this.close(); + } else { + var tabPanel = this.dialog.find('itemId', 'tabpanel')[0]; + Ext.MessageBox.alert('', this.localize('image_url_required'), function () { tabPanel.setActiveTab(0); urlField.focus(); }); + } + return false; + }, + /* + * Insert the image + */ + insertImage: function() { + this.editor.focus(); + this.restoreSelection(); + var image = this.image; + if (!image) { + var selection = this.editor._getSelection(); + var range = this.editor._createRange(selection); + this.editor.document.execCommand('InsertImage', false, this.parameters.url); + if (Ext.isWebKit) { + this.editor.cleanAppleStyleSpans(this.editor.document.body); } - this.dialog.close(); + if (Ext.isIE) { + image = range.parentElement(); + if (!/^img$/i.test(image.nodeName)) { + image = image.previousSibling; + } + this.editor.selectNode(image); + } else { + var selection = this.editor._getSelection(); + var range = this.editor._createRange(selection); + image = range.startContainer; + image = image.lastChild; + while (image && !/^img$/i.test(image.nodeName)) { + image = image.previousSibling; + } + } + } else { + image.src = this.parameters.url; } - return false; + if (/^img$/i.test(image.nodeName)) { + Ext.iterate(this.parameters, function (fieldName, value) { + switch (fieldName) { + case 'alt': + image.alt = value; + break; + case 'border': + if (parseInt(value)) { + image.style.borderWidth = parseInt(value) + 'px'; + image.style.borderStyle = 'solid'; + } else { + image.style.borderWidth = ''; + image.style.borderStyle = 'none'; + } + break; + case 'align': + image.style.verticalAlign = value; + break; + case 'paddingTop': + case 'paddingRight': + case 'paddingBottom': + case 'paddingLeft': + if (parseInt(value)) { + image.style[fieldName] = parseInt(value) + 'px'; + } else { + image.style[fieldName] = ''; + } + break; + case 'cssFloat': + if (Ext.isIE) { + image.style.styleFloat = value; + } else { + image.style.cssFloat = value; + } + break; + } + }); + } } }); - Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/locallang.xml =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/locallang.xml (révision 7150) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/locallang.xml (copie de travail) @@ -1,5 +1,5 @@ - + Labels for Image plugin of htmlArea RTE @@ -14,7 +14,7 @@ - + Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/popups/insert_image.html =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/popups/insert_image.html (révision 7150) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/popups/insert_image.html (copie de travail) @@ -1,205 +0,0 @@ - - - - - Insert Image - - - - -
-
Insert Image
-
-
- - - -
-
-
- - -
-
-
- Layout -
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
-
- Spacing and padding -
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
-
-
- Image Preview -
- -
-
-
- - -
-
-
-
- - Index: typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css (révision 7150) +++ typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css (copie de travail) @@ -233,6 +233,9 @@ text-decoration: underline; } /* Selectors for dialogue windows */ +.htmlarea-window ul.x-tab-strip { + list-style: none; +} .htmlarea-window .x-tab-panel-body { background-color: #EFEFF4; } @@ -240,7 +243,9 @@ margin: 3px; } .htmlarea-window .x-form-item-label { + font-size: 10px; text-align: right; + margin: 0; padding: 3px 5px 0 5px; } .htmlarea-window .x-btn-text { @@ -250,6 +255,11 @@ .htmlarea-window .x-form-check-wrap { padding-top: 3px; } +.htmlarea-window iframe { + background-color: #FFF; + color: #000; + border: 1px solid #A2AAB8; +} .htmlarea-window .show-color { margin-top: 10px; margin-left: 5px; @@ -272,186 +282,17 @@ .htmlarea-custom-colors em span { width: 100%; } -.popupwin { - background-color:#e4e0db;color:ButtonText; - font:11px Tahoma,Verdana,sans-serif; - border-style:none;margin:5px;padding:0; -} -.popupwin .title { - clear:both; - background-color:#ddf;color:#000; - font-weight:bold;font-size:120%;letter-spacing:2px; - border-top:0px;border-bottom:1px solid black;margin-top:0px;margin-bottom:10px;padding:3px 10px; -} -.popupwin p { - margin: 0.5em 0; -} -.popupwin h1 { - font-weight: bold; font-size: 1.2em; - padding: .3em 0; border-bottom: 1px solid #999; -} -.popupwin a:link, .popupwin a:visited { - color: #00f; -} -.popupwin a:hover { - color: #f00; -} -.popupwin a:active { - color: #f80; -} -.popupwin #tabbar { position: relative; left: 10px; } -.popupwin .tab { - color: #454; background-color: #66f; cursor: pointer; - margin-left: -5px; float: left; position: relative; top: -3px; left: -2px; z-index: 0; - border: 1px solid black; border-top: none; padding: 2px 10px 3px 10px; - -moz-border-radius: 0px 0px 4px 4px; - border-radius: 0px 0px 4px 4px; -} -.popupwin .tab-current { - color: #000; background-color: #ddf; - top: -4px; z-index: 10; - padding: 3px 10px 4px 10px; -} -.popupwin .content, .popupwin #content { - border-style:none; - margin:0;padding:0; -} -.popupwin ul { - list-style-type:none; - border-style:none;margin:0;padding:0; -} -.popupwin li { - margin:4px 0; -} -.popupwin select { - display:inline; -} -.popupwin table { - border-collapse:collapse;border-style:none;margin:0;padding:0; -} -.popupwin thead { - font-weight: bold; background-color: #ddf; -} -.popupwin td { - padding: 0.2em; -} -.popupwin form { - background-color:#e4e0db; - border-style:none;margin:0;padding:0; -} -.popupwin form p { - margin-top:5px;margin-bottom:5px; -} -.popupwin fieldset { - display:block; - margin:5px 5px 0 5px;padding:0 5px 2px 5px; -} -.popupwin fieldset div { - margin:3px 0; -} -.popupwin .floating { - float:left; -} -.popupwin legend { - font-weight:bold;padding:0 3px; -} -.popupwin .field { - float:left;text-align:left; - margin-left:5px;padding:2px 5px; -} -.popupwin label { - text-align:left; - margin-left:5px;padding:2px 5px; -} -.popupwin fieldset table { - font-size:11px;font-family:Tahoma,Verdana,sans-serif; - border-style:none;margin:2px 0;padding:0; -} -.popupwin .buttons { - clear:both;text-align:right; - border-top:1px solid #999;margin-top:10px;padding:5px; -} -.popupwin span.colorButton { - float:left; - padding:2px 0; -} -.popupwin span.colorButtonNoFloat { - padding:2px 0; -} -.popupwin select, .popupwin input, .popupwin button, .popupwin textarea, .popupwin table, .popupwin label { - font:11px Tahoma,Verdana,sans-serif; -} -.popupwin button { - background-color:#e4e0db; - width:8em; - padding:0; -} -.popupwin dl, .popupwin dt, .popupwin dd { - display: block; -} -.popupwin dt, .popupwin dd { - margin:3px 0; -} -.popupwin button.long-button { - width:10em; -} -.popupwin .fl { - float:left;text-align:right; - width:15em; - padding:2px 5px; -} -.popupwin .fl-borderCollapse { - float:left;text-align:right; - width:13em; - margin-left:10px;padding:2px 5px; -} -.popupwin .fr { - float:left;text-align:right; - width:9em; - padding:2px 5px; -} -.popupwin .space { - clear:left; - padding:2px; -} -.popupwin .label { - text-align:right; - width:8em; -} -.popupwin .checkbox { - text-align:left; - padding:2px 5px; -} -.popupwin .postlabel { - text-align:left; - padding:2px 5px; -} -.popupwin input.value { - width:30em; -} -.popupwin input.shorter-value { - width:17em; -} /* Selectors for the About dialogue */ .htmlarea-window .about-plugins .x-list-body dt { overflow: auto; white-space: normal; } -/* Selectors for the Default Image dialogue */ -.htmlarea-default-image #image, .htmlarea-default-image #alt { - white-space:nowrap; +/* Selectors for the default image dialogue */ +.htmlarea-window .image-preview { + height: 300; + width: 99%; + float: right; } -.htmlarea-default-image button.preview { - margin-left:5px;vertical-align:top; - white-space:normal; -} -.htmlarea-default-image div.imagepreview { - text-align:center; -} -.htmlarea-default-image div.imagepreview iframe { - width:300px;height:200px; - border:1px solid gray;margin:5px 0px; -} /* Selectors for the InsertSmiley plugin */ .htmlarea-window .emoticon-array { padding: 10px; @@ -493,9 +334,6 @@ float: right; height: 450px; margin: 9px 0px; - background-color: #FFF; - color: #000; - border: 1px solid #A2AAB8; } /* Selectors for the ContextMenu plugin */ .htmlarea-context-menu { @@ -504,6 +342,16 @@ font-family: Verdana, Helvetica, Geneva, Arial, sans-serif; font-size:10px; } +.htmlarea-context-menu ul { + list-style: none; + margin: 0; +} +.htmlarea-context-menu li { + margin: 0; +} +.htmlarea-context-menu a { + font-weight: normal; +} .htmlarea-context-menu .button { background-color:transparent; background-repeat:no-repeat; Index: typo3/sysext/t3skin/rtehtmlarea/htmlarea.css =================================================================== --- typo3/sysext/t3skin/rtehtmlarea/htmlarea.css (révision 7150) +++ typo3/sysext/t3skin/rtehtmlarea/htmlarea.css (copie de travail) @@ -239,6 +239,9 @@ text-decoration: underline; } /* Selectors for dialogue windows */ +.htmlarea-window ul.x-tab-strip { + list-style: none; +} .htmlarea-window .x-tab-panel-body { background-color: #EFEFF4; } @@ -246,7 +249,9 @@ margin: 3px; } .htmlarea-window .x-form-item-label { + font-size: 10px; text-align: right; + margin: 0; padding: 3px 5px 0 5px; } .htmlarea-window .x-btn-text { @@ -256,6 +261,11 @@ .htmlarea-window .x-form-check-wrap { padding-top: 3px; } +.htmlarea-window iframe { + background-color: #FFF; + color: #000; + border: 1px solid #A2AAB8; +} .htmlarea-window .show-color { margin-top: 10px; margin-left: 5px; @@ -278,187 +288,17 @@ .htmlarea-custom-colors em span { width: 100%; } -.popupwin { - color: #212424;background-color:#EFEFF4; - font-size:11px;font-family:Verdana, Helvetica, Geneva, Arial, sans-serif; - border-style:none;margin:5px;padding:0; -} -.popupwin .title { - clear:both; - color: #FFFFFF; background-color: #B8BEC9; background-image: url('alt_menu_mainitem_bg.gif'); background-position: top left; background-repeat: repeat-x; - font-weight:bold;font-size:120%; - border-top:0px;border-bottom:1px solid #A2AAB8;margin-top:0px;margin-bottom:10px;padding:3px 10px; -} -.popupwin p { - margin: 0.5em 0; -} -.popupwin h1 { - font-weight: bold; font-size: 1.1em; - padding: .3em 0; border-bottom: 1px solid #999; -} -.popupwin a:link, .popupwin a:visited { - color: #00f; -} -.popupwin a:hover { - color: #f00; -} -.popupwin a:active { - color: #f80; -} -.popupwin #tabbar { position: relative; left: 10px; } -.popupwin .tab { - color: #454; background-color: #66f; cursor: pointer; - margin-left: -5px; float: left; position: relative; top: -3px; left: -2px; z-index: 0; - border: 1px solid black; border-top: none; padding: 2px 10px 3px 10px; -} -.popupwin .tab-current { - color: #000; background-color: #ddf; - top: -4px; z-index: 10; - padding: 3px 10px 4px 10px; -} -.popupwin .content, .popupwin #content { - border-style:none; - margin:0;padding:0; -} -.popupwin ul { - list-style-type:none; - border-style:none;margin:0;padding:0; -} -.popupwin li { - margin:4px 0; -} -.popupwin select { - display:inline; - font-size:11px;font-family:Verdana, Helvetica, Geneva, Arial, sans-serif; -} -.popupwin table { - border-collapse:collapse;border-style:none;margin:0;padding:0; - width:100%; -} -.popupwin thead { - font-weight: bold; background-color: #ddf; -} -.popupwin td { - padding: 0.2em; -} -.popupwin form { - background-color:#EFEFF4; - border-style:none;margin:0;padding:0; -} -.popupwin form p { - margin-top:5px;margin-bottom:5px; -} -.popupwin fieldset { - display:block; - margin:5px 5px 0 5px;padding:0 5px 2px 5px; -} -.popupwin fieldset div { - margin:3px 0; -} -.popupwin .floating { - float:left; -} -.popupwin legend { - font-weight:bold;padding:0 3px; -} -.popupwin .field { - float:left;text-align:left; - margin-left:5px;padding:2px 5px; -} -.popupwin label { - text-align:left; - margin-left:5px;padding:2px 5px; -} -.popupwin fieldset table { - font-size:1.0em; - border-style:none;margin:2px 0px;padding:0; -} -.popupwin .buttons { - clear:both;text-align:right; - border-top:1px solid #999;margin-top:10px;padding:5px; -} -.popupwin span.colorButton { - float:left; - padding:2px 0px; -} -.popupwin select, .popupwin input, .popupwin button, .popupwin textarea, .popupwin table, .popupwin label { - font-size:1.0em; - padding: 3px 1px 1px 1px; - font-family:Verdana, Helvetica, Geneva, Arial, sans-serif; -} -.popupwin button { - width:8em; - vertical-align: middle; - text-align: center; - margin: 0px 3px 0px 0px; - padding: 1px; -} -.popupwin dl, .popupwin dt, .popupwin dd { - display: block; -} -.popupwin dt, .popupwin dd { - margin:3px 0; -} -.popupwin button.long-button { - width:10em; -} -.popupwin .fl { - float:left;text-align:right; - width:15em; - padding:2px 5px; -} -.popupwin .fl-borderCollapse { - float:left;text-align:right; - width:13em; - margin-left:10px;padding:2px 5px; -} -.popupwin .fr { - float:left;text-align:right; - width:13em; - padding:2px 5px; -} -.popupwin .space { - clear:left; - padding:2px; -} -.popupwin .label { - text-align:right; - width:8em; -} -.popupwin .checkbox { - text-align:left; - padding:2px 5px; -} -.popupwin .postlabel { - text-align:left; - padding:2px 5px; -} -.popupwin input.value { - width:30em; -} -.popupwin input.shorter-value { - width:17em; -} /* Selectors for the About dialogue */ .htmlarea-window .about-plugins .x-list-body dt { overflow: auto; white-space: normal; } -/* Selectors for the Default Image dialogue */ -.htmlarea-default-image #image, .htmlarea-default-image #alt { - white-space:nowrap; +/* Selectors for the default image dialogue */ +.htmlarea-window .image-preview { + height: 300; + width: 99%; + float: right; } -.htmlarea-default-image button.preview { - margin-left:5px;vertical-align:top; - white-space:normal; -} -.htmlarea-default-image div.imagepreview { - text-align:center; -} -.htmlarea-default-image div.imagepreview iframe { - width:300px;height:200px; - border:1px solid gray;margin:5px 0px; -} /* Selectors for the InsertSmiley plugin */ .htmlarea-window .emoticon-array { padding: 10px; @@ -500,9 +340,6 @@ float: right; height: 450px; margin: 9px 0px; - background-color: #FFF; - color: #000; - border: 1px solid #A2AAB8; } /* Selectors for the ContextMenu plugin */ .htmlarea-context-menu { @@ -511,6 +348,16 @@ font-family: Verdana, Helvetica, Geneva, Arial, sans-serif; font-size:10px; } +.htmlarea-context-menu ul { + list-style: none; + margin: 0; +} +.htmlarea-context-menu li { + margin: 0; +} +.htmlarea-context-menu a { + font-weight: normal; +} .htmlarea-context-menu .button { background-color:transparent; background-repeat:no-repeat;