Index: typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml (révision 7092) +++ typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.xml (copie de travail) @@ -87,6 +87,7 @@ + Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/AboutEditor/about-editor.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/AboutEditor/about-editor.js (révision 7092) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/AboutEditor/about-editor.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 @@ -27,52 +27,57 @@ * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ /* - * Character Map Plugin for TYPO3 htmlArea RTE + * About Plugin for TYPO3 htmlArea RTE * * TYPO3 SVN ID: $Id$ */ AboutEditor = 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) { /* * Registering plugin "About" information */ var pluginInformation = { - version : "1.0", - developer : "Stanislas Rolland", - developerUrl : "http://www.fructifor.ca/", - copyrightOwner : "Stanislas Rolland", - sponsor : "Fructifor Inc.", - sponsorUrl : "http://www.fructifor.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 = "About"; + var buttonId = 'About'; var buttonConfiguration = { id : buttonId, tooltip : this.localize(buttonId.toLowerCase()), - action : "onButtonPress", + action : 'onButtonPress', textMode : true, dialog : true }; this.registerButton(buttonConfiguration); - return true; }, - /* + * Supported browsers + */ + browsers: [ + 'Firefox 1.5+', + 'Google Chrome 1.0+', + 'Internet Explorer 6.0+', + 'Opera 9.62+', + 'Safari 3.0.4+', + 'SeaMonkey 1.0+' + ], + /* * This function gets called when the button was pressed. * * @param object editor: the editor instance @@ -80,14 +85,140 @@ * * @return boolean false if action is completed */ - onButtonPress : function(editor, id) { - - // Could be a button or its hotkey + onButtonPress: function (editor, id) { + // Could be a button or its hotkey var buttonId = this.translateHotKey(id); buttonId = buttonId ? buttonId : id; - - this.dialog = this.openDialog("About", this.makeUrlFromPopupName("about"), null, null, {width:475, height:350}); + this.openDialogue( + buttonId, + 'About HTMLArea', + this.getWindowDimensions({width:450, height:350}, buttonId), + this.buildTabItems() + ); return false; + }, + /* + * Open the dialogue window + * + * @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 void + */ + 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', + activeTab: 0, + listeners: { + activate: { + fn: this.resetFocus, + scope: this + }, + tabchange: { + fn: this.syncHeight, + scope: this + } + }, + items: tabItems + }, + buttons: [ + this.buildButtonConfig('Close', this.onCancel) + ] + }); + this.show(); + }, + /* + * Build the configuration of the the tab items + * + * @return array the configuration array of tab items + */ + buildTabItems: function () { + var tabItems = []; + // About tab + tabItems.push({ + xtype: 'panel', + cls: 'about', + title: this.localize('About'), + html: '

htmlArea RTE ' + RTEarea[0].version + '

' + + '

' + this.localize('free_editor').replace('<', '<').replace('>', '>') + '

' + + '


' + this.localize('Browser support') + ': ' + this.browsers.join(', ') + '.

' + + '


' + this.localize('product_documentation') + ' typo3.org

' + + '

' + + '
' + + '© 2002-2004 interactivetools.com, inc.
' + + '© 2003-2004 dynarch.com LLC.
' + + '© 2004-2010 Stanislas Rolland
' + + this.localize('All rights reserved.') + + '

' + }); + // Plugins tab + if (!this.store) { + this.store = new Ext.data.ArrayStore({ + fields: [{ name: 'name'}, { name: 'developer'}, { name: 'sponsor'}], + sortInfo: { + field: 'name', + direction: 'ASC' + }, + data: this.getPluginsInfo() + }); + } + tabItems.push({ + xtype: 'panel', + cls: 'about-plugins', + height: 200, + title: this.localize('Plugins'), + autoScroll: true, + items: { + xtype: 'listview', + store: this.store, + reserveScrollOffset: true, + columns: [{ + header: this.localize('Name'), + dataIndex: 'name', + width: .33 + },{ + header: this.localize('Developer'), + dataIndex: 'developer', + width: .33 + },{ + header: this.localize('Sponsored by'), + dataIndex: 'sponsor' + }] + } + }); + return tabItems; + }, + /* + * Format an arry of information on each configured plugin + * + * @return array array of data objects + */ + getPluginsInfo: function () { + var pluginsInfo = []; + Ext.iterate(this.editor.plugins, function (pluginId, plugin) { + pluginsInfo.push([ + plugin.name + ' ' + plugin.version, + '' + plugin.developer + '', + '' + plugin.sponsor + '' + ]); + }, this); + return pluginsInfo; } }); - Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/AboutEditor/popups/about.html =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/AboutEditor/popups/about.html (révision 7092) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/AboutEditor/popups/about.html (copie de travail) @@ -1,166 +0,0 @@ - - - - - - - About HTMLArea - - - -
-
About HTMLArea
-
-
-
-

htmlArea RTE v 1.1.3

-

free_editor

-

Mozilla_or_IE

-

product_documentation typo3.org

-

-
- © 2002-2004 interactivetools.com, inc.
- © 2003-2004 dynarch.com LLC.
- © 2004-2008 Stanislas Rolland
- All rights reserved. -

-
-
-

Plugins

-
-
-
-
-
-
-
About
-
Plugins
-
- -
-
- - \ No newline at end of file Index: typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css (révision 7092) +++ typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css (copie de travail) @@ -431,6 +431,11 @@ .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; Index: typo3/sysext/t3skin/rtehtmlarea/htmlarea.css =================================================================== --- typo3/sysext/t3skin/rtehtmlarea/htmlarea.css (révision 7092) +++ typo3/sysext/t3skin/rtehtmlarea/htmlarea.css (copie de travail) @@ -438,6 +438,11 @@ .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;