You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by th...@apache.org on 2011/09/28 16:49:02 UTC

svn commit: r1176905 [2/3] - in /lenya/contributions/2_0_X/modules/lenyaDocWriting: ./ client/ client/simple-client_files/ config/ docs/ java/ java/src/ java/src/org/ java/src/org/apache/ java/src/org/apache/lenya/ java/src/org/apache/lenya/transformat...

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/mobile.js
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/mobile.js?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/mobile.js (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/mobile.js Wed Sep 28 14:49:00 2011
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+/*
+	This is an optimized version of Dojo, built for deployment and not for
+	development. To get sources and documentation, please visit:
+
+		http://dojotoolkit.org
+*/
+
+window[(typeof (djConfig)!="undefined"&&djConfig.scopeMap&&djConfig.scopeMap[0][1])||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dijit._base.manager"],["provide","dojo.Stateful"],["provide","dijit._WidgetBase"],["provide","dojox.mobile._base"],["provide","dojox.mobile"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dijit._base.manager"]){_4._hasResource["dijit._base.manager"]=true;_4.provide("dijit._base.manager");_4.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_7){if(this._hash[_7.id]){throw new Error("Tried to register widget with id=="+_7.id+" but that id is already registered");}this._hash[_7.id]=_7;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_8,_9){_9=_9||_4.global;var i=0,id;for(id in this._hash){_8.call(_9,this._hash[id],i++,this._hash);}return this;},filter:function(_a,_b){_b=_b||_4.global;var _c=new _5.Widget
 Set(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_a.call(_b,w,i++,this._hash)){_c.add(w);}}return _c;},byId:function(id){return this._hash[id];},byClass:function(_d){var _e=new _5.WidgetSet(),id,_f;for(id in this._hash){_f=this._hash[id];if(_f.declaredClass==_d){_e.add(_f);}}return _e;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_10,_11){return _4.map(this.toArray(),_10,_11);},every:function(_12,_13){_13=_13||_4.global;var x=0,i;for(i in this._hash){if(!_12.call(_13,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_14,_15){_15=_15||_4.global;var x=0,i;for(i in this._hash){if(_14.call(_15,this._hash[i],x++,this._hash)){return true;}}return false;}});(function(){_5.registry=new _5.WidgetSet();var _16=_5.registry._hash,_17=_4.attr,_18=_4.hasAttr,_19=_4.style;_5.byId=function(id){return typeof id=="string"?_16[id]:id;};var _1a={};_5.getUniqueId=function(_1b){var id;do{id=_1b+"_"+(_1b
  in _1a?++_1a[_1b]:_1a[_1b]=0);}while(_16[id]);return _5._scopeName=="dijit"?id:_5._scopeName+"_"+id;};_5.findWidgets=function(_1c){var _1d=[];function _1e(_1f){for(var _20=_1f.firstChild;_20;_20=_20.nextSibling){if(_20.nodeType==1){var _21=_20.getAttribute("widgetId");if(_21){var _22=_16[_21];if(_22){_1d.push(_22);}}else{_1e(_20);}}}};_1e(_1c);return _1d;};_5._destroyAll=function(){_5._curFocus=null;_5._prevFocus=null;_5._activeStack=[];_4.forEach(_5.findWidgets(_4.body()),function(_23){if(!_23._destroyed){if(_23.destroyRecursive){_23.destroyRecursive();}else{if(_23.destroy){_23.destroy();}}}});};if(_4.isIE){_4.addOnWindowUnload(function(){_5._destroyAll();});}_5.byNode=function(_24){return _16[_24.getAttribute("widgetId")];};_5.getEnclosingWidget=function(_25){while(_25){var id=_25.getAttribute&&_25.getAttribute("widgetId");if(id){return _16[id];}_25=_25.parentNode;}return null;};var _26=(_5._isElementShown=function(_27){var s=_19(_27);return (s.visibility!="hidden")&&(s.v
 isibility!="collapsed")&&(s.display!="none")&&(_17(_27,"type")!="hidden");});_5.hasDefaultTabStop=function(_28){switch(_28.nodeName.toLowerCase()){case "a":return _18(_28,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var _29;try{var _2a=_28.contentDocument;if("designMode" in _2a&&_2a.designMode=="on"){return true;}_29=_2a.body;}catch(e1){try{_29=_28.contentWindow.document.body;}catch(e2){return false;}}return _29.contentEditable=="true"||(_29.firstChild&&_29.firstChild.contentEditable=="true");default:return _28.contentEditable=="true";}};var _2b=(_5.isTabNavigable=function(_2c){if(_17(_2c,"disabled")){return false;}else{if(_18(_2c,"tabIndex")){return _17(_2c,"tabIndex")>=0;}else{return _5.hasDefaultTabStop(_2c);}}});_5._getTabNavigable=function(_2d){var _2e,_2f,_30,_31,_32,_33,_34={};function _35(_36){return _36&&_36.tagName.toLowerCase()=="input"&&_36.type&&_36.type.toLowerCase()=="radio"&&_36.name&&_36
 .name.toLowerCase();};var _37=function(_38){_4.query("> *",_38).forEach(function(_39){if((_4.isIE&&_39.scopeName!=="HTML")||!_26(_39)){return;}if(_2b(_39)){var _3a=_17(_39,"tabIndex");if(!_18(_39,"tabIndex")||_3a==0){if(!_2e){_2e=_39;}_2f=_39;}else{if(_3a>0){if(!_30||_3a<_31){_31=_3a;_30=_39;}if(!_32||_3a>=_33){_33=_3a;_32=_39;}}}var rn=_35(_39);if(_4.attr(_39,"checked")&&rn){_34[rn]=_39;}}if(_39.nodeName.toUpperCase()!="SELECT"){_37(_39);}});};if(_26(_2d)){_37(_2d);}function rs(_3b){return _34[_35(_3b)]||_3b;};return {first:rs(_2e),last:rs(_2f),lowest:rs(_30),highest:rs(_32)};};_5.getFirstInTabbingOrder=function(_3c){var _3d=_5._getTabNavigable(_4.byId(_3c));return _3d.lowest?_3d.lowest:_3d.first;};_5.getLastInTabbingOrder=function(_3e){var _3f=_5._getTabNavigable(_4.byId(_3e));return _3f.last?_3f.last:_3f.highest;};_5.defaultDuration=_4.config["defaultDuration"]||200;})();}if(!_4._hasResource["dojo.Stateful"]){_4._hasResource["dojo.Stateful"]=true;_4.provide("dojo.Stateful
 ");_4.declare("dojo.Stateful",null,{postscript:function(_40){if(_40){_4.mixin(this,_40);}},get:function(_41){return this[_41];},set:function(_42,_43){if(typeof _42==="object"){for(var x in _42){this.set(x,_42[x]);}return this;}var _44=this[_42];this[_42]=_43;if(this._watchCallbacks){this._watchCallbacks(_42,_44,_43);}return this;},watch:function(_45,_46){var _47=this._watchCallbacks;if(!_47){var _48=this;_47=this._watchCallbacks=function(_49,_4a,_4b,_4c){var _4d=function(_4e){if(_4e){_4e=_4e.slice();for(var i=0,l=_4e.length;i<l;i++){try{_4e[i].call(_48,_49,_4a,_4b);}catch(e){console.error(e);}}}};_4d(_47["_"+_49]);if(!_4c){_4d(_47["*"]);}};}if(!_46&&typeof _45==="function"){_46=_45;_45="*";}else{_45="_"+_45;}var _4f=_47[_45];if(typeof _4f!=="object"){_4f=_47[_45]=[];}_4f.push(_46);return {unwatch:function(){_4f.splice(_4.indexOf(_4f,_46),1);}};}});}if(!_4._hasResource["dijit._WidgetBase"]){_4._hasResource["dijit._WidgetBase"]=true;_4.provide("dijit._WidgetBase");(function(){
 _4.declare("dijit._WidgetBase",_4.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(_4.config.blankGif||_4.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_50,_51){this.create(_50,_51);},create:function(_52,_53){this.srcNodeRef=_4.byId(_53);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_52){this.params=_52;_4._mixin(this,_52);}this.postMixInProperties();if(!this.id){this.id=_5.getUniqueId(this.declaredClass.replace(/\./g,"_"));}_5.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _54=this.srcNodeRef;if(_54&&_54.parentNode&&this.domNode!==_54){_54.parentNode.replaceChild(this.domNode,_54);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.sr
 cNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _55=function(_56,_57){if((_57.params&&_56 in _57.params)||_57[_56]){_57.set(_56,_57[_56]);}};for(var _58 in this.attributeMap){_55(_58,this);}_4.forEach(this._getSetterAttributes(),function(a){if(!(a in this.attributeMap)){_55(a,this);}},this);},_getSetterAttributes:function(){var _59=this.constructor;if(!_59._setterAttrs){var r=(_59._setterAttrs=[]),_5a,_5b=_59.prototype;for(var _5c in _5b){if(_4.isFunction(_5b[_5c])&&(_5a=_5c.match(/^_set([a-zA-Z]*)Attr$/))&&_5a[1]){r.push(_5a[1].charAt(0).toLowerCase()+_5a[1].substr(1));}}}return _59._setterAttrs;},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||_4.create("div");}if(this.baseClass){var _5d=this.baseClass.split(" ");if(!this.isLeftToRight()){_5d=_5d.concat(_4.map(_5d,function(_5e){return _5e+"Rtl";}));}_4.addClass(this.domNode,_5d);}},postCreate:funct
 ion(){},startup:function(){this._started=true;},destroyRecursive:function(_5f){this._beingDestroyed=true;this.destroyDescendants(_5f);this.destroy(_5f);},destroy:function(_60){this._beingDestroyed=true;this.uninitialize();var d=_4,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_61){dfe(_61,d.disconnect);});dfe(this._subscribes,function(_62){dun(_62);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_60);_5.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_63){if(this.bgIframe){this.bgIframe.destroy(_63);delete this.bgIframe;}if(this.domNode){if(_63){_4.removeAttr(this.domNode,"widgetId");}else{_4.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_63){_4.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_64){_4.forEach(this.getChildren(),function(_65){if(_65.destroyRecursive){_65.destroyRecurs
 ive(_64);}});},uninitialize:function(){return false;},_setClassAttr:function(_66){var _67=this[this.attributeMap["class"]||"domNode"];_4.replaceClass(_67,_66,this["class"]);this._set("class",_66);},_setStyleAttr:function(_68){var _69=this[this.attributeMap.style||"domNode"];if(_4.isObject(_68)){_4.style(_69,_68);}else{if(_69.style.cssText){_69.style.cssText+="; "+_68;}else{_69.style.cssText=_68;}}this._set("style",_68);},_attrToDom:function(_6a,_6b){var _6c=this.attributeMap[_6a];_4.forEach(_4.isArray(_6c)?_6c:[_6c],function(_6d){var _6e=this[_6d.node||_6d||"domNode"];var _6f=_6d.type||"attribute";switch(_6f){case "attribute":if(_4.isFunction(_6b)){_6b=_4.hitch(this,_6b);}var _70=_6d.attribute?_6d.attribute:(/^on[A-Z][a-zA-Z]*$/.test(_6a)?_6a.toLowerCase():_6a);_4.attr(_6e,_70,_6b);break;case "innerText":_6e.innerHTML="";_6e.appendChild(_4.doc.createTextNode(_6b));break;case "innerHTML":_6e.innerHTML=_6b;break;case "class":_4.replaceClass(_6e,_6b,this[_6a]);break;}},this);},
 get:function(_71){var _72=this._getAttrNames(_71);return this[_72.g]?this[_72.g]():this[_71];},set:function(_73,_74){if(typeof _73==="object"){for(var x in _73){this.set(x,_73[x]);}return this;}var _75=this._getAttrNames(_73);if(this[_75.s]){var _76=this[_75.s].apply(this,Array.prototype.slice.call(arguments,1));}else{if(_73 in this.attributeMap){this._attrToDom(_73,_74);}this._set(_73,_74);}return _76||this;},_attrPairNames:{},_getAttrNames:function(_77){var apn=this._attrPairNames;if(apn[_77]){return apn[_77];}var uc=_77.charAt(0).toUpperCase()+_77.substr(1);return (apn[_77]={n:_77+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},_set:function(_78,_79){var _7a=this[_78];this[_78]=_79;if(this._watchCallbacks&&this._created&&_79!==_7a){this._watchCallbacks(_78,_7a,_79);}},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){return this.containerNode?_4.query("[widgetId]",this.containerNode).map(_5.byNode):[];},getCh
 ildren:function(){return this.containerNode?_5.findWidgets(this.containerNode):[];},connect:function(obj,_7b,_7c){var _7d=[_4._connect(obj,_7b,this,_7c)];this._connects.push(_7d);return _7d;},disconnect:function(_7e){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_7e){_4.forEach(_7e,_4.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_7f,_80){var _81=_4.subscribe(_7f,this,_80);this._subscribes.push(_81);return _81;},unsubscribe:function(_82){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_82){_4.unsubscribe(_82);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_4._isBodyLtr();},placeAt:function(_83,_84){if(_83.declaredClass&&_83.addChild){_83.addChild(this,_84);}else{_4.place(this.domNode,_83,_84);}return this;}});})();}if(!_4._hasResource["dojox.mobile._base"]){_4._hasResource["dojox.mobile._base"]=true;_4.provide("dojox.mobile._base");_4.isBB=(navigator.userAgent.index
 Of("BlackBerry")!=-1)&&!_4.isWebKit;_4.declare("dojox.mobile.View",_5._WidgetBase,{selected:false,keepScrollPos:true,_started:false,constructor:function(_85,_86){if(_86){_4.byId(_86).style.visibility="hidden";}},buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("DIV");this.domNode.className="mblView";this.connect(this.domNode,"webkitAnimationEnd","onAnimationEnd");this.connect(this.domNode,"webkitAnimationStart","onAnimationStart");var id=location.href.match(/#(\w+)([^\w=]|$)/)?RegExp.$1:null;this._visible=this.selected&&!id||this.id==id;if(this.selected){_6.mobile._defaultView=this;}},startup:function(){if(this._started){return;}var _87=this;setTimeout(function(){if(!_87._visible){_87.domNode.style.display="none";}else{_6.mobile.currentView=_87;_87.onStartView();}_87.domNode.style.visibility="visible";},_4.isIE?100:0);this._started=true;},onStartView:function(){},onBeforeTransitionIn:function(_88,dir,_89,_8a,_8b){},onAfterTransi
 tionIn:function(_8c,dir,_8d,_8e,_8f){},onBeforeTransitionOut:function(_90,dir,_91,_92,_93){},onAfterTransitionOut:function(_94,dir,_95,_96,_97){},_saveState:function(_98,dir,_99,_9a,_9b){this._context=_9a;this._method=_9b;if(_99=="none"||!_4.isWebKit){_99=null;}this._moveTo=_98;this._dir=dir;this._transition=_99;this._arguments=[];var i;for(i=0;i<arguments.length;i++){this._arguments.push(arguments[i]);}this._args=[];if(_9a||_9b){for(i=5;i<arguments.length;i++){this._args.push(arguments[i]);}}},performTransition:function(_9c,dir,_9d,_9e,_9f){if(_4.hash){if(typeof (_9c)=="string"&&_9c.charAt(0)=="#"&&!_6.mobile._params){_6.mobile._params=[];for(var i=0;i<arguments.length;i++){_6.mobile._params.push(arguments[i]);}_4.hash(_9c);return;}}this._saveState.apply(this,arguments);var _a0;if(_9c){if(typeof (_9c)=="string"){_9c.match(/^#?([^&]+)/);_a0=RegExp.$1;}else{_a0=_9c;}}else{if(!this._dummyNode){this._dummyNode=_4.doc.createElement("DIV");_4.body().appendChild(this._dummyNode);}
 _a0=this._dummyNode;}var _a1=this.domNode;_a0=this.toNode=_4.byId(_a0);if(!_a0){alert("dojox.mobile.View#performTransition: destination view not found: "+_a0);}_a0.style.visibility="hidden";_a0.style.display="";this.onBeforeTransitionOut.apply(this,arguments);var _a2=_5.byNode(_a0);if(_a2){if(this.keepScrollPos&&!_5.getEnclosingWidget(this.domNode.parentNode)){var _a3=_4.body().scrollTop||_4.doc.documentElement.scrollTop||_4.global.pageYOffset||0;if(dir==1){_a0.style.top="0px";if(_a3>1){_a1.style.top=-_a3+"px";if(_4.config["mblHideAddressBar"]!==false){setTimeout(function(){_4.global.scrollTo(0,1);},0);}}}else{if(_a3>1||_a0.offsetTop!==0){var _a4=-_a0.offsetTop;_a0.style.top="0px";_a1.style.top=_a4-_a3+"px";if(_4.config["mblHideAddressBar"]!==false&&_a4>0){setTimeout(function(){_4.global.scrollTo(0,_a4+1);},0);}}}}else{_a0.style.top="0px";}_a2.onBeforeTransitionIn.apply(_a2,arguments);}_a0.style.display="none";_a0.style.visibility="visible";this._doTransition(_a1,_a0,_9d,dir
 );},_doTransition:function(_a5,_a6,_a7,dir){var rev=(dir==-1)?" reverse":"";_a6.style.display="";if(!_a7||_a7=="none"){this.domNode.style.display="none";this.invokeCallback();}else{_4.addClass(_a5,_a7+" out"+rev);_4.addClass(_a6,_a7+" in"+rev);}},onAnimationStart:function(e){},onAnimationEnd:function(e){var _a8=false;if(_4.hasClass(this.domNode,"out")){_a8=true;this.domNode.style.display="none";_4.forEach([this._transition,"in","out","reverse"],function(s){_4.removeClass(this.domNode,s);},this);}if(e.animationName.indexOf("shrink")===0){var li=e.target;li.style.display="none";_4.removeClass(li,"mblCloseContent");}if(_a8){this.invokeCallback();}this.domNode&&(this.domNode.className="mblView");},invokeCallback:function(){this.onAfterTransitionOut.apply(this,this._arguments);var _a9=_5.byNode(this.toNode);if(_a9){_a9.onAfterTransitionIn.apply(_a9,this._arguments);}_6.mobile.currentView=_a9;var c=this._context,m=this._method;if(!c&&!m){return;}if(!m){m=c;c=null;}c=c||_4.global;i
 f(typeof (m)=="string"){c[m].apply(c,this._args);}else{m.apply(c,this._args);}},getShowingView:function(){var _aa=this.domNode.parentNode.childNodes;for(var i=0;i<_aa.length;i++){if(_4.hasClass(_aa[i],"mblView")&&_4.style(_aa[i],"display")!="none"){return _5.byNode(_aa[i]);}}},show:function(){var fs=this.getShowingView().domNode.style;var ts=this.domNode.style;fs.display="none";ts.display="";_6.mobile.currentView=this;},addChild:function(_ab){this.containerNode.appendChild(_ab.domNode);}});_4.declare("dojox.mobile.Heading",_5._WidgetBase,{back:"",href:"",moveTo:"",transition:"slide",label:"",iconBase:"",buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("H1");this.domNode.className="mblHeading";this._view=_5.getEnclosingWidget(this.domNode.parentNode);if(this.label){this.domNode.appendChild(document.createTextNode(this.label));}else{this.label="";_4.forEach(this.domNode.childNodes,function(n){if(n.nodeType==3){this.label+=n.nodeVa
 lue;}},this);this.label=_4.trim(this.label);}if(this.back){var btn=_4.create("DIV",{className:"mblArrowButton"},this.domNode,"first");var _ac=_4.create("DIV",{className:"mblArrowButtonHead"},btn);var _ad=_4.create("DIV",{className:"mblArrowButtonBody mblArrowButtonText"},btn);this._body=_ad;this._head=_ac;this._btn=btn;_ad.innerHTML=this.back;this.connect(_ad,"onclick","onClick");var _ae=_4.create("DIV",{className:"mblArrowButtonNeck"},btn);btn.style.width=_ad.offsetWidth+_ac.offsetWidth+"px";this.setLabel(this.label);}},startup:function(){if(this._btn){this._btn.style.width=this._body.offsetWidth+this._head.offsetWidth+"px";}},onClick:function(e){var h1=this.domNode;_4.addClass(h1,"mblArrowButtonSelected");setTimeout(function(){_4.removeClass(h1,"mblArrowButtonSelected");},1000);this.goTo(this.moveTo,this.href);},setLabel:function(_af){if(_af!=this.label){this.label=_af;this.domNode.firstChild.nodeValue=_af;}},goTo:function(_b0,_b1){if(!this._view){this._view=_5.byNode(this
 .domNode.parentNode);}if(!this._view){return;}if(_b1){this._view.performTransition(null,-1,this.transition,this,function(){location.href=_b1;});}else{if(_6.mobile.app&&_6.mobile.app.STAGE_CONTROLLER_ACTIVE){_4.publish("/dojox/mobile/app/goback");}else{this._view.performTransition(_b0,-1,this.transition);}}}});_4.declare("dojox.mobile.RoundRect",_5._WidgetBase,{shadow:false,buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("DIV");this.domNode.className=this.shadow?"mblRoundRect mblShadow":"mblRoundRect";}});_4.declare("dojox.mobile.RoundRectCategory",_5._WidgetBase,{label:"",buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("H2");this.domNode.className="mblRoundRectCategory";if(this.label){this.domNode.innerHTML=this.label;}else{this.label=this.domNode.innerHTML;}}});_4.declare("dojox.mobile.EdgeToEdgeCategory",_6.mobile.RoundRectCategory,{buildRendering:function(){this.inherited(argum
 ents);this.domNode.className="mblEdgeToEdgeCategory";}});_4.declare("dojox.mobile.RoundRectList",_5._WidgetBase,{transition:"slide",iconBase:"",iconPos:"",buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("UL");this.domNode.className="mblRoundRectList";},addChild:function(_b2){this.containerNode.appendChild(_b2.domNode);_b2.inheritParams();_b2.setIcon();}});_4.declare("dojox.mobile.EdgeToEdgeList",_6.mobile.RoundRectList,{stateful:false,buildRendering:function(){this.inherited(arguments);this.domNode.className="mblEdgeToEdgeList";}});_4.declare("dojox.mobile.AbstractItem",_5._WidgetBase,{icon:"",iconPos:"",href:"",hrefTarget:"",moveTo:"",scene:"",clickable:false,url:"",urlTarget:"",transition:"",transitionDir:1,callback:null,sync:true,label:"",toggle:false,_duration:800,inheritParams:function(){var _b3=this.getParentWidget();if(_b3){if(!this.transition){this.transition=_b3.transition;}if(!this.icon){this.icon=_b3.iconBase;}if(!th
 is.iconPos){this.iconPos=_b3.iconPos;}}},findCurrentView:function(_b4){var w;if(_b4){w=_5.byId(_b4);if(w){return w.getShowingView();}}var n=this.domNode.parentNode;while(true){w=_5.getEnclosingWidget(n);if(!w){return null;}if(w.performTransition){break;}n=w.domNode.parentNode;}return w;},transitionTo:function(_b5,_b6,url,_b7){var w=this.findCurrentView(_b5);if(!w||_b5&&w===_5.byId(_b5)){return;}if(_b6){if(this.hrefTarget){_6.mobile.openWindow(this.href,this.hrefTarget);}else{w.performTransition(null,this.transitionDir,this.transition,this,function(){location.href=_b6;});}return;}else{if(_b7){_4.publish("/dojox/mobile/app/pushScene",[_b7]);return;}}if(url){var id;if(_6.mobile._viewMap&&_6.mobile._viewMap[url]){id=_6.mobile._viewMap[url];}else{var _b8=this._text;if(!_b8){if(this.sync){_b8=_4.trim(_4._getText(url));}else{_4["require"]("dojo._base.xhr");var _b9=_6.mobile.ProgressIndicator.getInstance();_4.body().appendChild(_b9.domNode);_b9.start();var xhr=_4.xhrGet({url:url,han
 dleAs:"text"});xhr.addCallback(_4.hitch(this,function(_ba,_bb){_b9.stop();if(_ba){this._text=_ba;this.transitionTo(_b5,_b6,url,_b7);}}));xhr.addErrback(function(_bc){_b9.stop();alert("Failed to load "+url+"\n"+(_bc.description||_bc));});return;}}this._text=null;id=this._parse(_b8);if(!_6.mobile._viewMap){_6.mobile._viewMap=[];}_6.mobile._viewMap[url]=id;}_b5=id;w=this.findCurrentView(_b5)||w;}w.performTransition(_b5,this.transitionDir,this.transition,this.callback&&this,this.callback);},_parse:function(_bd){var _be=_4.create("DIV");var _bf;var id=this.urlTarget;var _c0=_5.byId(id)&&_5.byId(id).containerNode||_4.byId(id)||_6.mobile.currentView&&_6.mobile.currentView.domNode.parentNode||_4.body();if(_bd.charAt(0)=="<"){_be.innerHTML=_bd;_bf=_be.firstChild;if(!_bf&&_bf.nodeType!=1){alert("dojox.mobile.AbstractItem#transitionTo: invalid view content");return;}_bf.setAttribute("_started","true");_bf.style.visibility="hidden";_c0.appendChild(_be);(_6.mobile.parser||_4.parser).pars
 e(_be);_c0.appendChild(_c0.removeChild(_be).firstChild);}else{if(_bd.charAt(0)=="{"){_c0.appendChild(_be);this._ws=[];_bf=this._instantiate(eval("("+_bd+")"),_be);for(var i=0;i<this._ws.length;i++){var w=this._ws[i];w.startup&&!w._started&&(!w.getParent||!w.getParent())&&w.startup();}this._ws=null;}}_bf.style.display="none";_bf.style.visibility="visible";var id=_bf.id;return _4.hash?"#"+id:id;},_instantiate:function(obj,_c1,_c2){var _c3;for(var key in obj){if(key.charAt(0)=="@"){continue;}var cls=_4.getObject(key);if(!cls){continue;}var _c4={};var _c5=cls.prototype;var _c6=_4.isArray(obj[key])?obj[key]:[obj[key]];for(var i=0;i<_c6.length;i++){for(var _c7 in _c6[i]){if(_c7.charAt(0)=="@"){var val=_c6[i][_c7];_c7=_c7.substring(1);if(typeof _c5[_c7]=="string"){_c4[_c7]=val;}else{if(typeof _c5[_c7]=="number"){_c4[_c7]=val-0;}else{if(typeof _c5[_c7]=="boolean"){_c4[_c7]=(val!="false");}else{if(typeof _c5[_c7]=="object"){_c4[_c7]=eval("("+val+")");}}}}}}_c3=new cls(_c4,_c1);if(!_c
 1){this._ws.push(_c3);}if(_c2&&_c2.addChild){_c2.addChild(_c3);}this._instantiate(_c6[i],null,_c3);}}return _c3&&_c3.domNode;},createDomButton:function(_c8,_c9){var s=_c8.className;if(s.match(/mblDomButton\w+_(\d+)/)){var _ca=RegExp.$1-0;for(var i=0,p=(_c9||_c8);i<_ca;i++){p=_4.create("DIV",null,p);}}},select:function(_cb){},defaultClickAction:function(){if(this.toggle){this.select(this.selected);}else{if(!this.selected){this.select();if(!this.selectOne){var _cc=this;setTimeout(function(){_cc.select(true);},this._duration);}if(this.moveTo||this.href||this.url||this.scene){this.transitionTo(this.moveTo,this.href,this.url,this.scene);}}}},getParentWidget:function(){var ref=this.srcNodeRef||this.domNode;return ref&&ref.parentNode?_5.getEnclosingWidget(ref.parentNode):null;}});_4.declare("dojox.mobile.ListItem",_6.mobile.AbstractItem,{rightText:"",btnClass:"",anchorLabel:false,noArrow:false,selected:false,buildRendering:function(){this.inheritParams();var a=this.anchorNode=_4.cr
 eate("A");a.className="mblListItemAnchor";var box=_4.create("DIV");box.className="mblListItemTextBox";if(this.anchorLabel){box.style.cursor="pointer";}var r=this.srcNodeRef;if(r){for(var i=0,len=r.childNodes.length;i<len;i++){box.appendChild(r.removeChild(r.firstChild));}}if(this.label){box.appendChild(_4.doc.createTextNode(this.label));}a.appendChild(box);if(this.rightText){this._setRightTextAttr(this.rightText);}if(this.moveTo||this.href||this.url||this.clickable){var _cd=this.getParentWidget();if(!this.noArrow&&!(_cd&&_cd.stateful)){var _ce=_4.create("DIV");_ce.className="mblArrow";a.appendChild(_ce);}this.connect(a,"onclick","onClick");}else{if(this.btnClass){var div=this.btnNode=_4.create("DIV");div.className=this.btnClass+" mblRightButton";div.appendChild(_4.create("DIV"));div.appendChild(_4.create("P"));var _cf=_4.create("DIV");_cf.className="mblRightButtonContainer";_cf.appendChild(div);a.appendChild(_cf);_4.addClass(a,"mblListItemAnchorHasRightButton");setTimeout(fu
 nction(){_cf.style.width=div.offsetWidth+"px";_cf.style.height=div.offsetHeight+"px";if(_4.isIE){a.parentNode.style.height=a.parentNode.offsetHeight+"px";}},0);}}if(this.anchorLabel){box.style.display="inline";}var li=this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("LI");li.className="mblListItem"+(this.selected?" mblItemSelected":"");li.appendChild(a);this.setIcon();},setIcon:function(){if(this.iconNode){return;}var a=this.anchorNode;if(this.icon&&this.icon!="none"){var img=this.iconNode=_4.create("IMG");img.className="mblListItemIcon";img.src=this.icon;this.domNode.insertBefore(img,a);_6.mobile.setupIcon(this.iconNode,this.iconPos);_4.removeClass(a,"mblListItemAnchorNoIcon");}else{_4.addClass(a,"mblListItemAnchorNoIcon");}},onClick:function(e){var a=e.currentTarget;var li=a.parentNode;if(_4.hasClass(li,"mblItemSelected")){return;}if(this.anchorLabel){for(var p=e.target;p.tagName!="LI";p=p.parentNode){if(p.className=="mblListItemTextBox"){_4.addClass(p
 ,"mblListItemTextBoxSelected");setTimeout(function(){_4.removeClass(p,"mblListItemTextBoxSelected");},1000);this.onAnchorLabelClicked(e);return;}}}if(this.getParentWidget().stateful){for(var i=0,c=li.parentNode.childNodes;i<c.length;i++){_4.removeClass(c[i],"mblItemSelected");}}else{setTimeout(function(){_4.removeClass(li,"mblItemSelected");},1000);}_4.addClass(li,"mblItemSelected");this.transitionTo(this.moveTo,this.href,this.url,this.scene);},onAnchorLabelClicked:function(e){},_setRightTextAttr:function(_d0){this.rightText=_d0;if(!this._rightTextNode){this._rightTextNode=_4.create("DIV",{className:"mblRightText"},this.anchorNode);}this._rightTextNode.innerHTML=_d0;}});_4.declare("dojox.mobile.Switch",_5._WidgetBase,{value:"on",leftLabel:"ON",rightLabel:"OFF",_width:53,buildRendering:function(){this.domNode=this.srcNodeRef||_4.doc.createElement("DIV");this.domNode.className="mblSwitch";this.domNode.innerHTML="<div class=\"mblSwitchInner\">"+"<div class=\"mblSwitchBg mblSwit
 chBgLeft\">"+"<div class=\"mblSwitchText mblSwitchTextLeft\">"+this.leftLabel+"</div>"+"</div>"+"<div class=\"mblSwitchBg mblSwitchBgRight\">"+"<div class=\"mblSwitchText mblSwitchTextRight\">"+this.rightLabel+"</div>"+"</div>"+"<div class=\"mblSwitchKnob\"></div>"+"</div>";var n=this.inner=this.domNode.firstChild;this.left=n.childNodes[0];this.right=n.childNodes[1];this.knob=n.childNodes[2];_4.addClass(this.domNode,(this.value=="on")?"mblSwitchOn":"mblSwitchOff");this[this.value=="off"?"left":"right"].style.display="none";},postCreate:function(){this.connect(this.knob,"onclick","onClick");this.connect(this.knob,"touchstart","onTouchStart");this.connect(this.knob,"mousedown","onTouchStart");},_changeState:function(_d1){this.inner.style.left="";_4.addClass(this.domNode,"mblSwitchAnimation");_4.removeClass(this.domNode,(_d1=="on")?"mblSwitchOff":"mblSwitchOn");_4.addClass(this.domNode,(_d1=="on")?"mblSwitchOn":"mblSwitchOff");var _d2=this;setTimeout(function(){_d2[_d1=="off"?"
 left":"right"].style.display="none";_4.removeClass(_d2.domNode,"mblSwitchAnimation");},300);},onClick:function(e){if(this._moved){return;}this.value=(this.value=="on")?"off":"on";this._changeState(this.value);this.onStateChanged(this.value);},onTouchStart:function(e){this._moved=false;this.innerStartX=this.inner.offsetLeft;if(e.targetTouches){this.touchStartX=e.targetTouches[0].clientX;this._conn1=_4.connect(this.inner,"touchmove",this,"onTouchMove");this._conn2=_4.connect(this.inner,"touchend",this,"onTouchEnd");}this.left.style.display="block";this.right.style.display="block";_4.stopEvent(e);},onTouchMove:function(e){e.preventDefault();var dx;if(e.targetTouches){if(e.targetTouches.length!=1){return false;}dx=e.targetTouches[0].clientX-this.touchStartX;}else{dx=e.clientX-this.touchStartX;}var pos=this.innerStartX+dx;var d=10;if(pos<=-(this._width-d)){pos=-this._width;}if(pos>=-d){pos=0;}this.inner.style.left=pos+"px";this._moved=true;},onTouchEnd:function(e){_4.disconnect(t
 his._conn1);_4.disconnect(this._conn2);if(this.innerStartX==this.inner.offsetLeft){if(_4.isWebKit){var ev=_4.doc.createEvent("MouseEvents");ev.initEvent("click",true,true);this.knob.dispatchEvent(ev);}return;}var _d3=(this.inner.offsetLeft<-(this._width/2))?"off":"on";this._changeState(_d3);if(_d3!=this.value){this.value=_d3;this.onStateChanged(this.value);}},onStateChanged:function(_d4){}});_4.declare("dojox.mobile.Button",_5._WidgetBase,{btnClass:"mblBlueButton",duration:1000,label:null,buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("BUTTON");this.domNode.className="mblButton "+this.btnClass;if(this.label){this.domNode.innerHTML=this.label;}this.connect(this.domNode,"onclick","onClick");},onClick:function(e){var _d5=this.domNode;var c="mblButtonSelected "+this.btnClass+"Selected";_4.addClass(_d5,c);setTimeout(function(){_4.removeClass(_d5,c);},this.duration);}});_4.declare("dojox.mobile.ToolBarButton",_6.mobile.AbstractItem,
 {selected:false,_defaultColor:"mblColorDefault",_selColor:"mblColorDefaultSel",buildRendering:function(){this.inheritParams();this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("div");_4.addClass(this.domNode,"mblToolbarButton mblArrowButtonText");var _d6;if(this.selected){_d6=this._selColor;}else{if(this.domNode.className.indexOf("mblColor")==-1){_d6=this._defaultColor;}}_4.addClass(this.domNode,_d6);if(this.label){this.domNode.innerHTML=this.label;}else{this.label=this.domNode.innerHTML;}if(this.icon&&this.icon!="none"){var img;if(this.iconPos){var _d7=_4.create("DIV",null,this.domNode);img=_4.create("IMG",null,_d7);img.style.position="absolute";var arr=this.iconPos.split(/[ ,]/);_4.style(_d7,{position:"relative",width:arr[2]+"px",height:arr[3]+"px"});}else{img=_4.create("IMG",null,this.domNode);}img.src=this.icon;_6.mobile.setupIcon(img,this.iconPos);this.iconNode=img;}this.createDomButton(this.domNode);this.connect(this.domNode,"onclick","onClick");},s
 elect:function(_d8){_4.toggleClass(this.domNode,this._selColor,!_d8);this.selected=!_d8;},onClick:function(e){this.defaultClickAction();}});_4.declare("dojox.mobile.ProgressIndicator",null,{interval:100,colors:["#C0C0C0","#C0C0C0","#C0C0C0","#C0C0C0","#C0C0C0","#C0C0C0","#B8B9B8","#AEAFAE","#A4A5A4","#9A9A9A","#8E8E8E","#838383"],_bars:[],constructor:function(){this.domNode=_4.create("DIV");this.domNode.className="mblProgContainer";for(var i=0;i<12;i++){var div=_4.create("DIV");div.className="mblProg mblProg"+i;this.domNode.appendChild(div);this._bars.push(div);}},start:function(){var _d9=0;var _da=this;this.timer=setInterval(function(){_d9--;_d9=_d9<0?11:_d9;var c=_da.colors;for(var i=0;i<12;i++){var idx=(_d9+i)%12;_da._bars[i].style.backgroundColor=c[idx];}},this.interval);},stop:function(){if(this.timer){clearInterval(this.timer);}this.timer=null;if(this.domNode.parentNode){this.domNode.parentNode.removeChild(this.domNode);}}});_6.mobile.ProgressIndicator._instance=null;_
 6.mobile.ProgressIndicator.getInstance=function(){if(!_6.mobile.ProgressIndicator._instance){_6.mobile.ProgressIndicator._instance=new _6.mobile.ProgressIndicator();}return _6.mobile.ProgressIndicator._instance;};_6.mobile.addClass=function(){var _db=document.getElementsByTagName("link");for(var i=0,len=_db.length;i<len;i++){if(_db[i].href.match(/dojox\/mobile\/themes\/(\w+)\//)){_6.mobile.theme=RegExp.$1;_4.addClass(_4.body(),_6.mobile.theme);break;}}};_6.mobile.setupIcon=function(_dc,_dd){if(_dc&&_dd){var arr=_4.map(_dd.split(/[ ,]/),function(_de){return _de-0;});var t=arr[0];var r=arr[1]+arr[2];var b=arr[0]+arr[3];var l=arr[1];_dc.style.clip="rect("+t+"px "+r+"px "+b+"px "+l+"px)";_dc.style.top=_4.style(_dc,"top")-t+"px";_dc.style.left=_4.style(_dc.parentNode,"paddingLeft")-l+"px";}};_6.mobile.hideAddressBar=function(){_4.body().style.minHeight="1000px";setTimeout(function(){scrollTo(0,1);},100);setTimeout(function(){scrollTo(0,1);},400);setTimeout(function(){scrollTo(0,1
 );_4.body().style.minHeight=(_4.global.innerHeight||_4.doc.documentElement.clientHeight)+"px";},1000);};_6.mobile.openWindow=function(url,_df){_4.global.open(url,_df||"_blank");};_4._loaders.unshift(function(){var _e0=_4.body().getElementsByTagName("*");var i,len,s;len=_e0.length;for(i=0;i<len;i++){s=_e0[i].getAttribute("dojoType");if(s){if(_e0[i].parentNode.getAttribute("lazy")=="true"){_e0[i].setAttribute("__dojoType",s);_e0[i].removeAttribute("dojoType");}}}});_4.addOnLoad(function(){_6.mobile.addClass();if(_4.config["mblApplyPageStyles"]!==false){_4.addClass(_4.doc.documentElement,"mobile");}if(_4.config["mblHideAddressBar"]!==false){_6.mobile.hideAddressBar();if(_4.config["mblAlwaysHideAddressBar"]==true){if(_4.global.onorientationchange!==undefined){_4.connect(_4.global,"onorientationchange",_6.mobile.hideAddressBar);}else{_4.connect(_4.global,"onresize",_6.mobile.hideAddressBar);}}}var _e1=_4.body().getElementsByTagName("*");var i,len=_e1.length,s;for(i=0;i<len;i++){s
 =_e1[i].getAttribute("__dojoType");if(s){_e1[i].setAttribute("dojoType",s);_e1[i].removeAttribute("__dojoType");}}if(_4.hash){var _e2=function(_e3){var arr;arr=_5.findWidgets(_e3);var _e4=arr;for(var i=0;i<_e4.length;i++){arr=arr.concat(_e2(_e4[i].containerNode));}return arr;};_4.subscribe("/dojo/hashchange",null,function(_e5){var _e6=_6.mobile.currentView;if(!_e6){return;}var _e7=_6.mobile._params;if(!_e7){var _e8=_e5?_e5:_6.mobile._defaultView.id;var _e9=_e2(_e6.domNode);var dir=1,_ea="slide";for(i=0;i<_e9.length;i++){var w=_e9[i];if("#"+_e8==w.moveTo){_ea=w.transition;dir=(w instanceof _6.mobile.Heading)?-1:1;break;}}_e7=[_e8,dir,_ea];}_e6.performTransition.apply(_e6,_e7);_6.mobile._params=null;});}_4.body().style.visibility="visible";});_5.getEnclosingWidget=function(_eb){while(_eb&&_eb.tagName!=="BODY"){if(_eb.getAttribute&&_eb.getAttribute("widgetId")){return _5.registry.byId(_eb.getAttribute("widgetId"));}_eb=_eb._parentNode||_eb.parentNode;}return null;};}if(!_4._has
 Resource["dojox.mobile"]){_4._hasResource["dojox.mobile"]=true;_4.provide("dojox.mobile");_4.experimental("dojox.mobile");}}};});

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/parser.js
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/parser.js?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/parser.js (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/parser.js Wed Sep 28 14:49:00 2011
@@ -0,0 +1,8 @@
+/*
+	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+window[(typeof (djConfig)!="undefined"&&djConfig.scopeMap&&djConfig.scopeMap[0][1])||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.mobile.parser"],["provide","dojo.parser"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.mobile.parser"]){_4._hasResource["dojox.mobile.parser"]=true;_4.provide("dojox.mobile.parser");_4.provide("dojo.parser");_6.mobile.parser=new function(){this.instantiate=function(_7,_8){var ws=[];if(_7){var i,_9;_9=_7.length;for(i=0;i<_9;i++){var _a=_7[i];var _b=_4.getObject(_4.attr(_a,"dojoType"));var _c=_b.prototype;var _d={};if(_8){for(var _e in _8){_d[_e]=_8[_e];}}for(var _f in _c){var val=_4.attr(_a,_f);if(!val){continue;}if(typeof _c[_f]=="string"){_d[_f]=val;}else{if(typeof _c[_f]=="number"){_d[_f]=val-0;}else{if(typeof _c[_f]=="boolean"){_d[_f]=(val!="false");}else{if(typeof _c[_f]=="object"){_d[_f]=eval("("+val+")");}}}}}_d["class"]=_a.className;_d["style"]=_a.style&&_a.style.cssText;var _10=new _b(_d,
 _a);ws.push(_10);var _11=_a.getAttribute("jsId");if(_11){_4.setObject(_11,_10);}}_9=ws.length;for(i=0;i<_9;i++){var w=ws[i];w.startup&&!w._started&&(!w.getParent||!w.getParent())&&w.startup();}}return ws;};this.parse=function(_12,_13){if(!_12){_12=_4.body();}else{if(!_13&&_12.rootNode){_12=_12.rootNode;}}var _14=_12.getElementsByTagName("*");var _15=[];for(var i=0,len=_14.length;i<len;i++){if(_14[i].getAttribute("dojoType")){_15.push(_14[i]);}}return this.instantiate(_15,_13);};}();_4._loaders.unshift(function(){if(_4.config.parseOnLoad){_6.mobile.parser.parse();}});}}};});
\ No newline at end of file

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/tiny_mce.js
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/tiny_mce.js?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/tiny_mce.js (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/tiny_mce.js Wed Sep 28 14:49:00 2011
@@ -0,0 +1 @@

[... 3 lines stripped ...]
Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/ui.css
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/ui.css?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/ui.css (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client_files/ui.css Wed Sep 28 14:49:00 2011
@@ -0,0 +1,213 @@
+/* Reset */
+.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
+.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
+.defaultSkin table td {vertical-align:middle}
+
+/* Containers */
+.defaultSkin table {direction:ltr; background:#F0F0EE}
+.defaultSkin iframe {display:block; background:#FFF}
+.defaultSkin .mceToolbar {height:26px}
+.defaultSkin .mceLeft {text-align:left}
+.defaultSkin .mceRight {text-align:right}
+
+/* External */
+.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
+.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
+.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
+
+/* Layout */
+.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
+.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
+.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
+.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
+.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top}
+.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
+.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
+.defaultSkin .mceStatusbar div {float:left; margin:2px}
+.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
+.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
+.defaultSkin table.mceToolbar {margin-left:3px}
+.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
+.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+.defaultSkin td.mceCenter {text-align:center;}
+.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
+.defaultSkin td.mceRight table {margin:0 0 0 auto;}
+
+/* Button */
+.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
+.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
+.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
+.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+.defaultSkin .mceButtonLabeled {width:auto}
+.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
+.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
+.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
+
+/* Separator */
+.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
+
+/* ListBox */
+.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
+.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
+.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
+.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
+.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
+.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
+.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
+.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
+.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
+.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
+
+/* SplitButton */
+.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
+.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
+.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
+.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
+.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
+.defaultSkin .mceSplitButton span.mceOpen {display:none}
+.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
+.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
+.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
+.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
+
+/* ColorSplitButton */
+.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
+.defaultSkin .mceColorSplitMenu td {padding:2px}
+.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
+.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
+.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
+.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
+.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
+.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
+.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
+
+/* Menu */
+.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8}
+.defaultSkin .mceNoIcons span.mceIcon {width:0;}
+.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
+.defaultSkin .mceMenu table {background:#FFF}
+.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
+.defaultSkin .mceMenu td {height:20px}
+.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
+.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
+.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
+.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
+.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
+.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
+.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
+.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
+.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
+.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
+.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
+.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
+.defaultSkin .mceMenu span.mceMenuLine {display:none}
+.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
+
+/* Progress,Resize */
+.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
+.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
+
+/* Formats */
+.defaultSkin .mce_formatPreview a {font-size:10px}
+.defaultSkin .mce_p span.mceText {}
+.defaultSkin .mce_address span.mceText {font-style:italic}
+.defaultSkin .mce_pre span.mceText {font-family:monospace}
+.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
+.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
+.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
+.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
+.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
+.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
+
+/* Theme */
+.defaultSkin span.mce_bold {background-position:0 0}
+.defaultSkin span.mce_italic {background-position:-60px 0}
+.defaultSkin span.mce_underline {background-position:-140px 0}
+.defaultSkin span.mce_strikethrough {background-position:-120px 0}
+.defaultSkin span.mce_undo {background-position:-160px 0}
+.defaultSkin span.mce_redo {background-position:-100px 0}
+.defaultSkin span.mce_cleanup {background-position:-40px 0}
+.defaultSkin span.mce_bullist {background-position:-20px 0}
+.defaultSkin span.mce_numlist {background-position:-80px 0}
+.defaultSkin span.mce_justifyleft {background-position:-460px 0}
+.defaultSkin span.mce_justifyright {background-position:-480px 0}
+.defaultSkin span.mce_justifycenter {background-position:-420px 0}
+.defaultSkin span.mce_justifyfull {background-position:-440px 0}
+.defaultSkin span.mce_anchor {background-position:-200px 0}
+.defaultSkin span.mce_indent {background-position:-400px 0}
+.defaultSkin span.mce_outdent {background-position:-540px 0}
+.defaultSkin span.mce_link {background-position:-500px 0}
+.defaultSkin span.mce_unlink {background-position:-640px 0}
+.defaultSkin span.mce_sub {background-position:-600px 0}
+.defaultSkin span.mce_sup {background-position:-620px 0}
+.defaultSkin span.mce_removeformat {background-position:-580px 0}
+.defaultSkin span.mce_newdocument {background-position:-520px 0}
+.defaultSkin span.mce_image {background-position:-380px 0}
+.defaultSkin span.mce_help {background-position:-340px 0}
+.defaultSkin span.mce_code {background-position:-260px 0}
+.defaultSkin span.mce_hr {background-position:-360px 0}
+.defaultSkin span.mce_visualaid {background-position:-660px 0}
+.defaultSkin span.mce_charmap {background-position:-240px 0}
+.defaultSkin span.mce_paste {background-position:-560px 0}
+.defaultSkin span.mce_copy {background-position:-700px 0}
+.defaultSkin span.mce_cut {background-position:-680px 0}
+.defaultSkin span.mce_blockquote {background-position:-220px 0}
+.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
+.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
+.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
+.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
+
+/* Plugins */
+.defaultSkin span.mce_advhr {background-position:-0px -20px}
+.defaultSkin span.mce_ltr {background-position:-20px -20px}
+.defaultSkin span.mce_rtl {background-position:-40px -20px}
+.defaultSkin span.mce_emotions {background-position:-60px -20px}
+.defaultSkin span.mce_fullpage {background-position:-80px -20px}
+.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
+.defaultSkin span.mce_iespell {background-position:-120px -20px}
+.defaultSkin span.mce_insertdate {background-position:-140px -20px}
+.defaultSkin span.mce_inserttime {background-position:-160px -20px}
+.defaultSkin span.mce_absolute {background-position:-180px -20px}
+.defaultSkin span.mce_backward {background-position:-200px -20px}
+.defaultSkin span.mce_forward {background-position:-220px -20px}
+.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
+.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
+.defaultSkin span.mce_movebackward {background-position:-280px -20px}
+.defaultSkin span.mce_moveforward {background-position:-300px -20px}
+.defaultSkin span.mce_media {background-position:-320px -20px}
+.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
+.defaultSkin span.mce_pastetext {background-position:-360px -20px}
+.defaultSkin span.mce_pasteword {background-position:-380px -20px}
+.defaultSkin span.mce_selectall {background-position:-400px -20px}
+.defaultSkin span.mce_preview {background-position:-420px -20px}
+.defaultSkin span.mce_print {background-position:-440px -20px}
+.defaultSkin span.mce_cancel {background-position:-460px -20px}
+.defaultSkin span.mce_save {background-position:-480px -20px}
+.defaultSkin span.mce_replace {background-position:-500px -20px}
+.defaultSkin span.mce_search {background-position:-520px -20px}
+.defaultSkin span.mce_styleprops {background-position:-560px -20px}
+.defaultSkin span.mce_table {background-position:-580px -20px}
+.defaultSkin span.mce_cell_props {background-position:-600px -20px}
+.defaultSkin span.mce_delete_table {background-position:-620px -20px}
+.defaultSkin span.mce_delete_col {background-position:-640px -20px}
+.defaultSkin span.mce_delete_row {background-position:-660px -20px}
+.defaultSkin span.mce_col_after {background-position:-680px -20px}
+.defaultSkin span.mce_col_before {background-position:-700px -20px}
+.defaultSkin span.mce_row_after {background-position:-720px -20px}
+.defaultSkin span.mce_row_before {background-position:-740px -20px}
+.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
+.defaultSkin span.mce_table_props {background-position:-980px -20px}
+.defaultSkin span.mce_row_props {background-position:-780px -20px}
+.defaultSkin span.mce_split_cells {background-position:-800px -20px}
+.defaultSkin span.mce_template {background-position:-820px -20px}
+.defaultSkin span.mce_visualchars {background-position:-840px -20px}
+.defaultSkin span.mce_abbr {background-position:-860px -20px}
+.defaultSkin span.mce_acronym {background-position:-880px -20px}
+.defaultSkin span.mce_attribs {background-position:-900px -20px}
+.defaultSkin span.mce_cite {background-position:-920px -20px}
+.defaultSkin span.mce_del {background-position:-940px -20px}
+.defaultSkin span.mce_ins {background-position:-960px -20px}
+.defaultSkin span.mce_pagebreak {background-position:0 -40px}
+.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
+.defaultSkin span.mce_spellchecker {background-position:-540px -20px}

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/config/module.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/config/module.xml?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/config/module.xml (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/config/module.xml Wed Sep 28 14:49:00 2011
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<module xmlns="http://apache.org/lenya/module/1.0">
+  
+  <id>org.apache.lenya.transformation.lenyaDocWriting</id>
+  
+  <depends module="org.apache.lenya.modules.usecase"/>
+  <depends module="org.apache.lenya.modules.workflow"/>
+  <depends module="org.apache.lenya.modules.sitemanagement"/>
+  <depends module="org.apache.lenya.modules.resource"/>
+  <depends module="org.apache.lenya.modules.ac"/>
+
+  <package>org.apache.lenya.transformation</package>
+  <version>0.1-dev</version>
+  <name>LenyaDocWritingTransformer</name>
+  <lenya-version>@lenya.version@</lenya-version>
+  <description>Create Lenya document from XML</description>
+</module>

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/API
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/API?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/API (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/API Wed Sep 28 14:49:00 2011
@@ -0,0 +1,139 @@
+
+= LenyaDocWritingTransformer =
+
+== How it work ?  ==
+* Like the cocoon sourcewriting transformer // //, in the same "spirit" (and code - widely inspired)
+
+== What does it do dude ? ==
+
+* You can create a new document in reaching : 
+** curl POST "http://yourhost/file?action="create" -F "content=myfile"
+
+* limitation for now : myfile is an xmlfile
+
+== XML input element  ==
+
+<lenyadoc:docwriter>
+
+	<lenyadoc:parameters ifdocexist="create|modify|delete|escape">
+		[A0]
+		[A1]
+		<lenyadoc:pubname>pubname </>
+		<lenyadoc:area> area </>
+		[A2]
+		<lenyadoc:path> path </>[A5] ==> if specify, this is the node name
+		<lenyadoc:parentpath> path of parent </> ==> don't care about if path is specify
+		<lenyadoc:pathname> name in the path of the document </> ==> don't care if path
+		<lenyadoc:navtitle> title</>
+		<lenyadoc:resourcetype> type_code</>
+		<lenyadoc:language> lang_code</> [A6]
+		<lenyadoc:visibleinnav> true|false</>
+		<lenyadoc:samplenumber> int </>
+		<lenyadoc:extension> ext </>
+		<lenyadoc:workflowstate>publish,submit,reject </>
+		[A3]
+	</lenyadoc:parameters>
+
+	[A7]
+	<lenyadoc:content [overwrite=true(default)|false]> [A4]
+		<lenyadoc:contentpath>content</>
+		[<lenyadoc:replacepath>] [A8]
+		<lenyadoc:fragment>
+			THE TEXT CONTENT
+		</lenyadoc:fragment>
+
+		<insertbefore>/<insertafter> ==> if attribute ifexist=insertcontent
+
+	</lenyadoc:content>
+</lenyadoc:docwriter>		
+
+
+=== Identity management ===
+
+* this is a point to improve.
+* {{{ actually, identification is hack, no user management }}}
+
+
+
+
+[A0] define identity, like : 
+	<lenyadoc:identity>
+		<lenyadoc:name>thename</>
+		<lenyadoc:passwd>thepasswd</>
+	</>
+** begin of work : 
+*** see the function : protected Session login(String userId, String pubId)
+**** in : impl/test/org/apache/lenya/ac/impl/AbstractAccessControlTest.java
+*** another example, the getSession function in impl/test/org/apache/lenya/cms/workflow/WorkflowTest.java
+[A1] : remplace <lenyadoc:location> by :
+<lenyadoc:locations>
+	<lenyadoc:location>
+		<..> same
+
+[A2] : add the tag : <createparent> true </>
+** explain : when create a document, if the parent don't exist : create It !
+*** Question : this is possible to create a parent node (P1)
+** add to this tag the attribute resourceType="myRessourceType" in order to be able to control the type of parents (by default xhtml)
+
+[A3] : other parameters like autor, metadatas,...
+
+[A4] : add other instructions : insert | delete
+
+[A5] : if not define, remove space and special caracters from the name
+
+[A6] : if not define, get the defaut publication language
+
+[A7] : allow multiple content tag in order to be able to edit differents sections in the document (ex : edit html/head and html/body)
+
+[A8] : make the position selection working (like <remplacepath>p[2]</remplacepath>.
+       Now it throw the stacktracejava.lang.NullPointerException
+       	   See where come this exeption and catch it in order to write the problem in the result xml
+	   This execption also occur when the replace path don't exist in the document
+
+
+[Ax] code to delete document
+* [Ay] define the output mode of the document : 
+** as is : get the xml input doc
+** result : get informations about the document created : uuid, name, url,...
+** all : as is + result
+
+[Ad] get a document by his uuid
+* add in the input structure, in parameters a lenyadoc:uuid
+** this uuid is prior than other document identification mode
+* ?? how to get a document in java with his uuid ???
+
+== Question / remarque ==
+
+* il faut que la balise paramètre soit en premier, et que les balises content soient disposées après
+
+== Fragment management ==
+
+- You can replace part-of your document (e.g a <p>, a <div>) by any "fragment" of informations in a document.
+
+* exemple : //////thisfile/////
+
+== Versionnage ==
+
+* version 0.7 : fonctionne pour la création des documents a partir du schéma défini dans le fichier xslt/addLenyaDocTags.xsl
+
+* version courante : 
+-- ajout du tag parentpath (remplace le tag path, qui prenait en compte le nom du node dans le path)
+-- ajout du tag pathname (facultatif, nom du document en url, si non présent transformé automatiquement depuis le navtitle)
+
+=== Workflow management  ===
+
+* This is a kind of think that is near to be done, but just a little but strange things occur :
+** You can pass from private to //brouillon//
+** but not from //brouillon// to publicated ... I have piece of code around... but not work
+
+* TODO : put definition of API
+
+== I want to use this transformer ! ==
+
+* Add in you desired sitemap this : 
+    <map:transformers default="xslt">
+      <map:transformer logger="sitemap.transformer.lenyadoc-writing" name="lenyadoc-writing" src="org.apache.lenya.transformation.LenyaDocWritingTransformer" />
+    </map:transformers>
+
+
+

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/NOTES
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/NOTES?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/NOTES (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/NOTES Wed Sep 28 14:49:00 2011
@@ -0,0 +1,203 @@
+
+== compilation avec le javac :  ==
+
+* javac -cp classes/ -d ../../../../WEB-INF/classes/ LenyaDocWritingTransformer.java
+** tous les jars doivent être décompilés dans le dossier "classes" (après le -cp)  pour que la compilation ait lieue
+** actuellement ce dossier classes est dans le dossier /modules/docwriter/Java-Sources
+* puis : sudo /etc/init.d/tomcat5.5 restart
+
+= LenyaDocWritingTransformer =
+== Warning ==
+
+* this code is the V0.1 of lenya Docwriting tranformer <version>
+* he is //:livred/// "as is", many function have not implented yet, but it work for me has I want NOW ! :)
+* be sure, I will work on it later !
+* And before this, if you want test, improve, modify it... feel free, and share whit us !
+
+
+== How it work ?  ==
+* Like the cocoon sourcewriting transformer // //, in the same "spirit" (and code - widely inspired)
+** 
+
+== XML input element  ==
+
+
+<lenyadoc:docwriter>
+
+	<lenyadoc:parameters ifdocexist="create|modify|delete|escape">
+		[A0]
+		[A1]
+		<lenyadoc:pubname>pubname </>
+		<lenyadoc:area> area </>
+		[A2]
+		<lenyadoc:path> path </>[A5] ==> if specify, this is the node name
+		<lenyadoc:parentpath> path of parent </> ==> don't care about if path is specify
+		<lenyadoc:pathname> name in the path of the document </> ==> don't care if path
+		<lenyadoc:navtitle> title</>
+		<lenyadoc:resourcetype> type_code</>
+		<lenyadoc:language> lang_code</> [A6]
+		<lenyadoc:visibleinnav> true|false</>
+		<lenyadoc:samplenumber> int </>
+		<lenyadoc:extension> ext </>
+		<lenyadoc:workflowstate>publish,submit,reject </>
+		[A3]
+	</lenyadoc:parameters>
+
+	[A7]
+	<lenyadoc:content [overwrite=true(default)|false]> [A4]
+		<lenyadoc:contentpath>content</>
+		[<lenyadoc:replacepath>] [A8]
+		<lenyadoc:fragment>
+			THE TEXT CONTENT
+		</lenyadoc:fragment>
+
+		<insertbefore>/<insertafter> ==> if attribute ifexist=insertcontent
+
+	</lenyadoc:content>
+</lenyadoc:docwriter>		
+
+=== Plan improvement ===
+
+* this plan don't care about priority, but say what will cool to do ! :)
+
+[A0] define identity, like : 
+	<lenyadoc:identity>
+		<lenyadoc:name>thename</>
+		<lenyadoc:passwd>thepasswd</>
+	</>
+** begin of work : 
+*** see the function : protected Session login(String userId, String pubId)
+**** in : impl/test/org/apache/lenya/ac/impl/AbstractAccessControlTest.java
+*** another example, the getSession function in impl/test/org/apache/lenya/cms/workflow/WorkflowTest.java
+[A1] : remplace <lenyadoc:location> by :
+<lenyadoc:locations>
+	<lenyadoc:location>
+		<..> same
+
+[A2] : add the tag : <createparent> true </>
+** explain : when create a document, if the parent don't exist : create It !
+*** Question : this is possible to create a parent node (P1)
+** add to this tag the attribute resourceType="myRessourceType" in order to be able to control the type of parents (by default xhtml)
+
+[A3] : other parameters like autor, metadatas,...
+
+[A4] : add other instructions : insert | delete
+
+[A5] : if not define, remove space and special caracters from the name
+
+[A6] : if not define, get the defaut publication language
+
+[A7] : allow multiple content tag in order to be able to edit differents sections in the document (ex : edit html/head and html/body)
+
+[A8] : make the position selection working (like <remplacepath>p[2]</remplacepath>.
+       Now it throw the stacktracejava.lang.NullPointerException
+       	   See where come this exeption and catch it in order to write the problem in the result xml
+	   This execption also occur when the replace path don't exist in the document
+
+
+[Ax] code to delete document
+* [Ay] define the output mode of the document : 
+** as is : get the xml input doc
+** result : get informations about the document created : uuid, name, url,...
+** all : as is + result
+
+[Ad] get a document by his uuid
+* add in the input structure, in parameters a lenyadoc:uuid
+** this uuid is prior than other document identification mode
+* ?? how to get a document in java with his uuid ???
+
+== Question / remarque ==
+
+* il faut que la balise paramètre soit en premier, et que les balises content soient disposées après
+
+== Versionnage ==
+
+* version 0.6 : permet de remplacer des éléments identifiés du document
+* version actuelle  :
+** pouvoir remplacer plusieurs fragments (balises content) dans un document
+
+* version 0.7 : fonctionne pour la création des documents a partir du schéma défini dans le fichier xslt/addLenyaDocTags.xsl
+
+* version courante : 
+-- ajout du tag parentpath (remplace le tag path, qui prenait en compte le nom du node dans le path)
+-- ajout du tag pathname (facultatif, nom du document en url, si non présent transformé automatiquement depuis le navtitle)
+
+=== GEstion du workflow  ===
+
+* /src/impl/test/org/apache/lenya/cms/workflow/WorkflowTest.java:            Version version = workflowable.getLatestVersion();
+* ./src/modules-core/workflow/java/src/org/apache/lenya/cms/workflow/usecases/Publish.java:        Workflowable workflowable = WorkflowUtil.getWorkflowable(thi
+s.manager, getSession(),
+
+
+=== Améliorations pour la gestion du document ===
+
+* utiliser cette méthode (elle permet d'éviter de passer directement par le documentManager : 
+   //-----------------------------------------------
+        //Start site management
+        SiteStructure site = pub.getArea(Publication.AUTHORING_AREA).getSite();
+        site.getRepositoryNode().lock();
+
+        try {
+            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
+            siteManager = (SiteManager) selector.select(pub.getSiteManagerHint());
+
+           /// siteManager.add("/tutorial/TOTO", doc);
+        } finally {
+            selector.release(siteManager);
+            this.manager.release(selector);
+        }
+        site.getRepositoryNode().unlock();
+
+
+
+== remarques pour la création d'un transformer  ==
+* ajout du transformateur dans le lenya/sitemap.xmap :
+**  <map:transformer logger="sitemap.transformer.lenyadoc-writing" name="lenyadoc-writing" 
+src="org.apache.lenya.transformation.LenyaDocWritingTransformer"/>
+
+
+* création de la classe org.apache.lenya.transformation.LenyaDocWritingTransformer
+
+* compilation grace à la commande : 
+** javac -cp classes/ -d ../../../../WEB-INF/classes/ LenyaDocWritingTransformer.java
+
+
+((( remarque : attention, pour la première compilation il faut changer les propriétaires/groupes = 
+tomcat55:dev4sengines et ajouter le chmod g+w )))
+
+
+
+== Sources d'information pour la création de documents  ==
+----
+a voir : le DocumentBuilder
+
+-- 
+création d'un documnt : 
+collection/java/test/org/apache/lenya/modules/collection/CollectionWrapperTest.java
+
+--------------------------
+* enregistrement des données dans un document : 
+modules/simplesite/java/src/org/apache/lenya/cms/site/simple/DocumentStore.java
+
+
+
+
+
+== remarques sur les documents html : a quoi sert le head ? ==
+
+
+
+
+
+
+== création d'un document DOM ==
+	    //récupération du contenu par défaut du lenyadoc :
+	    org.w3c.dom.Document xmlDocSource = DocumentHelper.readDocument(doc.getInputStream());
+	    NamespaceHelper helper = new NamespaceHelper("http://www.w3.org/1999/xhtml","xhtml",xmlDocSource);
+	    org.w3c.dom.Document xmlDocResult = helper.getDocument();
+	    Element root = xmlDocResult.getDocumentElement();
+	    
+	    Node importNode = xmlDocResult.importNode(fragment, true);
+	    root.appendChild(importNode);
+	    //Write the dom content in the lenya Document
+	    org.apache.lenya.cms.cocoon.source.SourceUtil.writeDOM(xmlDocResult, doc.getOutputStream());

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/TODO
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/TODO?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/TODO (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/TODO Wed Sep 28 14:49:00 2011
@@ -0,0 +1,45 @@
+
+=== Améliorations pour la gestion du document ===
+
+* utiliser cette méthode (elle permet d'éviter de passer directement par le documentManager : 
+   //-----------------------------------------------
+        //Start site management
+        SiteStructure site = pub.getArea(Publication.AUTHORING_AREA).getSite();
+        site.getRepositoryNode().lock();
+
+        try {
+            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
+            siteManager = (SiteManager) selector.select(pub.getSiteManagerHint());
+
+           /// siteManager.add("/tutorial/TOTO", doc);
+        } finally {
+            selector.release(siteManager);
+            this.manager.release(selector);
+        }
+        site.getRepositoryNode().unlock();
+
+== How to create a simple DOM document inside lenya ? ==
+	    //récupération du contenu par défaut du lenyadoc :
+	    org.w3c.dom.Document xmlDocSource = DocumentHelper.readDocument(doc.getInputStream());
+	    NamespaceHelper helper = new NamespaceHelper("http://www.w3.org/1999/xhtml","xhtml",xmlDocSource);
+	    org.w3c.dom.Document xmlDocResult = helper.getDocument();
+	    Element root = xmlDocResult.getDocumentElement();
+	    
+	    Node importNode = xmlDocResult.importNode(fragment, true);
+	    root.appendChild(importNode);
+	    //Write the dom content in the lenya Document
+	    org.apache.lenya.cms.cocoon.source.SourceUtil.writeDOM(xmlDocResult, doc.getOutputStream());
+
+
+== References  ==
+
+* create a docmument : collection/java/test/org/apache/lenya/modules/collection/CollectionWrapperTest.java
+
+--------------------------
+* enregistrement des données dans un document : 
+modules/simplesite/java/src/org/apache/lenya/cms/site/simple/DocumentStore.java
+
+== remarques sur les documents html : a quoi sert le head ? ==
+
+* les informations sont transmises à la page parente/finale
+

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/Workflow-invoker
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/Workflow-invoker?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/Workflow-invoker (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/Workflow-invoker Wed Sep 28 14:49:00 2011
@@ -0,0 +1,62 @@
+publication from createLenyaDocTransformer : 
+
+- this transformer is call from a module url says "default/modules/lenyaDocWriting/addMedia"
+
+- this transformer try to publish the document  "/default/tutorial.html"
+
+
+- in modules-core/usecase/java/src/org/apache/lenya/cms/usecase/impl/UsecaseInvokerImpl.java
+- Roles are retrieve from the request : that is on modules/lenyaDocWriting
+- and not from the documentURL/webappUrl that is on "/default/tutorial.html"
+
+- a way could be to take in consideration the documentURL, but roles are get from a request create by : 
+-- Request request = contextUtil.getRequest();
+-- see protected boolean isUsecaseAuthorized(String webappUrl, String usecaseName) throws Exception {
+
+... but the request seems not to be configurable...
+
+
+- In fact, during invoke workflow, roles and rights are checked for the current position in publication (request) and not on the position of the applied element (if the invoke is done on another document in the publication).
+
+- This can be a security risk ?
+
+- See how document creation implement this case as we have to be logged to create a document
+
+====
+
+- the more "clean method" : 
+UsecaseInvoker invoker = null;
+		try {
+			invoker = (UsecaseInvoker) this.manager.lookup(UsecaseInvoker.ROLE);
+			Map params = new HashMap();
+			// params.put(..., ...);
+			// invoker.invoke(getSourceUrl(), "publish", params);
+			reportResult("","PROBLEM","URL",lenyaDoc.getCanonicalDocumentURL(),lenyaDoc.getCanonicalWebappURL(),"");
+			invoker.invoke(lenyaDoc.getCanonicalWebappURL(), "workflow.submit", params);
+			//invoker.invoke("/default/authoring/concepts.html", "workflow.submit", params);
+			// invoker.invoke(lenyaDoc.getCanonicalWebappURL(),
+			// "workflow.publish", params);
+
+			if (invoker.getResult() != UsecaseInvoker.SUCCESS) {
+				// /A REMETTRE
+				List messages = invoker.getErrorMessages();
+				for (Iterator i = messages.iterator(); i.hasNext();) {
+					UsecaseMessage message = (UsecaseMessage) i.next();
+					// addErrorMessage(message.getMessage(),
+					// message.getParameters());
+					reportResult("", "PROBLEM-LIST", "USECASE PROBLEM",
+							message.getMessage(),
+							Arrays.toString(message.getParameters()), "");
+				}
+			}
+		} catch (ServiceException se) {
+			reportResult("", "PROBLEM123", "ServiceException", se.getMessage(),
+					"", "");
+		} catch (UsecaseException ue) {
+			reportResult("", "PROBLEM44", "UsecaseException", ue.getMessage(),
+					"", "");
+		} finally {
+			if (invoker != null) {
+				this.manager.release(invoker);
+			}
+		}

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/dev-docs.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/dev-docs.xml?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/dev-docs.xml (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/dev-docs.xml Wed Sep 28 14:49:00 2011
@@ -0,0 +1,96 @@
+
+=== NOTE really interresting for a kind of onthologies around howto ===
+
+<?xml version="1.0" encoding="utf-8"?>
+
+<root>
+  <howto>
+    <title> Do java module testing </title>
+    <content> invoque the command line <code> 
+./build.sh module.test -Dmodule=org.apache.lenya.transformation
+// not work for now : 
+./build.sh module.test -Dmodule=org.apache.lenya.module.lenyaDocWriting </code>
+    </content>
+  </howto>
+  <howto>Compile in place (whitout use the build.sh)</howto>
+  <content>
+    <ul>
+      <li> Have a folder that containt all .class (unziping of all
+      lenya's lib jar</li>
+      <li> javac -cp /home/YOURNAME/projet/lenyaClasses/ -d
+      /var/lib/tomcat5.5/webapps/lenya/WEB-INF/classes/ LenyaDocWritingTransformer.java</li>
+      <li> after that restart you server : sudo /etc/init.d/tomcat5.5 restart</li>
+    </ul>
+  </content>
+  <howto>
+    <title> Do http test </title>
+    <content>
+      type this address in your browser http://SERVER-NAME/lenya/default/modules/lenyaDocWriting/testwriter
+    </content>
+  </howto>
+  <todo>
+    <task>
+      <title>Simplifie the code for retrieve the document</title>
+      <description>
+	- see the way used in the input : moreInputs/java/src/org/apache/lenya/cms/cocoon/components/modules/input/GetUuidModuleMoreInputs.java
+	</description>
+      </task>
+    <task> review the algorithm in order to automatic creation of
+    document nav title from path</task>
+    <task>
+      <description>
+	if doc don't exist and attribute
+	ifdocexist="modify", the document is not created
+	... in fact the doc IS CREATED, but if nav title is don't set,
+	doc have no nav title 
+	<lenyadoc:lenyadoc
+	    xmlns:lenyadoc="http://4sengines/lenyadoc/0.1"><lenyadoc:parameters
+							       ifdocexist="modify">
+	  <lenyadoc:pubname>killbookmakers</lenyadoc:pubname>
+	  <lenyadoc:path>/footL1/unclass/Articles</lenyadoc:path></lenyadoc:parameters>
+	<lenyadoc:content></lenyadoc:content></lenyadoc:lenyadoc>
+      </description>
+      <task>
+	<description>write a test for this use case : 1) ifdocexist=modify but
+	the doc don't exist, and after that, 2) ifdocexist="modify on
+	the created in 1 document."
+	</description>
+      </task>
+      <solution status="idea">review the document naming choice
+      algorithm </solution>
+    </task>
+    <!--  notes on task's attributes : 
+	 hid (human id) : attribute that is use to show in code the
+	 place of the bug
+	 type : un list of predefined tag for the bug (ex : dev,
+	 interface, critize,...)
+	 tag : a list of open attribute
+	 critize : a possibility to set up a critize value to the bug ??
+	 solvingState : a % for show the avancement of the solving ??
+	  example: 
+	  <task hid="workflowbug" type="dev"> 
+    -->
+    <task> 
+      <description> improve lenyadocresult informations</description>
+      <task>add informations about : publication, area and language</task>
+    </task>
+    
+    <task> 
+      <description> implement the lenyadoc:root tag</description>
+      <task>in order to have an xml root when create differents documents</task>
+    </task>
+    
+    <task>a verification on the parent path string : he must have to
+    begin with a /. If not add this automatically. If not there is a
+    "index of string" error
+    </task>
+    
+    <task>
+      <description> Document is created but with no navitle when
+      parameter path is set. 
+      <solution status="idea">add a condition and auto-create the navtitle elemenent from path</solution>
+      </description>
+    </task>
+
+  </todo>
+</root>

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/endUser-doc.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/endUser-doc.xml?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/endUser-doc.xml (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/endUser-doc.xml Wed Sep 28 14:49:00 2011
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc>
+  <h1> Sorry, this module have no interface and wouldn't be use by
+  end-user </h1>
+</doc>
\ No newline at end of file

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/user-docs.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/user-docs.xml?rev=1176905&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/user-docs.xml (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/docs/user-docs.xml Wed Sep 28 14:49:00 2011
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc>
+<h1> Output of Transformer is userful !</h1>
+<p> you can use the output of the tranformer for create children of
+the just created document</p>
+<todo>
+<task> an example based on the article creation process </task>
+</todo>
+</doc>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org