Upgrade to Xinha 0.931. Xinha has been optimized for size and dozens of issues have been closed

out since the last upgrade . Add Firefox and Xinha buttons to main page to show our support.
This commit is contained in:
Chris Morgan
2007-05-31 22:43:05 +00:00
committed by WineHQ
parent ff46a4485d
commit 2d4b27530d
354 changed files with 19793 additions and 21419 deletions

View File

@@ -1,123 +1,68 @@
// Character Map plugin for HTMLArea
// Original Author - Bernhard Pfeifer novocaine@gmx.net
HTMLArea.loadStyle( 'CharacterMap.css', 'CharacterMap' );
function CharacterMap( editor )
{
this.editor = editor;
var cfg = editor.config;
var self = this;
cfg.registerButton(
{
id : 'insertcharacter',
tooltip : HTMLArea._lc( 'Insert special character', 'CharacterMap' ),
image : editor.imgURL( 'ed_charmap.gif', 'CharacterMap' ),
textMode : false,
action : function( editor ) { self.buttonPress( editor ); }
}
);
cfg.addToolbarElement('insertcharacter', 'createlink', -1);
if ( cfg.CharacterMap.mode == 'panel' )
{
editor._CharacterMap = editor.addPanel( 'right' );
HTMLArea._addClass( editor._CharacterMap, 'CharacterMap' );
editor.notifyOn( 'modechange',
function( e, args )
{
if ( args.mode == 'text' ) editor.hidePanel( editor._CharacterMap );
}
);
var entites =
[
'Ÿ', 'š', '@', '"', '¡', '¢', '£', '¤', '¥', '¦',
'§', '¨', '©', 'ª', '«', '¬', '¯', '°', '±', '²',
'³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»', '¼',
'½', '¾', '¿', '×', 'Ø', '÷', 'ø', 'ƒ', 'ˆ',
'˜', '–', '—', '‘', '’', '‚', '“', '”', '„',
'†', '‡', '•', '…', '‰', '‹', '›', '€', '™',
'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È',
'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ',
'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '®', '×', 'Ù', 'Ú',
'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã',
'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì',
'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ',
'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ',
'ÿ', 'Œ', 'œ', 'Š'
];
for ( var i=0; i<entites.length; i++ )
this.addEntity( entites[i], i );
editor.hidePanel( editor._CharacterMap );
}
HTMLArea.loadStyle("CharacterMap.css","CharacterMap");
function CharacterMap(_1){
this.editor=_1;
var _2=_1.config;
var _3=this;
_2.registerButton({id:"insertcharacter",tooltip:HTMLArea._lc("Insert special character","CharacterMap"),image:_1.imgURL("ed_charmap.gif","CharacterMap"),textMode:false,action:function(_4){
_3.buttonPress(_4);
}});
_2.addToolbarElement("insertcharacter","createlink",-1);
if(_2.CharacterMap.mode=="panel"){
_1._CharacterMap=_1.addPanel("right");
HTMLArea._addClass(_1._CharacterMap,"CharacterMap");
_1.notifyOn("modechange",function(e,_6){
if(_6.mode=="text"){
_1.hidePanel(_1._CharacterMap);
}
});
var _7=["&Yuml;","&scaron;","&#064;","&quot;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&times;","&Oslash;","&divide;","&oslash;","&fnof;","&circ;","&tilde;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&Dagger;","&bull;","&hellip;","&permil;","&lsaquo;","&rsaquo;","&euro;","&trade;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&reg;","&times;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&OElig;","&oelig;","&Scaron;"];
for(var i=0;i<_7.length;i++){
this.addEntity(_7[i],i);
}
_1.hidePanel(_1._CharacterMap);
}
}
HTMLArea.Config.prototype.CharacterMap={"mode":"popup"};
CharacterMap._pluginInfo={name:"CharacterMap",version:"2.0",developer:"Laurent Vilday",developer_url:"http://www.mokhet.com/",c_owner:"Xinha community",sponsor:"",sponsor_url:"",license:"Creative Commons Attribution-ShareAlike License"};
CharacterMap._isActive=false;
CharacterMap.prototype.buttonPress=function(_9){
var _a=_9.config;
if(_a.CharacterMap.mode=="panel"){
if(this._isActive){
this._isActive=false;
_9.hidePanel(_9._CharacterMap);
}else{
this._isActive=true;
_9.showPanel(_9._CharacterMap);
}
}else{
_9._popupDialog("plugin://CharacterMap/select_character",function(_b){
if(!_b){
return false;
}
if(HTMLArea.is_ie){
_9.focusEditor();
}
_9.insertHTML(_b);
},null);
}
// configuration mode : panel or popup
HTMLArea.Config.prototype.CharacterMap =
{
'mode': 'popup' // configuration mode : panel or popup
};
CharacterMap._pluginInfo =
{
name : "CharacterMap",
version : "2.0",
developer : "Laurent Vilday",
developer_url : "http://www.mokhet.com/",
c_owner : "Xinha community",
sponsor : "",
sponsor_url : "",
license : "Creative Commons Attribution-ShareAlike License"
CharacterMap.prototype.addEntity=function(_c,_d){
var _e=this.editor;
var _f=this;
var a=document.createElement("a");
HTMLArea._addClass(a,"entity");
a.innerHTML=_c;
a.href="javascript:void(0)";
HTMLArea._addClass(a,(_d%2)?"light":"dark");
a.onclick=function(){
if(HTMLArea.is_ie){
_e.focusEditor();
}
_e.insertHTML(_c);
return false;
};
CharacterMap._isActive = false;
CharacterMap.prototype.buttonPress = function( editor )
{
var cfg = editor.config;
if ( cfg.CharacterMap.mode == 'panel' )
{
if ( this._isActive )
{
this._isActive = false;
editor.hidePanel( editor._CharacterMap );
}
else
{
this._isActive = true;
editor.showPanel( editor._CharacterMap );
}
}
else
{
editor._popupDialog( "plugin://CharacterMap/select_character", function( entity )
{
if ( !entity ) return false;
if ( HTMLArea.is_ie ) editor.focusEditor();
editor.insertHTML( entity );
}, null);
}
_e._CharacterMap.appendChild(a);
a=null;
};
CharacterMap.prototype.addEntity = function ( entite, pos )
{
editor = this.editor;
var self = this;
var a = document.createElement( 'a' );
HTMLArea._addClass( a, 'entity' );
a.innerHTML = entite;
a.href = 'javascript:void(0)';
HTMLArea._addClass(a, (pos%2)? 'light':'dark');
a.onclick = function()
{
if (HTMLArea.is_ie) editor.focusEditor();
editor.insertHTML( entite );
self._isActive = false;
editor.hidePanel( editor._CharacterMap );
return false;
};
editor._CharacterMap.appendChild( a );
};