Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

preparing 3.3.2 release

  • Loading branch information...
commit 379be4af0ee362033c527f8a6522d922d3de18cd 1 parent d4afddd
Koen Deforche authored
View
2  examples/widgetgallery/src/eu/webtoolkit/jwt/examples/widgetgallery/GraphicsWidgets.java
@@ -337,7 +337,7 @@ WWidget ScatterPlotData() {
for (int column = 1; column < model.getColumnCount(); ++column) {
table.setColumnWidth(column, new WLength(90));
}
- table.resize(new WLength(780), new WLength(200));
+ table.resize(new WLength(783), new WLength(200));
WItemDelegate delegate = new WItemDelegate(table);
delegate.setTextFormat("%.1f");
table.setItemDelegate(delegate);
View
2  examples/widgetgallery/src/eu/webtoolkit/jwt/examples/widgetgallery/src.xml
@@ -3447,7 +3447,7 @@
<span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">column</span> <span class="o">=</span> <span class="mi">1</span><span class="o">;</span> <span class="n">column</span> <span class="o">&lt;</span> <span class="n">model</span><span class="o">.</span><span class="na">getColumnCount</span><span class="o">();</span> <span class="o">++</span><span class="n">column</span><span class="o">)</span> <span class="o">{</span>
<span class="n">table</span><span class="o">.</span><span class="na">setColumnWidth</span><span class="o">(</span><span class="n">column</span><span class="o">,</span> <span class="k">new</span> <span class="n">WLength</span><span class="o">(</span><span class="mi">90</span><span class="o">));</span>
<span class="o">}</span>
- <span class="n">table</span><span class="o">.</span><span class="na">resize</span><span class="o">(</span><span class="k">new</span> <span class="n">WLength</span><span class="o">(</span><span class="mi">780</span><span class="o">),</span> <span class="k">new</span> <span class="n">WLength</span><span class="o">(</span><span class="mi">200</span><span class="o">));</span>
+ <span class="n">table</span><span class="o">.</span><span class="na">resize</span><span class="o">(</span><span class="k">new</span> <span class="n">WLength</span><span class="o">(</span><span class="mi">783</span><span class="o">),</span> <span class="k">new</span> <span class="n">WLength</span><span class="o">(</span><span class="mi">200</span><span class="o">));</span>
<span class="n">WItemDelegate</span> <span class="n">delegate</span> <span class="o">=</span> <span class="k">new</span> <span class="n">WItemDelegate</span><span class="o">(</span><span class="n">table</span><span class="o">);</span>
<span class="n">delegate</span><span class="o">.</span><span class="na">setTextFormat</span><span class="o">(</span><span class="s">&quot;%.1f&quot;</span><span class="o">);</span>
<span class="n">table</span><span class="o">.</span><span class="na">setItemDelegate</span><span class="o">(</span><span class="n">delegate</span><span class="o">);</span>
View
2  overview.html
@@ -25,7 +25,7 @@
the way you build Wt, the way you configure Wt or the Wt API and
behaviour. It also indicates the main changes from version to verison.
-<h2>Release 3.3.2 (February, 2014)</h2>
+<h2>Release 3.3.2 (March 12, 2014)</h2>
<p>
This release brings a few big new features, as well the usual
View
1  src/eu/webtoolkit/jwt/DefaultPagingBar.java
@@ -26,6 +26,7 @@
public DefaultPagingBar(WAbstractItemView view) {
super();
this.view_ = view;
+ this.view_.addStyleClass("Wt-itemview-paged");
this.setStyleClass("Wt-pagingbar");
this.firstButton_ = new WPushButton(
tr("Wt.WAbstractItemView.PageBar.First"), this);
View
4 src/eu/webtoolkit/jwt/StdGridLayoutImpl2.java
@@ -714,7 +714,7 @@ static WJavaScriptPreamble wtjs1() {
JavaScriptScope.WtClassScope,
JavaScriptObjectType.JavaScriptConstructor,
"StdLayout2",
- "function(F,E,K,T,U,V,aa,q,D,y,A){function z(a,b,c,e){function i(l){return l==\"visible\"||l==\"none\"}var k=s[b],j=b?a.scrollHeight:a.scrollWidth,t,d;if(b==0&&j+f.pxself(a,k.left)>=e.clientWidth){t=a.style[k.left];v(a,k.left,\"-1000000px\");j=b?a.scrollHeight:a.scrollWidth}e=b?a.clientHeight:a.clientWidth;if(f.isGecko&&!a.style[k.size]&&b==0&&i(f.css(a,\"overflow\"))){d=a.style[k.size];v(a,k.size,\"\")}b=b?a.offsetHeight:a.offsetWidth;t&&v(a,k.left, t);d&&v(a,k.size,d);if(e>=1E6)e-=1E6;if(j>=1E6)j-=1E6;if(b>=1E6)b-=1E6;if(j===0){j=f.pxself(a,k.size);if(j!==0&&!f.isOpera&&!f.isGecko)j-=f.px(a,\"border\"+k.Left+\"Width\")+f.px(a,\"border\"+k.Right+\"Width\")}if(f.isIE&&(f.hasTag(a,\"BUTTON\")||f.hasTag(a,\"TEXTAREA\")||f.hasTag(a,\"INPUT\")||f.hasTag(a,\"SELECT\")))j=e;if(j>b)if(f.pxself(a,k.size)==0)j=e;else{var n=false;$(a).find(\".Wt-popup\").each(function(){if(this.style.display!==\"none\")n=true});if(n)j=e}d=f.px(a,\"border\"+k.Left+\"Width\")+f.px(a,\"border\"+k.Right+ \"Width\");t=b-(e+d)!=0;if(c)return[j,scrollBar];if(!f.boxSizing(a)&&!f.isOpera)j+=d;j+=f.px(a,\"margin\"+k.Left)+f.px(a,\"margin\"+k.Right);if(!f.boxSizing(a)&&!f.isIE)j+=f.px(a,\"padding\"+k.Left)+f.px(a,\"padding\"+k.Right);j+=b-(e+d);if(j<b)j=b;a=f.px(a,\"max\"+k.Size);if(a>0)j=Math.min(a,j);return[Math.round(j),t]}function C(a,b){b=s[b];if(a.style.display===\"none\")return 0;else if(a[\"layoutMin\"+b.Size])return a[\"layoutMin\"+b.Size];else{var c=f.px(a,\"min\"+b.Size);f.boxSizing(a)||(c+=f.px(a,\"padding\"+b.Left)+ f.px(a,\"padding\"+b.Right));return c}}function x(a,b){b=s[b];var c=f.px(a,\"margin\"+b.Left)+f.px(a,\"margin\"+b.Right);if(!f.boxSizing(a)&&!(f.isIE&&!f.isIElt9&&f.hasTag(a,\"BUTTON\")))c+=f.px(a,\"border\"+b.Left+\"Width\")+f.px(a,\"border\"+b.Right+\"Width\")+f.px(a,\"padding\"+b.Left)+f.px(a,\"padding\"+b.Right);return c}function M(a,b){b=s[b];return f.px(a,\"padding\"+b.Left)+f.px(a,\"padding\"+b.Right)}function G(a,b){if(f.boxSizing(a)){b=s[b];return f.px(a,\"border\"+b.Left+\"Width\")+f.px(a,\"border\"+b.Right+\"Width\")+ f.px(a,\"padding\"+b.Left)+f.px(a,\"padding\"+b.Right)}else return 0}function ba(a,b){b=s[b];return Math.round(f.px(a,\"border\"+b.Left+\"Width\")+f.px(a,\"border\"+b.Right+\"Width\")+f.px(a,\"margin\"+b.Left)+f.px(a,\"margin\"+b.Right)+f.px(a,\"padding\"+b.Left)+f.px(a,\"padding\"+b.Right))}function W(a,b,c){a.dirty=Math.max(a.dirty,b);N=true;c&&F.layouts2.scheduleAdjust()}function v(a,b,c){if(a.style[b]!==c){a.style[b]=c;return true}else return false}function qa(a,b,c){var e=s[a],i=e.config.length,k=s[a^1].config.length, j=e.measures.slice();if(j.length==5){j[0]=j[0].slice();j[1]=j[1].slice()}if(N){if(c&&typeof e.minSize==\"undefined\"){e.minSize=f.px(c,\"min\"+e.Size);if(e.minSize>0)e.minSize-=G(c,a)}var t=[],d=[],n=0,l=0,h,H,r=false;for(h=0;h<i;++h){var m=0,u=e.config[h][2],p=true;for(H=0;H<k;++H){var g=e.getItem(h,H);if(g){if(!g.w||a==0&&g.dirty>1){var o=$(\"#\"+g.id),w=o.get(0);if(!w){e.setItem(h,H,null);continue}if(w!=g.w){g.w=w;o.find(\"img\").add(o.filter(\"img\")).bind(\"load\",{item:g},function(P){W(P.data.item,1,true)})}}if(!V&& g.w.style.position!=\"absolute\"){g.w.style.position=\"absolute\";g.w.style.visibility=\"hidden\"}if(!g.ps)g.ps=[];if(!g.sc)g.sc=[];if(!g.ms)g.ms=[];if(!g.size)g.size=[];if(!g.psize)g.psize=[];if(!g.fs)g.fs=[];if(!g.margin)g.margin=[];if($(g.w).hasClass(\"Wt-hidden\"))g.ps[a]=g.ms[a]=0;else{o=!g.set;if(!g.set)g.set=[false,false];if(g.w){if(f.isIE)g.w.style.visibility=\"\";if(g.dirty){if(g.dirty>1){w=C(g.w,a);g.ms[a]=w}else w=g.ms[a];if(w>u)u=w;if(g.dirty>1)g.margin[a]=x(g.w,a);if(!g.set[a])if(a==0||!o){o=f.pxself(g.w, e.size);g.fs[a]=o?o+g.margin[a]:0}else{o=Math.round(f.px(g.w,e.size));g.fs[a]=o>Math.max(G(g.w,a),w)?o+g.margin[a]:0}o=g.fs[a];if(g.layout){if(o==0)o=g.ps[a];g.ps[a]=o}else{if(g.wasLayout){g.wasLayout=false;g.set=[false,false];g.ps=[];g.w.wtResize&&g.w.wtResize(g.w,-1,-1,true);v(g.w,s[1].size,\"\")}w=z(g.w,a,false,b);var J=w[0],Q=g.set[a];if(Q)if(g.psize[a]>8)Q=J>=g.psize[a]-4&&J<=g.psize[a]+4;var ka=typeof g.ps[a]!==\"undefined\"&&e.config[h][0]>0&&g.set[a];o=Q||ka?Math.max(o,g.ps[a]):Math.max(o,J); g.ps[a]=o;g.sc[a]=w[1]}if(!g.span||g.span[a]==1){if(o>m)m=o}else r=true}else if(!g.span||g.span[a]==1){if(g.ps[a]>m)m=g.ps[a];if(g.ms[a]>u)u=g.ms[a]}else r=true;if(!(g.w.style.display===\"none\"&&!g.w.ed)&&(!g.span||g.span[a]==1))p=false}}}}if(p)u=m=-1;else if(u>m)m=u;t[h]=m;d[h]=u;if(u>-1){n+=m;l+=u}}if(r){function ma(P,fa){for(h=0;h<i;++h)for(H=0;H<k;++H){var X=e.getItem(h,H);if(X&&X.span&&X.span[a]>1){var ca=P(X),ga=0,ha=0,I;for(I=0;I<X.span[a];++I){var O=fa[h+I];if(O!=-1){ca-=O;++ga;if(e.config[h+ I][0]>0)ha+=e.config[h+I][0]}}if(ca>=0)if(ga>0){if(ha>0)ga=ha;for(I=0;I<X.span[a];++I){O=fa[h+I];if(O!=-1){O=ha>0?e.config[h+I][0]:1;if(O>0){var na=Math.round(ca/O);ca-=na;ga-=O;fa[h+I]+=na}}}}else fa[h]=ca}}}ma(function(P){return P.ps[a]},t);ma(function(P){return P.ms[a]},d)}b=0;o=true;r=false;for(h=0;h<i;++h)if(d[h]>-1){if(o){b+=e.margins[1];o=false}else{b+=e.margins[0];if(r)b+=4}r=e.config[h][1]!==0}o||(b+=e.margins[2]);n+=b;l+=b;e.measures=[t,d,n,l,b]}if(da||j[2]!=e.measures[2])ia.updateSizeInParent(a); c&&e.minSize==0&&j[3]!=e.measures[3]&&c.parentNode.className!=\"Wt-domRoot\"&&v(c,\"min\"+e.Size,e.measures[3]+\"px\");c&&a==0&&c&&f.hasTag(c,\"TD\")&&v(c,e.size,e.measures[2]+\"px\")}function ra(a,b,c){a=s[a];if(ea)c=-c;if(a.config[b][0]>0&&a.config[b+1][0]==0){++b;c=-c}a.fixedSize[b]=a.sizes[b]+c;F.layouts2.scheduleAdjust()}function sa(a,b,c){var e=b.di,i=s[a],k=s[a^1],j,t=f.getElement(E),d;for(d=e-1;d>=0;--d)if(i.sizes[d]>=0){j=-(i.sizes[d]-i.measures[1][d]);break}e=i.sizes[e]-i.measures[1][e];if(ea){var n= j;j=-e;e=-n}new f.SizeHandle(f,i.resizeDir,f.pxself(b,i.size),f.pxself(b,k.size),j,e,i.resizerClass,function(l){ra(a,d,l)},b,t,c,0,0)}function ta(a,b){var c=s[a],e=s[a^1],i=c.measures,k=0,j=false,t=false,d=false,n=ja?b.parentNode:null;if(c.maxSize===0)if(n){var l=f.css(n,\"position\");if(l===\"absolute\")k=f.pxself(n,c.size);if(k===0){if(!c.initialized){if(a===0&&(l===\"absolute\"||l===\"fixed\")){n.style.display=\"none\";k=n.clientWidth;n.style.display=\"\"}k=a?n.clientHeight:n.clientWidth;j=true;if(a==0&&k== 0&&f.isIElt9){k=n.offsetWidth;j=false}var h;if((f.hasTag(n,\"TD\")||f.hasTag(n,\"TH\"))&&!(f.isIE&&!f.isIElt9)){d=0;h=1}else{d=c.minSize?c.minSize:i[3];h=0}function H(Q,ka){return Q-ka<=1}if(f.isIElt9&&H(k,h)||H(k,d+M(n,a)))c.maxSize=999999}if(k===0&&c.maxSize===0){k=a?n.clientHeight:n.clientWidth;j=true}}}else{k=f.pxself(b,c.size);t=true}else if(c.sizeSet){k=f.pxself(n,c.size);t=true}var r=0;if(n&&n.wtGetPS&&a==1)r=n.wtGetPS(n,b,a,0);d=i[2];if(d<c.minSize)d=c.minSize;if(c.maxSize&&!c.sizeSet){k=Math.min(d, c.maxSize)+r;v(n,c.size,k+G(n,a)+\"px\")&&Y&&Y.setElDirty(S);k=k;d=t=true}c.cSize=k;if(a==1&&n&&n.wtResize){h=e.cSize;d=c.cSize;n.wtResize(n,Math.round(h),Math.round(d),true)}k-=r;if(!t){t=0;if(typeof c.cPadding===\"undefined\"){t=j?M(n,a):G(n,a);c.cPadding=t}else t=c.cPadding;k-=t}c.initialized=true;if(!(n&&k<=0)){if(k<i[3]-r)k=i[3]-r;j=[];n=c.config.length;t=e.config.length;for(d=0;d<n;++d)c.stretched[d]=false;if(k>=i[3]-r){r=k-i[4];h=[];var m=[0,0],u=[0,0],p=0;for(d=0;d<n;++d)if(i[1][d]>-1){l=-1;if(typeof c.fixedSize[d]!== \"undefined\"&&(d+1==n||i[1][d+1]>-1))l=c.fixedSize[d];else if(c.config[d][1]!==0&&c.config[d][1][0]>=0){l=c.config[d][1][0];if(c.config[d][1][1])l=(k-i[4])*l/100}if(l>=0){h[d]=-1;j[d]=l;r-=j[d]}else{if(c.config[d][0]>0){l=1;h[d]=c.config[d][0];p+=h[d]}else{l=0;h[d]=0}m[l]+=i[1][d];u[l]+=i[0][d];j[d]=i[0][d]}}else{h[d]=-2;j[d]=-1}if(p==0){for(d=0;d<n;++d)if(h[d]==0){h[d]=1;++p}u[1]=u[0];m[1]=m[0];u[0]=0;m[0]=0}if(r>u[0]+m[1]){r-=u[0];if(r>u[1]){if(c.fitSize){r-=u[1];r=r/p;for(d=0;d<n;++d)if(h[d]>0){j[d]+= Math.round(h[d]*r);c.stretched[d]=true}}}else{l=1;if(r<m[l])r=m[l];r=u[l]-m[l]>0?(r-m[l])/(u[l]-m[l]):0;for(d=0;d<n;++d)if(h[d]>0){m=i[0][d]-i[1][d];j[d]=i[1][d]+Math.round(m*r)}}}else{for(d=0;d<n;++d)if(h[d]>0)j[d]=i[1][d];r-=m[1];l=0;if(r<m[l])r=m[l];r=u[l]-m[l]>0?(r-m[l])/(u[l]-m[l]):0;for(d=0;d<n;++d)if(h[d]==0){m=i[0][d]-i[1][d];j[d]=i[1][d]+Math.round(m*r)}}}else j=i[1];c.sizes=j;i=c.margins[1];r=true;m=false;for(d=0;d<n;++d){if(j[d]>-1){var g=m;if(m){h=E+\"-rs\"+a+\"-\"+d;m=f.getElement(h);if(!m){m= document.createElement(\"div\");m.setAttribute(\"id\",h);m.di=d;m.style.position=\"absolute\";m.style[e.left]=e.margins[1]+\"px\";m.style[c.size]=c.margins[0]+\"px\";if(e.cSize)m.style[e.size]=e.cSize-e.margins[2]-e.margins[1]+\"px\";m.className=c.handleClass;b.insertBefore(m,b.firstChild);m.onmousedown=m.ontouchstart=function(Q){sa(a,this,Q||window.event)}}i+=2;v(m,c.left,i+\"px\");i+=2}m=c.config[d][1]!==0;if(r)r=false;else i+=c.margins[0]}for(u=0;u<t;++u)if((p=c.getItem(d,u))&&p.w){h=p.w;l=Math.max(j[d],0); if(p.span){var o,w=m;for(o=1;o<p.span[a];++o){if(d+o>=j.length)break;if(w)l+=4;w=c.config[d+o][1]!==0;if(j[d+o-1]>-1&&j[d+o]>-1)l+=c.margins[0];l+=j[d+o]}}var J;v(h,\"visibility\",\"\");w=p.align>>c.alignBits&15;o=p.ps[a];if(l<o)w=0;if(w){switch(w){case 1:J=i;break;case 4:J=i+(l-o)/2;break;case 2:J=i+(l-o);break}o-=p.margin[a];if(p.layout){v(h,c.size,o+\"px\")&&W(p,1);p.set[a]=true}else if(l>=o&&p.set[a]){v(h,c.size,o+\"px\")&&W(p,1);p.set[a]=false}p.size[a]=o;p.psize[a]=o}else{w=Math.max(0,l-p.margin[a]); J=a==0&&p.sc[a];if(!(h.style.display===\"none\"&&!h.ed)&&(J||l!=o||p.layout)){if(v(h,c.size,w+\"px\")){if(!f.isIE&&(f.hasTag(h,\"TEXTAREA\")||f.hasTag(h,\"INPUT\"))){v(h,\"margin-\"+c.left,p.margin[a]/2+\"px\");v(h,\"margin-\"+e.left,p.margin[!a]/2+\"px\")}W(p,1);p.set[a]=true}}else if(p.fs[a])a==0&&v(h,c.size,p.fs[a]+\"px\");else{v(h,c.size,\"\")&&W(p,1);p.set[a]=false}J=i;p.size[a]=w;p.psize[a]=l}if(V)if(g){v(h,c.left,\"4px\");l=f.css(h,\"position\");if(l!==\"absolute\")h.style.position=\"relative\"}else v(h,c.left,\"0px\"); else v(h,c.left,J+\"px\");if(a==1){if(h.wtResize)h.wtResize(h,p.set[0]?Math.round(p.size[0]):-1,p.set[1]?Math.round(p.size[1]):-1,true);p.dirty=0}}if(j[d]>-1)i+=j[d]}$(b).children(\".\"+e.handleClass).css(c.size,k-c.margins[2]-c.margins[1]+\"px\")}}var f=F.WT;this.descendants=[];var ia=this,B=A,N=true,da=true,ja=false,Y=null,S=null,la=false,oa=false,Z=[],pa=false,ea=$(document.body).hasClass(\"Wt-rtl\"),s=[{initialized:false,config:B.cols,margins:D,maxSize:aa,measures:[],sizes:[],stretched:[],fixedSize:[], Left:ea?\"Right\":\"Left\",left:ea?\"right\":\"left\",Right:ea?\"Left\":\"Right\",Size:\"Width\",size:\"width\",alignBits:0,getItem:function(a,b){return B.items[b*s[0].config.length+a]},setItem:function(a,b,c){B.items[b*s[0].config.length+a]=c},handleClass:\"Wt-vrh2\",resizeDir:\"h\",resizerClass:\"Wt-hsh2\",fitSize:T},{initialized:false,config:B.rows,margins:y,maxSize:q,measures:[],sizes:[],stretched:[],fixedSize:[],Left:\"Top\",left:\"top\",Right:\"Bottom\",Size:\"Height\",size:\"height\",alignBits:4,getItem:function(a,b){return B.items[a* s[0].config.length+b]},setItem:function(a,b,c){B.items[a*s[0].config.length+b]=c},handleClass:\"Wt-hrh2\",resizeDir:\"v\",resizerClass:\"Wt-vsh2\",fitSize:U}];jQuery.data(document.getElementById(E),\"layout\",this);this.updateSizeInParent=function(a){if(Y)if(la){var b=s[a],c=b.measures[2];if(b.maxSize>0)c=Math.min(b.maxSize,c);if(pa){b=f.getElement(E);if(!b)return;for(var e=b,i=e.parentNode;;){if(i.wtGetPS)c=i.wtGetPS(i,e,a,c);c+=ba(i,a);if(i==S)break;if(a==1&&i==b.parentNode&&!i.lh&&i.offsetHeight>c)c=i.offsetHeight; e=i;i=e.parentNode}}else c+=Z[a];Y.setChildSize(S,a,c)}};this.setConfig=function(a){var b=B;B=a;s[0].config=B.cols;s[1].config=B.rows;s[0].stretched=[];s[1].stretched=[];var c;a=0;for(c=b.items.length;a<c;++a){var e=b.items[a];if(e){if(e.set){e.set[0]&&v(e.w,s[0].size,\"\");e.set[1]&&v(e.w,s[1].size,\"\")}if(e.layout){ia.setChildSize(e.w,0,e.ps[0]);ia.setChildSize(e.w,1,e.ps[1])}}}N=da=true;F.layouts2.scheduleAdjust()};this.getId=function(){return E};this.setElDirty=function(a){var b,c;b=0;for(c=B.items.length;b< c;++b){var e=B.items[b];if(e&&e.id==a.id){e.dirty=2;N=true;F.layouts2.scheduleAdjust();return}}};this.setItemsDirty=function(a){var b,c,e=s[0].config.length;b=0;for(c=a.length;b<c;++b){var i=B.items[a[b][0]*e+a[b][1]];i.dirty=2;if(i.layout){i.layout=false;i.wasLayout=true;F.layouts2.setChildLayoutsDirty(ia,i.w)}}N=true};this.setDirty=function(){da=true};this.setAllDirty=function(){var a,b;a=0;for(b=B.items.length;a<b;++a){var c=B.items[a];if(c)c.dirty=2}N=true};this.setChildSize=function(a,b,c){var e= s[0].config.length,i=s[b],k,j;k=0;for(j=B.items.length;k<j;++k){var t=B.items[k];if(t&&t.id==a.id){a=b===0?k%e:k/e;if(t.align>>i.alignBits&15||!i.stretched[a]){if(!t.ps)t.ps=[];t.ps[b]=c}t.layout=true;W(t,1);break}}};this.measure=function(a){var b=f.getElement(E);if(b)if(!f.isHidden(b)){if(!oa){oa=true;ja=K==null;la=true;if(ja){var c=b;c=c.parentNode;for(Z=[0,0];c!=document;){Z[0]+=ba(c,0);Z[1]+=ba(c,1);if(c.wtGetPS)pa=true;var e=jQuery.data(c.parentNode,\"layout\");if(e){Y=e;S=c;break}c=c;c=c.parentNode; if(c.childNodes.length!=1&&!c.wtGetPS)la=false}c=b.parentNode;for(e=0;e<2;++e)s[e].sizeSet=f.pxself(c,s[e].size)!=0}else{Y=jQuery.data(document.getElementById(K),\"layout\");S=b;Z[0]=ba(S,0);Z[1]=ba(S,1)}}if(N||da){c=ja?b.parentNode:null;qa(a,b,c)}if(a==1)N=da=false}};this.setMaxSize=function(a,b){s[0].maxSize=a;s[1].maxSize=b};this.apply=function(a){var b=f.getElement(E);if(!b)return false;if(f.isHidden(b))return true;ta(a,b);return true};this.contains=function(a){var b=f.getElement(E);a=f.getElement(a.getId()); return b&&a?f.contains(b,a):false};this.WT=f}");
+ "function(F,D,M,V,W,X,aa,q,E,y,A){function z(a,b,c,f){function i(l){return l==\"visible\"||l==\"none\"}var k=s[b],j=b?a.scrollHeight:a.scrollWidth,t,d;if(b==0&&j+e.pxself(a,k.left)>=f.clientWidth){t=a.style[k.left];v(a,k.left,\"-1000000px\");j=b?a.scrollHeight:a.scrollWidth}f=b?a.clientHeight:a.clientWidth;if(e.isGecko&&!a.style[k.size]&&b==0&&i(e.css(a,\"overflow\"))){d=a.style[k.size];v(a,k.size,\"\")}b=b?a.offsetHeight:a.offsetWidth;t&&v(a,k.left, t);d&&v(a,k.size,d);if(f>=1E6)f-=1E6;if(j>=1E6)j-=1E6;if(b>=1E6)b-=1E6;if(j===0){j=e.pxself(a,k.size);if(j!==0&&!e.isOpera&&!e.isGecko)j-=e.px(a,\"border\"+k.Left+\"Width\")+e.px(a,\"border\"+k.Right+\"Width\")}if(e.isIE&&(e.hasTag(a,\"BUTTON\")||e.hasTag(a,\"TEXTAREA\")||e.hasTag(a,\"INPUT\")||e.hasTag(a,\"SELECT\")))j=f;if(j>b)if(e.pxself(a,k.size)==0)j=f;else{var n=false;$(a).find(\".Wt-popup\").each(function(){if(this.style.display!==\"none\")n=true});if(n)j=f}d=e.px(a,\"border\"+k.Left+\"Width\")+e.px(a,\"border\"+k.Right+ \"Width\");t=b-(f+d)!=0;if(c)return[j,scrollBar];if(!e.boxSizing(a)&&!e.isOpera)j+=d;j+=e.px(a,\"margin\"+k.Left)+e.px(a,\"margin\"+k.Right);if(!e.boxSizing(a)&&!e.isIE)j+=e.px(a,\"padding\"+k.Left)+e.px(a,\"padding\"+k.Right);j+=b-(f+d);if(j<b)j=b;a=e.px(a,\"max\"+k.Size);if(a>0)j=Math.min(a,j);return[Math.round(j),t]}function C(a,b){b=s[b];if(a.style.display===\"none\")return 0;else if(a[\"layoutMin\"+b.Size])return a[\"layoutMin\"+b.Size];else{var c=e.px(a,\"min\"+b.Size);e.boxSizing(a)||(c+=e.px(a,\"padding\"+b.Left)+ e.px(a,\"padding\"+b.Right));return c}}function x(a,b){b=s[b];var c=e.px(a,\"margin\"+b.Left)+e.px(a,\"margin\"+b.Right);if(!e.boxSizing(a)&&!(e.isIE&&!e.isIElt9&&e.hasTag(a,\"BUTTON\")))c+=e.px(a,\"border\"+b.Left+\"Width\")+e.px(a,\"border\"+b.Right+\"Width\")+e.px(a,\"padding\"+b.Left)+e.px(a,\"padding\"+b.Right);return c}function N(a,b){b=s[b];return e.px(a,\"padding\"+b.Left)+e.px(a,\"padding\"+b.Right)}function G(a,b){if(e.boxSizing(a)){b=s[b];return e.px(a,\"border\"+b.Left+\"Width\")+e.px(a,\"border\"+b.Right+\"Width\")+ e.px(a,\"padding\"+b.Left)+e.px(a,\"padding\"+b.Right)}else return 0}function ba(a,b){b=s[b];return Math.round(e.px(a,\"border\"+b.Left+\"Width\")+e.px(a,\"border\"+b.Right+\"Width\")+e.px(a,\"margin\"+b.Left)+e.px(a,\"margin\"+b.Right)+e.px(a,\"padding\"+b.Left)+e.px(a,\"padding\"+b.Right))}function Y(a,b,c){a.dirty=Math.max(a.dirty,b);P=true;c&&F.layouts2.scheduleAdjust()}function v(a,b,c){if(a.style[b]!==c){a.style[b]=c;return true}else return false}function ra(a,b,c){var f=s[a],i=f.config.length,k=s[a^1].config.length, j=f.measures.slice();if(j.length==5){j[0]=j[0].slice();j[1]=j[1].slice()}if(P){if(c&&typeof f.minSize==\"undefined\"){f.minSize=e.px(c,\"min\"+f.Size);if(f.minSize>0)f.minSize-=G(c,a)}var t=[],d=[],n=0,l=0,h,H,r=false;for(h=0;h<i;++h){var m=0,u=f.config[h][2],p=true;for(H=0;H<k;++H){var g=f.getItem(h,H);if(g){if(!g.w||a==0&&g.dirty>1){var o=$(\"#\"+g.id),w=o.get(0);if(!w){f.setItem(h,H,null);continue}if(w!=g.w){g.w=w;o.find(\"img\").add(o.filter(\"img\")).bind(\"load\",{item:g},function(S){Y(S.data.item,1,true)})}}if(!X&& g.w.style.position!=\"absolute\"){g.w.style.position=\"absolute\";g.w.style.visibility=\"hidden\"}if(!g.ps)g.ps=[];if(!g.sc)g.sc=[];if(!g.ms)g.ms=[];if(!g.size)g.size=[];if(!g.psize)g.psize=[];if(!g.fs)g.fs=[];if(!g.margin)g.margin=[];if($(g.w).hasClass(\"Wt-hidden\"))g.ps[a]=g.ms[a]=0;else{o=!g.set;if(!g.set)g.set=[false,false];if(g.w){if(e.isIE)g.w.style.visibility=\"\";if(g.dirty){if(g.dirty>1){w=C(g.w,a);g.ms[a]=w}else w=g.ms[a];if(w>u)u=w;if(g.dirty>1)g.margin[a]=x(g.w,a);if(!g.set[a])if(a==0||!o){o=e.pxself(g.w, f.size);g.fs[a]=o?o+g.margin[a]:0}else{o=Math.round(e.px(g.w,f.size));g.fs[a]=o>Math.max(G(g.w,a),w)?o+g.margin[a]:0}o=g.fs[a];if(g.layout){if(o==0)o=g.ps[a];g.ps[a]=o}else{if(g.wasLayout){g.wasLayout=false;g.set=[false,false];g.ps=[];g.w.wtResize&&g.w.wtResize(g.w,-1,-1,true);v(g.w,s[1].size,\"\")}w=z(g.w,a,false,b);var J=w[0],T=g.set[a];if(T)if(g.psize[a]>8)T=J>=g.psize[a]-4&&J<=g.psize[a]+4;var ka=typeof g.ps[a]!==\"undefined\"&&f.config[h][0]>0&&g.set[a];o=T||ka?Math.max(o,g.ps[a]):Math.max(o,J); g.ps[a]=o;g.sc[a]=w[1]}if(!g.span||g.span[a]==1){if(o>m)m=o}else r=true}else if(!g.span||g.span[a]==1){if(g.ps[a]>m)m=g.ps[a];if(g.ms[a]>u)u=g.ms[a]}else r=true;if(!(g.w.style.display===\"none\"&&!g.w.ed)&&(!g.span||g.span[a]==1))p=false}}}}if(p)u=m=-1;else if(u>m)m=u;t[h]=m;d[h]=u;if(u>-1){n+=m;l+=u}}if(r){function oa(S,fa){for(h=0;h<i;++h)for(H=0;H<k;++H){var Z=f.getItem(h,H);if(Z&&Z.span&&Z.span[a]>1){var ca=S(Z),ga=0,ha=0,I;for(I=0;I<Z.span[a];++I){var Q=fa[h+I];if(Q!=-1){ca-=Q;++ga;if(f.config[h+ I][0]>0)ha+=f.config[h+I][0]}}if(ca>=0)if(ga>0){if(ha>0)ga=ha;for(I=0;I<Z.span[a];++I){Q=fa[h+I];if(Q!=-1){Q=ha>0?f.config[h+I][0]:1;if(Q>0){var pa=Math.round(ca/Q);ca-=pa;ga-=Q;fa[h+I]+=pa}}}}else fa[h]=ca}}}oa(function(S){return S.ps[a]},t);oa(function(S){return S.ms[a]},d)}b=0;o=true;r=false;for(h=0;h<i;++h)if(d[h]>-1){if(o){b+=f.margins[1];o=false}else{b+=f.margins[0];if(r)b+=4}r=f.config[h][1]!==0}o||(b+=f.margins[2]);n+=b;l+=b;f.measures=[t,d,n,l,b]}if(da||j[2]!=f.measures[2])ia.updateSizeInParent(a); c&&f.minSize==0&&j[3]!=f.measures[3]&&c.parentNode.className!=\"Wt-domRoot\"&&v(c,\"min\"+f.Size,f.measures[3]+\"px\");c&&a==0&&c&&e.hasTag(c,\"TD\")&&v(c,f.size,f.measures[2]+\"px\")}function sa(a,b,c){a=s[a];if(ea)c=-c;if(a.config[b][0]>0&&a.config[b+1][0]==0){++b;c=-c}a.fixedSize[b]=a.sizes[b]+c;F.layouts2.scheduleAdjust()}function ta(a,b,c){var f=b.di,i=s[a],k=s[a^1],j,t=e.getElement(D),d;for(d=f-1;d>=0;--d)if(i.sizes[d]>=0){j=-(i.sizes[d]-i.measures[1][d]);break}f=i.sizes[f]-i.measures[1][f];if(ea){var n= j;j=-f;f=-n}new e.SizeHandle(e,i.resizeDir,e.pxself(b,i.size),e.pxself(b,k.size),j,f,i.resizerClass,function(l){sa(a,d,l)},b,t,c,0,0)}function ua(a,b){var c=s[a],f=s[a^1],i=c.measures,k=0,j=false,t=false,d=false,n=ja?b.parentNode:null;if(c.maxSize===0)if(n){var l=e.css(n,\"position\");if(l===\"absolute\")k=e.pxself(n,c.size);if(k===0){if(!c.initialized){if(a===0&&(l===\"absolute\"||l===\"fixed\")){n.style.display=\"none\";k=n.clientWidth;n.style.display=\"\"}k=a?n.clientHeight:n.clientWidth;j=true;if(a==0&&k== 0&&e.isIElt9){k=n.offsetWidth;j=false}var h;if((e.hasTag(n,\"TD\")||e.hasTag(n,\"TH\"))&&!(e.isIE&&!e.isIElt9)){d=0;h=1}else{d=c.minSize?c.minSize:i[3];h=0}function H(T,ka){return T-ka<=1}if(e.isIElt9&&H(k,h)||H(k,d+N(n,a)))c.maxSize=999999}if(k===0&&c.maxSize===0){k=a?n.clientHeight:n.clientWidth;j=true}}}else{k=e.pxself(b,c.size);t=true}else if(c.sizeSet){k=e.pxself(n,c.size);t=true}var r=0;if(n&&n.wtGetPS&&a==1)r=n.wtGetPS(n,b,a,0);d=i[2];if(d<c.minSize)d=c.minSize;if(c.maxSize&&!c.sizeSet){k=Math.min(d, c.maxSize)+r;v(n,c.size,k+G(n,a)+\"px\")&&O&&O.setElDirty(K);k=k;d=t=true}c.cSize=k;if(a==1&&n&&n.wtResize){h=f.cSize;d=c.cSize;n.wtResize(n,Math.round(h),Math.round(d),true)}k-=r;if(!t){t=0;if(typeof c.cPadding===\"undefined\"){t=j?N(n,a):G(n,a);c.cPadding=t}else t=c.cPadding;k-=t}c.initialized=true;if(!(n&&k<=0)){if(k<i[3]-r)k=i[3]-r;j=[];n=c.config.length;t=f.config.length;for(d=0;d<n;++d)c.stretched[d]=false;if(k>=i[3]-r){r=k-i[4];h=[];var m=[0,0],u=[0,0],p=0;for(d=0;d<n;++d)if(i[1][d]>-1){l=-1;if(typeof c.fixedSize[d]!== \"undefined\"&&(d+1==n||i[1][d+1]>-1))l=c.fixedSize[d];else if(c.config[d][1]!==0&&c.config[d][1][0]>=0){l=c.config[d][1][0];if(c.config[d][1][1])l=(k-i[4])*l/100}if(l>=0){h[d]=-1;j[d]=l;r-=j[d]}else{if(c.config[d][0]>0){l=1;h[d]=c.config[d][0];p+=h[d]}else{l=0;h[d]=0}m[l]+=i[1][d];u[l]+=i[0][d];j[d]=i[0][d]}}else{h[d]=-2;j[d]=-1}if(p==0){for(d=0;d<n;++d)if(h[d]==0){h[d]=1;++p}u[1]=u[0];m[1]=m[0];u[0]=0;m[0]=0}if(r>u[0]+m[1]){r-=u[0];if(r>u[1]){if(c.fitSize){r-=u[1];r=r/p;for(d=0;d<n;++d)if(h[d]>0){j[d]+= Math.round(h[d]*r);c.stretched[d]=true}}}else{l=1;if(r<m[l])r=m[l];r=u[l]-m[l]>0?(r-m[l])/(u[l]-m[l]):0;for(d=0;d<n;++d)if(h[d]>0){m=i[0][d]-i[1][d];j[d]=i[1][d]+Math.round(m*r)}}}else{for(d=0;d<n;++d)if(h[d]>0)j[d]=i[1][d];r-=m[1];l=0;if(r<m[l])r=m[l];r=u[l]-m[l]>0?(r-m[l])/(u[l]-m[l]):0;for(d=0;d<n;++d)if(h[d]==0){m=i[0][d]-i[1][d];j[d]=i[1][d]+Math.round(m*r)}}}else j=i[1];c.sizes=j;i=c.margins[1];r=true;m=false;for(d=0;d<n;++d){if(j[d]>-1){var g=m;if(m){h=D+\"-rs\"+a+\"-\"+d;m=e.getElement(h);if(!m){m= document.createElement(\"div\");m.setAttribute(\"id\",h);m.di=d;m.style.position=\"absolute\";m.style[f.left]=f.margins[1]+\"px\";m.style[c.size]=c.margins[0]+\"px\";if(f.cSize)m.style[f.size]=f.cSize-f.margins[2]-f.margins[1]+\"px\";m.className=c.handleClass;b.insertBefore(m,b.firstChild);m.onmousedown=m.ontouchstart=function(T){ta(a,this,T||window.event)}}i+=2;v(m,c.left,i+\"px\");i+=2}m=c.config[d][1]!==0;if(r)r=false;else i+=c.margins[0]}for(u=0;u<t;++u)if((p=c.getItem(d,u))&&p.w){h=p.w;l=Math.max(j[d],0); if(p.span){var o,w=m;for(o=1;o<p.span[a];++o){if(d+o>=j.length)break;if(w)l+=4;w=c.config[d+o][1]!==0;if(j[d+o-1]>-1&&j[d+o]>-1)l+=c.margins[0];l+=j[d+o]}}var J;v(h,\"visibility\",\"\");w=p.align>>c.alignBits&15;o=p.ps[a];if(l<o)w=0;if(w){switch(w){case 1:J=i;break;case 4:J=i+(l-o)/2;break;case 2:J=i+(l-o);break}o-=p.margin[a];if(p.layout){v(h,c.size,o+\"px\")&&Y(p,1);p.set[a]=true}else if(l>=o&&p.set[a]){v(h,c.size,o+\"px\")&&Y(p,1);p.set[a]=false}p.size[a]=o;p.psize[a]=o}else{w=Math.max(0,l-p.margin[a]); J=a==0&&p.sc[a];if(!(h.style.display===\"none\"&&!h.ed)&&(J||l!=o||p.layout)){if(v(h,c.size,w+\"px\")){if(!e.isIE&&(e.hasTag(h,\"TEXTAREA\")||e.hasTag(h,\"INPUT\"))){v(h,\"margin-\"+c.left,p.margin[a]/2+\"px\");v(h,\"margin-\"+f.left,p.margin[!a]/2+\"px\")}Y(p,1);p.set[a]=true}}else if(p.fs[a])a==0&&v(h,c.size,p.fs[a]+\"px\");else{v(h,c.size,\"\")&&Y(p,1);p.set[a]=false}J=i;p.size[a]=w;p.psize[a]=l}if(X)if(g){v(h,c.left,\"4px\");l=e.css(h,\"position\");if(l!==\"absolute\")h.style.position=\"relative\"}else v(h,c.left,\"0px\"); else v(h,c.left,J+\"px\");if(a==1){if(h.wtResize)h.wtResize(h,p.set[0]?Math.round(p.size[0]):-1,p.set[1]?Math.round(p.size[1]):-1,true);p.dirty=0}}if(j[d]>-1)i+=j[d]}$(b).children(\".\"+f.handleClass).css(c.size,k-c.margins[2]-c.margins[1]+\"px\")}}function la(){var a=e.getElement(D);ja=M==null;K=O=null;qa=ma=true;U=[];na=false;if(ja){var b=a;b=b.parentNode;for(U=[0,0];b!=document;){U[0]+=ba(b,0);U[1]+=ba(b,1);if(b.wtGetPS)na=true;var c=jQuery.data(b.parentNode,\"layout\");if(c){K=b;O=c;break}b=b;b=b.parentNode; if(b.childNodes.length!=1&&!b.wtGetPS)ma=false}a=a.parentNode;for(b=0;b<2;++b)s[b].sizeSet=e.pxself(a,s[b].size)!=0}else{O=jQuery.data(document.getElementById(M),\"layout\");K=a;U[0]=ba(K,0);U[1]=ba(K,1)}}var e=F.WT;this.descendants=[];var ia=this,B=A,P=true,da=true,ja,O,K,ma,qa=false,U,na,ea=$(document.body).hasClass(\"Wt-rtl\"),s=[{initialized:false,config:B.cols,margins:E,maxSize:aa,measures:[],sizes:[],stretched:[],fixedSize:[],Left:ea?\"Right\":\"Left\",left:ea?\"right\":\"left\",Right:ea?\"Left\":\"Right\", Size:\"Width\",size:\"width\",alignBits:0,getItem:function(a,b){return B.items[b*s[0].config.length+a]},setItem:function(a,b,c){B.items[b*s[0].config.length+a]=c},handleClass:\"Wt-vrh2\",resizeDir:\"h\",resizerClass:\"Wt-hsh2\",fitSize:V},{initialized:false,config:B.rows,margins:y,maxSize:q,measures:[],sizes:[],stretched:[],fixedSize:[],Left:\"Top\",left:\"top\",Right:\"Bottom\",Size:\"Height\",size:\"height\",alignBits:4,getItem:function(a,b){return B.items[a*s[0].config.length+b]},setItem:function(a,b,c){B.items[a* s[0].config.length+b]=c},handleClass:\"Wt-hrh2\",resizeDir:\"v\",resizerClass:\"Wt-vsh2\",fitSize:W}];jQuery.data(document.getElementById(D),\"layout\",this);this.updateSizeInParent=function(a){if(O){var b=e.$(K.id);if(b){if(K!=b)if(O=jQuery.data(b.parentNode,\"layout\"))K=b;else la()}else la()}if(O)if(ma){var c=s[a];b=c.measures[2];if(c.maxSize>0)b=Math.min(c.maxSize,b);if(na){c=e.getElement(D);if(!c)return;for(var f=c,i=f.parentNode;;){if(i.wtGetPS)b=i.wtGetPS(i,f,a,b);b+=ba(i,a);if(i==K)break;if(a==1&&i== c.parentNode&&!i.lh&&i.offsetHeight>b)b=i.offsetHeight;f=i;i=f.parentNode}}else b+=U[a];O.setChildSize(K,a,b)}};this.setConfig=function(a){var b=B;B=a;s[0].config=B.cols;s[1].config=B.rows;s[0].stretched=[];s[1].stretched=[];var c;a=0;for(c=b.items.length;a<c;++a){var f=b.items[a];if(f){if(f.set){f.set[0]&&v(f.w,s[0].size,\"\");f.set[1]&&v(f.w,s[1].size,\"\")}if(f.layout){ia.setChildSize(f.w,0,f.ps[0]);ia.setChildSize(f.w,1,f.ps[1])}}}P=da=true;F.layouts2.scheduleAdjust()};this.getId=function(){return D}; this.setElDirty=function(a){var b,c;b=0;for(c=B.items.length;b<c;++b){var f=B.items[b];if(f&&f.id==a.id){f.dirty=2;P=true;F.layouts2.scheduleAdjust();return}}};this.setItemsDirty=function(a){var b,c,f=s[0].config.length;b=0;for(c=a.length;b<c;++b){var i=B.items[a[b][0]*f+a[b][1]];i.dirty=2;if(i.layout){i.layout=false;i.wasLayout=true;F.layouts2.setChildLayoutsDirty(ia,i.w)}}P=true};this.setDirty=function(){da=true};this.setAllDirty=function(){var a,b;a=0;for(b=B.items.length;a<b;++a){var c=B.items[a]; if(c)c.dirty=2}P=true};this.setChildSize=function(a,b,c){var f=s[0].config.length,i=s[b],k,j;k=0;for(j=B.items.length;k<j;++k){var t=B.items[k];if(t&&t.id==a.id){a=b===0?k%f:k/f;if(t.align>>i.alignBits&15||!i.stretched[a]){if(!t.ps)t.ps=[];t.ps[b]=c}t.layout=true;Y(t,1);break}}};this.measure=function(a){var b=e.getElement(D);if(b)if(!e.isHidden(b)){qa||la();if(P||da)ra(a,b,ja?b.parentNode:null);if(a==1)P=da=false}};this.setMaxSize=function(a,b){s[0].maxSize=a;s[1].maxSize=b};this.apply=function(a){var b= e.getElement(D);if(!b)return false;if(e.isHidden(b))return true;ua(a,b);return true};this.contains=function(a){var b=e.getElement(D);a=e.getElement(a.getId());return b&&a?e.contains(b,a):false};this.WT=e}");
}
static WJavaScriptPreamble appjs1() {
@@ -722,7 +722,7 @@ static WJavaScriptPreamble appjs1() {
JavaScriptScope.ApplicationScope,
JavaScriptObjectType.JavaScriptObject,
"layouts2",
- "new (function(){var F=[],E=false,K=this,T=false;this.find=function(q){return(q=document.getElementById(q))?jQuery.data(q,\"layout\"):null};this.setDirty=function(q){if(q=this.find(q)){q.setDirty();K.scheduleAdjust()}};this.setElementDirty=function(q){var D=q;for(q=q.parentNode;q&&q!=document.body;){var y=jQuery.data(q,\"layout\");y&&y.setElDirty(D);D=q;q=q.parentNode}};this.setChildLayoutsDirty=function(q,D){var y,A;y=0;for(A=q.descendants.length;y< A;++y){var z=q.descendants[y];if(D){var C=q.WT.getElement(z.getId());if(C&&!q.WT.contains(D,C))continue}z.setDirty()}};this.add=function(q){function D(y,A){var z,C;z=0;for(C=y.length;z<C;++z){var x=y[z];if(x.getId()==A.getId()){y[z]=A;A.descendants=x.descendants;return}else if(x.contains(A)){D(x.descendants,A);return}else if(A.contains(x)){A.descendants.push(x);y.splice(z,1);--z;--C}}y.push(A)}D(F,q);K.scheduleAdjust()};var U=false,V=0;this.scheduleAdjust=function(q){if(q)T=true;if(!U){if(E)++V;else V= 0;if(!(V>=6)){U=true;setTimeout(function(){K.adjust()},0)}}};this.adjust=function(q,D){function y(z,C){var x,M;x=0;for(M=z.length;x<M;++x){var G=z[x];y(G.descendants,C);if(C==1&&T)G.setDirty();else C==0&&G.setAllDirty();G.measure(C)}}function A(z,C){var x,M;x=0;for(M=z.length;x<M;++x){var G=z[x];if(G.apply(C))A(G.descendants,C);else{z.splice(x,1);--x;--M}}}if(q){(q=this.find(q))&&q.setItemsDirty(D);K.scheduleAdjust()}else{U=false;if(!E){E=true;y(F,0);A(F,0);y(F,1);A(F,1);T=E=false}}};this.updateConfig= function(q,D){(q=this.find(q))&&q.setConfig(D)};this.adjustNow=function(){U&&K.adjust()};var aa=null;window.onresize=function(){clearTimeout(aa);aa=setTimeout(function(){aa=null;K.scheduleAdjust(true)},20)};window.onshow=function(){T=true;K.adjust()}})");
+ "new (function(){var F=[],D=false,M=this,V=false;this.find=function(q){return(q=document.getElementById(q))?jQuery.data(q,\"layout\"):null};this.setDirty=function(q){if(q=this.find(q)){q.setDirty();M.scheduleAdjust()}};this.setElementDirty=function(q){var E=q;for(q=q.parentNode;q&&q!=document.body;){var y=jQuery.data(q,\"layout\");y&&y.setElDirty(E);E=q;q=q.parentNode}};this.setChildLayoutsDirty=function(q,E){var y,A;y=0;for(A=q.descendants.length;y< A;++y){var z=q.descendants[y];if(E){var C=q.WT.getElement(z.getId());if(C&&!q.WT.contains(E,C))continue}z.setDirty()}};this.add=function(q){function E(y,A){var z,C;z=0;for(C=y.length;z<C;++z){var x=y[z];if(x.getId()==A.getId()){y[z]=A;A.descendants=x.descendants;return}else if(x.contains(A)){E(x.descendants,A);return}else if(A.contains(x)){A.descendants.push(x);y.splice(z,1);--z;--C}}y.push(A)}E(F,q);M.scheduleAdjust()};var W=false,X=0;this.scheduleAdjust=function(q){if(q)V=true;if(!W){if(D)++X;else X= 0;if(!(X>=6)){W=true;setTimeout(function(){M.adjust()},0)}}};this.adjust=function(q,E){function y(z,C){var x,N;x=0;for(N=z.length;x<N;++x){var G=z[x];y(G.descendants,C);if(C==1&&V)G.setDirty();else C==0&&G.setAllDirty();G.measure(C)}}function A(z,C){var x,N;x=0;for(N=z.length;x<N;++x){var G=z[x];if(G.apply(C))A(G.descendants,C);else{z.splice(x,1);--x;--N}}}if(q){(q=this.find(q))&&q.setItemsDirty(E);M.scheduleAdjust()}else{W=false;if(!D){D=true;y(F,0);A(F,0);y(F,1);A(F,1);V=D=false}}};this.updateConfig= function(q,E){(q=this.find(q))&&q.setConfig(E)};this.adjustNow=function(){W&&M.adjust()};var aa=null;window.onresize=function(){clearTimeout(aa);aa=setTimeout(function(){aa=null;M.scheduleAdjust(true)},20)};window.onshow=function(){V=true;M.adjust()}})");
}
static WJavaScriptPreamble wtjs10() {
View
15 src/eu/webtoolkit/jwt/WApplication.java
@@ -1832,8 +1832,11 @@ public final void attachThread() {
* immediately. The JavaScript will be run after the normal event handling,
* unless <code>afterLoaded</code> is set to <code>false</code>.
* <p>
+ * In most situations, it&apos;s more robust to use
+ * {@link WWidget#doJavaScript(String js) WWidget#doJavaScript()} however.
+ * <p>
*
- * @see WApplication#addAutoJavaScript(String javascript)
+ * @see WWidget#doJavaScript(String js)
* @see WApplication#addAutoJavaScript(String javascript)
*/
public void doJavaScript(final String javascript, boolean afterLoaded) {
@@ -1867,8 +1870,11 @@ public final void doJavaScript(final String javascript) {
* immediately. The JavaScript will be run after the normal event handling,
* unless <code>afterLoaded</code> is set to <code>false</code>.
* <p>
+ * In most situations, it&apos;s more robust to use
+ * {@link WWidget#doJavaScript(String js) WWidget#doJavaScript()} however.
+ * <p>
*
- * @see WApplication#addAutoJavaScript(String javascript)
+ * @see WWidget#doJavaScript(String js)
* @see WApplication#addAutoJavaScript(String javascript)
*/
public void addAutoJavaScript(final String javascript) {
@@ -1972,8 +1978,11 @@ public boolean requireJQuery(final String uri) {
* immediately. The JavaScript will be run after the normal event handling,
* unless <code>afterLoaded</code> is set to <code>false</code>.
* <p>
+ * In most situations, it&apos;s more robust to use
+ * {@link WWidget#doJavaScript(String js) WWidget#doJavaScript()} however.
+ * <p>
*
- * @see WApplication#addAutoJavaScript(String javascript)
+ * @see WWidget#doJavaScript(String js)
* @see WApplication#addAutoJavaScript(String javascript)
*/
public boolean isCustomJQuery() {
View
193 src/eu/webtoolkit/jwt/chart/WAxis.java
@@ -55,8 +55,8 @@
* <p>
* The labels are shown using a &quot;%.4g&quot; format string for numbers, and
* a suitable format for {@link AxisScale#DateScale DateScale} or
- * {@link AxisScale#DateTimeScale DateTimeScale} formats, which uses heuristics
- * to choose a suitable format. The format may be customized using
+ * {@link AxisScale#DateTimeScale DateTimeScale} scales, based on heuristics.
+ * The format may be customized using
* {@link WAxis#setLabelFormat(CharSequence format) setLabelFormat()}. The angle
* of the label text may be changed using
* {@link WAxis#setLabelAngle(double angle) setLabelAngle()}. By default, all
@@ -499,8 +499,7 @@ public double getLabelInterval() {
* For an axis with a {@link AxisScale#LinearScale LinearScale} or
* {@link AxisScale#LogScale LogScale} scale, the format string must be a
* format string that is accepted by snprintf() and which formats one
- * double. If the format string is an empty string, &quot;%.4g&quot; is
- * used.
+ * double. If the format string is an empty string, then {@link } is used.
* <p>
* For an axis with a {@link AxisScale#DateScale DateScale} scale, the
* format string must be a format string accepted by
@@ -514,7 +513,9 @@ public double getLabelInterval() {
* the format string is an empty string, a suitable format is chosen based
* on heuristics.
* <p>
- * The default value is an empty string (&quot;&quot;).
+ * The default value is &quot;%.4g&quot; for a numeric axis, and a suitable
+ * format for date(time) scales based on a heuristic taking into account the
+ * current axis range.
* <p>
*
* @see WAxis#getLabelFormat()
@@ -525,6 +526,7 @@ public void setLabelFormat(final CharSequence format) {
update();
}
;
+ this.defaultLabelFormat_ = false;
}
/**
@@ -534,7 +536,25 @@ public void setLabelFormat(final CharSequence format) {
* @see WAxis#setLabelFormat(CharSequence format)
*/
public WString getLabelFormat() {
- return this.labelFormat_;
+ switch (this.scale_) {
+ case CategoryScale:
+ return new WString();
+ case DateScale:
+ case DateTimeScale:
+ if (this.defaultLabelFormat_) {
+ if (!this.segments_.isEmpty()) {
+ final WAxis.Segment s = this.segments_.get(0);
+ return this.defaultDateTimeFormat(s);
+ } else {
+ return this.labelFormat_;
+ }
+ } else {
+ return this.labelFormat_;
+ }
+ default:
+ return this.defaultLabelFormat_ ? new WString("%.4g")
+ : this.labelFormat_;
+ }
}
/**
@@ -775,25 +795,23 @@ public WString getLabel(double u) {
if (this.scale_ == AxisScale.CategoryScale) {
text = this.chart_.categoryLabel((int) u, this.axis_);
if ((text.length() == 0)) {
- buf = String.format("%.4g", u + 1);
- text = new WString(buf);
+ text = new WString(LocaleUtils.toString(LocaleUtils
+ .getCurrentLocale(), u));
}
} else {
if (this.scale_ == AxisScale.DateScale) {
WDate d = WDate.fromJulianDay((int) u);
- WString format = this.labelFormat_;
- if ((format.length() == 0)) {
- return new WString(d.toString("dd/MM/yyyy"));
- } else {
- return new WString(d.toString(format.toString()));
- }
+ WString format = this.getLabelFormat();
+ return new WString(d.toString(format.toString()));
} else {
- String format = this.labelFormat_.toString();
+ String format = this.getLabelFormat().toString();
if (format.length() == 0) {
- format = "%.4g";
+ text = new WString(LocaleUtils.toString(LocaleUtils
+ .getCurrentLocale(), u));
+ } else {
+ buf = String.format(format, u);
+ text = new WString(buf);
}
- buf = String.format(format, u);
- text = new WString(buf);
}
}
return text;
@@ -1450,6 +1468,7 @@ protected void getLabelTicks(final List<WAxis.TickLabel> ticks, int segment) {
}
case DateTimeScale:
case DateScale: {
+ WString format = this.getLabelFormat();
WDate dt = null;
if (this.scale_ == AxisScale.DateScale) {
dt = WDate.fromJulianDay((int) s.renderMinimum);
@@ -1467,70 +1486,6 @@ protected void getLabelTicks(final List<WAxis.TickLabel> ticks, int segment) {
|| unit.getValue() <= WAxis.DateTimeUnit.Days.getValue()
|| !!EnumUtils.mask(this.roundLimits_,
AxisValue.MinimumValue).isEmpty();
- WString format = this.labelFormat_;
- if ((format.length() == 0)) {
- if (atTick) {
- switch (unit) {
- case Months:
- case Years:
- case Days:
- if (dt.getSecond() != 0) {
- format = new WString("dd/MM/yy hh:mm:ss");
- } else {
- if (dt.getHour() != 0) {
- format = new WString("dd/MM/yy hh:mm");
- } else {
- format = new WString("dd/MM/yy");
- }
- }
- break;
- case Hours:
- if (dt.getSecond() != 0) {
- format = new WString("dd/MM hh:mm:ss");
- } else {
- if (dt.getMinute() != 0) {
- format = new WString("dd/MM hh:mm");
- } else {
- format = new WString("h'h' dd/MM");
- }
- }
- break;
- case Minutes:
- if (dt.getSecond() != 0) {
- format = new WString("hh:mm:ss");
- } else {
- format = new WString("hh:mm");
- }
- break;
- case Seconds:
- format = new WString("hh:mm:ss");
- break;
- }
- } else {
- switch (unit) {
- case Years:
- format = new WString("yyyy");
- break;
- case Months:
- format = new WString("MMM yy");
- break;
- case Days:
- format = new WString("dd/MM/yy");
- break;
- case Hours:
- format = new WString("h'h' dd/MM");
- break;
- case Minutes:
- format = new WString("hh:mm");
- break;
- case Seconds:
- format = new WString("hh:mm:ss");
- break;
- default:
- break;
- }
- }
- }
for (;;) {
long dl = this.getDateNumber(dt);
if (dl > s.renderMaximum) {
@@ -1596,6 +1551,7 @@ public int getValue() {
private double resolution_;
private double labelInterval_;
private WString labelFormat_;
+ private boolean defaultLabelFormat_;
private boolean gridLines_;
private WPen pen_;
private WPen gridLinesPen_;
@@ -1643,6 +1599,7 @@ public Segment() {
this.resolution_ = 0.0;
this.labelInterval_ = 0;
this.labelFormat_ = new WString();
+ this.defaultLabelFormat_ = true;
this.gridLines_ = false;
this.pen_ = new WPen();
this.gridLinesPen_ = new WPen(WColor.gray);
@@ -1871,6 +1828,78 @@ private double calcAutoNumLabels(Orientation orientation,
: AUTO_H_LABEL_PIXELS);
}
+ private WString defaultDateTimeFormat(final WAxis.Segment s) {
+ WDate dt = null;
+ if (this.scale_ == AxisScale.DateScale) {
+ dt = WDate.fromJulianDay((int) s.renderMinimum);
+ if (!(dt != null)) {
+ String exception = "Invalid julian day: "
+ + String.valueOf(s.renderMinimum);
+ throw new WException(exception);
+ }
+ } else {
+ dt = new WDate(new Date((long) (long) s.renderMinimum));
+ }
+ int interval = s.dateTimeRenderInterval;
+ WAxis.DateTimeUnit unit = s.dateTimeRenderUnit;
+ boolean atTick = interval > 1
+ || unit.getValue() <= WAxis.DateTimeUnit.Days.getValue()
+ || !!EnumUtils.mask(this.roundLimits_, AxisValue.MinimumValue)
+ .isEmpty();
+ if (atTick) {
+ switch (unit) {
+ case Months:
+ case Years:
+ case Days:
+ if (dt.getSecond() != 0) {
+ return new WString("dd/MM/yy hh:mm:ss");
+ } else {
+ if (dt.getHour() != 0) {
+ return new WString("dd/MM/yy hh:mm");
+ } else {
+ return new WString("dd/MM/yy");
+ }
+ }
+ case Hours:
+ if (dt.getSecond() != 0) {
+ return new WString("dd/MM hh:mm:ss");
+ } else {
+ if (dt.getMinute() != 0) {
+ return new WString("dd/MM hh:mm");
+ } else {
+ return new WString("h'h' dd/MM");
+ }
+ }
+ case Minutes:
+ if (dt.getSecond() != 0) {
+ return new WString("hh:mm:ss");
+ } else {
+ return new WString("hh:mm");
+ }
+ case Seconds:
+ return new WString("hh:mm:ss");
+ }
+ } else {
+ switch (unit) {
+ case Years:
+ return new WString("yyyy");
+ case Months:
+ return new WString("MMM yy");
+ case Days:
+ return new WString("dd/MM/yy");
+ case Hours:
+ return new WString("h'h' dd/MM");
+ case Minutes:
+ return new WString("hh:mm");
+ case Seconds:
+ return new WString("hh:mm:ss");
+ default:
+ break;
+ }
+ }
+ return WString.Empty;
+ }
+
double mapFromDevice(double d) {
for (int i = 0; i < this.segments_.size(); ++i) {
final WAxis.Segment s = this.segments_.get(i);
View
2  src/eu/webtoolkit/jwt/render/Css21Lexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.5 src/eu/webtoolkit/jwt/render/Css21.g 2014-03-10 11:55:30
+// $ANTLR 3.5 src/eu/webtoolkit/jwt/render/Css21.g 2014-03-12 17:03:45
package eu.webtoolkit.jwt.render;
import org.antlr.runtime.*;
View
2  src/eu/webtoolkit/jwt/render/Css21Parser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.5 src/eu/webtoolkit/jwt/render/Css21.g 2014-03-10 11:55:29
+// $ANTLR 3.5 src/eu/webtoolkit/jwt/render/Css21.g 2014-03-12 17:03:45
package eu.webtoolkit.jwt.render;
import org.antlr.runtime.*;
View
4 src/eu/webtoolkit/jwt/utils/LocaleUtils.java
@@ -64,5 +64,9 @@ public static String toFixedString(Locale locale, double value, int precision) {
public static String toString(Locale locale, int value) {
return NumberFormat.getInstance(locale).format(value);
+ }
+
+ public static String toString(Locale locale, double value) {
+ return NumberFormat.getInstance(locale).format(value);
}
}
View
4 src/eu/webtoolkit/jwt/wt-resources/themes/bootstrap/2/wt.css
@@ -544,7 +544,6 @@
white-space: nowrap;
background: white;
border: 1px solid #dddddd;
- overflow: auto;
/* header */
/* resize handles */
@@ -554,6 +553,9 @@
/* item drag & drop */
}
+.Wt-itemview.Wt-itemview-paged {
+ overflow: auto;
+}
.Wt-itemview .Wt-spacer {
background: url(../../../loading.png);
}
View
5 src/eu/webtoolkit/jwt/wt-resources/themes/bootstrap/2/wt.less
@@ -501,7 +501,10 @@
white-space: nowrap;
background: white;
border: 1px solid @tableBorder;
- overflow: auto;
+
+ &.Wt-itemview-paged {
+ overflow: auto;
+ }
.Wt-spacer {
background: url(../../../loading.png);
View
17 src/eu/webtoolkit/jwt/wt-resources/themes/bootstrap/3/wt.css
@@ -607,13 +607,16 @@ fieldset[disabled] .Wt-slider-v .handle.active {
*/
.Wt-itemview {
- overflow: auto;
white-space: nowrap;
cursor: default;
background: white;
border: 1px solid #dddddd;
}
+.Wt-itemview.Wt-itemview-paged {
+ overflow: auto;
+}
+
.Wt-itemview .Wt-spacer {
background: url(../../../loading.png);
}
@@ -971,6 +974,12 @@ body.Wt-rtl .Wt-sbspacer {
border-right: 1px solid #dddddd;
}
+.Wt-treeview button.Wt-tv-c {
+ border-right-color: transparent;
+ /* doesn't work */
+
+}
+
.Wt-treeview .Wt-tv-c {
padding: 0 3px;
-webkit-box-sizing: content-box;
@@ -978,12 +987,6 @@ body.Wt-rtl .Wt-sbspacer {
box-sizing: content-box;
}
-.Wt-treeview button.Wt-tv-c {
- border-right-color: transparent;
- /* doesn't work */
-
-}
-
.Wt-treeview .Wt-tv-row {
float: right;
overflow: hidden;
View
5 src/eu/webtoolkit/jwt/wt-resources/themes/bootstrap/3/wt.less
@@ -519,7 +519,10 @@
white-space: nowrap;
background: white;
border: 1px solid @table-border-color;
- overflow: auto;
+
+ &.Wt-itemview-paged {
+ overflow: auto;
+ }
.Wt-spacer {
background: url(../../../loading.png);
Please sign in to comment.
Something went wrong with that request. Please try again.