;aaa ={} ; G={O:{},last:{}} P={} W=window L=W // Prototypes P.object=Object.prototype P.string=String.prototype P.number=Number.prototype P.date=Date.prototype P.record=Object.create(P.object) // Styles // info // login.js // records.js // team.paul.js // team.thomas.js // team.juri.js Object.defineProperty(P.object,"P",{get:function(){return Object.getPrototypeOf(this)}}) function nf(n) { var a=n.split(".") var b=a.pop() find(a.join(".")) } function find(n) // sucht aus einem Namenstring das Objekt oder erstellt es define("acc.adre.234.44") { n=n.split(".") var o=G,b while (n.length) { b=n.shift() if (!o[b]) { o[b]={} } o=o[b] } L=o } left=function aaa_left(str,len) { return str.substr(0,len) } right=function aaa_right(str,len) { return str.substr(-len) } substr=function aaa_substr(str,pos,len) { return str.substr(pos,len) } upper=function(x){return x.toUpperCase()} lower=function(x){return x.toLowerCase()} chr=String.fromCharCode asc=function asc(s) { return s.charCodeAt(0) } len=function util_len(s) { return s.length } log=console.log time=function() { var a=new Date() return a.getTime() } dom={};util={};tabs={};menu={};account={};input={};sys={} ;account ={} ; // ;adre ={} ; adre={} adre.card=function(C,id) { tabs.card(C,"$126 Adre",id) ;with({C:G.C,V:G.C.V}){ if (C.neu) { G.rec=C.V.record={id:id} // adre.0.ews Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ Fn(div.title,C,'ATadresJeAerfasJen') G.C=C Fn(div.buttons,C,'AJ') ;with({C:G.C,V:G.C.V}){ record.read(C.V.account,C.V.record) G.C=C Fn(input.button,C,'AbaX46') ;with({C:G.C,V:G.C.V}){ Fn(input.info,C,'Aspeichern') G.C=C Fn(on.click,C,'ArecordCsaveDthisCTvCacJountBthisCTvCrecordE') G.C=C };G.C=C Fn(input.button,C,'AbaX74') ;with({C:G.C,V:G.C.V}){ Fn(input.info,C,'AzurhaXcksetzen') G.C=C Fn(on.click,C,'ArecordCreadDthisCTvCacJountBthisCTvCrecordEA') G.C=C };G.C=C Fn(input.button,C,'AbaX7J') ;with({C:G.C,V:G.C.V}){ Fn(input.info,C,'Aduplizieren') G.C=C Fn(on.click,C,'AthisCTvCrecordCidF8WadreC0Cews8WAK') G.C=C };G.C=C Fn(input.button,C,'AbaX47') ;with({C:G.C,V:G.C.V}){ Fn(input.info,C,'Alg4Xschen') G.C=C Fn(on.click,C,'ArecordCdeleteDthisCTvCacJountBthisCTvCrecordEbxXtabsCremoveDthisCTvCtabsTcardE') G.C=C };G.C=C Fn(input.button,C,'AbaX12J') ;with({C:G.C,V:G.C.V}){ Fn(input.info,C,'Aexit') G.C=C Fn(on.click,C,'AtabsCremoveDthisCTvCtabsTcardEARRL') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.table,C,'AJ') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.prompt,C,'ATidbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'Aid') ;with({C:G.C,V:G.C.V}){ C.readOnly=true G.C=C };G.C=C };G.C=C Fn(input.prompt,C,'ATanredebwXA') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AaJ') G.C=C };G.C=C Fn(input.prompt,C,'ATnamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'Aan') G.C=C };G.C=C Fn(input.prompt,C,'ATvornamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'Aav') G.C=C };G.C=C Fn(input.prompt,C,'ATadresJzeilebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'Aaz') G.C=C };G.C=C Fn(input.prompt,C,'ATplzbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'Aap') G.C=C };G.C=C Fn(input.prompt,C,'ATortbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'Aao') G.C=C };G.C=C Fn(input.prompt,C,'ATlandbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'Aal') G.C=C };G.C=C Fn(input.prompt,C,'ATtelefonbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AatA') G.C=C };G.C=C Fn(input.prompt,C,'ATmemobwXA') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'10JbbX') G.C=C Fn(input.memo,C,'Aam') G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} };G.C=C} record={} record.read=function(acc,rec) { var a,b,c a=db.read(acc,rec.id) a.ready=function() { b=JSON.parse(a.content) ;with({C:G.C,V:G.C.V}){ for (c in b) { rec[c]=b[c] } };G.C=C input.refresh("A") }} record.save=function(acc,rec) { var a,b,c,save1 console.log(rec) save1=function() { a=db.write(acc,rec.id,JSON.stringify(rec)) a.ready=function() { if (a.error) { alert(a.error) }}} if (at(rec.id,".0.")>0) { a=db.read(acc,rec.id) a.ready=function() { console.log(b=""+(this.content*1+1)) c=db.write(acc,rec.id,b) c.ready=function() { input.refresh("A") rec.id=rec.id.split(".0.").join("."+b+".") console.log(b+rec.id) save1() }}} else { save1() }} record.delete=function(acc,rec) { db.delete(acc,rec.id) input.refresh("A") } ; ;color ={} ; color.color = function(color) { //convert to rgba var color3 = color.slice(0,3).toUpperCase(); var color4 = color.slice(0,4).toUpperCase(); var color5 = color.slice(0,5).toUpperCase(); var rgba; var merge = function(R, G, B, A) { rgba= 'rgba('+R+', '+G+', '+B+', '+A+')' } // if (color.slice(0,1) == '#') { } else if (color4 == 'RGBA') { color = color.slice(5); color = color.slice(0,(color.length-1)) color = color.split(',') merge (color[0], color[1], color[2], color[3]) // } else if (color3 == 'RGB') { color = color.slice(5); color = color.slice(0,(color.length-1)) color = color.split(',') merge (color[0]*1, color[1]*1, color[2]*1, '1') // } else if (color4 == 'HSLA') { } else if (color3 == 'HSL') { } else if (color3 == 'HSV' || color3 == 'HSB') { } else if (color4 == 'CMYK') { } else if (color3 == 'LAB') { } else if (color5 == 'YPBPR' || color5 == 'YCBCR' || color3 == 'YUV') { } else if (color3 == 'XYZ') { } // return rgba } // // // // // // rgb(231, 105, 105) // rgba(231, 105, 105, 1) // hsl(0, 73%, 66%) // hsla(0, 73%, 66%, 1) // #E76969 // // Quelle axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c color.rgbToHsl = function(r, g, b) { eval('r /= 255, g /= 255, b /= 255; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; if(max == min){h = s = 0;}else{var d = max - min; s = l > 0.5 ? d/(2-max-min):d/(max + min); switch(max){case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break;}h /= 6;};') return ('hsl('+h+', '+s+', '+l+')') } ;compile ={} ; Function.prototype.valueOf1=function() { var a=this if (a.obj) { a=a.obj } return a.toString().toSrc() } Object.defineProperty(HTMLElement.prototype, "P", {get: function() { return this.parentElement}, set: function(p) {}}) // definiert getter für dom.P HTMLElement.prototype.child=function() //child(3,2,0) -> 0-tes Kind vom 2ten Kind vom 3ten Kind { var i=0,o=this while (i=0) { a=".f"+"unction." } return a } var fnPar=function(x) // Zeile mit {: { var a,b,c a=x.split("{")[0].split('"')[0].split("'")[0].split(":") if (a.length<2) { return x } b=a[0];c=x.substr(b.length+1) b="Fn("+b+",C,'"+c.toCode()+"')" return b } while(it) { y="}" if (lt.y<0) { // y="}(G.C);G.C=C" y=" };G.C=C" } lt=lt.lt;ob[2*i]=ob[2*i]+y } ob[2*i+1]=fnPar(x) y=ltyp(x) i++ } return ob.join(chr(10)) } String.prototype.toSrc=function(o) { console.log("deprecated - String.toSrc") if (!o) { o=this.toString() } o=o.split(chr(10)) var i=0,l=o.length,s=[],z,t=0 while (i1) { z=z.substr(1) c=z.substr(0,1) if (c=="{") { t++ } if (c=="}") { t-- }}} else { if (z.substr(0,3)=="Fn(") { z=z.split(",'") z=z[0].split(",C")[0].substr(3)+":"+z[1].split("')")[0].toData() } s.push(" ".repeat(t)+z) }} return s.join(chr(10)) } compile.init =function() { var x=Function.prototype if (!x.value) // Darf nur einmal initialisiert werden! { x.value=x.valueOf x.valueOf=function() { // Gibt die EWS-Form einer Funktion aus var a=this if (typeof(a.obj)=="function") { a=a.obj } return(a.value().toString().toSrc()) }}} compile.init() // Library initialisieren compile.scripts=function() { // alle ews-scripts im html-file ausführen var a=dom.byTag("script"),b for (b in a) { if (a[b].type=="text/ews") { eval(a[b].innerHTML.toObj()) }}} compile.srcToObj=function(s) { s=NoCr(ltrim(s+chr(10))) s=s.split(chr(10)) return o } compile.objToSrc=function(obj) { return s } ;css ={} ; css={} css.classes={} css.font=function(C,n) { n="@font-face" return css.tag(C,n) } css.style=function(C,n) { n=alltrim(n) C[C.length]=n } css.class=function(C,n) // definiert eine Klasse { n=alltrim(n) return css.tag(C,"."+n) } css.tag=function(C,n) { n=alltrim(n) C=css.classes[n]=[] G.C=C return C } css.import=function(C,n) // kopiert eine bestehende Klasse { n="."+alltrim(n) var i=0 n=css.classes[n] while (i o.content,o.error // myDb.ready=function(){console.log(myDb.content)} // myDb=db.write(myAcc, db.field=function(obj,fname) { Object.defineProperty(obj,fname,{get: function(){return this["_"+fname]},set: function(x){this["_"+fname]=x}}) } db.objToRec=function() { ; } db.open=db.def=function(dir,fname,key) { o={dir:dir,fname:fname,key:key} o.ready=function() { console.log(o) } return o } db.account=db.def=function(dir,key) { o={dir:dir,key:key} o.ready=function() { console.log(o) } return o } db.request=function(o) { var r=new XMLHttpRequest() var p="db.php"; if (o.cmd=="log"){p="log.php"} r.open("POST",p,true) r.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); r.onerror=function() { //o.onerror(o,r.error) } r.onload=function() { var a o.response=r.response a=at(o.response,"{") if (a>0) { console.log(substr(o.response,0,a)) } var x=JSON.parse(substr(o.response,a)) log(o) o.content=x.content o.error=x.error obj.ready(o) } obj.busy(o) r.send(JSON.stringify(o)) G.C=o return o } db.req=function(o) // Test für apps-script { var r=new XMLHttpRequest() r.open("POST",o.link,true) r.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); r.onerror=function() { //o.onerror(o,r.error) } r.onload=function() { var a o.response=r.response a=at(o.response,"{") var x=JSON.parse(substr(c,a)) log(o) o.content=x.content o.error=x.error obj.ready(o) } obj.busy(o) r.send(JSON.stringify(o.par)) G.C=o return o } // Alte Version db.log=function(o,txt) { o=o.junior();o.kze=o.kze;o.dir=o.dir; var t=""+time();l=localStorage if (!l.logStart) { l.logStart=t } o.content=t+","+l.logStart+","+txt+",";o.cmd="log";db.request(o);return o } db.add=function(o,f,r) { o=o.junior();o.kze=o.kze;o.dir=o.dir;o.key=o.key // Eigenschaften in Junior kopieren o.fname=f o.content=r;o.cmd="add";db.request(o);return o } db.read=function(o,f) { o=o.junior();o.kze=o.kze;o.dir=o.dir;o.key=o.key o.fname=f o.content="";o.cmd="read";db.request(o);return o } db.write=function(o,f,v) { o=o.junior();o.kze=o.kze;o.dir=o.dir;o.key=o.key o.fname=f o.content=v;o.cmd="write";db.request(o);return o } db.update=function(o,f,old,content) { o=o.junior();o.kze=o.kze;o.dir=o.dir;o.key=o.key o.fname=f;o.old=old o.content=content;o.cmd="update";db.request(o);return o } db.dir=function(o,f) { o=o.junior();o.kze=o.kze;o.dir=o.dir;o.key=o.key o.fname=f o.cmd="dir";db.request(o);return o } db.select=function(o,file,sel) // sel="meier,hans;müller,thun" { o.sel=sel;o.cmd="select";db.request(o);return(o) } db.rename=function(o,v1,v2) { o.v1=v1;o.v2=v2;o.cmd="rename";db.request(o);return } db.valToStr=function(f) { return JSON.stringify(f) } db.strToVal=function(s) { return JSON.parse(s) } db.objToRec=function(o) { var a,b=chr(2),c,r="" for (a in o) { r=r+a+"="+valToStr(o[a]) } return r } db.recToObj=function(r,o) { var a,b,c if (!o) { o={} } return o } db.sort=function(sel,$key) { var mykey=function($v) { with($v) { return eval($key) }} var mysort=function(a,b) { a=mykey(a);b=mykey(b) if (a>b){return 1} if (b>a){return -1} return 0 } sel.sort(mysort) } dbf={} // alte Funktionen dbf.delta=function(alt,neu) { // erstellt einen String mit den differenz-Infos von alt und neu var a=0,b,c,d=0,m,alt1=alt,neu1=neu alt=alt.split("") neu=neu.split("") // finde Gleichheit links a=dpos(alt,neu) // finde Gleichheit rechts b=dpos(alt.reverse(),neu.reverse()) if ((a+b)>neu.length) { b=neu.length-a } c=alt1.substr(a,alt.length-a-b) d=neu1.substr(a,neu.length-a-b) return([a,b,c,d].join(chr(2))) // Noch in Code-verwandeln!! function dpos (alt,neu) { // Unterfunktion zu d var a=0,m=min(alt.length,neu.length) if (m==0) { return 0 } while(alt[a]==neu[a]) { a++ if(a==m) { break }} return a }} dbf.strmut=function(alt,delta) { // macht aus alt einen String Neu mit den Differenz-Infos var a,b,c,n delta=delta.split(chr(2)) a=left(alt,delta[0]) b=delta[2] // Noch umwandeln !! n=delta[3] c=substr(alt,len(b)+1*delta[0]) if (substr(alt,delta[0],len(b))==b) { return (""+a+n+c) } if (substr(alt,len(alt)-len(b)-delta[1],len(b))==b) { a=left(alt,len(alt)-len(b)-delta[1]) return (""+a+n+right(alt,1*delta[1])) } log("strMutError: Old value not found") return alt } dbf.record=function(db) { // erstellt einen neuen Record zur DB obj.junior(P.record) } dbf.select=function(db,selkeys) { // erstellt eine Selektion aus einer Datenbank } dbf.sort=function(sel,sortExpr) { // Sortier eine Selektion } //db.php ;debug ={} ; debug.stack={p:0} debug.mode="" debug.init=function() { debug.lib=function(l) // startet Trace für alle Funktionen der Library { var a for (a in l) { if (l.hasOwnProperty(a)) { debug.function(l,a) }}} debug.all=function(C,x) // Startet den Debugger auf alle Libraries Parameter "call,return,stack" { debug.mode=x.toLowerCase() lib.all.tab.forEach(function(n){debug.lib(window[n])}) // erfasse alle bisherigen Libraries } debug.ftrace=function(lib,fnam) // führt ein Log der Funktion ein { // Die Library-Funktion wird nun immer indirekt über die Zwischenfunktion aufgerufen var fn=lib[fnam] // Aufrufzähler initialisieren if (fn.obj) return // keine verschachtelte debug-Umleitungen var tr=lib[fnam]=function() // Trace-Zwischenfunktion { var s=debug.stack debug.stack={s:debug.stack,p:debug.stack.p+1,arg:arguments,lib:lib.nam,function:fnam} //stack.arg[stack.p++]=arguments if (debug.mode.indexOf("call")>=0) { console.log((".".repeat(s.p+1))+" Call: "+lib.nam+"."+fnam,arguments) // parameter loggen } var r=fn.apply(this,arguments) tr.cnt++ if (debug.mode.indexOf("return")>=0) { console.log((".".repeat(s.p+1))+" Return: "+lib.nam+"."+fnam,r) // Rückgabewert } debug.stack=s return r } tr.obj=fn tr.cnt=0 return tr } debug.function=function(lib,fnam) // Initialisiert Trace für eine Funktion { if ((typeof lib[fnam])=="function") { console.log("debug: "+lib.nam+"."+fnam) debug.ftrace(lib,fnam) }} onerror=function(a,b,c,d,e,f) { // Normale Fehlerbehandlung console.log(e) console.log(a) console.log(b) console.log("Line: "+(c/2)) console.log("Character "+d) console.log(f) var s=debug.stack while(s) { console.log(s) s=s.s }}} ;demo ={} ; demo.card=function(C) { Fn(tabs.card,C,'AdemoCcard') ;with({C:G.C,V:G.C.V}){ C.V.record={line:"Zeile",memo:"Text"} G.C=C Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ Fn(div.title,C,'ATdemoATcard') G.C=C Fn(div.buttons,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'AbaX12J') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AtabsCremoveDeventCcurJentTtargetCTvCtabsTcardE') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'') ;with({C:G.C,V:G.C.V}){ Fn(input.table,C,'') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.prompt,C,'ATzeilebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'Aline') G.C=C };G.C=C Fn(input.prompt,C,'ATdatumbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.date,C,'Aline') G.C=C };G.C=C Fn(input.prompt,C,'ATtextbwX') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.memo,C,'Amemo') G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} demo.dir=function(C,dir) { Fn(tabs.card,C,'AbaX91') ;with({C:G.C,V:G.C.V}){ C.V.record={dir:dir,memo:""} G.C=C Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ Fn(div.title,C,'ATdirectoryabfrage') G.C=C Fn(div.buttons,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'AbaX91') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'ADTeventCtargetE') G.C=C };G.C=C Fn(input.button,C,'AbaX12J') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AeJFeventbxXtabsCremoveDeventCcurJentTtargetCTvCtabsTcardE') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'') ;with({C:G.C,V:G.C.V}){ Fn(input.table,C,'') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.prompt,C,'ATdirbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AdirA') G.C=C };G.C=C Fn(input.prompt,C,'ATdirectorybwX') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.memo,C,'Amemo') ;with({C:G.C,V:G.C.V}){ C.V.record.input=C // Eingabeelement im Record referenzieren G.C=C Fn(on.click,C,'ApgeditCselectionDthisE') G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C C.V.readDir() G.C=C };G.C=C} demo.icons=function(C) { Fn(tabs.card,C,'AbaX125ATicons') ;with({C:G.C,V:G.C.V}){ Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ Fn(div.buttons,C,'') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'AbaX12J') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AtabsCremoveDthisCTvCtabsTcardE') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'') ;with({C:G.C,V:G.C.V}){ Fn(demo.symbTab,C,'') G.C=C };G.C=C };G.C=C };G.C=C} demo.symbTab=function(C) { var a=0,b=1,c=29,d,e Fn(dom.table,C,'') ;with({C:G.C,V:G.C.V}){ d=C G.C=C };G.C=C while (a<15) { a++ b=0 dom.tr(d) ;with({C:G.C,V:G.C.V}){ e=C G.C=C };G.C=C while(b++<10) { c++ dom.td(e,dom.symbols("$"+c+"
"+c)) }}} ; ;demoCard ={} ; demoCard={} demoCard.card=function(C,n) { tabs.card(C,"$126 "+n,"demoCard") ;with({C:G.C,V:G.C.V}){ if (C.neu) { C.V.record={name:n,code:""} var myCard=C Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ Fn(div.title,C,'ATdemoATkarteikarte') G.C=C Fn(div.buttons,C,'AJ') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'AbaX12J') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AtabsCremoveDthisCTvCtabsTcardEARRM') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.table,C,'') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.prompt,C,'ATnamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AnameA') G.C=C };G.C=C Fn(input.prompt,C,'TdatumbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.date,C,'AnameA') G.C=C };G.C=C Fn(input.prompt,C,'ATcodebwX') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.memo,C,'ATtextA') ;with({C:G.C,V:G.C.V}){ C.style.fontFamily="monospace" G.C=C C.V.record.input=C G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} };G.C=C} ;demoDb ={} ; demoDb={} demoDb.card=function(C,n) { tabs.card(C,"$126 "+n,"demoDb") ;with({C:G.C,V:G.C.V}){ if (C.neu) { C.V.record={name:n,code:""} Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ div.title(C,"Demo DB "+n) G.C=C Fn(div.buttons,C,'AJ') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'Aread') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AdemoTdbCreadDthisEA') G.C=C };G.C=C Fn(input.button,C,'Awrite') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AdemoTdbCwriteDthisEAJ') G.C=C };G.C=C Fn(input.button,C,'AadJ') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AdemoTdbCadJDthisEAJ') G.C=C };G.C=C Fn(input.button,C,'Adelete') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AdemoTdbCdeleteDthisEA') G.C=C };G.C=C Fn(input.button,C,'AbaX12J') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AtabsCremoveDthisCTvCtabsTcardEARRM') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.table,C,'') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.prompt,C,'ATnamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AnameA') G.C=C };G.C=C Fn(input.prompt,C,'ATvornamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AnameA') G.C=C };G.C=C Fn(input.prompt,C,'ATnamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AnameA') G.C=C };G.C=C Fn(input.prompt,C,'ATnamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AnameA') G.C=C };G.C=C Fn(input.prompt,C,'ATcodebwX') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.memo,C,'ATtextA') ;with({C:G.C,V:G.C.V}){ C.style.fontFamily="monospace" G.C=C C.V.record.input=C G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} };G.C=C} demoDb.read=function(o) { db.read(o.V.account,o.V.record) } demoDb.write=function(o) { db.write(o.V.account,o.V.record) } demoDb.add=function(o) { db.add(o.V.account,o.V.record) } demoDb.delete=function(o) { db.delete(o.V.account,o.V.record) } ;div ={} ; div.init=function() { div.full=function(C,x) { var o=dom.create(C,"div",x,"divFull") return o } div.fix=function(C,x) { var o=dom.create(C,"div",x,"divFix") return o } div.title=function(C,x) { var o=dom.create(C,"div",x,"divTitle") return o } div.buttons=function(C,x) { var o=dom.create(C,"div",x,"divButtons") return o } div.dialog=function(C,x) { var o=dom.create(C,"div",x,"divDialog") return o } div.overflow=function(C,x) { var o=dom.create(C,"div",x,"divOverflow") return o }} ;dom ={} ; dom.init=function() { // Nötig für HTML5 - Darstellung dom.byTag("html")[0].style.height="100%" dom.byTag("body")[0].style.height="95%" } dom.define=function(C,x) { // Setzt eine ID C.id=x;return C } dom.select=function(C,x) { G.C=C var c=dom.byId(x) if (c) { G.C=c;c.id="i" } else { alert(x +" nicht gefunden") } return G.C } dom.create=function(C,x,i,s) // dom.create(C,element,innerHTML,class) { // Erstellt ein DOM-Element if (!i) i="" if (!s) s="" var o=document.createElement(x) if (i>" ") { o.innerHTML=dom.symbols(i) } o.id="i"+(sys.id++) if (s>" ") { o.classList.add(s) } o.V=C.V.junior() C.appendChild(o) G.C=o;return o } dom.text=function(C,x) { C.innerHTML+=x return C } dom.symbols=function(x) { var i=1,a x=x.split("$") while(i"+a.join(" ") x[i++]=b } return x.join("") } dom.import=function(c,s) { // ?? s=s.split(".") lib(c,s[0]+",abcdef") abcdef=function(C) { window[s[0]][s[1]](c) }} dom.fill=function(C,x) { // Füllt einen Container mit dem inneren Element aus dom.position(C,"absolute") dom.bottom(C,x) dom.top(C,x) dom.left(C,x) dom.right(C,x) } dom.img=function(C,x) { // erstellt ein Bild var o=dom.create(C,"img") o.src=x.split(" ").join("") return(o) } dom.fields=function(C,li,col) { var a=0,b=0,r,n var t=dom.table(C) t.className="ScreenFields" while(a++ 2) { var m=o.junior() m.file=a+"." m.onreadcomplete=function() { m.file=a+".manifest" m.text= "CACHE MANIFEST"+chr(10)+"#"+milliseconds()+chr(10)+"NETWORK:"+chr(10)+"CACHE:"+chr(10)+m.text m.write() } m.dir() }} host.onerror=function(r) { o=this alert("IO-Error File: "+o) return this } ;info ={} ; info.card=function(C) { tabs.type="library" dom.type="library" Fn(tabs.card,C,'ATinfoATcard') ;with({C:G.C,V:G.C.V}){ Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ Fn(div.title,C,'ATinfoATcard') G.C=C Fn(div.buttons,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(pgedit.button,C,'Alib1CinfoCjsA') G.C=C Fn(input.button,C,'Aexit') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AtabsCremoveDeventCtargetCTvCtabsTcardE') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(menu.container,C,'') ;with({C:G.C,V:G.C.V}){ Fn(on.select,C,'AmenusCstartDeventE') G.C=C Fn(menu.tree,C,'ATkurzreferenzen') ;with({C:G.C,V:G.C.V}){ Fn(info.kurzref,C,'') G.C=C };G.C=C Fn(menu.tree,C,'ATmemoryfunktionen') ;with({C:G.C,V:G.C.V}){ Fn(menu.tree,C,'ATobjektfunktionen') G.C=C Fn(menu.tree,C,'ATstringfunktionen') G.C=C Fn(menu.tree,C,'ATarJayfunktionen') G.C=C Fn(menu.tree,C,'ATdatumfunktionen') G.C=C };G.C=C Fn(menu.tree,C,'ATdialogfunktionenA') ;with({C:G.C,V:G.C.V}){ Fn(menu.tree,C,'ATdomfunktionen') ;with({C:G.C,V:G.C.V}){ Fn(info.dom,C,'') G.C=C };G.C=C Fn(menu.tree,C,'ATtabfunktionen') ;with({C:G.C,V:G.C.V}){ Fn(info.tabs,C,'') G.C=C };G.C=C Fn(menu.tree,C,'ATmenufunktionen') ;with({C:G.C,V:G.C.V}){ Fn(info.menu,C,'') G.C=C };G.C=C Fn(menu.tree,C,'ATeingabefunktionenA') ;with({C:G.C,V:G.C.V}){ Fn(info.input,C,'') G.C=C };G.C=C };G.C=C Fn(menu.tree,C,'ATprintfunktionen') ;with({C:G.C,V:G.C.V}){ Fn(info.print,C,'') G.C=C };G.C=C Fn(menu.tree,C,'ATgeplanteAfunktionen') ;with({C:G.C,V:G.C.V}){ Fn(info.geplant,C,'') G.C=C };G.C=C Fn(menu.tree,C,'ATbugs') ;with({C:G.C,V:G.C.V}){ Fn(info.bugs,C,'') G.C=C };G.C=C //info.object(C,window) G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} info.kurzref=function(C) { Fn(menu.tree,C,'ATaAFA8WaktuelJesATobjekt8W') Fn(menu.tree,C,'ATbAFA8Wbody8WA') Fn(menu.tree,C,'ATcAFA8WTactCATcontainer8W') Fn(menu.tree,C,'ATdAFA8Wdocument8W') Fn(menu.tree,C,'ATgAFA8WTglobaleATvariablen8W') Fn(menu.tree,C,'ATlAFA8WTlibrary8W') Fn(menu.tree,C,'ATpAFA8WTparentAdesATdombjXTobjekts8W') Fn(menu.tree,C,'ATsAFA8WTsystembjXTunterobjekt8W') Fn(menu.tree,C,'ATvAFA8WTvariablenAzumATdombjXTobjekt8W') Fn(menu.tree,C,'ATwAFA8Wwindow8WA') } info.dom=function(C) { return } info.menu=function(C) { return } info.input=function(C) { Fn(menu.tree,C,'AinputCtablebwXA') Fn(menu.tree,C,'AinputCpromptbwXATname') Fn(menu.tree,C,'AinputClinebwXAvar') Fn(menu.tree,C,'AinputCmemobwXAvar') Fn(menu.tree,C,'AinputCdatebwXAvar') Fn(menu.tree,C,'AinputCselectbwXAvar') } info.tabs=function(C) { Fn(menu.tree,C,'AtabsCcontainerDTcEA') Fn(menu.tree,C,'AtabsCcardDtabsTcontainerBTtitelE') Fn(menu.tree,C,'AtabsCselectDtabsTcardE') Fn(menu.tree,C,'AtabsCremoveDtabsTcardEA') } info.print=function(C) { Fn(menu.tree,C,'AprintCdivDTcEA') } info.geplant=function(C) { Fn(menu.tree,C,'ATpasJworteingabeADohneAhtJpsE') Fn(menu.tree,C,'ATdatumeingabeADTsystemhaXbergreifendE') } info.bugs=function(C) { Fn(menu.tree,C,'ATleJrzeilenAinATlibraryAbewirkenATcompilerfehler') Fn(menu.tree,C,'ATdopJelpunktAinATkomJentarenAbewirktATfehler') } info.object=function(c,o) { var n=Object.getOwnPropertyNames(o),i=0,a,b,c1,C=0 while (i"+x+"") G.C=C a.style.textAlign="right" G.C=C a.style.verticalAlign="top" G.C=C a.style.width="5%" G.C=C b=dom.create(C,"td") G.C=C };G.C=C G.C=b;b.row=a return b } input.init=function(C,x) { if (x>" ") { C.varName=x C.name="A" C.onfocus=input.read C.onblur=input.write C.onfocus() }} input.read=function() { var o,r,p,v o=this r=o.V.record o.record=r v=r.val(o.varName) if (o.oldValue!=v) { o.oldValue=v } if (o.oldValue!=o.value) { o.value=o.oldValue }} input.update=function(C) { C.onfocus() } input.write=function(C) { var v,o=this v=o.record.val(o.varName) // Objekt aus dem gelesen wurde! if (o.value != v) { o.record.val(o.varName,o.value) }} input.wide=function(C,x) { var a dom.create(C,"tr","") ;with({C:G.C,V:G.C.V}){ a=dom.create(C,"td",x) G.C=C a.colSpan="2" G.C=C };G.C=C G.C=a return a } input.buttons=function(C,x) { var a a=dom.fix(C,"") ;with({C:G.C,V:G.C.V}){ C.style.top=C.style.right="10px" G.C=C };G.C=C return a } input.button=function(C,x) { return dom.create(C,"button",x,"inputButton") } // input.number = function(C, x) { var r=input.line(C,x,"inputLine") r.type="number" return r } input.h_range = function(C) { var div = dom.create(C,"div","","") var range = dom.create(div,"input","","inputRange") range.type = 'range' range.style.marginLeft = '0,5px' range.set_width = function (x) { div.style.width= x range.style.width= x } range.set_height = function (x) { div.style.height= x range.style.height= x } return (range) } input.v_range = function(C) { var div = dom.create(C,"div","","") var range = dom.create(div,"input","","inputRange") range.type = 'range' range.style.transform = "rotate(270deg)"; range.set_width = function (x) { div.style.width= x range.style.height= x correct(div, range) } range.set_height = function (x) { div.style.height= x range.style.width= x correct(div, range) } var correct = function(div, range) { range.style.marginLeft = ((((div.style.height.split('px')[0])/2)-((div.style.width.split('px')[0])/2))*-1+ 'px') range.style.marginTop = ((((div.style.height.split('px')[0])/2)-((div.style.width.split('px')[0])/2))-0.5+ 'px') } return (range) } // input.line=function(C,x) { var r=dom.create(C,"input",x,"inputLine") input.init(r,x) r.autocomplete="off" return r } input.password=function(C,x) { var r=input.line(C,x,"inputLine") r.type="password" return r } input.memo=function(C,x) { var r=dom.create(C,"textarea",x,"inputMemo") input.init(r,x) return r } input.flag=function(C,x) { var r=dom.create(C,"input",x) input.init(r,x) return r } input.date=function(C,x) { var r=dom.create(C,"input",x,"inputDate") //r.type="date" r.type="date" // Date Picker funktioniert mit einem Texetfeld //C.onclick=function(e) // var c=e.target // if (G.last.click==c) // c.ondblclick(c) // neu für Picker input.init(r,x) input.datePicker(C) return r } input.select=function(C,x) { var r=dom.create(C,"select","","inputSelect") input.init(r,x) r.onfocus() return r } input.option=function(C,x) { x=(x+"="+x).split("=") //var r=dom.create(C,"option") C.options[C.options.length]=new Option(x[1],x[0]) return C } input.refresh=function input_refresh(nam) { var i,o,a=document.getElementsByName(nam) i=a.length while(i--) { o=a[i] if (o.onfocus) { o.onfocus() }}} input.code=function(C,v) { var d=dom.div(C) ;with({C:G.C,V:G.C.V}){ C.setAttribute("class","inputCode") G.C=C //C.onscroll=input.code.scroll G.C=C Fn(dom.div,C,'') ;with({C:G.C,V:G.C.V}){ C.setAttribute("class","inputCodeLineOuter") G.C=C Fn(input.memo,C,'') ;with({C:G.C,V:G.C.V}){ C.setAttribute("class","inputCodeLine") G.C=C C.setAttribute("readonly","1") G.C=C input.code.lineNums(C,1) G.C=C };G.C=C };G.C=C Fn(dom.div,C,'') ;with({C:G.C,V:G.C.V}){ C.setAttribute("class","inputCodeTextOuter") G.C=C input.memo(C,v) ;with({C:G.C,V:G.C.V}){ C.spellcheck=false G.C=C C.setAttribute("class","inputCodeText") G.C=C C.onkeyup=input.code.keyup G.C=C C.onscroll=input.code.scroll G.C=C };G.C=C };G.C=C Fn(dom.div,C,'') ;with({C:G.C,V:G.C.V}){ C.style.clear="both" G.C=C };G.C=C C.onfocus=function() { var ta=this.childNodes[1].firstChild ta.onfocus() log("input.memo onfocus()") ta.onkeyup() } };G.C=C G.C=d return d } input.code.keyup=function() { var l=nocr(this.value).split("\n").length,lm=this.parentNode.parentNode.firstChild.firstChild,d if(!this.lastLength) { this.lastLength=1 //this.origHeight=this.scrollHeight //this.resizeSteps=1 } if(l>this.lastLength) { input.code.lineNums(lm,l) //lm.parentNode.style.height=this.scrollHeight+"px" //this.parentNode.style.height=this.scrollHeight+"px" // if(this.scrollHeight>this.origHeight) // this.resizeSteps++ // this.parentNode.parentNode.style.overflow="auto" } if(lthis.origHeight) // lm.parentNode.style.height=this.scrollHeight-d+"px" // this.parentNode.style.height=this.scrollHeight-d+"px" // this.resizeSteps-- //else // this.parentNode.parentNode.style.overflow="hidden" } this.lastLength=l var e={} e.target=this input.code.scroll(e) } input.code.lineNums=function(C,l) { var a=[] for(var i=1;i<=l;i++) { a.push(i) } C.value=a.join("\n") } input.code.scroll=function(e) { var linememo=e.target.parentNode.parentNode.firstChild.firstChild linememo.scrollTop=e.target.scrollTop } input.datePicker = function (elem) { var datum = new Date(); var css_class = {}; css_class.border = 'inputButton'; //css_class.pageBackground = ;//Abdunkel der Seite //css_class.background = ;// datePicker Hintergrund //css_class.cell = ;// Kanlender Tabelle Zelle //css_class.pasive_cell = ;// Zelle vor, nach Monat //css_class.highlight_cell = ;// Aktuelles Datum // var background = document.createElement('div'); document.body.appendChild(background); background.style.position = 'absolute'; background.style.top = '-10%'; background.style.left = '-10%'; background.style.overflow = 'hidden'; background.style.zIndex = '100'; background.style.opacity = "0.3"; background.style.background = 'grey' background.style.width = '110%'; background.style.height = '110%'; background.style.display = 'none'; background.style.transition = 'opacity 1s'; // var picker = document.createElement('div'); document.body.appendChild(picker); picker.style.position = 'absolute'; picker.style.background = '#FFFFFF'; picker.style.border = '1px solid'; picker.style.zIndex = '100'; picker.style.margin = '-5px'; picker.style.display = 'none'; picker.style.top = (elem.offsetTop*1) + (elem.clientHeight*1)+ 9 +'px'; picker.style.left = elem.offsetLeft + 4 + 'px'; picker.style.transition = 'opacity 1s'; picker.style.userSelect= 'none'; picker.style.borderRadius = "5px"; // var nav_month_year = document.createElement('div'); // zurüch, aktueller Monat, weiter picker.appendChild(nav_month_year); nav_month_year.className = css_class.border; nav_month_year.style.background = 'grey'; nav_month_year.style.borderRadius = '0px'; nav_month_year.style.borderTopLeftRadius = "5px"; nav_month_year.style.borderTopRightRadius = "5px"; nav_month_year.style.textAlign = "center"; nav_month_year.style.fontSize = '25px'; nav_month_year.style.height = '30px'; // var nav_year_back = document.createElement('div'); // zurück nav_month_year.appendChild(nav_year_back); nav_year_back.innerHTML = "A"; nav_year_back.className = 'symbols'; nav_year_back.style.float = 'left'; nav_year_back.style.width = '40px'; nav_year_back.onclick = function(){picker_start(year_minus(datum))}; // var nav_month_back = document.createElement('div'); // zurück nav_month_year.appendChild(nav_month_back); nav_month_back.innerHTML = "@"; nav_month_back.className = 'symbols'; nav_month_back.style.float = 'left'; nav_month_back.style.width = '20px'; nav_month_back.onclick = function(){picker_start(month_minus(datum))}; // var nav_month_name = document.createElement('div'); nav_month_year.appendChild(nav_month_name); nav_month_name.innerHTML = "Monat"; nav_month_name.style.float = 'left'; nav_month_name.style.textAlign = 'center'; nav_month_name.style.width = '200px'; // var nav_year_forward = document.createElement('div'); nav_month_year.appendChild(nav_year_forward); nav_year_forward.innerHTML = "G"; nav_year_forward.className = 'symbols'; nav_year_forward.style.float = 'right'; nav_year_forward.style.width = '40px'; nav_year_forward.onclick = function(){picker_start(year_plus(datum));} // var nav_month_forward = document.createElement('div'); nav_month_year.appendChild(nav_month_forward); nav_month_forward.innerHTML = "H"; nav_month_forward.className = 'symbols'; nav_month_forward.style.float = 'right'; nav_month_forward.style.width = '20px'; nav_month_forward.onclick = function(){picker_start(month_plus(datum));} // var nav_calendar = document.createElement ('div'); picker.appendChild(nav_calendar); // // Events // elem.onclick = function(){picker_start();} background.onclick = function(){picker_stop();} // var initial_type; //Type des Feldes (txt, Date) // var picker_start = elem.ondblclick = function (dat2) { //initial_type = elem.blur(); nav_calendar.innerHTML = '' // Alte Tabelle Entfernen picker.style.opacity = '0.00' picker.style.opacity = '1.00' picker.style.display = ''; background.style.opacity = '0.00' background.style.display = ''; background.style.opacity = '0.30' var dat; try{dat = date.date(elem.value)}catch(err) {dat = date.date()} if (!(!dat2 || 0 === dat2.length)){dat = dat2; console.log('true');} datum = dat; create_Table(nav_calendar, dat); var tmp_year = dat.getFullYear()+''; //tmp_year = tmp_year.slice(2); nav_month_name.innerHTML = date.month(dat) + ' ' + tmp_year; console.log(dat); } // var picker_stop = function (dat, cell, startDateCell) { if (startDateCell) { startDateCell.style.border = '0px solid'; } if (cell) { cell.style.background = '#FFFFFF' cell.style.border = '1.5px solid'; } picker.style.opacity = '0.00' background.style.opacity = '0.00' setTimeout(function() { background.style.display = 'none'; picker.style.display = 'none'; picker.style.opacity = '1.00'; background.style.opacity = "0.3"; } , 1000); //background.style.display = 'none'; //picker.style.display = 'none'; if (!(!dat || 0 === dat.length)){elem.value = date.dmj(dat)} } // var create_Table = function (elem, dat) { var table = document.createElement('table'); elem.appendChild(table); var tr_days = document.createElement ('tr'); table.appendChild(tr_days); tr_days.innerHTML = 'MoDiMiDoFrSaSo'; var i2 = 7; var woche; dat = date.date(dat); var startDateCell; var startDate = dat; //output = []; var start = date.dmj(dat).split('.'); start[0] = '1'; start = start.join('.') var wday = date.date(start).getDay(); var offset = (wday - 1); if (offset == -1 ){offset = 6;} start = date.date(start); // Gehe zurück bis Montag start = new Date(start - (offset*24*60*60*1000)); //console.log('start: ' + start); // var addDay = function (main) { if (i2 == 7) { //console.log('true'); woche = document.createElement('tr'); table.appendChild(woche); i2 = 0; } var cell = document.createElement('td'); cell.innerHTML = i.getDate(); cell.style.height = '12px'; cell.style.width = '35px'; cell.style.textAlign = 'right'; cell.style.border = '1px solid'; cell.style.borderColor = '#c0c0c0'; var dat = (date.date(date.dmj(i))); cell.onclick = function (){picker_stop(dat, this, startDateCell)}; if (main == true) { cell.style.backgroundColor = '#c5c5c5'; cell.style.borderColor = '#000000'; } console.log((date.dmj(startDate)) + ' : ' + date.dmj(i)); if ((date.dmj(startDate)) == date.dmj(i)) { startDateCell = cell console.log('blue'); cell.style.backgroundColor = '#c5c5c5'; } cell.style.border = '1px solid'; cell.style.borderColor = '#c0c0c0'; cell.style.padding = '4px'; woche.appendChild(cell) //elem i.setDate(i.getDate() + 1) // Plus 1 Tag i2++; } //return output; // var i = start; // i aktuall verarbeidendes Datum // Pre Monat while (offset > 0) { addDay(false); offset--; } // // Monat while (i.getMonth() == dat.getMonth()) //!! Januar = 0 { addDay(true) } // // su Monat while (!(i.getDay()== 1)) // Solange nicht Mo { addDay(false) } // startDateCell.style.border = '1.5px solid'; //startDateCell.style.backgroundColor = '#FFFFFF'; // console.log(startDateCell) // } var month_minus = function(dat) { dat = date.dmj(dat); dat = dat.split('.'); dat[0] = dat[0]*1; dat[1] = dat[1]*1; dat[2] = dat[2]*1 if(dat[1] == 1) { dat[1] = '12'; dat[2] = ((dat[2]*1) - 1)+''; } else { dat[1] = (dat[1]*1) -1; } dat = dat.join('.'); dat = date.date(dat); return (dat); } // var month_plus = function (dat) { dat = date.dmj(dat); dat = dat.split('.'); dat[0] = dat[0]*1; dat[1] = dat[1]*1; dat[2] = dat[2]*1; if(dat[1] == 12) { dat[1] = '1'; dat[2] = ((dat[2]*1) + 1)+''; } else { dat[1] = (dat[1]*1) +1; } dat = dat.join('.'); dat = date.date(dat); return(dat); } // var year_minus = function(dat) { dat = date.dmj(dat); dat = dat.split('.'); dat[0] = dat[0]*1; dat[1] = dat[1]*1; dat[2] = dat[2]*1 dat[2] = dat[2] -1 dat = dat.join('.'); dat = date.date(dat); return (dat); } // var year_plus = function (dat) { dat = date.dmj(dat); dat = dat.split('.'); dat[0] = dat[0]*1; dat[1] = dat[1]*1; dat[2] = dat[2]*1 dat[2] = dat[2] +1 dat = dat.join('.'); dat = date.date(dat); return (dat); }} input.fileDrop = function(C,text) { div = dom.create(C,"div") //temp. global div.style.width = '100px' div.style.height = '100px' div.style.background = '#888' div.style.textAlign = 'center' div.innerText = text var text=document.createElement("p") div.appendChild(text) div.ondragover = function(ev) { ev.preventDefault(ev) } div.ondrop = function(ev) { ev.preventDefault(ev) file = ev.dataTransfer.files[0], //temp. global text.innerHTML = 'Datei '+file.name+' wird geladen' reader = new FileReader() //temp. global reader.onload = function (e) { text.innerHTML = ''+file.name+': '+filesize(file.size) div.file = {} div.file.content = event.target.result div.file.name = file.name div.file.size = file.size div.oninput(div.file) } reader.readAsDataURL(file); //console.log(file) } filesize= function (size, elem) { if (size/(1024^2)/(1024^2) > 1) { size = size/(1024^2)/(1024^2) size = Math.round(size * 100)/100 return (size+ ' MB geladen') } else if ((size/(1024^2)) > 1) { size = size/(1024^2) size = Math.round(size * 100)/100 return (size+ ' KB geladen') } else { return (size+ ' B geladen') }} //console.log(div) return div } ;lib ={} ; lib.init=function() { lib.account=account lib.db=db lib.debug=debug lib.demo=demo lib.div=div lib.dom=dom lib.event=event lib.ews=ews lib.host=host lib.info=info lib.input=input lib.log=log lib.load=load lib.menu=menu lib.printer=printer lib.style=style lib.tabs=tabs lib.util=util lib.win=win } ;load ={} ; load={} load.filetime=""+time() load.time=time() load.click=function() { var t=time() if ((t-5000)>load.time) { load.time=t var f=load.request("req.php?gc"+load.filetime) ;with({C:G.C,V:G.C.V}){ f.ready=function(txt) { f.files=txt.split(chr(10)) load.filetime=f.files[0] var n=f.files.length console.log(txt) var fn,el,ei while (--n>0) { console.log(fn=f.files[n]) el=document.getElementsByName("html."+fn) ei=el.length while(ei--) { load.html(el[ei],fn) // HTML Inhalt neu laden }}} };G.C=C} //alert(document.getElementsByName("html.elrafa.restaurant.telnr.htm").length) } load.request=function(file) // erstellt den Request für IO { var r=new XMLHttpRequest() r.open("GET",file,true) r.onload=function(x) { r.value=r.responseText log("onload"+r.responseText) r.ready(r.responseText) } r.send() return r } load.html=function(C,fnam) { // lädt file(fnam) als C.innerHTML var o=load.request(fnam+"?"+time()) log("load:"+fnam) o.ready=function(txt) { log(txt) C.innerHTML=txt C.setAttribute("name","html."+fnam) C.contentEditable=load.editable(fnam) }} load.get=function(f) // load.get("filename")-> { var o={} if (f) var r=o.request() r.onload=function() { o.text=r.responseText } //r.onerror=o.onerror r.send() G.C=o return o } load.editable=function(fnam) // Prüft ob User angemeldet { if (server.user=="pst") { return true } return false } load.lib=function(name) { // } a=1 ;log ={} ; log=console.log // Journal // 26.01.17 domElement.child(a,b,c) // 26.01.17 domElement.P.P // Geplant // Libraries str,obj,print, // styles, include // demo.account.js // demo.login // demo. // acc=account.open(Account,User,Key) // account.output(obj,vName) // account.input(obj,vName,value) ;menu ={} ; menu.container=function(c) { var div=dom.create(c,"div","","menuContainer") div.setAttribute("lib","menu") div.setAttribute("autoclose","1") div.setAttribute("ismenucont","1") return div } menu.tree=function(c,x) { var table=dom.create(c,"table","","menuTree") var tr=dom.create(table,"tr","","") var tr2=dom.create(table,"tr","","") var td1=dom.create(tr,"td","","") var icon=dom.create(td1,"div","e","menuIconClosed") var td2=dom.create(tr,"td","","") var link=dom.create(td2,"a",x,"menuLinkOpen") link.setAttribute("ismenulink","1") link.setAttribute("onclick","menu.onclick(event)") var td3=dom.create(tr2,"td","","") var td4=dom.create(tr2,"td","","") td4=dom.create(td4,"div","","") td4.setAttribute("class","menuTree") // zu entfernen td4.style.opacity="0" td4.style.maxHeight="0" td4.style.overflow="hidden" td4.style.transition="all 0.7s" // td4.setAttribute("istreecont","1") link.setAttribute("displaystate","0") table.setAttribute("istree","1") G.C=td4 return td4 } menu.item=function(c,x) { var mopt,mtext if(x.split("=").length>1) { mopt=x.split("=")[0] mtext=x.split("=")[1] } else { mopt=mtext=x } var table=dom.create(c,"table","","menuItem") var tr=dom.create(table,"tr","","") var tr2=dom.create(table,"tr","","") var td1=dom.create(tr,"td","","") var icon=dom.create(td1,"div","e","menuIconClosed") var td2=dom.create(tr,"td","","") var link=dom.create(td2,"a",mtext,"menuLinkOpen") link.setAttribute("ismenulink","1") link.setAttribute("ismenuitem","1") link.setAttribute("mopt",mopt) link.setAttribute("onclick","menu.onclick(event)") var td3=dom.create(tr2,"td","","") var td4=dom.create(tr2,"td","","") td4=dom.create(td4,"div","","") td4.setAttribute("class","menuItem") // zu entfernen td4.style.opacity="0" td4.style.maxHeight="0" td4.style.overflow="hidden" td4.style.transition="all 0.7s" // td4.setAttribute("isitemcont","1") link.setAttribute("displaystate","0") table.setAttribute("isitem","1") G.C=td4 return td4 } menu.treeDisplay=function(el) { var ac=menu.getNextAutoClose(el) if(ac=="1") { if(el.getAttribute("displaystate")=="0" && el.getAttribute("ismenuitem")==null) { menu.openLevelTree(el) } else { menu.closeTree(el) }} else { if(el.getAttribute("displaystate")=="0" && el.getAttribute("ismenuitem")==null) { menu.openTree(el) } else { menu.closeTree(el) }}} menu.onclick=function(e) { if(e.target.getAttribute("ismenuitem")!=null) { e.mopt=e.menuOption=e.target.getAttribute("mopt") menu.getMenuCont(e.target).onselect(e) } e=e.target if(e.getAttribute("ismenulink")!=null) { //alert(menu.getNextAutoClose(e)) menu.treeDisplay(e) }} menu.getNextAutoClose=function(el) { var ac while(true) { ac=el.getAttribute("autoclose") if(ac!=null) { return ac } el=el.parentNode }} menu.getMenuCont=function(el) { while(true) { if(el.getAttribute("ismenucont")!=null) { return el } el=el.parentNode }} menu.autoClose=function(C,v) { C.setAttribute("autoclose",v) } menu.getIcon=function(el) { return el.parentNode.parentNode.firstChild.firstChild // td2->tr1->table->tr1->td1->div } menu.getCont=function(el) { return el.parentNode.parentNode.parentNode.lastChild.lastChild.firstChild //->td2->tr1->table->tr2->td4->div } menu.getLink=function(table) { return table.firstChild.lastChild.firstChild } menu.openTree=function(el) { var mcs=menu.getCont(el).style mcs.opacity="1" mcs.maxHeight=menu.getCont(el).scrollHeight+"px" menu.setHeight(el) el.setAttribute("displaystate","1") var icon=menu.getIcon(el) icon.setAttribute("class","menuIconOpen") icon.innerHTML="f" } menu.closeTree=function(el) { var mcs=menu.getCont(el).style mcs.opacity="0" mcs.maxHeight="0" mcs.overflow="hidden" el.setAttribute("displaystate","0") var icon=menu.getIcon(el) icon.setAttribute("class","menuIconClosed") icon.innerHTML="e" } menu.getParentCont=function(el) { return el.parentNode.parentNode.parentNode.parentNode // td2->tr1->table->div } menu.setHeight=function(el) { var p=menu.getParentCont(el) if(p.getAttribute("istreecont")!=null) { p.style.maxHeight=menu.getCont(p).scrollHeight+menu.getCont(el).scrollHeight+"px" //log(p.style.maxHeight) menu.setHeight(p.parentNode.parentNode.parentNode.firstChild.lastChild.firstChild) //->td4->tr2->table->tr1->td2->link }} menu.openAll=function(m) { var a=[] menu.getAllTreeCont(m,a) for(var i=0;itd->tr->table->div->children for(var i=0;i=0) { item=a[i] break }} while(item.getAttribute("ismenucont")==null) { if(item.getAttribute("istree")!=null) { menu.openTree(menu.getLink(item)) } item=item.parentNode }} ;menus ={} ; menus.admin=function(C) { tabs.card(C,"Menu") ;with({C:G.C,V:G.C.V}){ Fn(input.info,C,'AThauptmenu') G.C=C C.library="lib1.menues.js" G.C=C Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ Fn(div.title,C,'AThauptmenuARQ') G.C=C Fn(div.buttons,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(pgedit.button,C,'Alib1CmenusCjsA') G.C=C Fn(input.button,C,'Alogout') ;with({C:G.C,V:G.C.V}){ C.set("title","Tab entfernen") G.C=C Fn(on.click,C,'AofJiceClogoutDeventE') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'') ;with({C:G.C,V:G.C.V}){ Fn(menu.container,C,'') ;with({C:G.C,V:G.C.V}){ Fn(on.select,C,'AmenusCstartDeventE') G.C=C Fn(menu.tree,C,'ATadresJverwaltung') ;with({C:G.C,V:G.C.V}){ Fn(menu.item,C,'ArecordsCadresJDTcB8WJEAJFbaX9JAJTadresJeAerfasJen') G.C=C Fn(menu.item,C,'ATadresJeAsuchenAJ') G.C=C Fn(menu.item,C,'ATadresJenAdrucken') G.C=C };G.C=C Fn(menu.tree,C,'ATbuchJaltung') ;with({C:G.C,V:G.C.V}){ Fn(menu.item,C,'ArecordsCbuchungDTcB8WJEAFTbuchungAerfasJen') G.C=C Fn(menu.item,C,'ATbuchungAsuchen') G.C=C Fn(menu.item,C,'ATbuchungAdrucken') G.C=C };G.C=C Fn(menu.tree,C,'ATentwicklung') ;with({C:G.C,V:G.C.V}){ Fn(menu.item,C,'AdemoCdirDTcB8WJEARRMFTdirectory') G.C=C Fn(menu.item,C,'AinfoCcardDTcB8WJEARRLFTewsATinfos') G.C=C Fn(menu.item,C,'ApgeditCcardDTcB8WJEARRJFTprogramJeditor') G.C=C Fn(menu.item,C,'ApgeditCcardDTcB8WewsCgeplantCdat8WEAMFTgeplanteATfunktionen') G.C=C Fn(menu.item,C,'ApgeditCcardDTcB8WewsCerJorsCdat8WEANFTewsAbekanJteATfehler') G.C=C Fn(menu.item,C,'ApgeditCcardDTcB8WlogCjuriCdat8WEAPFTlogATjuri') G.C=C Fn(menu.item,C,'ApgeditCcardDTcB8WlogCthomasCdat8WEANFTlogATthomas') G.C=C Fn(menu.item,C,'ApgeditCcardDTcB8WlogCpaulCdat8WEAPFTlogATpaulA') G.C=C };G.C=C Fn(menu.tree,C,'Astr') ;with({C:G.C,V:G.C.V}){ Fn(menu.item,C,'AleftDstrBlenE') G.C=C Fn(menu.item,C,'ArightDstrBlenE') G.C=C Fn(menu.item,C,'AsubstrDstrBposBlenE') G.C=C };G.C=C Fn(menu.tree,C,'Adom') ;with({C:G.C,V:G.C.V}){ Fn(menu.tree,C,'Adiv') ;with({C:G.C,V:G.C.V}){ Fn(dom.text,C,'AdivDTcBhtmlBclasJEA') G.C=C };G.C=C Fn(menu.tree,C,'Asubstr') ;with({C:G.C,V:G.C.V}){ Fn(dom.text,C,'AsubstrDstrBposBlenEA') G.C=C };G.C=C Fn(menu.tree,C,'Adiv') ;with({C:G.C,V:G.C.V}){ Fn(dom.text,C,'AdivDTcBhtmlBclasJEA') G.C=C };G.C=C Fn(menu.tree,C,'Asubstr') ;with({C:G.C,V:G.C.V}){ Fn(dom.text,C,'AsubstrDstrBposBlenEA') G.C=C };G.C=C Fn(menu.tree,C,'Adiv') ;with({C:G.C,V:G.C.V}){ Fn(dom.text,C,'AdivDTcBhtmlBclasJEA') G.C=C };G.C=C Fn(menu.tree,C,'Asubstr') ;with({C:G.C,V:G.C.V}){ Fn(dom.text,C,'AsubstrDstrBposBlenEbyXbrb0X') G.C=C Fn(dom.text,C,'AsubstrDstrBposBlenEbyXbrb0X') G.C=C Fn(dom.text,C,'AsubstrDstrBposBlenEA') G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} menus.start=function(event) { var t=event.target,h=t.innerHTML C=t.get("sysCont") eval(event.mopt) } ;obj ={} ; obj.busy=function obj_busy(o) { if (! o.busy) { o.busy=1 } else { ++ o.busy }} obj.ready=function obj_ready(o,v,e) { if((--o.busy)==0) { log("ready: "+o.fName) if (o.ready) { o.ready(v,e) }}} obj.junior=function obj_junior(o) { return Object.create(o) } obj.senior=function obj_senior(o) { return Object.getPrototypeOf(o) } obj.clear=function(o) // löscht alle Eigenschaften im Objekt { var a for (a in o) { if (o.hasOwnProperty(a)) { delete o[a] }}} obj.copy=function(src,dest) { var a for (a in src) { if (src.hasOwnProperty(a)) { dest[a]=src[a] }}} ;objects ={} ; /* login ;with({C:G.C,V:G.C.V}){ pw G.C=C name G.C=C };G.C=C adre ;with({C:G.C,V:G.C.V}){ ai = Index G.C=C aa = Anrede G.C=C ab = Briefanrede G.C=C an = Name G.C=C av = Vorname G.C=C az = Zeile G.C=C ap = Plz G.C=C ao = Ort G.C=C al = Land G.C=C };G.C=C comm fibu ;with({C:G.C,V:G.C.V}){ bi = Index G.C=C bd = Buchungsdatum G.C=C - G.C=C bb = Betrag G.C=C bt = Text G.C=C bk = Konto G.C=C ba = Adress-Nr G.C=C };G.C=C rechnung ;with({C:G.C,V:G.C.V}){ bi = Index G.C=C bd = Datum G.C=C - G.C=C ra = Anzahl G.C=C rs = Suchbegriff G.C=C rp = Preis G.C=C };G.C=C */ ;office ={} ; office.search=function(C,tit,ltit) { tabs.card(C,tit) // Karte in Container C mit Titel tit erstellen ;with({C:G.C,V:G.C.V}){ C.set("myCard") // Referenz zu Karte speichern G.C=C Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ div.title(C,ltit) G.C=C Fn(div.buttons,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'Asuchen') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AloginCtestDeventEA') G.C=C };G.C=C Fn(input.button,C,'AexitA') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'ArecordsCbuchungDeventCtargetCgetD8WsysTcont8WEJ') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'ARKblXJAdefiniereAdenAdialogbjXTcontainer') ;with({C:G.C,V:G.C.V}){ V.record={} G.C=C Fn(input.table,C,'') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.prompt,C,'ATsuchbegrifJebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AsearchAJ') G.C=C };G.C=C Fn(input.prompt,C,'ATresultatebwX') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.memo,C,'AfoundA') G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} office.menu=function(C) { Adressen Aufträge Artikel Buchhaltung Personal ;with({C:G.C,V:G.C.V}){ Stamm G.C=C Monatsdaten G.C=C Auswertungen G.C=C };G.C=C} ;on ={} ; on.init=function() { var a="blur,error,focus,load,resize,scroll,beforeunload,hashchange,languagechange,message,offline,online,pagehide,pageshow,popstate,rejectionhandled,storage,unhandledrejection,unload,abort,cancel,canplay,canplaythrough,change,click,close,contextmenu,cuechange,dblclick,drag,dragend,dragenter,dragleave,dragover,dragstart,drop,durationchange,emptied,ended,input,invalid,keydown,keypress,keyup,loadeddata,loadedmetadata,loadstart,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,mousewheel,pause,play,playing,progress,ratechange,reset,seeked,seeking,select,show,stalled,submit,suspend,timeupdate,toggle,volumechange,waiting,auxclick,pointercancel,pointerdown,pointerenter,pointerleave,pointermove,pointerout,pointerover,pointerup,beforecopy,beforecut,beforepaste,copy,cut,paste,search,selectstart,wheel,webkitfullscreenchange,webkitfullscreenerror,gotpointercapture,lostpointercapture".split(",") while(a.length) { b=a.shift() //console.log("on: "+b) on_init(b) } function on_init(b) { if (0) {on[b]=new Function("C","cmd","C.setAttribute('on"+b+"',cmd);return G.C={V:{},C:{}}") } on[b]=new Function("C","cmd","on.set(C,'"+b+"',cmd)") }} on.init() on.set=function(o,e,cmd) { o["on"+e]=new Function("event",cmd) } ;pgedit ={} ; pgedit.card=function(C,n) { tabs.card(C,"$126 "+n,"pgedit") ;with({C:G.C,V:G.C.V}){ if (C.neu) { C.V.record={name:n,code:""} var myCard=C Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ Fn(div.title,C,'ATprogramJeditor') G.C=C Fn(div.buttons,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'Aread') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'ApgeditCreadDeventCtargetE') G.C=C };G.C=C Fn(input.button,C,'Awrite') ;with({C:G.C,V:G.C.V}){ C.onclick=function() { pgedit.write(myCard) } };G.C=C Fn(input.button,C,'AapJly') ;with({C:G.C,V:G.C.V}){ C.onclick=function() { pgedit.apply(myCard) } };G.C=C Fn(input.button,C,'AbaX1J6AJblXJATprintbjXTsource') ;with({C:G.C,V:G.C.V}){ C.onclick=function() { pgedit.print(myCard) } };G.C=C Fn(pgedit.button,C,'Alib1CpgeditCjsA') G.C=C Fn(input.button,C,'AbaX12J') ;with({C:G.C,V:G.C.V}){ C.onclick=function() { pgedit.exit(myCard) } };G.C=C };G.C=C Fn(div.dialog,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.table,C,'') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.prompt,C,'ATlibrarybwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'AnameA') G.C=C };G.C=C Fn(input.prompt,C,'ATcodebwX') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.memo,C,'AcodeA') ;with({C:G.C,V:G.C.V}){ C.style.fontFamily="monospace" G.C=C C.V.record.input=C G.C=C pgedit.read(C) G.C=C C.onclick=function() { pgedit.selection(this) } };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} };G.C=C} pgedit.print=function pgedit_print(t) { t=t.V.record printer.printCode(t.name,t.code) } pgedit.button=function(C,lib) { return Fn(input.button,C,'AbaX126') ;with({C:G.C,V:G.C.V}){ C.lib=lib G.C=C Fn(on.click,C,'AevFthisbxXpgeditCcardDthisCgetD8WsysTcont8WEBthisClibE') G.C=C };G.C=C} pgedit.read=function(c) { var V=c.V var rec=V.record var r=db.read(V.account,rec.name) r.ready=function() { var val rec.alt=val=r.content if (rec.name.substr(-3)==".js") { val=val.toSrc() } rec.code=val rec.input.onfocus() }} pgedit.write=function(c) { var V=c.V var rec=V.record var code=rec.code var io=db.read(V.account,rec.name) io.ready=function() { if (rec.name.substr(-3)==".js") { code=code.toObj() } if (rec.alt==io.content) { io=db.write(V.account,rec.name,code) io.ready=function() { rec.alt=code }} else { alert("Die Datei konnte nicht gesichert werden da sie zwischenzeitlich von einem anderen Benutzer verändert wurde!") }}} pgedit.apply=function(c) { var V=c.V var rec=V.record var code=rec.code if (rec.name.substr(-3)==".js") { eval(code.toObj()) } else { alert("Kein .js - File") }} pgedit.exit=function pgedit_exit(C) { C.mode=0 tabs.remove(C) } pgedit.selection=function(C) { if (dblclick()) { var a=pgedit.selname(C) if (a>"") { a=a.trim() pgedit.card(C.V.tabsContainer,a) }}} pgedit.selname=function(C) { // holt den Namen der unter dem Cursor steht. C=InputElement var e=1,v=" "+C.value.toLowerCase()+" ",t="$_abcdefghijklmnopqrstuvwxyz0123456789." while (e) { e=0 if (t.includes(v.substr(C.selectionStart,1))) { C.selectionStart--;e=1 } if (t.includes(v.substr(C.selectionEnd+1,1))) { C.selectionEnd++;e=1 }} return C.value.substr(C.selectionStart,C.selectionEnd-C.selectionStart) } ;printer ={} ; printer={} printer.printCode=function(tit,code) { tit=tit code=code.split(chr(32)).join(chr(160)) var max_lines_page = 94 var max_char_line = 65 var win = window.open() var line = 4 // offset 1. Seite var replace_all = function (str, orig, repl) { str = str.split(orig) return(str.join(repl)) } code = replace_all(code, '<', '<') code = replace_all(code, '>', '>') var style = win.document.createElement('style'); win.document.body.appendChild(style) style.innerHTML = (``) var main = win.document.createElement('div'); win.document.body.appendChild(main) main.style.marginLeft = '1cm' main.style.marginRight = '1cm' var page; var table; var line_all = 0 var line_page = 0 var newPage = function () { page = win.document.createElement('div'); main.appendChild(page) page.style.marginTop = '6mm' page.style.pageBreakAfter = 'always' line_page = 0 console.log('new Page') } newPage() var title = win.document.createElement('h1'); page.appendChild(title) title.innerText = tit title.style.width = '190mm' title.style.marginBottom = '10px' var newTable = function () { table = win.document.createElement('table'); page.appendChild(table) table.style.lineHeight= '0.9' table.style.fontFamily = '"Courier New", Courier, monospace' table.style.borderCollapse = "collapse" } newTable() // var addLine = function (i, cont) { var tmp = lines[i] //.split(' ').join('') var length = tmp.length length = Math.ceil(length/max_char_line) console.log(length) line = (line+length) if (line >= max_lines_page) { var tr = win.document.createElement('tr'); table.appendChild(tr) newPage() newTable() line = 0 } i = number(i) var tr = win.document.createElement('tr'); table.appendChild(tr) var numb = win.document.createElement('td'); tr.appendChild(numb) var text = win.document.createElement('td'); tr.appendChild(text) numb.innerHTML = i+': ' numb.style.textAlign = 'right' numb.style.verticalAlign= 'top' numb.style.fontSize = '11.4px' tr.style.paddingBottom = '-5px' text.style.fontSize = '11.4px' text.style.marginLeft = '30px' text.innerHTML = cont console.log(cont + ' : ' +i+':'+ line) } // var number = function (i) { i = i+'' while (i.length+1 < (lines.length+'').length) { i = ' '+i //console.log('test: ' +i) } return(i) } // var lines = code.split(/\r?\n/) var i = 0 while (lines.length > i) { //console.log(i+': '+lines[i]) addLine(i, lines[i]) i++ } win.print() win.close() } // printer.printCodeAlt=function(tit,code) { var replace_all = function (str, orig, repl) { //str = str.split (orig) return(str.join(repl)) } code = replace_all(code, '<', '<') code = replace_all(code, '>', '>') var win = window.open() win.document.title = 'Drucken: '+tit var main = win.document.createElement('div'); win.document.body.appendChild(main) var style = win.document.createElement('style'); win.document.body.appendChild(style) style.innerHTML = (``) main.style.marginLeft = '1cm' var page; var newPage = function () { page = win.document.createElement('div'); main.appendChild(page) page.style.marginTop = '1cm' page.style.pageBreakAfter = 'always' } newPage() // var title = win.document.createElement('h1'); page.appendChild(title) title.innerText = tit // page.style.height = '28cm' var maxHeight = page.clientHeight page.style.height = '' // var addLine = function (i, str) { var pre = win.document.createElement('div') pre.style.fontFamily = '"Courier New", Courier, monospace' page.appendChild(pre) pre.innerText = (number(i+1))+': '+str //console.log(pre) if (page.clientHeight > maxHeight) { pre.style.display = 'none' newPage() addLine(i, str) } // } // var number = function (i) { i = i+'' while (i.length < (lines.length+'').length) { i = ' '+i //console.log('test: ' +i) } return(i) } // var lines = code.split(/\r?\n/) var i = 0 while (lines.length > i) { //console.log(i+': '+lines[i]) addLine(i, lines[i]) i++ } win.print() win.close() } // printer.printDiv=function(div) { var win = window.open() win.document.write('') win.document.write(div.innerHTML) win.print() win.close() // } ;records ={} ; records.load=function(a,o) { // account, record a=a.junior() a.rec=a.read(o.N) a.ready=function(a) { a.toObj(o,a.rec.text) // Daten in Record laden }} records.save=function(a,o) { a=a.junior() a.rec=a.write(o.N,a.toStr(o)) } records.adress=function(C,rec) { tabs.card(C,"Adresse") ;with({C:G.C,V:G.C.V}){ V.card=C G.C=C V.acc=V.account.junior() G.C=C Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ V.record=["aa","bb","cc","dd"] G.C=C V.record.N="test.adre.123.rec" G.C=C Fn(div.title,C,'ATadresJeAerfasJenARQ') G.C=C Fn(div.buttons,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'AspeichernA') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AvarAvFeventCtargetCTvbxXrecordsCsaveDvCacJBvCrecordE') G.C=C };G.C=C Fn(input.button,C,'AladenA') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AvarAvFeventCtargetCTvbxXrecordsCloadDvCacJBvCrecordEA') G.C=C };G.C=C Fn(pgedit.button,C,'Alib1CrecordsCjsA') G.C=C Fn(input.button,C,'AexitA') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AtabsCremoveDeventCtargetCTvCtabsTcardE') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'ARKblXJAdefiniereAdenAdialogbjXTcontainer') ;with({C:G.C,V:G.C.V}){ //input.form G.C=C Fn(input.table,C,'AJ') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C //dom.width 97% G.C=C Fn(input.prompt,C,'ATanredebwXA') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A1') G.C=C };G.C=C Fn(input.prompt,C,'ATnamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A2') G.C=C };G.C=C Fn(input.prompt,C,'ATvornamebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A3') G.C=C };G.C=C Fn(input.prompt,C,'ATadresJzeilebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A4') G.C=C };G.C=C Fn(input.prompt,C,'ATplzbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A5') G.C=C };G.C=C Fn(input.prompt,C,'ATortbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A6') G.C=C };G.C=C Fn(input.prompt,C,'ATlandbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A7') G.C=C };G.C=C Fn(input.prompt,C,'ATtelefonbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A8') G.C=C };G.C=C Fn(input.prompt,C,'ATtelefonbwXbyXbrb0XTemailbwXbyXbrb0XTinternetbwXA') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'20bbX') G.C=C Fn(input.memo,C,'A9') G.C=C };G.C=C Fn(input.prompt,C,'ATmemobwXA') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'10JbbX') G.C=C Fn(input.memo,C,'A10') ;with({C:G.C,V:G.C.V}){ mem=C G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} records.buchung=function(C,rec) { tabs.card(C,"Buchung") ;with({C:G.C,V:G.C.V}){ V.card=C G.C=C V.acc=V.account.junior() G.C=C Fn(div.full,C,'') ;with({C:G.C,V:G.C.V}){ V.record=["aa","bb","cc","dd"] G.C=C V.record.N="test.adre.123.rec" G.C=C Fn(div.title,C,'ATbuchungAerfasJenARQ') G.C=C Fn(div.buttons,C,'A') ;with({C:G.C,V:G.C.V}){ Fn(input.button,C,'AspeichernA') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'ArecordCstoreDeventE') G.C=C };G.C=C Fn(input.button,C,'AdateA') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AalertDTvCrecordctX1cvXE') G.C=C };G.C=C Fn(input.button,C,'Alg4XschenA') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AloginCtestDeventEA') G.C=C };G.C=C Fn(pgedit.button,C,'Alib1CrecordsCjsA') G.C=C Fn(input.button,C,'AexitA') ;with({C:G.C,V:G.C.V}){ Fn(on.click,C,'AtabsCremoveDeventCtargetCTvCtabsTcardE') G.C=C };G.C=C };G.C=C Fn(div.dialog,C,'ARKblXJAdefiniereAdenAdialogbjXTcontainer') ;with({C:G.C,V:G.C.V}){ Fn(input.table,C,'') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'A10JbbX') G.C=C Fn(input.prompt,C,'ATdatumbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A1') G.C=C };G.C=C Fn(input.prompt,C,'ATdatumbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.date,C,'A1') G.C=C };G.C=C Fn(input.prompt,C,'ATbelegblXTtypbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A2') G.C=C };G.C=C Fn(input.prompt,C,'ATtextbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A3') G.C=C };G.C=C Fn(input.prompt,C,'ATsolJkontobwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A4') G.C=C };G.C=C Fn(input.prompt,C,'AThabenkontobwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A5') G.C=C };G.C=C Fn(input.prompt,C,'ATbetragbwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A6') G.C=C };G.C=C Fn(input.prompt,C,'ATfirmabwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A7') G.C=C };G.C=C Fn(input.prompt,C,'ATkostenstelJebwX') ;with({C:G.C,V:G.C.V}){ Fn(input.line,C,'A8') G.C=C };G.C=C Fn(input.prompt,C,'ATmemobwXA') ;with({C:G.C,V:G.C.V}){ Fn(dom.height,C,'10JbbX') G.C=C Fn(input.memo,C,'A9') G.C=C };G.C=C };G.C=C };G.C=C };G.C=C };G.C=C} ;server ={} ; server.login=function server_login(account,user,key) { var o=server.junior() o.account=account o.user=user o.key=key o.sys={} // User-File einlesen o.loadObj(account+".user."+user+".sys",o.sys) return o } server.encode=function server_encode(txt) { return encodeURIComponent(txt) } server.decode=function server_decode(txt) { return decodeURIComponent(txt) } server.request=function server_request(o,cmd,fnam,v1,v2) { var srv=this,r=new XMLHttpRequest() r.open("POST","index.php",true) r.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); r.onerror=function() { //o.onerror(o,r.error) } r.onload=function() { log(o) obj.ready(o,r.response);obj.ready(srv,r.response) } obj.busy(srv);obj.busy(o) o.fName=fnam r.send(server.param(cmd,fnam,o.user+o.key,v1,v2)) G.C=o return o } server.param=function() { // wandelt die Parameter urlencode var p="",i=arguments.length while (i--) { p=","+server.encode(""+arguments[i])+p } return p.substr(1) } // server.read=function server_read(fnam) // liest eine Datei { var o=this.junior();o.busy=0 this.request(o,"read",fnam) return o } server.write=function server_write(fnam,v) // schreibt eine Datei { var o=this.junior();o.busy=0 this.request(o,"write",fnam,v) return o } server.append=function server_append(fnam,v) // erweitert eine Datei { var o=this.junior();o.busy=0 this.request(o,"append",fnam,v) return o } server.replace=function server_replace(fnam,alt,neu) // ersetzt einen Teil einer Datei { var o=this.junior();o.busy=0 this.request(o,"replace",fnam,alt,neu) return o } server.search=function server_search(fnam,from,to) // sucht records in einer Datei { var o=this.junior();o.busy=0 this.request(o,"search",fnam,from,to) return o } server.dir=function server_dir(fnam) // listet ein Directory { var o=this.junior();o.busy=0 this.request(o,"dir",fnam) return o } server.get=function server_get(fnam) { var o=this.junior();o.busy=0 this.request(o,"get",fnam) return o } server.toObj=function server_toObj(obj,str) { // füllt ein Objekt mit codierten Daten eines Strings var a,n,v str=str.toData().split(chr(1)) while (str.length) { a=str.shift().split(chr(2)) if (a.length ==2) { n=a[0] v=a[1] obj[n]=v }}} server.toStr=function server_toStr(obj) { // wandelt die Daten eines Objekts in einen String var a,r="",c for (a in obj) { if (obj.hasOwnProperty(a)) { c=(""+obj[a]) r+=a+chr(2)+c+chr(1) }} return r.toCode() } server.loadObj=function server_loadObj(fnam,o) { var a,b,c,srv,fi,tmp={} srv=this fi=srv.read(fnam) fi.ready=function(v) { log("obj Parse: "+v) obj.clear(o) obj.copy(JSON.parse(v),o) log(o) } return o } server.saveObj=function server_saveObj(fnam,o) { var tmp={} tmp.text=JSON.stringify(o) srv=this.junior() return srv.write(fnam,tmp,"text") } ;size ={} ; L=assign={} L.h=function(C,x) { C.style.height=x } L.b=function(C,x) { C.style.width=x } L.abs=function(C) { C.style.position="absolute" C.P.style.position="relative" } L.o=function(C,x) { this.abs(C) C.style.top=x } L.u=function(C,x) { this.abs(C) C.style.bottom=x } L.l=function(C,x) { this.abs(C) C.style.left=x } L.r=function(C,x) { this.abs(C) C.style.right=x } L.rand=function(C,x) { this.abs(C) C.style.right=x C.style.left=x C.style.bottom=x C.style.top=x } L.style=function(C,x) { eval("C.style."+x) } L.value=function(C,x) { eval("C."+x) } L.macro=function(C,x) { eval(x) } L.event=function(C,x) { //event.add(C,x,domEvent) C["on"+x]=domEvent } ;str ={} ; str.left=function(str,len) { return str.left(len) } str.right=function(str,len) { return str.right(len) } ;style ={} ; style.init=function() { style.classes={} style.classes["all"]={} style.classes["screen"]={} style.classes["(max-device-width: 800px)"]={} style.classes["print"]={} style.styles=[] style.deviceName="all" style.fontclasses={} style.fontclasses["all"]={} style.fontclasses["screen"]={} style.fontclasses["(max-device-width: 800px)"]={} style.fontclasses["print"]={} for(var s in document.body.style) { //if(document.body.style.hasOwnProperty(s)) style.styles.push(s) } // for IE style.styles.push("src") // end for(var i=0;i") } style.import=function(C,className) { var c=style.classes,cls for(var m in c) { if(c.propertyIsEnumerable(m)) { cls=c[m][className] for(var s in cls) { if(cls.propertyIsEnumerable(s)) { C[m][C.actName][s]=cls[s] }}}}} style.fontFace=function(C,name) { G.C=style.fontclasses G.C.actName=name style.fontclasses["all"][name]={} style.fontclasses["screen"][name]={} style.fontclasses["(max-device-width: 800px)"][name]={} style.fontclasses["print"][name]={} style.fontclasses["all"][name]["fontFamily"]=name style.fontclasses["screen"][name]["fontFamily"]=name style.fontclasses["(max-device-width: 800px)"][name]["fontFamily"]=name style.fontclasses["print"][name]["fontFamily"]=name return G.C } style.toCss=function(x) { var char,out=[] for(var i=0;i0) { if(cls.substr(0,1)=="<" && cls.substr(cls.length-1)==">") { a.push(cls.substr(1,cls.length-2)+"{"+css.join(";")+"}") } else { a.push("."+cls+"{"+css.join(";")+"}") } css=[] }}} style.createStyleTag(type,a.join("\n")) a=[] }} a=[],c=style.fontclasses for(var n in c) // für alle Medien-Typen { var css=[],media,type,t if(c.propertyIsEnumerable(n) && typeof(c[n])=="object") { media=c[n] // media=style.classes.screen etc. type=n for(var cls in media) // für alle Klassen innerhalb der Medien-Typs { if(media.propertyIsEnumerable(cls)) { t=media[cls] for(var s in t) // für alle styles innerhalb der Klasse { if(t.propertyIsEnumerable(s)) { css.push(style.toCss(s)+":"+t[s]) }} if(css.length>0) { a.push("@font-face {"+css.join(";")+"}") css=[] }}} style.createStyleTag(type,a.join("\n")) a=[] }} style.insertViewportTag() return } style.createStyleTag=function(media,innerHTML) { var o=document.createElement("style") o.setAttribute("media",media) o.innerHTML=innerHTML document.body.appendChild(o) } style.insertViewportTag=function() { var metaTag=document.createElement("meta") metaTag.name="viewport" metaTag.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" document.head.appendChild(metaTag) } ;styles ={} ; styles.init=function(C) { Fn(style.class,C,'AmyTfont') ;with({C:G.C,V:G.C.V}){ Fn(style.fontFamily,C,'AarialBverdana') G.C=C Fn(style.fontSize,C,'A9ptA') G.C=C Fn(style.fontFace,C,'AiconTfont') ;with({C:G.C,V:G.C.V}){ Fn(style.src,C,'AurlDewsCmenuCtJfE') G.C=C Fn(style.screen.src,C,'AurlDewsCmenuCtJfE') G.C=C Fn(style.handheld.src,C,'AurlDewsCmenuCtJfE') G.C=C Fn(style.print.src,C,'AurlDewsCmenuCtJfE') G.C=C };G.C=C };G.C=C Fn(style.class,C,'AmyTtitle') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTfont') G.C=C Fn(style.fontSize,C,'A1Jpt') G.C=C Fn(style.color,C,'A9W0860a8') G.C=C };G.C=C Fn(style.class,C,'AmyTcolor') ;with({C:G.C,V:G.C.V}){ Fn(style.backgroundColor,C,'Awhite') G.C=C Fn(style.color,C,'Ablack') G.C=C };G.C=C Fn(style.class,C,'AmyTcursor') ;with({C:G.C,V:G.C.V}){ Fn(style.cursor,C,'ApointerAJ') G.C=C };G.C=C Fn(style.class,C,'AmyTborder') ;with({C:G.C,V:G.C.V}){ Fn(style.borderRadius,C,'A5px') G.C=C Fn(style.border,C,'A1pxAsolidA9Wa0a0a0') G.C=C };G.C=C Fn(style.class,C,'AmyTshadow') ;with({C:G.C,V:G.C.V}){ Fn(style.boxShadow,C,'A5pxA5pxA5pxA9WcN') G.C=C };G.C=C Fn(style.class,C,'AinputA') ;with({C:G.C,V:G.C.V}){ Fn(style.borderRadius,C,'A0px') G.C=C Fn(style.borderWidth,C,'A0px') G.C=C Fn(style.import,C,'AmyTcolor2') G.C=C };G.C=C Fn(style.class,C,'AinputTbutJon') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTborder') G.C=C Fn(style.import,C,'AmyTcolor') G.C=C };G.C=C Fn(style.class,C,'AinputTbutJonTbusy') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AinputTbutJon') G.C=C Fn(style.backgroundColor,C,'A9WfJc2b3') G.C=C };G.C=C Fn(style.class,C,'AinputTtable') ;with({C:G.C,V:G.C.V}){ Fn(style.width,C,'A10JbbX') G.C=C };G.C=C Fn(style.class,C,'AinputTline') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'Ainput') G.C=C Fn(style.width,C,'A10JbbX') G.C=C };G.C=C Fn(style.class,C,'AinputTmemo') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AinputTline') G.C=C Fn(style.height,C,'A10JbbX') G.C=C Fn(style.minHeight,C,'A50px') G.C=C };G.C=C Fn(style.class,C,'AinputTdate') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AinputTline') G.C=C Fn(style.width,C,'A10JbbX') G.C=C };G.C=C if (0) { Fn(style.class,C,'AinputTcode') ;with({C:G.C,V:G.C.V}){ Fn(style.height,C,'A10JbbX') G.C=C Fn(style.width,C,'A10JbbX') G.C=C Fn(style.margin,C,'A0px') G.C=C Fn(style.position,C,'Arelative') G.C=C Fn(style.overflow,C,'AhidJen') G.C=C };G.C=C Fn(style.class,C,'AinputTcodeTtextTouter') ;with({C:G.C,V:G.C.V}){ Fn(style.height,C,'A10JbbX') G.C=C Fn(style.overflow,C,'AhidJen') G.C=C Fn(style.float,C,'Aleft') G.C=C Fn(style.position,C,'Aabsolute') G.C=C Fn(style.left,C,'A31px') G.C=C Fn(style.right,C,'A0px') G.C=C };G.C=C Fn(style.class,C,'AinputTcodeTtext') ;with({C:G.C,V:G.C.V}){ Fn(style.fontFamily,C,'Acourier') G.C=C Fn(style.whiteSpace,C,'Apre') G.C=C Fn(style.width,C,'A10JbbX') G.C=C Fn(style.height,C,'A10JbbX') G.C=C Fn(style.padding,C,'A0px') G.C=C Fn(style.overflow,C,'Aauto') G.C=C Fn(style.resize,C,'Anone') G.C=C };G.C=C Fn(style.class,C,'AinputTcodeTlineTouter') ;with({C:G.C,V:G.C.V}){ Fn(style.width,C,'A30px') G.C=C Fn(style.height,C,'A10JbbX') G.C=C Fn(style.float,C,'Aleft') G.C=C };G.C=C Fn(style.class,C,'AinputTcodeTline') ;with({C:G.C,V:G.C.V}){ Fn(style.overflow,C,'AhidJen') G.C=C Fn(style.fontFamily,C,'Acourier') G.C=C Fn(style.textAlign,C,'Aright') G.C=C Fn(style.background,C,'A9WcN') G.C=C Fn(style.width,C,'A10JbbX') G.C=C Fn(style.height,C,'A10JbbX') G.C=C Fn(style.padding,C,'A0px') G.C=C Fn(style.resize,C,'Anone') G.C=C };G.C=C} Fn(style.class,C,'AinputTselect') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AinputTlineA') G.C=C };G.C=C Fn(style.class,C,'AdivTfulJ') ;with({C:G.C,V:G.C.V}){ Fn(style.position,C,'Arelative') G.C=C Fn(style.width,C,'A10JbbX') G.C=C Fn(style.height,C,'A10JbbX') G.C=C };G.C=C Fn(style.class,C,'AdivTfix') ;with({C:G.C,V:G.C.V}){ Fn(style.position,C,'Aabsolute') G.C=C };G.C=C Fn(style.class,C,'AdivTtitle') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTtitle') G.C=C Fn(style.position,C,'Aabsolute') G.C=C Fn(style.top,C,'A10px') G.C=C Fn(style.left,C,'A10px') G.C=C };G.C=C Fn(style.class,C,'AdivTbutJons') ;with({C:G.C,V:G.C.V}){ Fn(style.position,C,'Aabsolute') G.C=C Fn(style.top,C,'A10px') G.C=C Fn(style.right,C,'A10px') G.C=C };G.C=C Fn(style.class,C,'AdivTdialog') ;with({C:G.C,V:G.C.V}){ Fn(style.backgroundColor,C,'A9We0e0e0') G.C=C Fn(style.position,C,'Aabsolute') G.C=C Fn(style.top,C,'A30px') G.C=C Fn(style.left,C,'A10px') G.C=C Fn(style.right,C,'A10px') G.C=C Fn(style.bottom,C,'A10px') G.C=C Fn(style.overflow,C,'Aauto') G.C=C Fn(style.padding,C,'A5px') G.C=C };G.C=C Fn(style.class,C,'AdivThead') ;with({C:G.C,V:G.C.V}){ Fn(style.backgroundColor,C,'A9WcN') G.C=C Fn(style.position,C,'Aabsolute') G.C=C Fn(style.top,C,'A0px') G.C=C Fn(style.left,C,'A0px') G.C=C Fn(style.right,C,'A0px') G.C=C Fn(style.height,C,'A50pxA') G.C=C };G.C=C Fn(style.class,C,'AdivTmenu') ;with({C:G.C,V:G.C.V}){ Fn(style.backgroundColor,C,'A9WcN') G.C=C Fn(style.position,C,'Aabsolute') G.C=C Fn(style.top,C,'A50px') G.C=C Fn(style.left,C,'A0px') G.C=C Fn(style.width,C,'A20Jpx') G.C=C Fn(style.bottom,C,'A0px') G.C=C Fn(style.overflow,C,'Aauto') G.C=C };G.C=C Fn(style.class,C,'AdivTpage') ;with({C:G.C,V:G.C.V}){ Fn(style.backgroundColor,C,'A9WcN') G.C=C Fn(style.position,C,'Aabsolute') G.C=C Fn(style.top,C,'A50px') G.C=C Fn(style.left,C,'A20Jpx') G.C=C Fn(style.right,C,'A0px') G.C=C Fn(style.bottom,C,'A0px') G.C=C Fn(style.overflow,C,'AautoA') G.C=C };G.C=C Fn(style.class,C,'AdivToverflow') ;with({C:G.C,V:G.C.V}){ Fn(style.backgroundColor,C,'A9WdNAJ') G.C=C Fn(style.overflow,C,'Aauto') G.C=C };G.C=C Fn(style.class,C,'Atabs') ;with({C:G.C,V:G.C.V}){ Fn(style.width,C,'A10JbbX') G.C=C Fn(style.height,C,'A10JbbX') G.C=C };G.C=C Fn(style.class,C,'Atitle1') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTtitle') G.C=C Fn(style.fontSize,C,'A18pt') G.C=C };G.C=C Fn(style.class,C,'Atitle2') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTtitle') G.C=C Fn(style.fontSize,C,'A16pt') G.C=C };G.C=C Fn(style.class,C,'Atitle3') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTtitle') G.C=C Fn(style.fontSize,C,'A14pt') G.C=C };G.C=C Fn(style.class,C,'Ahtml') ;with({C:G.C,V:G.C.V}){ Fn(style.width,C,'A10JbbX') G.C=C Fn(style.height,C,'A10JbbX') G.C=C };G.C=C Fn(style.class,C,'Abody') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTfont') G.C=C };G.C=C Fn(style.class,C,'AtabTtableTcontainer') ;with({C:G.C,V:G.C.V}){ Fn(style.width,C,'A10JbbX') G.C=C Fn(style.height,C,'A10JbbX') G.C=C Fn(style.borderSpacing,C,'A0px') G.C=C };G.C=C Fn(style.class,C,'AtabTdialogs') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AtabTtableTcontainer') G.C=C Fn(style.margin,C,'A0px') G.C=C Fn(style.padding,C,'A0px') G.C=C };G.C=C Fn(style.class,C,'AtabTbutJons') ;with({C:G.C,V:G.C.V}){ Fn(style.padding,C,'A0px') G.C=C };G.C=C Fn(style.class,C,'AtabTdialog') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTborder') G.C=C Fn(style.import,C,'AmyTshadow') G.C=C Fn(style.display,C,'Anone') G.C=C Fn(style.height,C,'A10JbbX') G.C=C Fn(style.borderTopLeftRadius,C,'A0px') G.C=C Fn(style.background,C,'A9WeNA') G.C=C Fn(style.padding,C,'A3px') G.C=C Fn(style.margin,C,'A0px') G.C=C };G.C=C Fn(style.class,C,'AtabTdialogTselected') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AtabTdialog') G.C=C Fn(style.display,C,'Ablock') G.C=C };G.C=C Fn(style.class,C,'AtabTbutJon') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmyTborder') G.C=C Fn(style.import,C,'AmyTfont') G.C=C Fn(style.cursor,C,'Apointer') G.C=C Fn(style.background,C,'A9WdNA') G.C=C Fn(style.padding,C,'A5px') G.C=C Fn(style.borderBottom,C,'A0px') G.C=C Fn(style.borderBottomLeftRadius,C,'A0px') G.C=C Fn(style.borderBottomRightRadius,C,'A0px') G.C=C Fn(style.margin,C,'A0px') G.C=C Fn(style.boxShadow,C,'A2pxA0pxA1pxA9WcN') G.C=C };G.C=C Fn(style.class,C,'AtabTbutJonTselected') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AtabTbutJonA') G.C=C Fn(style.position,C,'Arelative') G.C=C Fn(style.top,C,'A1px') G.C=C Fn(style.cursor,C,'Apointer') G.C=C Fn(style.background,C,'A9WeN') G.C=C Fn(style.paddingTop,C,'A8px') G.C=C Fn(style.boxShadow,C,'A2pxAbjX1pxA1pxA9WcN') G.C=C };G.C=C Fn(style.class,C,'AacJordionTdialog') ;with({C:G.C,V:G.C.V}){ Fn(style.border,C,'A1pxAsolidA9Wa0a0a0') G.C=C Fn(style.borderRadius,C,'A3px') G.C=C Fn(style.padding,C,'A5pxA') G.C=C Fn(style.margin,C,'A0px') G.C=C Fn(style.boxShadow,C,'A2pxA0pxA1pxA9WcNA') G.C=C };G.C=C Fn(style.class,C,'AacJordionTbutJonTinactive') ;with({C:G.C,V:G.C.V}){ Fn(style.border,C,'A1pxAsolidA9Wa0a0a0') G.C=C Fn(style.borderRadius,C,'A3px') G.C=C Fn(style.cursor,C,'Apointer') G.C=C Fn(style.padding,C,'A5pxA') G.C=C Fn(style.margin,C,'A0px') G.C=C Fn(style.background,C,'A9WcN') G.C=C Fn(style.boxShadow,C,'A2pxA0pxA1pxA9WcN') G.C=C Fn(style.width,C,'A10JbbX') G.C=C };G.C=C Fn(style.class,C,'AacJordionTbutJonTactive') ;with({C:G.C,V:G.C.V}){ Fn(style.border,C,'A1pxAsolidA9Wa0a0a0') G.C=C Fn(style.borderRadius,C,'A3px') G.C=C Fn(style.cursor,C,'Apointer') G.C=C Fn(style.padding,C,'A5pxA') G.C=C Fn(style.margin,C,'A0px') G.C=C Fn(style.background,C,'A9WeN') G.C=C Fn(style.boxShadow,C,'A2pxA0pxA1pxA9WcN') G.C=C Fn(style.width,C,'A10JbbX') G.C=C };G.C=C Fn(style.class,C,'AmenuTitem') ;with({C:G.C,V:G.C.V}){ Fn(style.opacity,C,'A1') G.C=C Fn(style.maxHeight,C,'A0') G.C=C Fn(style.overflow,C,'AhidJen') G.C=C Fn(style.transition,C,'AalJA0C7s') G.C=C };G.C=C Fn(style.class,C,'AmenuTtreJA') ;with({C:G.C,V:G.C.V}){ Fn(style.opacity,C,'A1') G.C=C Fn(style.maxHeight,C,'A0') G.C=C Fn(style.overflow,C,'AhidJen') G.C=C Fn(style.transition,C,'AalJA0C7s') G.C=C };G.C=C Fn(style.class,C,'AmenuTiconTopen') ;with({C:G.C,V:G.C.V}){ Fn(style.fontFamily,C,'AiconTfont') G.C=C Fn(style.fontSize,C,'A10pt') G.C=C Fn(style.padding,C,'A0px') G.C=C Fn(style.margin,C,'A0px') G.C=C Fn(style.color,C,'A9W0860a8') G.C=C };G.C=C Fn(style.class,C,'AmenuTiconTclosed') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmenuTiconTopen') G.C=C };G.C=C Fn(style.class,C,'AmenuTlinkTopen') ;with({C:G.C,V:G.C.V}){ Fn(style.color,C,'A9W0860a8') G.C=C Fn(style.cursor,C,'Apointer') G.C=C };G.C=C Fn(style.class,C,'AmenuTlinkTclosed') ;with({C:G.C,V:G.C.V}){ Fn(style.import,C,'AmenuTlinkTopen') G.C=C Fn(style.color,C,'A9W3N') G.C=C Fn(style.cursor,C,'Apointer') G.C=C };G.C=C Fn(style.class,C,'AmenuTlink') ;with({C:G.C,V:G.C.V}){ Fn(style.cursor,C,'Apointer') G.C=C };G.C=C Fn(style.fontFace,C,'AewsbjXsymbols') ;with({C:G.C,V:G.C.V}){ Fn(style.src,C,'AurlDewsCiconsCtJfE') G.C=C };G.C=C Fn(style.class,C,'Asymbols') ;with({C:G.C,V:G.C.V}){ Fn(style.fontFamily,C,'AewsbjXsymbols') G.C=C };G.C=C style.apply() } import1={} import1.ews=function(c,n) { var s=dom.create(c,"script") s.onload=function(){alert(this.innerHTML)} s.src=n } ;sys ={} ; sys.id=1 sys.load=function sys_load(C,x) { x=x.split(" ").join("").split(",") var l={C:C,libs:x} } sys.loadJs=function sys_loadJs(o,n,f) // loadJs("ews_demo_tabs",alert(o.name+ "geladen")) { return } sys.lib=function sys_lib(C,x) { dom.div(C) ;with({C:G.C,V:G.C.V}){ C.id=x G.C=C var s=dom.create(C,"script") G.C=C s.src=x+".js" G.C=C return G.C=C G.C=C };G.C=C} ;tabs ={} ; tabs.container=function(c) { var divouter=dom.create(c,"div","","TabContainer") var table=dom.create(divouter,"table","","tabTableContainer") var trbuttons=dom.create(table,"tr","","") var tdbuttons=dom.create(trbuttons,"td","","tabButtons") var trdialogs=dom.create(table,"tr","","") var tddialogs=dom.create(trdialogs,"td","","tabDialogs") divouter.setAttribute("lib","tabs") G.C=divouter G.C.V.tabsContainer=G.C return divouter } tabs.card=function(c,x,type) // Type=Gruppe für automatische Auswahl { if (type) { type+=("-"+x) var d=c[type] if (d) // Wenn editor für diese Datei schon besteht -> öffne diesen Tab { if (d.mode) { d.neu=0 tabs.select(d) G.C=d return d }}} var buttonCont=c.firstChild.firstChild.firstChild // div->table->tr->td var button=dom.create(buttonCont,"button",x,"tabButton") button.setAttribute("istabbutton","1") if(buttonCont.childNodes.length==1) { button.setAttribute("class","tabButtonSelected") } button.setAttribute("onclick","tabs.onclick(this)") //on.click(button,"tabs.onclick(event)") var dialogCont=c.firstChild.lastChild.firstChild var tab=dom.create(dialogCont,"div","","tabDialogSelected") var pnc=tab.parentNode.children if(pnc.length>1) { pnc[pnc.length-1].setAttribute("class","tabDialog") } tab.setAttribute("istab","1") tab.setAttribute("name",x) tab.neu=tab.mode=1 c[type]=tab G.C=tab tab.V.tabsCard=tab tab.V.tabsButton=button return tab } tabs.onclick=function(e) { if(!e.getAttribute || e.getAttribute("istabbutton")==null) { e=e.target } if(e.getAttribute("istabbutton")!=null) { tabs.displayCard(e) }} tabs.displayCard=function(e) { var tabsarr=e.parentNode.children,tab for(var i=0;i> 6 | 192 } else { if (c > 0xd7ff && c < 0xdc00) { if (++ci >= s.length) { throw new Error('UTF-8 encode: incomplete surrogate pair') } var c2 = s.charCodeAt(ci) if (c2 < 0xdc00 || c2 > 0xdfff) { throw new Error('UTF-8 encode: second surrogate character 0x' + c2.toString(16) + ' at index ' + ci + ' out of range') } c = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff) bytes[i++] = c >> 18 | 240 bytes[i++] = c >> 12 & 63 | 128 } else bytes[i++] = c >> 12 | 224 ;with({C:G.C,V:G.C.V}){ bytes[i++] = c >> 6 & 63 | 128 G.C=C };G.C=C} bytes[i++] = c & 63 | 128 } while (i>=0) { r[i]=chr(bytes[i]) i-- } return r.join("") } utf8.decode =function (bytes) { var i = 0,c, s = '' while (i < bytes.length) { var c = asc(bytes[i++]) if (c > 127) { if (c > 191 && c < 224) { if (i >= bytes.length) { throw new Error('UTF-8 decode: incomplete 2-byte sequence') } c = (c & 31) << 6 | asc(bytes[i++]) & 63 } else if (c > 223 && c < 240) { if (i + 1 >= bytes.length) { throw new Error('UTF-8 decode: incomplete 3-byte sequence') } c = (c & 15) << 12 | (asc(bytes[i++]) & 63) << 6 | asc(bytes[i++]) & 63 } else if (c > 239 && c < 248) { if (i + 2 >= bytes.length) { throw new Error('UTF-8 decode: incomplete 4-byte sequence') } c = (c & 7) << 18 | (asc(bytes[i++]) & 63) << 12 | asc((bytes[i++]) & 63) << 6 | asc(bytes[i++]) & 63; } else throw new Error('UTF-8 decode: unknown multibyte start 0x' + c.toString(16) + ' at index ' + (i - 1)) } if (c <= 0xffff) s += String.fromCharCode(c) else if (c <= 0x10ffff) { c -= 0x10000 s += String.fromCharCode(c >> 10 | 0xd800) s += String.fromCharCode(c & 0x3FF | 0xdc00) } else throw new Error('UTF-8 decode: code point 0x' + c.toString(16) + ' exceeds UTF-16 reach') } return s; } // ;util ={} ; util.lastElement=function util_lastElement(o) // Gibt das zuletzt hinzugefügte Element eines Objektes zurück lib_styles { var last for(var i in o) { if(o.propertyIsEnumerable(i)) { last=i }} return o[last] } max=function util_max() { var a=arguments,l=a.length,b=a[0],c=0 while(++cb) {b=a[c]} } return b } min=function util_min() { var a=arguments,l=a.length,b=a[0],c=0 while(++c1) { dom.set(this,n,v) } if ((typeof this[n])=="undefined") { return "" } return this[n] } util.empty=function(o) // entleere das Objekt { var a for (a in o) { delete o[a] } return o } util.import=function(obj,neu) // ergänze obj mit den Eigenschaften des Objekts neu { var a for (a in neu) { obj[a]=neu[a] } return obj } util.test=function(n,v) { var a=this,b,n=n.split(".") while (n.length>0) { b=n.shift() if ((typeof a[b])!="object") { a[b]={} } a=a[b] } if (arguments.length>1) { dom.set(a,n[0],v) } return this[n] } Object.prototype.junior=function util_junior(o) { if (!o) { o=this } return Object.create(o) } Object.prototype.between=function util_between(a,b) { o=this if (o>a) { if (o0) { s[i-1]=chr(73+z) z=0 if (y==x) { continue }} y=x a=x.toLowerCase() p=at(t,a)+1 if (p) { // a..z, 0..9 if (a!=x) { // Grossbuchstaben a="T"+a } s[i]=a continue } p=at(t1,a)+1 if (p) { // häufige Sonderzeichen s[i]=chr(64+p) continue } a=asc(x);x="";c=1 while (c>0) { b=a%36 c=a=(a-b)/36 x=t2.substr(b,1)+x } x=x+chr(86+x.length) s[i]=x } if (z>0) { s[i]=chr(73+z) } if (pw) { s=s.join("").split("") crypt(s,pw,1) } return s.join("") } // Decodieren in JS-2Byte-Code String.prototype.toData=function(pw) { var i=-1,a,b,x,s=this.valueOf().split(""),l=s.length-1 if (pw) { crypt(s,pw,-1) } while (i