Bug #19154 ยป rtehtmlarea_bugfix_9056_trunk.patch
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/insert-smiley.js (copie de travail) | ||
---|---|---|
if (this.editor_url == '../') {
|
||
this.editor_url = document.URL.replace(/^(.*\/).*\/.*$/g, "$1");
|
||
}
|
||
// Default set of imoticons from Mozilla Thunderbird
|
||
this.icons = [
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_smile' + '.png', alt: ':-)', title: this.localize('mozilla_smile')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_frown' + '.png', alt: ':-(', title: this.localize('mozilla_frown')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_wink' + '.png', alt: ';-)', title: this.localize('mozilla_wink')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_tongueout' + '.png', alt: ':-P', title: this.localize('mozilla_tongueout')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_laughing' + '.png', alt: ':-D', title: this.localize('mozilla_laughing')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_embarassed' + '.png', alt: ':-[', title: this.localize('mozilla_embarassed')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_undecided' + '.png', alt: ':-\\', title: this.localize('mozilla_undecided')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_surprised' + '.png', alt: '=-O', title: this.localize('mozilla_surprised')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_kiss' + '.png', alt: ':-*', title: this.localize('mozilla_kiss')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_yell' + '.png', alt: '>:o', title: this.localize('mozilla_yell')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_cool' + '.png', alt: '8-)', title: this.localize('mozilla_cool')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_moneyinmouth' + '.png', alt: ':-$', title: this.localize('mozilla_moneyinmouth')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_footinmouth' + '.png', alt: ':-!', title: this.localize('mozilla_footinmouth')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_innocent' + '.png', alt: 'O:-)', title: this.localize('mozilla_innocent')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_cry' + '.png', alt: ':\'(', title: this.localize('mozilla_cry')},
|
||
{ file: this.editor_url + 'plugins/InsertSmiley/smileys/' + 'mozilla_sealed' + '.png', alt: ':-X', title: this.localize('mozilla_sealed')}
|
||
];
|
||
/*
|
||
* Registering plugin "About" information
|
||
*/
|
||
var pluginInformation = {
|
||
version : "2.0",
|
||
developer : "Ki Master George & Stanislas Rolland",
|
||
developerUrl : "http://www.sjbr.ca/",
|
||
copyrightOwner : "Ki Master George & Stanislas Rolland",
|
||
sponsor : "Ki Master George & SJBR",
|
||
sponsorUrl : "http://www.sjbr.ca/",
|
||
license : "GPL"
|
||
version : '2.0',
|
||
developer : 'Ki Master George & Stanislas Rolland',
|
||
developerUrl : 'http://www.sjbr.ca/',
|
||
copyrightOwner : 'Ki Master George & Stanislas Rolland',
|
||
sponsor : 'Ki Master George & SJBR',
|
||
sponsorUrl : 'http://www.sjbr.ca/',
|
||
license : 'GPL'
|
||
};
|
||
this.registerPluginInformation(pluginInformation);
|
||
/*
|
||
* Registering the button
|
||
*/
|
||
var buttonId = "InsertSmiley";
|
||
var buttonId = 'InsertSmiley';
|
||
var buttonConfiguration = {
|
||
id : buttonId,
|
||
tooltip : this.localize("Insert Smiley"),
|
||
action : "onButtonPress",
|
||
tooltip : this.localize('Insert Smiley'),
|
||
action : 'onButtonPress',
|
||
hotKey : (this.pageTSConfiguration ? this.pageTSConfiguration.hotKey : null),
|
||
dialog : true
|
||
};
|
||
... | ... | |
// Could be a button or its hotkey
|
||
var buttonId = this.translateHotKey(id);
|
||
buttonId = buttonId ? buttonId : id;
|
||
var dimensions = this.getWindowDimensions({width:175, height:230}, buttonId);
|
||
var dimensions = this.getWindowDimensions({width:216, height:230}, buttonId);
|
||
this.dialog = new Ext.Window({
|
||
title: this.localize('Insert Smiley'),
|
||
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: {
|
||
... | ... | |
xtype: 'box',
|
||
cls: 'emoticon-array',
|
||
tpl: new Ext.XTemplate(
|
||
'<tpl for="."><a href="#" class="emoticon" hidefocus="on"><img alt="" title="" src="{.}" /></a></tpl>'
|
||
'<tpl for="."><a href="#" class="emoticon" hidefocus="on"><img alt="{alt}" title="{title}" src="{file}" /></a></tpl>'
|
||
),
|
||
listeners: {
|
||
render: {
|
||
... | ... | |
* @return void
|
||
*/
|
||
render: function (component) {
|
||
this.icons = [];
|
||
var numberOfIcons = 20, inum;
|
||
for (var i = 1; i <= numberOfIcons; i++) {
|
||
inum = i;
|
||
if (i < 10) {
|
||
inum = '000' + i;
|
||
} else if (i < 100) {
|
||
inum = '00' + i;
|
||
} else if (i < 1000) {
|
||
inum = '0' + i;
|
||
}
|
||
this.icons.push(this.editor_url + 'plugins/InsertSmiley/smileys/' + inum + '.gif');
|
||
}
|
||
component.tpl.overwrite(component.el, this.icons);
|
||
component.mon(component.el, 'click', this.insertImageTag, this, {delegate: 'a'});
|
||
},
|
||
... | ... | |
insertImageTag: function (event, target) {
|
||
this.editor.focus();
|
||
this.restoreSelection();
|
||
this.editor.insertHTML('<img src="' + Ext.get(target).first().getAttribute('src') + '" alt="" />');
|
||
var icon = Ext.get(target).first();
|
||
var imgTag = this.editor.document.createElement('img');
|
||
imgTag.setAttribute('src', icon.getAttribute('src'));
|
||
imgTag.setAttribute('alt', icon.getAttribute('alt'));
|
||
imgTag.setAttribute('title', icon.getAttribute('title'));
|
||
this.editor.insertNodeAtSelection(imgTag);
|
||
if (!Ext.isIE) {
|
||
this.editor.selectNode(imgTag, false);
|
||
}
|
||
this.close();
|
||
}
|
||
});
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/locallang.xml (copie de travail) | ||
---|---|---|
<label index="Insert Smiley">Insert Smiley</label>
|
||
<label index="Smiley">Smiley</label>
|
||
<label index="Cancel">Cancel</label>
|
||
<label index="mozilla_smile">Smile</label>
|
||
<label index="mozilla_frown">Frown</label>
|
||
<label index="mozilla_wink">Wink</label>
|
||
<label index="mozilla_tongueout">Tongue out</label>
|
||
<label index="mozilla_laughing">Laughing</label>
|
||
<label index="mozilla_embarassed">Embarassed</label>
|
||
<label index="mozilla_undecided">Undecided</label>
|
||
<label index="mozilla_surprised">Surprise</label>
|
||
<label index="mozilla_kiss">Kiss</label>
|
||
<label index="mozilla_yell">Yell</label>
|
||
<label index="mozilla_cool">Cool</label>
|
||
<label index="mozilla_moneyinmouth">Money Mouth</label>
|
||
<label index="mozilla_footinmouth">Foot in mouth</label>
|
||
<label index="mozilla_innocent">Innocent</label>
|
||
<label index="mozilla_cry">Cry</label>
|
||
<label index="mozilla_sealed">Lips are sealed</label>
|
||
</languageKey>
|
||
</data>
|
||
<orig_hash type="array">
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/popups/insertsmiley.html (copie de travail) | ||
---|---|---|
<!DOCTYPE html
|
||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html>
|
||
<!--
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2004 Ki Master George <kimastergeorge@gmail.com>
|
||
* (c) 2005-2008 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 script is a modified version of a script published under the htmlArea License.
|
||
* A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
/*
|
||
* Insert Smiley Plugin for TYPO3 htmlArea RTE
|
||
*
|
||
* TYPO3 SVN ID: $Id$
|
||
*/
|
||
-->
|
||
<head>
|
||
<title>Insert Smiley</title>
|
||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||
<script type="text/javascript">
|
||
/*<![CDATA[*/
|
||
<!--
|
||
var dialog = window.opener.HTMLArea.Dialog.InsertSmiley;
|
||
var param;
|
||
function Init() {
|
||
var totalsmileys = 20;
|
||
// Do not resize until the smileys are inserted on the page
|
||
dialog.initialize(false, "noResize", false);
|
||
param = dialog.arguments;
|
||
var tbody = document.getElementById("smileytable");
|
||
var inum;
|
||
var trow;
|
||
for(var i = 1; i <= totalsmileys; i++) {
|
||
if((i - 1) % 4 == 0) {
|
||
trow = tbody.insertRow((i - 1) / 4);
|
||
}
|
||
// find new number to be found in smileys folder
|
||
inum = "";
|
||
if(i < 1000) {
|
||
if(i < 100) {
|
||
if(i < 10) {
|
||
inum = "000" + i;
|
||
} else {
|
||
inum = "00" + i;
|
||
}
|
||
} else {
|
||
inum = "0" + i;
|
||
}
|
||
} else {
|
||
inum = i;
|
||
}
|
||
trow.insertCell((i - 1) % 4).innerHTML = "<a href=\"javascript:onOK('" + inum + "')\"><img alt=\"Smiley " + + i + "\" src=\""+ param.editor_url +"plugins/InsertSmiley/smileys/" + inum + ".gif\" />";
|
||
}
|
||
if (HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) {
|
||
setTimeout( function() { dialog.resize(); }, 200);
|
||
} else {
|
||
dialog.resize();
|
||
}
|
||
};
|
||
function onOK(smileynum) {
|
||
var params = {};
|
||
params.imgURL = param.editor_url +"plugins/InsertSmiley/smileys/" + smileynum + ".gif";
|
||
dialog.performAction(params);
|
||
dialog.close();
|
||
return false;
|
||
};
|
||
function onCancel() {
|
||
dialog.close();
|
||
return false;
|
||
};
|
||
// -->
|
||
/*]]>*/
|
||
</script>
|
||
</head>
|
||
<body class="popupwin htmlarea-insert-smiley"" onload="Init();">
|
||
<div id="content">
|
||
<div class="title">Insert Smiley</div>
|
||
<form action="" method="get">
|
||
<div class="smileytable">
|
||
<table id="smileytable" name="smileytable"></table>
|
||
</div>
|
||
<div class="space"></div>
|
||
<div class="buttons">
|
||
<button type="button" onclick="return onCancel();">Cancel</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</body>
|
||
</html>
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/mozilla_public_license.txt (r?vision 0) | ||
---|---|---|
FOR TRANSLATIONS OF THIS LICENSE INTO SELECTED LANGUAGES, PLEASE VISIT WWW.MOZILLA.ORG/LICENSING.
|
||
|
||
MOZILLA FOUNDATION
|
||
MOZILLA THUNDERBIRD END-USER SOFTWARE LICENSE AGREEMENT
|
||
|
||
A SOURCE CODE VERSION OF CERTAIN THUNDERBIRD E-MAIL FUNCTIONALITY THAT YOU MAY USE, MODIFY AND DISTRIBUTE IS AVAILABLE TO YOU FREE-OF-CHARGE FROM WWW.MOZILLA.ORG UNDER THE MOZILLA PUBLIC LICENSE and other open source software licenses.
|
||
The accompanying executable code version of Mozilla Thunderbird and related documentation (the "Product") is made available to you under the terms of this MOZILLA THUNDERBIRD END-USER SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT"). BY CLICKING THE "ACCEPT" BUTTON, OR BY INSTALLING OR USING THE MOZILLA THUNDERBIRD E-MAIL CLIENT, YOU ARE CONSENTING TO BE BOUND BY THE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT CLICK THE "ACCEPT" BUTTON, AND DO NOT INSTALL OR USE ANY PART OF THE MOZILLA THUNDERBIRD E-MAIL CLIENT.
|
||
DURING THE MOZILLA THUNDERBIRD INSTALLATION PROCESS, AND AT LATER TIMES, YOU MAY BE GIVEN THE OPTION OF INSTALLING ADDITIONAL COMPONENTS FROM THIRD-PARTY SOFTWARE PROVIDERS. THE INSTALLATION AND USE OF THOSE THIRD-PARTY COMPONENTS MAY BE GOVERNED BY ADDITIONAL LICENSE AGREEMENTS.
|
||
1. LICENSE GRANT. The Mozilla Foundation grants you a non-exclusive license to use the executable code version of the Product. This Agreement will also govern any software upgrades provided by Mozilla that replace and/or supplement the original Product, unless such upgrades are accompanied by a separate license, in which case the terms of that license will govern.
|
||
2. TERMINATION. If you breach this Agreement your right to use the Product will terminate immediately and without notice, but all provisions of this Agreement except the License Grant (Paragraph 1) will survive termination and continue in effect. Upon termination, you must destroy all copies of the Product.
|
||
3. PROPRIETARY RIGHTS. Portions of the Product are available in source code form under the terms of the Mozilla Public License and other open source licenses (collectively, "Open Source Licenses") at http://www.mozilla.org. Nothing in this Agreement will be construed to limit any rights granted under the Open Source Licenses. Subject to the foregoing, Mozilla, for itself and on behalf of its licensors, hereby reserves all intellectual property rights in the Product, except for the rights expressly granted in this Agreement. You may not remove or alter any trademark, logo, copyright or other proprietary notice in or on the Product. This license does not grant you any right to use the trademarks, service marks or logos of Mozilla or its licensors.
|
||
4. DISCLAIMER OF WARRANTY. THE PRODUCT IS PROVIDED "AS IS" WITH ALL FAULTS. TO THE EXTENT PERMITTED BY LAW, MOZILLA AND MOZILLA'S LICENSORS HEREBY DISCLAIM ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES THAT THE PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE AND NON-INFRINGING. YOU BEAR ENTIRE RISK AS TO SELECTING THE PRODUCT FOR YOUR PURPOSES AND AS TO THE QUALITY AND PERFORMANCE OF THE PRODUCT. THIS LIMITATION WILL APPLY NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||
5. LIMITATION OF LIABILITY. EXCEPT AS REQUIRED BY LAW, MOZILLA AND ITS DIRECTORS, LICENSORS, CONTRIBUTORS AND AGENTS (COLLECTIVELY, THE "MOZILLA GROUP") WILL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES ARISING OUT OF OR IN ANY WAY RELATING TO THIS AGREEMENT OR THE USE OF OR INABILITY TO USE THE PRODUCT, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOST PROFITS, LOSS OF DATA, AND COMPUTER FAILURE OR MALFUNCTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF THE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH SUCH CLAIM IS BASED. THE MOZILLA GROUP'S COLLECTIVE LIABILITY UNDER THIS AGREEMENT WILL NOT EXCEED THE GREATER OF $500 (FIVE HUNDRED DOLLARS) AND THE FEES PAID BY YOU UNDER THIS LICENSE (IF ANY). SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||
6. EXPORT CONTROLS. This license is subject to all applicable export restrictions. You must comply with all export and import laws and restrictions and regulations of any United States or foreign agency or authority relating to the Product and its use.
|
||
7. U.S. GOVERNMENT END-USERS. The Product is a "commercial item," as that term is defined in 48 C.F.R. 2.101, consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995) and 48 C.F.R. 227.7202 (June 1995). Consistent with 48 C.F.R. 12.212, 48 C.F.R. 27.405(b)(2) (June 1998) and 48 C.F.R. 227.7202, all U.S. Government End Users acquire the Product with only those rights as set forth herein.
|
||
8. MISCELLANEOUS. (a) This Agreement constitutes the entire agreement between Mozilla and you concerning the subject matter hereof, and it may only be modified by a written amendment signed by an authorized executive of Mozilla. (b) Except to the extent applicable law, if any, provides otherwise, this Agreement will be governed by the laws of the state of California, U.S.A., excluding its conflict of law provisions. (c) This Agreement will not be governed by the United Nations Convention on Contracts for the International Sale of Goods. (d) If any part of this Agreement is held invalid or unenforceable, that part will be construed to reflect the parties' original intent, and the remaining portions will remain in full force and effect. (e) A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not waive such term or condition or any subsequent breach thereof. (f) Except as required by law, the controlling language of this Agreement is English. (g) You may assign your rights under this Agreement to any party that consents to, and agrees to be bound by, its terms; the Mozilla Foundation may assign its rights under this Agreement without condition. (h) This Agreement will be binding upon and will inure to the benefit of the parties, their successors and permitted assigns.
|
||
|
||
|
typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css (copie de travail) | ||
---|---|---|
/* Selectors for the InsertSmiley plugin */
|
||
.htmlarea-window .emoticon-array {
|
||
padding: 10px;
|
||
width: 150px;
|
||
}
|
||
.htmlarea-window .emoticon {
|
||
display: block;
|
typo3/sysext/t3skin/rtehtmlarea/htmlarea.css (copie de travail) | ||
---|---|---|
/* Selectors for the InsertSmiley plugin */
|
||
.htmlarea-window .emoticon-array {
|
||
padding: 10px;
|
||
width: 150px;
|
||
}
|
||
.htmlarea-window .emoticon {
|
||
display: block;
|