You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by fe...@apache.org on 2007/07/22 16:51:30 UTC

svn commit: r558490 [19/33] - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha: ./ images/ images/de/ images/fr/ lang/ modules/ modules/ColorPicker/ modules/CreateLink/ modules/Dialogs/ m...

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/assets/wz_jsgraphics.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/assets/wz_jsgraphics.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/assets/wz_jsgraphics.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/assets/wz_jsgraphics.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,502 @@
+var jg_ihtm,jg_ie,jg_dom,jg_n4=(document.layers&&typeof document.classes!="undefined");
+function chkDHTM(x,i){
+x=document.body||null;
+jg_ie=(x&&typeof x.insertAdjacentHTML!="undefined");
+jg_dom=(x&&!jg_ie&&typeof x.appendChild!="undefined"&&typeof document.createRange!="undefined"&&typeof (i=document.createRange()).setStartBefore!="undefined"&&typeof i.createContextualFragment!="undefined");
+jg_ihtm=(!jg_ie&&!jg_dom&&x&&typeof x.innerHTML!="undefined");
+}
+function pntDoc(){
+this.wnd.document.write(this.htm);
+this.htm="";
+}
+function pntCnvDom(){
+var x=document.createRange();
+x.setStartBefore(this.cnv);
+x=x.createContextualFragment(this.htm);
+this.cnv.appendChild(x);
+this.htm="";
+}
+function pntCnvIe(){
+this.cnv.insertAdjacentHTML("BeforeEnd",this.htm);
+this.htm="";
+}
+function pntCnvIhtm(){
+this.cnv.innerHTML+=this.htm;
+this.htm="";
+}
+function pntCnv(){
+this.htm="";
+}
+function mkDiv(x,y,w,h){
+this.htm+="<div style=\"position:absolute;"+"left:"+x+"px;"+"top:"+y+"px;"+"width:"+w+"px;"+"height:"+h+"px;"+"clip:rect(0,"+w+"px,"+h+"px,0);"+"overflow:hidden;background-color:"+this.color+";"+"\"></div>";
+}
+function mkDivPrint(x,y,w,h){
+this.htm+="<div style=\"position:absolute;"+"border-left:"+w+"px solid "+this.color+";"+"left:"+x+"px;"+"top:"+y+"px;"+"width:"+w+"px;"+"height:"+h+"px;"+"clip:rect(0,"+w+"px,"+h+"px,0);"+"overflow:hidden;background-color:"+this.color+";"+"\"></div>";
+}
+function mkLyr(x,y,w,h){
+this.htm+="<layer "+"left=\""+x+"\" "+"top=\""+y+"\" "+"width=\""+w+"\" "+"height=\""+h+"\" "+"bgcolor=\""+this.color+"\"></layer>\n";
+}
+function mkLbl(txt,x,y){
+this.htm+="<div style=\"position:absolute;white-space:nowrap;"+"left:"+x+"px;"+"top:"+y+"px;"+"font-family:"+this.ftFam+";"+"font-size:"+this.ftSz+";"+"color:"+this.color+";"+this.ftSty+"\">"+txt+"</div>";
+}
+function mkLin(x1,y1,x2,y2){
+if(x1>x2){
+var _x2=x2;
+var _y2=y2;
+x2=x1;
+y2=y1;
+x1=_x2;
+y1=_y2;
+}
+var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1;
+if(dx>=dy){
+var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx,ox=x;
+while((dx--)>0){
+++x;
+if(p>0){
+this.mkDiv(ox,y,x-ox,1);
+y+=yIncr;
+p+=pru;
+ox=x;
+}else{
+p+=pr;
+}
+}
+this.mkDiv(ox,y,x2-ox+1,1);
+}else{
+var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy,oy=y;
+if(y2<=y1){
+while((dy--)>0){
+if(p>0){
+this.mkDiv(x++,y,1,oy-y+1);
+y+=yIncr;
+p+=pru;
+oy=y;
+}else{
+y+=yIncr;
+p+=pr;
+}
+}
+this.mkDiv(x2,y2,1,oy-y2+1);
+}else{
+while((dy--)>0){
+y+=yIncr;
+if(p>0){
+this.mkDiv(x++,oy,1,y-oy);
+p+=pru;
+oy=y;
+}else{
+p+=pr;
+}
+}
+this.mkDiv(x2,oy,1,y2-oy+1);
+}
+}
+}
+function mkLin2D(x1,y1,x2,y2){
+if(x1>x2){
+var _x2=x2;
+var _y2=y2;
+x2=x1;
+y2=y1;
+x1=_x2;
+y1=_y2;
+}
+var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1;
+var s=this.stroke;
+if(dx>=dy){
+if(s-3>0){
+var _s=(s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy)/dx;
+_s=(!(s-4)?Math.ceil(_s):Math.round(_s))+1;
+}else{
+var _s=s;
+}
+var ad=Math.ceil(s/2);
+var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx,ox=x;
+while((dx--)>0){
+++x;
+if(p>0){
+this.mkDiv(ox,y,x-ox+ad,_s);
+y+=yIncr;
+p+=pru;
+ox=x;
+}else{
+p+=pr;
+}
+}
+this.mkDiv(ox,y,x2-ox+ad+1,_s);
+}else{
+if(s-3>0){
+var _s=(s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy)/dy;
+_s=(!(s-4)?Math.ceil(_s):Math.round(_s))+1;
+}else{
+var _s=s;
+}
+var ad=Math.round(s/2);
+var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy,oy=y;
+if(y2<=y1){
+++ad;
+while((dy--)>0){
+if(p>0){
+this.mkDiv(x++,y,_s,oy-y+ad);
+y+=yIncr;
+p+=pru;
+oy=y;
+}else{
+y+=yIncr;
+p+=pr;
+}
+}
+this.mkDiv(x2,y2,_s,oy-y2+ad);
+}else{
+while((dy--)>0){
+y+=yIncr;
+if(p>0){
+this.mkDiv(x++,oy,_s,y-oy+ad);
+p+=pru;
+oy=y;
+}else{
+p+=pr;
+}
+}
+this.mkDiv(x2,oy,_s,y2-oy+ad+1);
+}
+}
+}
+function mkLinDott(x1,y1,x2,y2){
+if(x1>x2){
+var _x2=x2;
+var _y2=y2;
+x2=x1;
+y2=y1;
+x1=_x2;
+y1=_y2;
+}
+var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1,drw=true;
+if(dx>=dy){
+var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx;
+while((dx--)>0){
+if(drw){
+this.mkDiv(x,y,1,1);
+}
+drw=!drw;
+if(p>0){
+y+=yIncr;
+p+=pru;
+}else{
+p+=pr;
+}
+++x;
+}
+if(drw){
+this.mkDiv(x,y,1,1);
+}
+}else{
+var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy;
+while((dy--)>0){
+if(drw){
+this.mkDiv(x,y,1,1);
+}
+drw=!drw;
+y+=yIncr;
+if(p>0){
+++x;
+p+=pru;
+}else{
+p+=pr;
+}
+}
+if(drw){
+this.mkDiv(x,y,1,1);
+}
+}
+}
+function mkOv(_2e,top,_30,_31){
+var a=_30>>1,b=_31>>1,wod=_30&1,hod=(_31&1)+1,cx=_2e+a,cy=top+b,x=0,y=b,ox=0,oy=b,aa=(a*a)<<1,bb=(b*b)<<1,st=(aa>>1)*(1-(b<<1))+bb,tt=(bb>>1)-aa*((b<<1)-1),w,h;
+while(y>0){
+if(st<0){
+st+=bb*((x<<1)+3);
+tt+=(bb<<1)*(++x);
+}else{
+if(tt<0){
+st+=bb*((x<<1)+3)-(aa<<1)*(y-1);
+tt+=(bb<<1)*(++x)-aa*(((y--)<<1)-3);
+w=x-ox;
+h=oy-y;
+if(w&2&&h&2){
+this.mkOvQds(cx,cy,-x+2,ox+wod,-oy,oy-1+hod,1,1);
+this.mkOvQds(cx,cy,-x+1,x-1+wod,-y-1,y+hod,1,1);
+}else{
+this.mkOvQds(cx,cy,-x+1,ox+wod,-oy,oy-h+hod,w,h);
+}
+ox=x;
+oy=y;
+}else{
+tt-=aa*((y<<1)-3);
+st-=(aa<<1)*(--y);
+}
+}
+}
+this.mkDiv(cx-a,cy-oy,a-ox+1,(oy<<1)+hod);
+this.mkDiv(cx+ox+wod,cy-oy,a-ox+1,(oy<<1)+hod);
+}
+function mkOv2D(_33,top,_35,_36){
+var s=this.stroke;
+_35+=s-1;
+_36+=s-1;
+var a=_35>>1,b=_36>>1,wod=_35&1,hod=(_36&1)+1,cx=_33+a,cy=top+b,x=0,y=b,aa=(a*a)<<1,bb=(b*b)<<1,st=(aa>>1)*(1-(b<<1))+bb,tt=(bb>>1)-aa*((b<<1)-1);
+if(s-4<0&&(!(s-2)||_35-51>0&&_36-51>0)){
+var ox=0,oy=b,w,h,pxl,pxr,pxt,pxb,pxw;
+while(y>0){
+if(st<0){
+st+=bb*((x<<1)+3);
+tt+=(bb<<1)*(++x);
+}else{
+if(tt<0){
+st+=bb*((x<<1)+3)-(aa<<1)*(y-1);
+tt+=(bb<<1)*(++x)-aa*(((y--)<<1)-3);
+w=x-ox;
+h=oy-y;
+if(w-1){
+pxw=w+1+(s&1);
+h=s;
+}else{
+if(h-1){
+pxw=s;
+h+=1+(s&1);
+}else{
+pxw=h=s;
+}
+}
+this.mkOvQds(cx,cy,-x+1,ox-pxw+w+wod,-oy,-h+oy+hod,pxw,h);
+ox=x;
+oy=y;
+}else{
+tt-=aa*((y<<1)-3);
+st-=(aa<<1)*(--y);
+}
+}
+}
+this.mkDiv(cx-a,cy-oy,s,(oy<<1)+hod);
+this.mkDiv(cx+a+wod-s+1,cy-oy,s,(oy<<1)+hod);
+}else{
+var _a=(_35-((s-1)<<1))>>1,_b=(_36-((s-1)<<1))>>1,_x=0,_y=_b,_aa=(_a*_a)<<1,_bb=(_b*_b)<<1,_st=(_aa>>1)*(1-(_b<<1))+_bb,_tt=(_bb>>1)-_aa*((_b<<1)-1),pxl=new Array(),pxt=new Array(),_pxb=new Array();
+pxl[0]=0;
+pxt[0]=b;
+_pxb[0]=_b-1;
+while(y>0){
+if(st<0){
+st+=bb*((x<<1)+3);
+tt+=(bb<<1)*(++x);
+pxl[pxl.length]=x;
+pxt[pxt.length]=y;
+}else{
+if(tt<0){
+st+=bb*((x<<1)+3)-(aa<<1)*(y-1);
+tt+=(bb<<1)*(++x)-aa*(((y--)<<1)-3);
+pxl[pxl.length]=x;
+pxt[pxt.length]=y;
+}else{
+tt-=aa*((y<<1)-3);
+st-=(aa<<1)*(--y);
+}
+}
+if(_y>0){
+if(_st<0){
+_st+=_bb*((_x<<1)+3);
+_tt+=(_bb<<1)*(++_x);
+_pxb[_pxb.length]=_y-1;
+}else{
+if(_tt<0){
+_st+=_bb*((_x<<1)+3)-(_aa<<1)*(_y-1);
+_tt+=(_bb<<1)*(++_x)-_aa*(((_y--)<<1)-3);
+_pxb[_pxb.length]=_y-1;
+}else{
+_tt-=_aa*((_y<<1)-3);
+_st-=(_aa<<1)*(--_y);
+_pxb[_pxb.length-1]--;
+}
+}
+}
+}
+var ox=0,oy=b,_oy=_pxb[0],l=pxl.length,w,h;
+for(var i=0;i<l;i++){
+if(typeof _pxb[i]!="undefined"){
+if(_pxb[i]<_oy||pxt[i]<oy){
+x=pxl[i];
+this.mkOvQds(cx,cy,-x+1,ox+wod,-oy,_oy+hod,x-ox,oy-_oy);
+ox=x;
+oy=pxt[i];
+_oy=_pxb[i];
+}
+}else{
+x=pxl[i];
+this.mkDiv(cx-x+1,cy-oy,1,(oy<<1)+hod);
+this.mkDiv(cx+ox+wod,cy-oy,1,(oy<<1)+hod);
+ox=x;
+oy=pxt[i];
+}
+}
+this.mkDiv(cx-a,cy-oy,1,(oy<<1)+hod);
+this.mkDiv(cx+ox+wod,cy-oy,1,(oy<<1)+hod);
+}
+}
+function mkOvDott(_3c,top,_3e,_3f){
+var a=_3e>>1,b=_3f>>1,wod=_3e&1,hod=_3f&1,cx=_3c+a,cy=top+b,x=0,y=b,aa2=(a*a)<<1,aa4=aa2<<1,bb=(b*b)<<1,st=(aa2>>1)*(1-(b<<1))+bb,tt=(bb>>1)-aa2*((b<<1)-1),drw=true;
+while(y>0){
+if(st<0){
+st+=bb*((x<<1)+3);
+tt+=(bb<<1)*(++x);
+}else{
+if(tt<0){
+st+=bb*((x<<1)+3)-aa4*(y-1);
+tt+=(bb<<1)*(++x)-aa2*(((y--)<<1)-3);
+}else{
+tt-=aa2*((y<<1)-3);
+st-=aa4*(--y);
+}
+}
+if(drw){
+this.mkOvQds(cx,cy,-x,x+wod,-y,y+hod,1,1);
+}
+drw=!drw;
+}
+}
+function mkRect(x,y,w,h){
+var s=this.stroke;
+this.mkDiv(x,y,w,s);
+this.mkDiv(x+w,y,s,h);
+this.mkDiv(x,y+h,w+s,s);
+this.mkDiv(x,y+s,s,h-s);
+}
+function mkRectDott(x,y,w,h){
+this.drawLine(x,y,x+w,y);
+this.drawLine(x+w,y,x+w,y+h);
+this.drawLine(x,y+h,x+w,y+h);
+this.drawLine(x,y,x,y+h);
+}
+function jsgFont(){
+this.PLAIN="font-weight:normal;";
+this.BOLD="font-weight:bold;";
+this.ITALIC="font-style:italic;";
+this.ITALIC_BOLD=this.ITALIC+this.BOLD;
+this.BOLD_ITALIC=this.ITALIC_BOLD;
+}
+var Font=new jsgFont();
+function jsgStroke(){
+this.DOTTED=-1;
+}
+var Stroke=new jsgStroke();
+function jsGraphics(id,wnd){
+this.setColor=new Function("arg","this.color = arg;");
+this.getColor=new Function("return this.color");
+this.setStroke=function(x){
+this.stroke=x;
+if(!(x+1)){
+this.drawLine=mkLinDott;
+this.mkOv=mkOvDott;
+this.drawRect=mkRectDott;
+}else{
+if(x-1>0){
+this.drawLine=mkLin2D;
+this.mkOv=mkOv2D;
+this.drawRect=mkRect;
+}else{
+this.drawLine=mkLin;
+this.mkOv=mkOv;
+this.drawRect=mkRect;
+}
+}
+};
+this.setPrintable=function(arg){
+this.printable=arg;
+this.mkDiv=jg_n4?mkLyr:arg?mkDivPrint:mkDiv;
+};
+this.setFont=function(fam,sz,sty){
+this.ftFam=fam;
+this.ftSz=sz;
+this.ftSty=sty||Font.PLAIN;
+};
+this.drawPolyline=this.drawPolyLine=function(x,y,s){
+var i=x.length-1;
+while(i>=0){
+this.drawLine(x[i],y[i],x[--i],y[i]);
+}
+};
+this.fillRect=function(x,y,w,h){
+this.mkDiv(x,y,w,h);
+};
+this.fillRectPattern=function(x,y,w,h,url){
+this.htm+="<div style=\"position:absolute;"+"left:"+x+"px;"+"top:"+y+"px;"+"width:"+w+"px;"+"height:"+h+"px;"+"clip:rect(0,"+w+"px,"+h+"px,0);"+"overflow:hidden;"+"background-image: url('"+url+"');"+"layer-background-image: url('"+url+"');"+"z-index:100;\"></div>";
+};
+this.drawHandle=function(x,y,w,h,_62){
+this.htm+="<div style=\"position:absolute;"+"left:"+x+"px;"+"top:"+y+"px;"+"width:"+w+"px;"+"height:"+h+"px;"+"clip:rect(0,"+w+"px,"+h+"px,0);"+"padding: 2px;overflow:hidden;"+"cursor: '"+_62+"';"+"\" class=\"handleBox\" id=\""+_62+"\" ></div>";
+};
+this.drawHandleBox=function(x,y,w,h,_67){
+this.htm+="<div style=\"position:absolute;"+"left:"+x+"px;"+"top:"+y+"px;"+"width:"+w+"px;"+"height:"+h+"px;"+"clip:rect(0,"+(w+2)+"px,"+(h+2)+"px,0);"+"overflow:hidden; border: solid 1px "+this.color+";"+"cursor: '"+_67+"';"+"\" class=\"handleBox\" id=\""+_67+"\" ></div>";
+};
+this.drawPolygon=function(x,y){
+this.drawPolyline(x,y);
+this.drawLine(x[x.length-1],y[x.length-1],x[0],y[0]);
+};
+this.drawEllipse=this.drawOval=function(x,y,w,h){
+this.mkOv(x,y,w,h);
+};
+this.fillEllipse=this.fillOval=function(_6e,top,w,h){
+var a=(w-=1)>>1,b=(h-=1)>>1,wod=(w&1)+1,hod=(h&1)+1,cx=_6e+a,cy=top+b,x=0,y=b,ox=0,oy=b,aa2=(a*a)<<1,aa4=aa2<<1,bb=(b*b)<<1,st=(aa2>>1)*(1-(b<<1))+bb,tt=(bb>>1)-aa2*((b<<1)-1),pxl,dw,dh;
+if(w+1){
+while(y>0){
+if(st<0){
+st+=bb*((x<<1)+3);
+tt+=(bb<<1)*(++x);
+}else{
+if(tt<0){
+st+=bb*((x<<1)+3)-aa4*(y-1);
+pxl=cx-x;
+dw=(x<<1)+wod;
+tt+=(bb<<1)*(++x)-aa2*(((y--)<<1)-3);
+dh=oy-y;
+this.mkDiv(pxl,cy-oy,dw,dh);
+this.mkDiv(pxl,cy+oy-dh+hod,dw,dh);
+ox=x;
+oy=y;
+}else{
+tt-=aa2*((y<<1)-3);
+st-=aa4*(--y);
+}
+}
+}
+}
+this.mkDiv(cx-a,cy-oy,w+1,(oy<<1)+hod);
+};
+this.drawString=mkLbl;
+this.clear=function(){
+this.htm="";
+if(this.cnv){
+this.cnv.innerHTML=this.defhtm;
+}
+};
+this.mkOvQds=function(cx,cy,xl,xr,yt,yb,w,h){
+this.mkDiv(xr+cx,yt+cy,w,h);
+this.mkDiv(xr+cx,yb+cy,w,h);
+this.mkDiv(xl+cx,yb+cy,w,h);
+this.mkDiv(xl+cx,yt+cy,w,h);
+};
+this.setStroke(1);
+this.setPrintable(false);
+this.setFont("verdana,geneva,helvetica,sans-serif",String.fromCharCode(49,50,112,120),Font.PLAIN);
+this.color="#000000";
+this.htm="";
+this.wnd=wnd||window;
+if(!(jg_ie||jg_dom||jg_ihtm)){
+chkDHTM();
+}
+if(typeof id!="string"||!id){
+this.paint=pntDoc;
+}else{
+this.cnv=document.all?(this.wnd.document.all[id]||null):document.getElementById?(this.wnd.document.getElementById(id)||null):null;
+this.defhtm=(this.cnv&&this.cnv.innerHTML)?this.cnv.innerHTML:"";
+this.paint=jg_dom?pntCnvDom:jg_ie?pntCnvIe:jg_ihtm?pntCnvIhtm:pntCnv;
+}
+}
+

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/assets/wz_jsgraphics.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/backend.php
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/backend.php?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/backend.php (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/backend.php Sun Jul 22 07:50:10 2007
@@ -0,0 +1,155 @@
+<?php 
+/**
+* Unified backend for ImageManager 
+*
+* Image Manager was originally developed by:
+*   Xiang Wei Zhuo, email: xiangweizhuo(at)hotmail.com Wei Shou.
+*
+* Unified backend sponsored by DTLink Software, http://www.dtlink.com
+* Implementation by Yermo Lamers, http://www.formvista.com
+*
+* (c) DTLink, LLC 2005.
+* Distributed under the same terms as HTMLArea itself.
+* This notice MUST stay intact for use (see license.txt).
+*
+* DESCRIPTION:
+*
+* Instead of using separate URL's for each function, ImageManager now
+* routes all requests to the server through this single, replaceable,
+* entry point. backend.php expects at least two URL variable parameters: 
+*
+* __plugin=ImageManager   for future expansion; identify the plugin being requested.
+* __function=thumbs|images|editorFrame|editor|manager  function being called.
+*
+* Having a single entry point that strictly adheres to a defined interface will 
+* make the backend code much easier to maintain and expand. It will make it easier
+* on integrators, not to mention it'll make it easier to have separate 
+* implementations of the backend in different languages (Perl, Python, ASP, etc.) 
+*
+* @see config.inc.php
+*/
+
+// Strip slashes if MQGPC is on
+set_magic_quotes_runtime(0);
+if(get_magic_quotes_gpc())
+{
+  $to_clean = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE);
+  while(count($to_clean))
+  {
+    $cleaning =& $to_clean[array_pop($junk = array_keys($to_clean))];
+    unset($to_clean[array_pop($junk = array_keys($to_clean))]);
+    foreach(array_keys($cleaning) as $k)
+    {
+      if(is_array($cleaning[$k]))
+      {
+        $to_clean[] =& $cleaning[$k];
+      }
+      else
+      {
+        $cleaning[$k] = stripslashes($cleaning[$k]);
+      }
+    }
+  }
+}
+
+/**
+* ImageManager configuration
+*/
+
+require_once('config.inc.php');
+
+/**
+* debug message library
+*/
+
+include_once( "ddt.php" );
+
+// uncomment to turn on debugging
+// _ddtOn();
+
+_ddt( __FILE__, __LINE__, "backend.php: top with query '" . $_SERVER["PHP_SELF"] . "' string '" . $_SERVER["QUERY_STRING"] . "'" );
+
+$formVars = empty($_POST) ? $_GET : $_POST;
+
+// make sure the request is for us (this gives us the ability to eventually organize
+// a backend event handler system) For an include file the return doesn't make alot of
+// sense but eventually we'll want to turn all of this into at least functions 
+// separating out all the presentation HTML from the logic. (Right now all the HTML
+// used by ImageManager is in the same files as the PHP code ...)
+
+if ( @$formVars[ "__plugin" ] != "ImageManager" )
+	{
+	// not for us.
+
+	_ddt( __FILE__, __LINE__, "request was not for us" );
+
+	return true;
+	}
+
+// so we don't have to re-engineer the entire thing right now, since it's probably
+// going to get rewritten anyway, we just include the correct file based on the 
+// function request.
+
+_ddt( __FILE__, __LINE__, "backend.php(): handling function '" . $formVars[ "__function" ] . "' base_dir is '" . $IMConfig["base_dir"] . "'" );
+
+switch ( @$formVars[ "__function" ] )
+	{
+
+	case "editor": 
+
+		include_once( $IMConfig['base_dir'] . "/editor.php" );
+		exit();
+		
+		break;
+
+	case "editorFrame":
+
+		include_once( $IMConfig['base_dir'] . "/editorFrame.php" );
+		exit();
+
+		break;
+
+	case "manager":
+
+		_ddt( __FILE__, __LINE__, "including '" . $IMConfig['base_dir'] . "/manager.php" );
+
+		include_once( $IMConfig['base_dir'] . "/manager.php" );
+		exit();
+
+		break;
+
+	case "images":
+
+		include_once( $IMConfig['base_dir'] . "/images.php" );
+		exit();
+
+		break;
+
+	case "thumbs":
+
+		include_once( $IMConfig['base_dir'] . "/thumbs.php" );
+		exit();
+
+		break;
+
+	case "resizer":
+
+		include_once( $IMConfig['base_dir'] . "/resizer.php" );
+		exit();
+
+		break;
+
+	default:
+
+		_ddt( __FILE__, __LINE__, "function request not supported" );
+		_error( __FILE__, __LINE__, "function request not supported" );
+
+		break;
+
+	}	// end of switch.
+
+return false ;
+
+// END
+
+?>

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/config.inc.php
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/config.inc.php?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/config.inc.php (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/config.inc.php Sun Jul 22 07:50:10 2007
@@ -0,0 +1,337 @@
+<?php
+/**
+ * Image Manager configuration file.
+ * @author $Author: ray $
+ * @version $Id: config.inc.php 677 2007-01-19 22:24:36Z ray $
+ * @package ImageManager
+ *
+ * @todo change all these config values to defines()
+ */
+
+// REVISION HISTORY:
+//
+// 2005-03-20 Yermo Lamers (www.formvista.com):
+//	. unified backend.
+// . created a set of defaults that make sense for bundling with Xinha.
+
+// -------------------------------------------------------------------------
+
+/**
+* Default backend URL
+*
+* URL to use for unified backend.
+*
+* The ?__plugin=ImageManager& is required. 
+*/
+
+$IMConfig['backend_url'] = "backend.php?__plugin=ImageManager&";
+
+/**
+* Backend Installation Directory
+*
+* location of backend install; these are used to link to css and js
+* assets because we may have the front end installed in a different
+* directory than the backend. (i.e. nothing assumes that the frontend
+* and the backend are in the same directory)
+*/
+
+$IMConfig['base_dir'] = getcwd();
+$IMConfig['base_url'] = '';
+
+// ------------------------------------------------------------
+
+/**
+* Path to directory containing images.
+*
+* File system path to the directory you want to manage the images
+* for multiple user systems, set it dynamically.
+*
+* NOTE: This directory requires write access by PHP. That is, 
+* PHP must be able to create files in this directory.
+* Able to create directories is nice, but not necessary.
+*
+* CHANGE THIS: for out-of-the-box demo purposes we're setting this to ./demo_images
+* which has some graphics in it.
+*/
+
+// $IMConfig['images_dir'] = "/some/path/to/images/directory;
+
+$IMConfig['images_dir'] = "demo_images";
+
+// -------------------------------------------------------------------------
+
+/**
+* URL of directory containing images.
+*
+* The URL to the above path, the web browser needs to be able to see it.
+* It can be protected via .htaccess on apache or directory permissions on IIS,
+* check you web server documentation for futher information on directory protection
+* If this directory needs to be publicly accessiable, remove scripting capabilities
+* for this directory (i.e. disable PHP, Perl, CGI). We only want to store assets
+* in this directory and its subdirectories.
+*
+* CHANGE THIS: You need to change this to match the url where you have Xinha
+* installed. If the images show up blank chances are this is not set correctly.
+*/
+
+// $IMConfig['images_url'] = "/url/to/above";
+
+// try to figure out the URL of the sample images directory. For your installation
+// you will probably want to keep images in another directory.
+
+$IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "demo_images";
+
+// -------------------------------------------------------------------------
+
+/**
+* PHP Safe Mode?
+*
+* Possible values: true, false
+*
+* TRUE - If PHP on the web server is in safe mode, set this to true.
+* SAFE MODE restrictions: directory creation will not be possible,
+* only the GD library can be used, other libraries require
+* Safe Mode to be off.
+*
+* FALSE - Set to false if PHP on the web server is not in safe mode.
+*/
+
+$IMConfig['safe_mode'] = false;
+
+// -------------------------------------------------------------------------
+
+/**
+* Image Library to use.
+*
+* Possible values: 'GD', 'IM', or 'NetPBM'
+*
+* The image manipulation library to use, either GD or ImageMagick or NetPBM.
+* If you have safe mode ON, or don't have the binaries to other packages, 
+* your choice is 'GD' only. Other packages require Safe Mode to be off.
+*
+* DEFAULT: GD is probably the most likely to be available. 
+*/
+
+$IMConfig['IMAGE_CLASS'] = 'GD';
+
+
+// -------------------------------------------------------------------------
+
+/**
+* NetPBM or IM binary path.
+*
+* After defining which library to use, if it is NetPBM or IM, you need to
+* specify where the binary for the selected library are. And of course
+* your server and PHP must be able to execute them (i.e. safe mode is OFF).
+* GD does not require the following definition.
+*/
+
+$IMConfig['IMAGE_TRANSFORM_LIB_PATH'] ='/usr/bin/';
+
+// For windows, something like
+// C:/"Program Files"/ImageMagick-5.5.7-Q16/
+
+// -------------------------------------------------------------------------
+//                OPTIONAL SETTINGS 
+// -------------------------------------------------------------------------
+
+/**
+* Thumbnail prefix
+*
+* The prefix for thumbnail files, something like .thumb will do. The
+* thumbnails files will be named as "prefix_imagefile.ext", that is,
+*  prefix + orginal filename.
+*/
+
+$IMConfig['thumbnail_prefix'] = '.';
+
+// -------------------------------------------------------------------------
+
+/**
+* Thumbnail Directory
+*
+* Thumbnail can also be stored in a directory, this directory
+* will be created by PHP. If PHP is in safe mode, this parameter
+*  is ignored, you can not create directories. 
+*
+*  If you do not want to store thumbnails in a directory, set this
+*  to false or empty string '';
+*/
+
+$IMConfig['thumbnail_dir'] = '.thumbs';
+
+// -------------------------------------------------------------------------
+
+/**
+* Resized prefix
+*
+* The prefix for resized files, something like .resized will do.  The
+* resized files will be named <prefix>_<width>x<height>_<original>
+* resized files are created when one changes the dimensions of an image
+* in the image manager selection dialog - the image is scaled when the
+* user clicks the ok button.
+*/
+
+$IMConfig['resized_prefix'] = '.resized';
+
+// -------------------------------------------------------------------------
+
+/**
+* Resized Directory
+*
+* Resized images may also be stored in a directory, except in safe mode.
+*/
+
+$IMConfig['resized_dir'] = '.resized';
+
+// -------------------------------------------------------------------------
+
+/**
+* Allow New Directories
+*
+*
+* Possible values: true, false
+*
+* TRUE -  Allow the user to create new sub-directories in the
+*        $IMConfig['base_dir'].
+*
+* FALSE - No directory creation.
+*
+* NOTE: If $IMConfig['safe_mode'] = true, this parameter
+*     is ignored, you can not create directories
+*
+* DEFAULT: for demo purposes we turn this off.
+*/
+
+$IMConfig['allow_new_dir'] = true;
+
+// -------------------------------------------------------------------------
+
+/**
+* Allow Uploads
+*
+*  Possible values: true, false
+*
+*  TRUE - Allow the user to upload files.
+*
+*  FALSE - No uploading allowed.
+*
+* DEFAULT: for demo purposes we turn this off.
+*/
+
+$IMConfig['allow_upload'] = true;
+
+// -------------------------------------------------------------------------
+
+/**
+* Validate Images
+*
+* Possible values: true, false
+*
+* TRUE - If set to true, uploaded files will be validated based on the 
+*        function getImageSize, if we can get the image dimensions then 
+*        I guess this should be a valid image. Otherwise the file will be rejected.
+*
+* FALSE - All uploaded files will be processed.
+*
+* NOTE: If uploading is not allowed, this parameter is ignored.
+*/
+
+$IMConfig['validate_images'] = true;
+
+// -------------------------------------------------------------------------
+
+/**
+* Default Thumnail.
+*
+* The default thumbnail if the thumbnails can not be created, either
+* due to error or bad image file.
+*/
+
+$IMConfig['default_thumbnail'] = 'img/default.gif';
+
+// -------------------------------------------------------------------------
+
+/**
+*  Thumbnail dimensions.
+*/
+
+$IMConfig['thumbnail_width'] = 96;
+$IMConfig['thumbnail_height'] = 96;
+
+// -------------------------------------------------------------------------
+
+/**
+* Editor Temporary File Prefix.
+*
+* Image Editor temporary filename prefix.
+*/
+
+$IMConfig['tmp_prefix'] = '.editor_';
+
+
+$IMConfig['ViewMode'] = 'thumbs';
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+//       ================== END OF CONFIGURATION =======================      //
+////////////////////////////////////////////////////////////////////////////////
+
+
+// Standard PHP Backend Data Passing
+//  if data was passed using xinha_pass_to_php_backend() we merge the items
+//  provided into the Config
+require_once(realpath(dirname(__FILE__) . '/../../contrib/php-xinha.php'));
+if($passed_data = xinha_read_passed_data())
+{
+  $IMConfig = array_merge($IMConfig, $passed_data);
+  $IMConfig['backend_url'] .= xinha_passed_data_querystring() . '&';
+}
+// Deprecated config passing, don't use this way any more!
+elseif(isset($_REQUEST['backend_config']))
+{
+  if(get_magic_quotes_gpc()) {
+    $_REQUEST['backend_config'] = stripslashes($_REQUEST['backend_config']);
+  }
+  
+  // Config specified from front end, check that it's valid
+  session_start();
+  $secret = $_SESSION[$_REQUEST['backend_config_secret_key_location']];
+
+  if($_REQUEST['backend_config_hash'] !== sha1($_REQUEST['backend_config'] . $secret))
+  {
+    die("Backend security error.");
+  }
+
+  $to_merge = unserialize($_REQUEST['backend_config']);
+  if(!is_array($to_merge))
+  {
+    die("Backend config syntax error.");
+  }
+
+  $IMConfig = array_merge($IMConfig, $to_merge);
+  $IMConfig['backend_url'] .= "backend_config=" . rawurlencode($_REQUEST['backend_config']) . '&';
+  $IMConfig['backend_url'] .= "backend_config_hash=" . rawurlencode($_REQUEST['backend_config_hash']) . '&';
+  $IMConfig['backend_url'] .= "backend_config_secret_key_location=" . rawurlencode($_REQUEST['backend_config_secret_key_location']) . '&';
+
+}
+
+define('IMAGE_CLASS', $IMConfig['IMAGE_CLASS']);
+define('IMAGE_TRANSFORM_LIB_PATH', $IMConfig['IMAGE_TRANSFORM_LIB_PATH']);
+define( "IM_CONFIG_LOADED", "yes" );
+
+// bring in the debugging library
+
+include_once( "ddt.php" );
+
+// uncomment to send debug messages to a local file
+// _setDebugLog( "/tmp/debug_log.txt" );
+
+// turn debugging on everywhere.
+// _ddtOn();
+
+// END
+
+?>

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/ddt.php
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/ddt.php?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/ddt.php (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/ddt.php Sun Jul 22 07:50:10 2007
@@ -0,0 +1,288 @@
+<?php 
+/*
+This ddt library is released under the terms of the HTMLArea license. 
+See license.txt that is shipped with Xinha.
+*/
+
+// must be included after the configuration has been loaded.
+
+if ( ! defined( "IM_CONFIG_LOADED" ) )
+	die( "sorry" );
+
+/**
+* Debug and Error Message functions.
+*
+* These functions implement a procedural version of the formVista DDT debug
+* message system.
+*
+* @package formVista
+* @subpackage lib
+* @copyright DTLink, LLC 2005
+* @author Yermo Lamers
+* @see http://www.formvista.com/contact.html
+*/
+
+// REVISION HISTORY:
+//
+// 26 Jan 2001 YmL:
+//		. initial revision
+//
+// 2002-06-19 YmL:
+//		. added	logging	debug and error	messages to a file.
+//
+// 2004-02-06 YmL:
+//	.	added a newline to generated messages.
+//
+// 2005-01-09 YmL:
+//	.	now checks global $fvDEBUG[ "logfile" ] setting for 
+//		logfile to output to. 
+//	.	dumping to file has not been combined into a dumpmsg 
+//		method.
+//
+// 2005-02-25 YmL:
+//	.	added _error() support for cmdLine programs.
+//
+// 2005-03-20 YmL:
+//	.	changed license for this file to HTMLArea from RPL.
+//	.	quick hack to repurpose for Xinha.
+//
+// -------------------------------------------------------
+
+/**
+* dumps message to stdout or log file depending upon global.
+*
+* checks $fvDEBUG["logfile"] global for name of file to dump
+* messages to. Opens the file once.
+*/
+
+function dumpmsg( $msgline )
+{
+
+global $fvDEBUG;
+
+if ( @$fvDEBUG[ "logfile" ] != NULL )
+	{
+
+	// only open the file once and store the handle in the global
+	// fvDEBUG array .. for now.
+
+	if ( @$fvDEBUG[ "logfile_fp" ] == NULL )
+		{
+
+		// we clear out the debug file on each run.
+
+		if (( $fvDEBUG[ "logfile_fp" ] = fopen( $fvDEBUG[ "logfile" ], "a" )) == NULL )
+			{
+			die( "ddt(): unable to open debug log" );
+			return  false ;
+			}
+		}
+
+	fputs( $fvDEBUG[ "logfile_fp" ], "$msgline" );
+	fflush( $fvDEBUG[ "logfile_fp" ] );
+
+	}
+else
+	{
+	echo $msgline;
+	}
+
+}	// end of dumpmsg.
+
+/**
+* displays a formatted debugging message.
+*
+* If ddtOn() was called, outputs a formatted debugging message.
+*
+* @param string $file filename, usually __FILE__
+* @param string $line line number in file, usually __LINE__
+* @param string $msg debugging message to display
+*/
+
+function _ddt( $file, $line, $msg )
+{
+
+global $_DDT;
+global $_DDT_DEBUG_LOG;
+global $_DDT_CMDLINE;
+
+$basename = basename( $file );
+
+if ( @$_DDT == "yes" )
+	{
+
+	if ( @$_DDT_CMDLINE == "yes" )
+		{
+		dumpmsg( basename( $file ) . ":$line: $msg \n" );
+		flush();
+
+		}
+	else
+		{
+		dumpmsg( "<p>$basename:$line: $msg</p>\n" );
+		}
+	}
+
+}	// end of _ddt
+
+/**
+* displays a formatted dump of an associative array.
+*
+* If ddtOn() was called, outputs a formatted debugging message showing 
+* contents of array.
+*
+* @param string $file filename, usually __FILE__
+* @param string $line line number in file, usually __LINE__
+* @param string $msg debugging message to display
+* @param array $array_var array to dump.
+*/
+
+function _ddtArray( $file, $line, $msg,	$array_var )
+{
+
+global $_DDT;
+
+if ( $_DDT == "yes" )
+	{
+
+	dumpmsg( "<h2>$file:$line: $msg</h2>" );
+	
+	foreach	( $array_var as	$name => $value	)
+		{
+		dumpmsg( "<p><b>$name</b> => <b>$value</b>\n" );
+		}
+	}
+
+}	// end of _ddtArray
+
+// -----------------------------------------------------------------
+
+/**
+* Central Error Function.
+*
+* Displays a formatted error message to the user.
+* If the global _DDT_ERROR_LOG is set the error message is dumped 
+* to that file	instead	of being displayed to the user.
+*/
+
+function _error( $file,	$line, $msg )
+{
+
+global $_DDT_ERROR_LOG;
+global $_DDT_CMDLINE;
+
+if ( @$_DDT_ERROR_LOG == NULL )
+	{
+
+	if ( @$_DDT_CMDLINE == "yes" )
+		{
+		echo basename($file) . ":$line: $msg\n";
+		}
+	else
+		{
+		echo "<h2>$file:$line: $msg</h2>";
+		}
+	}
+else
+	{
+	 
+	if (( $fp = fopen( $_DDT_ERROR_LOG, "a"	)) != NULL )
+		{
+		fputs( $fp, date("D M j	G:i:s T	Y") . "	- $file:$line: $msg\n" );
+		fclose(	$fp );
+		}
+		
+	}
+	
+}	// end of _error
+
+// ----------------------------------------------------------------------
+
+function errorEcho( $title, $field )
+{
+
+global $error_msg;
+
+if ( $error_msg[ $field	] != ""	)
+	{
+	
+	echo "<FONT SIZE=\"+2\"	COLOR=\"RED\">$title</FONT>";
+	
+	}
+else
+	{
+	
+	echo $title;
+	
+	}
+	
+}	// end of errorEcho
+
+/**
+* turns on procedural debugging.
+*
+* Causes _ddt() calls to display debugging messages.
+*/
+
+function _ddtOn()
+{
+
+global $_DDT;
+
+$_DDT =	"yes";
+
+}
+
+/**
+* set error message destination.
+*
+* sets the destination for error messages.
+*
+* @param string $file full path to errorlog.
+*/
+
+function _setErrorLog( $errorLog )
+{
+
+global $_DDT_ERROR_LOG;
+
+$_DDT_ERROR_LOG	= $errorLog;
+
+}
+
+/**
+* set output file for debugging messages.
+*
+* sets the destination file for debugging messages.
+*
+* @param string $file full path to debuglog.
+*/
+
+function _setDebugLog( $debugLog )
+{
+
+global $fvDEBUG;
+
+$fvDEBUG[ "logfile" ] = $debugLog;
+
+}
+
+/**
+* set debugging output style to command line.
+*
+* tells ddt to format debugging messages for a 
+* command line program.
+*/
+
+function _ddtSetCmdLine()
+{
+
+global $_DDT_CMDLINE;
+
+$_DDT_CMDLINE = "yes";
+
+}
+
+// END
+
+?>

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/bikerpeep.jpg
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/bikerpeep.jpg?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/bikerpeep.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/linux/linux.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/linux/linux.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/linux/linux.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/wesnoth078.jpg
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/wesnoth078.jpg?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/demo_images/wesnoth078.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/editor.php
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/editor.php?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/editor.php (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/editor.php Sun Jul 22 07:50:10 2007
@@ -0,0 +1,148 @@
+<?php 
+/**
+ * The PHP Image Editor user interface.
+ * @author $Author: ray $
+ * @version $Id: editor.php 677 2007-01-19 22:24:36Z ray $
+ * @package ImageManager
+ */
+
+require_once('config.inc.php');
+require_once('Classes/ImageManager.php');
+require_once('Classes/ImageEditor.php');
+
+$manager = new ImageManager($IMConfig);
+$editor = new ImageEditor($manager);
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+	<title></title>
+<script type="text/javascript">
+_backend_url = "<?php print $IMConfig['backend_url']; ?>";
+</script>
+	<link href="<?php print $IMConfig['base_url'];?>assets/editor.css" rel="stylesheet" type="text/css" />	
+<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/slider.js"></script>
+<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/popup.js"></script>
+<script type="text/javascript">
+/*<![CDATA[*/
+	window.resizeTo(673, 531);
+
+	if(window.opener)
+		HTMLArea = window.opener.HTMLArea;
+/*]]>*/
+</script>
+<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editor.js"></script>
+</head>
+
+<body>
+<div id="indicator">
+<img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" id="indicator_image" height="20" width="20" alt="" />
+</div>
+<div id="tools">
+	<div id="tools_crop" style="display:none;">
+		<div id="tool_inputs">
+			<label for="cx">Start X:</label><input type="text" id="cx"  class="textInput" onchange="updateMarker('crop')"/>
+			<label for="cy">Start Y:</label><input type="text" id="cy" class="textInput" onchange="updateMarker('crop')"/>
+			<label for="cw">Width:</label><input type="text" id="cw" class="textInput" onchange="updateMarker('crop')"/>
+			<label for="ch">Height:</label><input type="text" id="ch" class="textInput" onchange="updateMarker('crop')"/>
+			<img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />
+		</div>	
+		<a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
+		<a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>		
+	</div>	
+	<div id="tools_scale" style="display:none;">
+		<div id="tool_inputs">
+			<label for="sw">Width:</label><input type="text" id="sw" class="textInput" onchange="checkConstrains('width')"/>
+			<a href="javascript:toggleConstraints();" title="Lock"><img src="<?php print $IMConfig['base_url'];?>img/islocked2.gif" id="scaleConstImg" height="14" width="8" alt="Lock" class="div" /></a><label for="sh">Height:</label>
+			<input type="text" id="sh" class="textInput" onchange="checkConstrains('height')"/>
+			<input type="checkbox" id="constProp" value="1" checked="checked" onclick="toggleConstraints()"/>
+			<label for="constProp">Constrain Proportions</label>
+			<img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />
+		</div>	
+		<a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
+		<a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>		
+	</div>	
+	<div id="tools_rotate" style="display:none;">
+		<div id="tool_inputs">
+			<select id="flip" name="flip" style="margin-left: 10px; vertical-align: middle;">
+              <option selected>Flip Image</option>
+              <option>-----------------</option>
+              <option value="hoz">Flip Horizontal</option>
+              <option value="ver">Flip Vertical</option>
+         </select>
+			<select name="rotate" onchange="rotatePreset(this)" style="margin-left: 20px; vertical-align: middle;">
+              <option selected>Rotate Image</option>
+              <option>-----------------</option>
+
+              <option value="180">Rotate 180 &deg;</option>
+              <option value="90">Rotate 90 &deg; CW</option>
+              <option value="-90">Rotate 90 &deg; CCW</option>
+         </select>
+			<label for="ra">Angle:</label><input type="text" id="ra" class="textInput" />
+			<img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />
+		</div>	
+		<a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
+		<a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>		
+	</div>		
+	<div id="tools_measure" style="display:none;">
+		<div id="tool_inputs">
+			<label>X:</label><input type="text" class="measureStats" id="sx" />
+			<label>Y:</label><input type="text" class="measureStats" id="sy" />
+			<img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />
+			<label>W:</label><input type="text" class="measureStats" id="mw" />
+			<label>H:</label><input type="text" class="measureStats" id="mh" />
+			<img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />
+			<label>A:</label><input type="text" class="measureStats" id="ma" />		
+			<label>D:</label><input type="text" class="measureStats" id="md" />		
+			<img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />
+			<button type="button" onclick="editor.reset();" >Clear</button>
+		</div>	
+	</div>
+	<div id="tools_save" style="display:none;">
+		<div id="tool_inputs">
+			<label for="save_filename">Filename:</label><input type="text" id="save_filename" value="<?php echo $editor->getDefaultSaveFile();?>"/>
+			<select name="format" id="save_format" style="margin-left: 10px; vertical-align: middle;" onchange="updateFormat(this)">
+            <option value="" selected>Image Format</option>
+            <option value="">---------------------</option>
+            <option value="jpeg,85">JPEG High</option>
+            <option value="jpeg,60">JPEG Medium</option>
+            <option value="jpeg,35">JPEG Low</option>
+            <option value="png">PNG</option>
+			<?php if($editor->isGDGIFAble() != -1) { ?>
+            <option value="gif">GIF</option>
+			<?php } ?>
+         </select>
+			<label>Quality:</label>
+			<table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">
+				<tr>
+				<td>
+					<div id="slidercasing"> 
+				<div id="slidertrack" style="width:100px"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
+            <div id="sliderbar" style="left:85px" onmousedown="captureStart();"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
+			</div>	
+				</td>
+				</tr>
+			</table>				
+			<input type="text" id="quality" onchange="updateSlider(this.value)" style="width: 2em;" value="85"/>
+			<img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />
+		</div>	
+		<a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
+		<a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>		
+	</div>	
+</div>
+<div id="toolbar">
+<a href="javascript:toggle('crop')" id="icon_crop" title="Crop"><img src="<?php print $IMConfig['base_url'];?>img/crop.gif" height="20" width="20" alt="Crop" /><span>Crop</span></a>
+<a href="javascript:toggle('scale')" id="icon_scale" title="Resize"><img src="<?php print $IMConfig['base_url'];?>img/scale.gif" height="20" width="20" alt="Resize" /><span>Resize</span></a>
+<a href="javascript:toggle('rotate')" id="icon_rotate" title="Rotate"><img src="<?php print $IMConfig['base_url'];?>img/rotate.gif" height="20" width="20" alt="Rotate" /><span>Rotate</span></a>
+<a href="javascript:toggle('measure')" id="icon_measure" title="Measure"><img src="<?php print $IMConfig['base_url'];?>img/measure.gif" height="20" width="20" alt="Measure" /><span>Measure</span></a>
+<a href="javascript: toggleMarker();" title="Marker"><img id="markerImg" src="<?php print $IMConfig['base_url'];?>img/t_black.gif" height="20" width="20" alt="Marker" /><span>Marker</span></a>
+<a href="javascript:toggle('save')" id="icon_save" title="Save"><img src="<?php print $IMConfig['base_url'];?>img/save.gif" height="20" width="20" alt="Save" /><span>Save</span></a>
+</div>
+<div id="contents">
+<iframe src="<?php print $IMConfig['backend_url']; ?>__function=editorFrame&img=<?php if(isset($_GET['img'])) echo rawurlencode($_GET['img']); ?>" name="editor" id="editor"  scrolling="auto" title="Image Editor" frameborder="0"></iframe>
+</div>
+<div id="bottom"></div>
+</body>
+</html>
\ No newline at end of file

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/editorFrame.php
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/editorFrame.php?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/editorFrame.php (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/editorFrame.php Sun Jul 22 07:50:10 2007
@@ -0,0 +1,79 @@
+<?php 
+/**
+ * The frame that contains the image to be edited.
+ * @author $Author: ray $
+ * @version $Id: editorFrame.php 677 2007-01-19 22:24:36Z ray $
+ * @package ImageManager
+ */
+
+require_once('config.inc.php');
+require_once('Classes/ImageManager.php');
+require_once('Classes/ImageEditor.php');
+
+$manager = new ImageManager($IMConfig);
+$editor = new ImageEditor($manager);
+$imageInfo = $editor->processImage();
+
+?>
+
+<html>
+<head>
+	<title></title>
+<script type="text/javascript">
+_backend_url = "<?php print $IMConfig['backend_url']; ?>";
+</script>
+
+<link href="<?php print $IMConfig['base_url'];?>assets/editorFrame.css" rel="stylesheet" type="text/css" />	
+<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/wz_jsgraphics.js"></script>
+<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/EditorContent.js"></script>
+<script type="text/javascript">
+
+if(window.top)
+	HTMLArea = window.top.HTMLArea;
+
+function i18n(str) {
+    return HTMLArea._lc(str, 'ImageManager');
+}
+	
+	var mode = "<?php echo $editor->getAction(); ?>" //crop, scale, measure
+
+var currentImageFile = "<?php if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>";
+
+<?php if ($editor->isFileSaved() == 1) { ?>
+	alert(i18n('File saved.'));
+  window.parent.opener.selectImage
+    (
+      '<?php echo $imageInfo['savedFile'] ?>',
+      '<?php echo $imageInfo['savedFile'] ?>'.replace(/^.*\/?([^\/]*)$/, '$1'),
+      <?php echo $imageInfo['width'] ?>,
+      <?php echo $imageInfo['height'] ?>
+    );
+  window.parent.opener.parent.refresh();
+  window.parent.close();
+<?php } else if ($editor->isFileSaved() == -1) { ?>
+	alert(i18n('File was not saved.'));
+<?php } ?>
+
+</script>
+<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editorFrame.js"></script>
+</head>
+
+<body>
+<div id="status"></div>
+<div id="ant" class="selection" style="visibility:hidden"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="0" height="0" border="0" alt="" id="cropContent"></div>
+<?php if ($editor->isGDEditable() == -1) { ?>
+	<div style="text-align:center; padding:10px;"><span class="error">GIF format is not supported, image editing not supported.</span></div>
+<?php } ?>
+<table height="100%" width="100%">
+	<tr>
+		<td>
+<?php if(count($imageInfo) > 0 && is_file($imageInfo['fullpath'])) { ?>
+	<span id="imgCanvas" class="crop"><img src="<?php echo $imageInfo['src']; ?>" <?php echo $imageInfo['dimensions']; ?> alt="" id="theImage" name="theImage"></span>
+<?php } else { ?>
+	<span class="error">No Image Available</span>
+<?php } ?>
+		</td>
+	</tr>
+</table>
+</body>
+</html>
\ No newline at end of file

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/image-manager.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/image-manager.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/image-manager.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/image-manager.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,146 @@
+function ImageManager(_1){
+}
+ImageManager._pluginInfo={name:"ImageManager",version:"1.0",developer:"Xiang Wei Zhuo",developer_url:"http://www.zhuo.org/htmlarea/",license:"htmlArea"};
+HTMLArea.Config.prototype.ImageManager={"backend":_editor_url+"plugins/ImageManager/backend.php?__plugin=ImageManager&","backend_data":null,"backend_config":null,"backend_config_hash":null,"backend_config_secret_key_location":"Xinha:ImageManager"};
+HTMLArea.prototype._insertImage=function(_2){
+var _3=this;
+var _4=null;
+if(typeof _2=="undefined"){
+_2=this.getParentElement();
+if(_2&&!/^img$/i.test(_2.tagName)){
+_2=null;
+}
+}
+if(_2){
+_4={f_url:HTMLArea.is_ie?_2.src:_2.src,f_alt:_2.alt,f_border:_2.style.borderWidth?_2.style.borderWidth:_2.border,f_align:_2.align,f_padding:_2.style.padding,f_margin:_2.style.margin,f_width:_2.width,f_height:_2.height,f_backgroundColor:_2.style.backgroundColor,f_borderColor:_2.style.borderColor};
+function shortSize(_5){
+if(/ /.test(_5)){
+var _6=_5.split(" ");
+var _7=true;
+for(var i=1;i<_6.length;i++){
+if(_6[0]!=_6[i]){
+_7=false;
+break;
+}
+}
+if(_7){
+_5=_6[0];
+}
+}
+return _5;
+}
+_4.f_border=shortSize(_4.f_border);
+_4.f_padding=shortSize(_4.f_padding);
+_4.f_margin=shortSize(_4.f_margin);
+function convertToHex(_9){
+if(typeof _9=="string"&&/, /.test.color){
+_9=_9.replace(/, /,",");
+}
+if(typeof _9=="string"&&/ /.test.color){
+var _a=_9.split(" ");
+var _b="";
+for(var i=0;i<_a.length;i++){
+_b+=Xinha._colorToRgb(_a[i]);
+if(i+1<_a.length){
+_b+=" ";
+}
+}
+return _b;
+}
+return Xinha._colorToRgb(_9);
+}
+_4.f_backgroundColor=convertToHex(_4.f_backgroundColor);
+_4.f_borderColor=convertToHex(_4.f_borderColor);
+}
+var _d=_3.config.ImageManager.backend+"__function=manager";
+if(_3.config.ImageManager.backend_config!=null){
+_d+="&backend_config="+encodeURIComponent(_3.config.ImageManager.backend_config);
+_d+="&backend_config_hash="+encodeURIComponent(_3.config.ImageManager.backend_config_hash);
+_d+="&backend_config_secret_key_location="+encodeURIComponent(_3.config.ImageManager.backend_config_secret_key_location);
+}
+if(_3.config.ImageManager.backend_data!=null){
+for(var i in _3.config.ImageManager.backend_data){
+_d+="&"+i+"="+encodeURIComponent(_3.config.ImageManager.backend_data[i]);
+}
+}
+Dialog(_d,function(_f){
+if(!_f){
+return false;
+}
+var img=_2;
+if(!img){
+if(HTMLArea.is_ie){
+var sel=_3._getSelection();
+var _12=_3._createRange(sel);
+_3._doc.execCommand("insertimage",false,_f.f_url);
+img=_12.parentElement();
+if(img.tagName.toLowerCase()!="img"){
+img=img.previousSibling;
+}
+}else{
+img=document.createElement("img");
+img.src=_f.f_url;
+_3.insertNodeAtSelection(img);
+}
+}else{
+img.src=_f.f_url;
+}
+for(field in _f){
+var _13=_f[field];
+switch(field){
+case "f_alt":
+img.alt=_13;
+break;
+case "f_border":
+if(_13.length){
+img.style.borderWidth=/[^0-9]/.test(_13)?_13:(parseInt(_13)+"px");
+if(img.style.borderWidth&&!img.style.borderStyle){
+img.style.borderStyle="solid";
+}
+}else{
+img.style.borderWidth="";
+img.style.borderStyle="";
+}
+break;
+case "f_borderColor":
+img.style.borderColor=_13;
+break;
+case "f_backgroundColor":
+img.style.backgroundColor=_13;
+break;
+case "f_padding":
+if(_13.length){
+img.style.padding=/[^0-9]/.test(_13)?_13:(parseInt(_13)+"px");
+}else{
+img.style.padding="";
+}
+break;
+case "f_margin":
+if(_13.length){
+img.style.margin=/[^0-9]/.test(_13)?_13:(parseInt(_13)+"px");
+}else{
+img.style.margin="";
+}
+break;
+case "f_align":
+img.align=_13;
+break;
+case "f_width":
+if(!isNaN(parseInt(_13))){
+img.width=parseInt(_13);
+}else{
+img.width="";
+}
+break;
+case "f_height":
+if(!isNaN(parseInt(_13))){
+img.height=parseInt(_13);
+}else{
+img.height="";
+}
+break;
+}
+}
+},_4);
+};
+

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/image-manager.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/images.php
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/images.php?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/images.php (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/images.php Sun Jul 22 07:50:10 2007
@@ -0,0 +1,289 @@
+<?php 
+/**
+ * Show a list of images in a long horizontal table.
+ * @author $Author: ray $
+ * @version $Id: images.php 677 2007-01-19 22:24:36Z ray $
+ * @package ImageManager
+ */
+
+require_once('config.inc.php');
+require_once('ddt.php');
+require_once('Classes/ImageManager.php');
+
+// uncomment for debugging
+
+// _ddtOn();
+
+//default path is /
+$relative = '/';
+$manager = new ImageManager($IMConfig);
+
+//process any file uploads
+$manager->processUploads();
+
+$manager->deleteFiles();
+
+$refreshDir = false;
+//process any directory functions
+if($manager->deleteDirs() || $manager->processNewDir())
+	$refreshDir = true;
+
+//check for any sub-directory request
+//check that the requested sub-directory exists
+//and valid
+if(isset($_REQUEST['dir']))
+{
+	$path = rawurldecode($_REQUEST['dir']);
+	if($manager->validRelativePath($path))
+		$relative = $path;
+}
+
+
+$manager = new ImageManager($IMConfig);
+
+
+//get the list of files and directories
+$list = $manager->getFiles($relative);
+
+
+/* ================= OUTPUT/DRAW FUNCTIONS ======================= */
+
+/**
+ * Draw the files in an table.
+ */
+function drawFiles($list, &$manager)
+{
+	global $relative;
+	global $IMConfig;
+
+    switch($IMConfig['ViewMode'])
+    {
+      case 'details':
+      {
+        ?>
+        <script language="Javascript">
+          <!--
+            function showPreview(f_url)
+            {
+              
+              window.parent.document.getElementById('f_preview').src = 
+                window.parent._backend_url + '__function=thumbs&img=' + f_url;
+            }
+          //-->
+        </script>
+        <table class="listview">
+        <thead>
+        <tr><th>Name</th><th>Filesize</th><th>Dimensions</th></tr></thead>
+        <tbody>
+          <?php
+          foreach($list as $entry => $file)
+          {
+            ?>
+            <tr>
+              <th><a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo $entry; ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);return false;" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>" onmouseover="showPreview('<?php echo $file['relative'];?>')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" ><?php echo $entry ?></a></th>
+              <td><?php echo Files::formatSize($file['stat']['size']); ?></td>
+              <td><?php if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } ?>
+              <td class="actions">
+                <a href="<?php print $IMConfig['backend_url']; ?>__function=images&dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']);?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" border="0"  /></a>
+        
+                <a href="javascript:;" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit" border="0" /></a>
+              </td>
+            </tr>
+            <?php        
+          }
+          ?>
+        </tbody>
+        </table>
+        <?php
+      }      
+      break;
+      
+      case 'thumbs':
+      default      :
+      {
+	foreach($list as $entry => $file)
+	{
+		?>
+    <div class="thumb_holder" id="holder_<?php echo asc2hex($entry) ?>">
+      <a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo $entry; ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);return false;" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>">
+        <img src="<?php print $manager->getThumbnail($file['relative']); ?>" alt="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"/>
+      </a>
+      <div class="edit">
+        <a href="<?php print $IMConfig['backend_url']; ?>__function=images&dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']);?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"  /></a>
+
+        <a href="javascript:;" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit" /></a>
+
+        <?php if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?>
+      </div>
+    </div>
+	  <?php
+        }
+      }
+    }	
+}//function drawFiles
+
+
+/**
+ * Draw the directory.
+ */
+function drawDirs($list, &$manager) 
+{
+	global $relative;
+   global $IMConfig;
+
+  switch($IMConfig['ViewMode'])
+  {
+    case 'details':
+    {
+        
+    }
+    break; 
+    
+    case 'thumbs':
+    default      :
+    {
+	foreach($list as $path => $dir) 
+	{ ?>
+    <div class="dir_holder">
+      <a class="dir" href="<?php print $IMConfig['backend_url'];?>__function=images&dir=<?php echo rawurlencode($path); ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>"><img src="<?php print $IMConfig['base_url'];?>img/folder.gif" height="80" width="80" alt="<?php echo $dir['entry']; ?>" /></a>
+
+      <div class="edit">
+        <a href="<?php print $IMConfig['backend_url'];?>__function=images&dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>" title="Trash" onclick="return confirmDeleteDir('<?php echo $dir['entry']; ?>', <?php echo $dir['count']; ?>);"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a>
+        <?php echo $dir['entry']; ?>
+      </div>
+    </div>
+	  <?php 
+	} //foreach
+    }
+  }
+  
+	
+}//function drawDirs
+
+
+/**
+ * No directories and no files.
+ */
+function drawNoResults() 
+{
+?>
+<div class="noResult">No Images Found</div>
+<?php 
+}
+
+/**
+ * No directories and no files.
+ */
+function drawErrorBase(&$manager) 
+{
+?>
+<div class="error"><span>Invalid base directory:</span> <?php echo $manager->config['images_dir']; ?></div>
+<?php 
+}
+
+/**
+ * Utility to convert ascii string to hex
+ */
+function asc2hex ($temp)
+{
+  $len = strlen($temp);
+  $data = "";
+  for ($i=0; $i<$len; $i++) $data.=sprintf("%02x",ord(substr($temp,$i,1)));
+  return $data;
+}
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+	<title>Image List</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<link href="<?php print $IMConfig['base_url'];?>assets/imagelist.css" rel="stylesheet" type="text/css" />
+<script type="text/javascript">
+_backend_url = "<?php print $IMConfig['backend_url']; ?>";
+</script>
+
+<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script>
+<script type="text/javascript">
+/*<![CDATA[*/
+
+	if(window.top)
+		HTMLArea = window.top.HTMLArea;
+
+	function hideMessage()
+	{
+		var topDoc = window.top.document;
+		var messages = topDoc.getElementById('messages');
+		if(messages)
+			messages.style.display = "none";
+	}
+
+	init = function()
+	{
+	  __dlg_translate('ImageManager');
+		hideMessage();
+		var topDoc = window.top.document;
+
+<?php 
+	//we need to refesh the drop directory list
+	//save the current dir, delete all select options
+	//add the new list, re-select the saved dir.
+	if($refreshDir) 
+	{ 
+		$dirs = $manager->getDirs();
+?>
+		var selection = topDoc.getElementById('dirPath');
+		var currentDir = selection.options[selection.selectedIndex].text;
+
+		while(selection.length > 0)
+		{	selection.remove(0); }
+		
+		selection.options[selection.length] = new Option("/","<?php echo rawurlencode('/'); ?>");	
+		<?php foreach($dirs as $relative=>$fullpath) { ?>
+		selection.options[selection.length] = new Option("<?php echo $relative; ?>","<?php echo rawurlencode($relative); ?>");		
+		<?php } ?>
+		
+		for(var i = 0; i < selection.length; i++)
+		{
+			var thisDir = selection.options[i].text;
+			if(thisDir == currentDir)
+			{
+				selection.selectedIndex = i;
+				break;
+			}
+		}		
+<?php } ?>
+    update_selected();
+	}	
+
+	function editImage(image) 
+	{
+		var url = "<?php print $IMConfig['backend_url']; ?>__function=editor&img="+image;
+		Dialog(url, function(param) 
+		{
+			if (!param) // user must have pressed Cancel
+				return false;
+			else
+			{
+				return true;
+			}
+		}, null);		
+	}
+
+/*]]>*/
+</script>
+<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/images.js"></script>
+<script type="text/javascript" src="assets/popup.js"></script>
+</head>
+
+<body>
+<?php if ($manager->isValidBase() == false) { drawErrorBase($manager); } 
+	elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?>
+
+	<?php drawDirs($list[0], $manager); ?>
+	<?php drawFiles($list[1], $manager); ?>
+
+<?php } else { drawNoResults(); } ?>
+</body>
+</html>

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/2x2.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/2x2.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/2x2.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/2x2_w.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/2x2_w.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/2x2_w.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btnFolderNew.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btnFolderNew.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btnFolderNew.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btnFolderUp.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btnFolderUp.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btnFolderUp.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btn_cancel.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btn_cancel.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btn_cancel.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btn_ok.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btn_ok.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/btn_ok.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/crop.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/crop.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/crop.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/default.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/default.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/default.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/div.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/div.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/div.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/dots.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/dots.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/dots.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_active.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_active.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_active.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_pencil.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_pencil.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_pencil.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_trash.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_trash.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/edit_trash.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/folder.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/folder.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/folder.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/hand.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/hand.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/hand.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/islocked2.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/islocked2.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/islocked2.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/locked.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/locked.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/locked.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/measure.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/measure.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/measure.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/noimages.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/noimages.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/noimages.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/rotate.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/rotate.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/rotate.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/save.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/save.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/save.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/scale.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/scale.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/scale.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/spacer.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/spacer.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/spacer.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/t_black.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/t_black.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/t_black.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/t_white.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/t_white.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/t_white.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/unlocked.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/unlocked.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/unlocked.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/unlocked2.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/unlocked2.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/img/unlocked2.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/lang/de.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/lang/de.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/lang/de.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/lang/de.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,65 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8
+// translated: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, udo.schmal@t-online.de
+{
+  "Image Manager": "Bildmanager",
+  "Insert Image": "Bild einfügen",
+  "Directory": "Ordner",
+  "Directory Up": "übergeordneter Ordner",
+  "New Folder": "Neuer Ordner",
+  "Trash": "Müll",
+  "Edit": "bearbeiten",
+  "Image File": "Bilddatei",
+  "Upload": "Hochladen",
+  "Width": "Breite",
+  "Height": "Höhe",
+  "Constrain Proportions": "Proportional",
+  "Border": "Rand",
+  "V Space": "vertikaler Freiraum",
+  "H Space": "horizontaler Freiraum",
+  "Refresh": "Aktualisieren",
+  "Uploading...": "Hochladen...",
+  "Crop": "Beschneiden",
+  "Resize": "Größe ändern",
+  "Rotate": "Drehen",
+  "Measure": "Abmessungen",
+  "Marker": "Marker",
+  "Save": "Speichern",
+  "Filename:": "Dateiname:",
+  "Image Format": "Bildformat:",
+  "Quality:": "Qualität",
+  "JPEG High": "JPEG hoch",
+  "JPEG Medium": "JPEG mittel",
+  "JPEG Low": "JPEG niedrig",
+  "File saved.": "Datei gespeichert.",
+  "File was not saved.": "Datei wurde nicht gespeichert.",
+  "Start X:": "Start X",
+  "Start Y:": "Start Y",
+  "Lock": "Sperren",
+  "Flip Image": "Bild spiegeln",
+  "Flip Horizontal": "horizontal spiegeln",
+  "Flip Vertical": "vertikal spiegeln",
+  "Rotate Image": "Bild drehen",
+  "Rotate 180 °": "180° drehen",
+  "Rotate 90 ° CW": "90° drehen im UZS",
+  "Rotate 90 ° CCW": "90° drehen gegen UZS",
+  "Angle:": "Winkel:",
+  "W:": "B:",
+  "Clear": "Entfernen",
+  "Loading": "Laden",
+  "Invalid base directory:": "Ungültiges Startverzeichnis:",
+  "Delete file?": "Datei löschen?",
+  "Please delete all files/folders inside the folder you wish to delete first.": "Bitte löschen Sie zuerst alle Dateien im Ordner den Sie löschen möchten.",
+  "Delete folder?": "Ordner löschen?",
+  "Folder Name:": "Ordnername:",
+  "No Images Found": "Kein Bild gefunden",
+  "Invalid folder name, please choose another folder name.": "Ungültiger Ordnername, bitte wählen sie einen anderen Namen.",
+  "GIF format is not supported, image editing not supported.": "GIF Format wird nicht unterstützt, Bildbearbeitung wird nicht unterstützt.",
+  "No Image Available": "Kein Bild verfügbar",
+  "No Image selected.": "Kein Bild ausgewählt.",
+  "Description:": "Beschreibung:",
+  "Align:": "Ausrichtung:",
+  "Margin:": "Außenabstand:",
+  "Padding:": "Innenabstand:",
+  "Color:": "Farbe:"
+};
\ No newline at end of file

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/ImageManager/lang/de.js
------------------------------------------------------------------------------
    svn:eol-style = native