(Experimental) Replace htmlarea with XINHA. Thanks to abdussamad!

This commit is contained in:
Garvin Hicking
2008-09-09 07:52:18 +00:00
parent 7dce38ddbe
commit 7a852ecdc7
903 changed files with 50035 additions and 10204 deletions
+139
View File
@@ -0,0 +1,139 @@
/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/FullScreen/full-screen.js */
function FullScreen(_1,_2){
this.editor=_1;
_1._superclean_on=false;
cfg=_1.config;
cfg.registerButton("fullscreen",this._lc("Maximize/Minimize Editor"),[_editor_url+cfg.imgURL+"ed_buttons_main.gif",8,0],true,function(e,_4,_5){
e._fullScreen();
});
cfg.addToolbarElement("fullscreen","popupeditor",0);
}
FullScreen._pluginInfo={name:"FullScreen",version:"1.0",developer:"James Sleeman",developer_url:"http://www.gogo.co.nz/",c_owner:"Gogo Internet Services",license:"htmlArea",sponsor:"Gogo Internet Services",sponsor_url:"http://www.gogo.co.nz/"};
FullScreen.prototype._lc=function(_6){
return Xinha._lc(_6,{url:_editor_url+"modules/FullScreen/lang/",context:"FullScreen"});
};
Xinha.prototype._fullScreen=function(){
var e=this;
function sizeItUp(){
if(!e._isFullScreen||e._sizing){
return false;
}
e._sizing=true;
var _8=Xinha.viewportSize();
var h=_8.y-e.config.fullScreenMargins[0]-e.config.fullScreenMargins[2];
var w=_8.x-e.config.fullScreenMargins[1]-e.config.fullScreenMargins[3];
e.sizeEditor(w+"px",h+"px",true,true);
e._sizing=false;
if(e._toolbarObjects.fullscreen){
e._toolbarObjects.fullscreen.swapImage([_editor_url+cfg.imgURL+"ed_buttons_main.gif",9,0]);
}
}
function sizeItDown(){
if(e._isFullScreen||e._sizing){
return false;
}
e._sizing=true;
e.initSize();
e._sizing=false;
if(e._toolbarObjects.fullscreen){
e._toolbarObjects.fullscreen.swapImage([_editor_url+cfg.imgURL+"ed_buttons_main.gif",8,0]);
}
}
function resetScroll(){
if(e._isFullScreen){
window.scroll(0,0);
window.setTimeout(resetScroll,150);
}
}
if(typeof this._isFullScreen=="undefined"){
this._isFullScreen=false;
if(e.target!=e._iframe){
Xinha._addEvent(window,"resize",sizeItUp);
}
}
if(Xinha.is_gecko){
this.deactivateEditor();
}
if(this._isFullScreen){
this._htmlArea.style.position="";
if(!Xinha.is_ie){
this._htmlArea.style.border="";
}
try{
if(Xinha.is_ie&&document.compatMode=="CSS1Compat"){
var _b=document.getElementsByTagName("html");
}else{
var _b=document.getElementsByTagName("body");
}
_b[0].style.overflow="";
}
catch(e){
}
this._isFullScreen=false;
sizeItDown();
var _c=this._htmlArea;
while((_c=_c.parentNode)&&_c.style){
_c.style.position=_c._xinha_fullScreenOldPosition;
_c._xinha_fullScreenOldPosition=null;
}
if(Xinha.ie_version<7){
var _d=document.getElementsByTagName("select");
for(var i=0;i<_d.length;++i){
_d[i].style.visibility="visible";
}
}
window.scroll(this._unScroll.x,this._unScroll.y);
}else{
this._unScroll={x:(window.pageXOffset)?(window.pageXOffset):(document.documentElement)?document.documentElement.scrollLeft:document.body.scrollLeft,y:(window.pageYOffset)?(window.pageYOffset):(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop};
var _c=this._htmlArea;
while((_c=_c.parentNode)&&_c.style){
_c._xinha_fullScreenOldPosition=_c.style.position;
_c.style.position="static";
}
if(Xinha.ie_version<7){
var _d=document.getElementsByTagName("select");
var s,currentEditor;
for(var i=0;i<_d.length;++i){
s=_d[i];
currentEditor=false;
while(s=s.parentNode){
if(s==this._htmlArea){
currentEditor=true;
break;
}
}
if(!currentEditor&&_d[i].style.visibility!="hidden"){
_d[i].style.visibility="hidden";
}
}
}
window.scroll(0,0);
this._htmlArea.style.position="absolute";
this._htmlArea.style.zIndex=999;
this._htmlArea.style.left=e.config.fullScreenMargins[3]+"px";
this._htmlArea.style.top=e.config.fullScreenMargins[0]+"px";
if(!Xinha.is_ie&&!Xinha.is_webkit){
this._htmlArea.style.border="none";
}
this._isFullScreen=true;
resetScroll();
try{
if(Xinha.is_ie&&document.compatMode=="CSS1Compat"){
var _b=document.getElementsByTagName("html");
}else{
var _b=document.getElementsByTagName("body");
}
_b[0].style.overflow="hidden";
}
catch(e){
}
sizeItUp();
}
if(Xinha.is_gecko){
this.activateEditor();
}
this.focusEditor();
};
+6
View File
@@ -0,0 +1,6 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// translated: Raimund Meyer xinha@ray-of-light.org
{
"Maximize/Minimize Editor": "Editor maximieren/verkleinern"
};
+5
View File
@@ -0,0 +1,5 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
{
"Maximize/Minimize Editor": "Agrandir/Réduire l'éditeur"
};
+5
View File
@@ -0,0 +1,5 @@
// I18N constants
// LANG: "ja", ENCODING: UTF-8
{
"Maximize/Minimize Editor": "エディタの最大化/最小化"
};
+6
View File
@@ -0,0 +1,6 @@
// I18N constants
// LANG: "nb", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
"Maximize/Minimize Editor": "Maksimer/Minimer WYSIWYG vindu"
};
+6
View File
@@ -0,0 +1,6 @@
// I18N constants
// LANG: "pl", ENCODING: UTF-8
// translated: Krzysztof Kotowicz, koto1sa@o2.pl, http://www.eskot.krakow.pl/portfolio
{
"Maximize/Minimize Editor": "Maksymalizuj/minimalizuj edytor"
};
+18
View File
@@ -0,0 +1,18 @@
// I18N constants
//
// LANG: "pt_br", ENCODING: UTF-8
// Portuguese Brazilian Translation
//
// Author: Marcio Barbosa, <marcio@mpg.com.br>
// MSN: tomarshall@msn.com - ICQ: 69419933
// Site: http://www.mpg.com.br
//
// Last revision: 06 september 2007
// Please don´t remove this information
// If you modify any source, please insert a comment with your name and e-mail
//
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
{
"Maximize/Minimize Editor": "Maximizar/Minimizar Editor"
};
+6
View File
@@ -0,0 +1,6 @@
// I18N constants
// LANG: "ru", ENCODING: UTF-8
// Author: Andrei Blagorazumov, a@fnr.ru
{
"Maximize/Minimize Editor": "Развернуть/Свернуть редактор"
};
+6
View File
@@ -0,0 +1,6 @@
// I18N constants
// LANG: "sv" (Swedish), ENCODING: UTF-8
// translated: Erik Dalén, <dalen@jpl.se>
{
"Maximize/Minimize Editor": "Maximera/Minimera WYSIWYG fönster"
};