diff --git a/README.md b/README.md index e105ec9f..0ed47dd6 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,15 @@ The ant build file has a separate target to generate maven pom files: To install the two artifacts in your local repository, do: - mvn install:install-file -Dfile=dist/jwt-3.3.1.jar -DpomFile=jwt-3.3.1.pom - mvn install:install-file -Dfile=dist/jwt-auth-3.3.1.jar -DpomFile=jwt-auth-3.3.1.pom + mvn install:install-file -Dfile=dist/jwt-3.3.2.jar -DpomFile=jwt-3.3.2.pom + mvn install:install-file -Dfile=dist/jwt-auth-3.3.2.jar -DpomFile=jwt-auth-3.3.2.pom The corresponding dependency blocks are: eu.webtoolkit jwt - 3.3.1 + 3.3.2 @@ -68,7 +68,7 @@ features you use eu.webtoolkit jwt-auth - 3.3.1 + 3.3.2 diff --git a/build.xml b/build.xml index 59d39969..c602becb 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - + diff --git a/examples/bobsmith/.classpath b/examples/bobsmith/.classpath index f88efb35..7663a913 100644 --- a/examples/bobsmith/.classpath +++ b/examples/bobsmith/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/charts/.classpath b/examples/charts/.classpath index f88efb35..7663a913 100644 --- a/examples/charts/.classpath +++ b/examples/charts/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/composer/.classpath b/examples/composer/.classpath index f88efb35..7663a913 100644 --- a/examples/composer/.classpath +++ b/examples/composer/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/dialog/.classpath b/examples/dialog/.classpath index f88efb35..7663a913 100644 --- a/examples/dialog/.classpath +++ b/examples/dialog/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/dragdrop/.classpath b/examples/dragdrop/.classpath index f88efb35..7663a913 100644 --- a/examples/dragdrop/.classpath +++ b/examples/dragdrop/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/feature/auth1/.classpath b/examples/feature/auth1/.classpath index 367b087e..bf687026 100644 --- a/examples/feature/auth1/.classpath +++ b/examples/feature/auth1/.classpath @@ -26,8 +26,8 @@ - - + + diff --git a/examples/feature/itemmodel/.classpath b/examples/feature/itemmodel/.classpath index f88efb35..7663a913 100644 --- a/examples/feature/itemmodel/.classpath +++ b/examples/feature/itemmodel/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/feature/mediaplayer/.classpath b/examples/feature/mediaplayer/.classpath index f88efb35..7663a913 100644 --- a/examples/feature/mediaplayer/.classpath +++ b/examples/feature/mediaplayer/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/feature/serverpush/.classpath b/examples/feature/serverpush/.classpath index f88efb35..7663a913 100644 --- a/examples/feature/serverpush/.classpath +++ b/examples/feature/serverpush/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/filetreetable/.classpath b/examples/filetreetable/.classpath index f88efb35..7663a913 100644 --- a/examples/filetreetable/.classpath +++ b/examples/filetreetable/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/form/.classpath b/examples/form/.classpath index f88efb35..7663a913 100644 --- a/examples/form/.classpath +++ b/examples/form/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/googlemap/.classpath b/examples/googlemap/.classpath index f88efb35..7663a913 100644 --- a/examples/googlemap/.classpath +++ b/examples/googlemap/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/hello-mvn/pom.xml b/examples/hello-mvn/pom.xml index ff0cb9c4..35efd566 100644 --- a/examples/hello-mvn/pom.xml +++ b/examples/hello-mvn/pom.xml @@ -30,7 +30,7 @@ eu.webtoolkit jwt - 3.3.1 + 3.3.2 diff --git a/examples/hello/.classpath b/examples/hello/.classpath index f88efb35..7663a913 100644 --- a/examples/hello/.classpath +++ b/examples/hello/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/hellowidgetset/.classpath b/examples/hellowidgetset/.classpath index f88efb35..7663a913 100644 --- a/examples/hellowidgetset/.classpath +++ b/examples/hellowidgetset/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/javascript/.classpath b/examples/javascript/.classpath index f88efb35..7663a913 100644 --- a/examples/javascript/.classpath +++ b/examples/javascript/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/mandelbrot/.classpath b/examples/mandelbrot/.classpath index f88efb35..7663a913 100644 --- a/examples/mandelbrot/.classpath +++ b/examples/mandelbrot/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/mission/.classpath b/examples/mission/.classpath index f88efb35..7663a913 100644 --- a/examples/mission/.classpath +++ b/examples/mission/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/painting/.classpath b/examples/painting/.classpath index f88efb35..7663a913 100644 --- a/examples/painting/.classpath +++ b/examples/painting/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/planner/.classpath b/examples/planner/.classpath index ed3b33d2..813dd806 100644 --- a/examples/planner/.classpath +++ b/examples/planner/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/simplechat/.classpath b/examples/simplechat/.classpath index f88efb35..7663a913 100644 --- a/examples/simplechat/.classpath +++ b/examples/simplechat/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/style/.classpath b/examples/style/.classpath index f88efb35..7663a913 100644 --- a/examples/style/.classpath +++ b/examples/style/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/textedit/.classpath b/examples/textedit/.classpath index f88efb35..7663a913 100644 --- a/examples/textedit/.classpath +++ b/examples/textedit/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/treeview/.classpath b/examples/treeview/.classpath index f88efb35..7663a913 100644 --- a/examples/treeview/.classpath +++ b/examples/treeview/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/treeviewdragdrop/.classpath b/examples/treeviewdragdrop/.classpath index f88efb35..7663a913 100644 --- a/examples/treeviewdragdrop/.classpath +++ b/examples/treeviewdragdrop/.classpath @@ -3,7 +3,7 @@ - + diff --git a/examples/widgetgallery/.classpath b/examples/widgetgallery/.classpath index 33db502a..0a68c645 100644 --- a/examples/widgetgallery/.classpath +++ b/examples/widgetgallery/.classpath @@ -3,7 +3,7 @@ - + diff --git a/jwt-3.3.1.pom b/jwt-3.3.1.pom deleted file mode 100644 index 0320bd5c..00000000 --- a/jwt-3.3.1.pom +++ /dev/null @@ -1,55 +0,0 @@ - - - org.sonatype.oss - oss-parent - 7 - - - 4.0.0 - eu.webtoolkit - jwt - jar - Java Web Toolkit - 3.3.1 - Java library for developing web applications - http://webtoolkit.eu/jwt/ - - - - GNU General Public License, version 2 - http://www.gnu.org/licenses/gpl-2.0.html - repo - - - - - http://www.webtoolkit.eu/git/jwt.git - http://www.webtoolkit.eu/git/jwt.git - - - - - commons-fileupload - commons-fileupload - 1.2.2 - - - - org.apache.commons - commons-io - 1.3.2 - - - - org.slf4j - slf4j-simple - 1.6.4 - - - - org.slf4j - slf4j-api - 1.6.4 - - - diff --git a/jwt-auth-3.3.1.pom b/jwt-auth-3.3.1.pom deleted file mode 100644 index eeae6e46..00000000 --- a/jwt-auth-3.3.1.pom +++ /dev/null @@ -1,55 +0,0 @@ - - - org.sonatype.oss - oss-parent - 7 - - - 4.0.0 - eu.webtoolkit - jwt-auth - jar - Java Web Toolkit Authentication Library - 3.3.1 - Authentication library for the Java Web Toolkit - http://webtoolkit.eu/jwt/ - - - - GNU General Public License, version 2 - http://www.gnu.org/licenses/gpl-2.0.html - repo - - - - - http://www.webtoolkit.eu/git/jwt.git - http://www.webtoolkit.eu/git/jwt.git - - - - - eu.webtoolkit - jwt - 3.3.1 - - - - com.google.code.gson - gson - 2.0 - - - - org.apache.httpcomponents - httpclient - 4.1.2 - - - - edu.vt.middleware - vt-password - 3.1.1 - - - diff --git a/src/eu/webtoolkit/jwt/DomElement.java b/src/eu/webtoolkit/jwt/DomElement.java index f8f02c68..76f41502 100644 --- a/src/eu/webtoolkit/jwt/DomElement.java +++ b/src/eu/webtoolkit/jwt/DomElement.java @@ -381,7 +381,7 @@ public void setEvent(String eventName, final String jsCode, js.append("o=this;"); if (anchorClick) { js - .append("if(e.ctrlKey||e.metaKey||(Wt3_3_1.button(e) > 1))return true;else{"); + .append("if(e.ctrlKey||e.metaKey||(Wt3_3_2.button(e) > 1))return true;else{"); } js.append(jsCode); if (isExposed) { @@ -503,7 +503,7 @@ public void setTimeout(int msec, boolean jsRepeat) { public void callMethod(final String method) { ++this.numManipulations_; if (this.var_.length() == 0) { - this.javaScript_.append("Wt3_3_1").append(".$('").append(this.id_) + this.javaScript_.append("Wt3_3_2").append(".$('").append(this.id_) .append("')."); } else { this.javaScript_.append(this.var_).append('.'); @@ -565,7 +565,7 @@ public final void removeAllChildren() { * Removes the element. */ public void removeFromParent() { - this.callJavaScript("Wt3_3_1.remove('" + this.getId() + "');", true); + this.callJavaScript("Wt3_3_2.remove('" + this.getId() + "');", true); } /** @@ -713,22 +713,22 @@ public String asJavaScript(final EscapeOStream out, String style = this.properties_ .get(Property.PropertyStyleDisplay); if (style.equals("none")) { - out.append("Wt3_3_1.hide('").append(this.id_).append( + out.append("Wt3_3_2.hide('").append(this.id_).append( "');\n"); return this.var_; } else { if (style.length() == 0) { - out.append("Wt3_3_1.show('").append(this.id_) + out.append("Wt3_3_2.show('").append(this.id_) .append("');\n"); return this.var_; } else { if (style.equals("inline")) { - out.append("Wt3_3_1.inline('" + this.id_ + out.append("Wt3_3_2.inline('" + this.id_ + "');\n"); return this.var_; } else { if (style.equals("block")) { - out.append("Wt3_3_1.block('" + this.id_ + out.append("Wt3_3_2.block('" + this.id_ + "');\n"); return this.var_; } @@ -743,7 +743,7 @@ public String asJavaScript(final EscapeOStream out, } } if (this.unwrapped_) { - out.append("Wt3_3_1.unwrap('").append(this.id_).append("');\n"); + out.append("Wt3_3_2.unwrap('").append(this.id_).append("');\n"); } this.processEvents(app); this.processProperties(app); @@ -756,7 +756,7 @@ public String asJavaScript(final EscapeOStream out, ");\n"); this.replaced_.createElement(out, app, insertJs.toString()); if (this.unstubbed_) { - out.append("Wt3_3_1.unstub(").append(this.var_).append(',') + out.append("Wt3_3_2.unstub(").append(this.var_).append(',') .append(varr).append(',').append( this.hideWithDisplay_ ? 1 : 0).append( ");\n"); @@ -777,7 +777,7 @@ public String asJavaScript(final EscapeOStream out, } if (!this.childrenToSave_.isEmpty()) { this.declare(out); - out.append("Wt3_3_1").append(".saveReparented(").append( + out.append("Wt3_3_2").append(".saveReparented(").append( this.var_).append(");"); } for (int i = 0; i < this.childrenToSave_.size(); ++i) { @@ -1177,7 +1177,7 @@ public boolean isDefaultInline() { public void declare(final EscapeOStream out) { if (this.var_.length() == 0) { out.append("var ").append(this.getCreateVar()).append( - "=Wt3_3_1.$('").append(this.id_).append("');\n"); + "=Wt3_3_2.$('").append(this.id_).append("');\n"); } } @@ -1453,7 +1453,7 @@ private void processEvents(WApplication app) { DomElement.EventHandler keypress = this.eventHandlers_.get(S_keypress); if (keypress != null && keypress.jsCode.length() != 0) { MapUtils.access(self.eventHandlers_, S_keypress, - DomElement.EventHandler.class).jsCode = "if (Wt3_3_1.isKeyPress(event)){" + DomElement.EventHandler.class).jsCode = "if (Wt3_3_2.isKeyPress(event)){" + MapUtils.access(self.eventHandlers_, S_keypress, DomElement.EventHandler.class).jsCode + '}'; } @@ -1469,7 +1469,7 @@ private void processProperties(WApplication app) { if (minw != null || maxw != null) { if (w == null) { StringBuilder expr = new StringBuilder(); - expr.append("Wt3_3_1.IEwidth(this,"); + expr.append("Wt3_3_2.IEwidth(this,"); if (minw != null) { expr.append('\'').append(minw).append('\''); self.properties_.remove(Property.PropertyStyleMinWidth); @@ -1507,7 +1507,7 @@ private void setJavaScriptProperties(final EscapeOStream out, switch (i.getKey()) { case PropertyInnerHTML: case PropertyAddedInnerHTML: - out.append("Wt3_3_1.setHtml(").append(this.var_).append(','); + out.append("Wt3_3_2.setHtml(").append(this.var_).append(','); if (!pushed) { escaped .pushEscape(EscapeOStream.RuleSet.JsStringLiteralSQuote); @@ -1686,7 +1686,7 @@ private void setJavaScriptEvent(final EscapeOStream out, String eventName, out.append("function f").append(fid).append("(event) { "); if (globalUnfocused) { out - .append("var g=event||window.event; var t=g.target||g.srcElement;if ((!t||Wt3_3_1.hasTag(t,'DIV') ||Wt3_3_1.hasTag(t,'BODY') ||Wt3_3_1.hasTag(t,'HTML'))) {"); + .append("var g=event||window.event; var t=g.target||g.srcElement;if ((!t||Wt3_3_2.hasTag(t,'DIV') ||Wt3_3_2.hasTag(t,'BODY') ||Wt3_3_2.hasTag(t,'HTML'))) {"); } out.append(handler.jsCode); if (globalUnfocused) { @@ -1756,7 +1756,7 @@ private String addToParent(final EscapeOStream out, final String parentVar, } else { StringBuilder insertJS = new StringBuilder(); if (pos != -1) { - insertJS.append("Wt3_3_1.insertAt(").append(parentVar).append( + insertJS.append("Wt3_3_2.insertAt(").append(parentVar).append( ",").append(this.var_).append(",").append(pos).append( ");"); } else { @@ -1778,7 +1778,7 @@ private void renderInnerHtmlJS(final EscapeOStream out, WApplication app) { || !this.childrenToAdd_.isEmpty() || !this.childrenHtml_.isEmpty()) { this.declare(out); - out.append("Wt3_3_1.setHtml(").append(this.var_).append(",'"); + out.append("Wt3_3_2.setHtml(").append(this.var_).append(",'"); out.pushEscape(EscapeOStream.RuleSet.JsStringLiteralSQuote); out.append(this.childrenHtml_.toString()); List timeouts = new ArrayList(); diff --git a/src/eu/webtoolkit/jwt/FileUtils.java b/src/eu/webtoolkit/jwt/FileUtils.java index 2022de59..991ca7fe 100644 --- a/src/eu/webtoolkit/jwt/FileUtils.java +++ b/src/eu/webtoolkit/jwt/FileUtils.java @@ -55,10 +55,11 @@ public static InputStream getResourceAsStream(String path) throws IOException { if (url == null) { WApplication app = WApplication.getInstance(); if (app != null) { - ServletContext context = app.getEnvironment().getServer().getServletContext(); try { + ServletContext context = app.getEnvironment().getServer().getServletContext(); url = context.getResource(path); - } catch (IOException e) { + } catch (Exception e) { + url = null; } } diff --git a/src/eu/webtoolkit/jwt/ItemDataRole.java b/src/eu/webtoolkit/jwt/ItemDataRole.java index d01406f3..ee2fde00 100644 --- a/src/eu/webtoolkit/jwt/ItemDataRole.java +++ b/src/eu/webtoolkit/jwt/ItemDataRole.java @@ -48,13 +48,15 @@ public class ItemDataRole { public final static int StyleClassRole = 3; /** *

- * Role that indicates the check state. Data for this role should be a - * bool. When the {@link ItemFlag#ItemIsTristate} flag is set - * for the item, data for this role should be of type {@link CheckState}. + * Role that indicates the check state. + *

+ * Data for this role should be a bool. When the + * {@link ItemFlag#ItemIsTristate} flag is set for the item, data for this + * role should be of type {@link CheckState}. */ public final static int CheckStateRole = 4; /** - * Role for a tooltip. + * Role for a (plain) tooltip. */ public final static int ToolTipRole = 5; /** diff --git a/src/eu/webtoolkit/jwt/ItemFlag.java b/src/eu/webtoolkit/jwt/ItemFlag.java index 8550b47d..78ebb400 100644 --- a/src/eu/webtoolkit/jwt/ItemFlag.java +++ b/src/eu/webtoolkit/jwt/ItemFlag.java @@ -48,12 +48,14 @@ public enum ItemFlag { ItemIsDropEnabled, /** *

- * Item has tree states. When set, {@link ItemDataRole#CheckStateRole} data - * is of type {@link CheckState} + * Item has tree states. + *

+ * When set, {@link ItemDataRole#CheckStateRole} data is of type + * {@link CheckState} */ ItemIsTristate, /** - * Item's textual is HTML. + * Item's text (DisplayRole, ToolTipRole) is HTML. */ ItemIsXHTMLText, /** diff --git a/src/eu/webtoolkit/jwt/PaintedSlider.java b/src/eu/webtoolkit/jwt/PaintedSlider.java index 038fb084..0c0736b9 100644 --- a/src/eu/webtoolkit/jwt/PaintedSlider.java +++ b/src/eu/webtoolkit/jwt/PaintedSlider.java @@ -93,9 +93,9 @@ public void updateState() { double max = l - this.slider_.getHandleWidth(); boolean horizontal = o == Orientation.Horizontal; StringBuilder mouseDownJS = new StringBuilder(); - mouseDownJS.append("obj.setAttribute('down', Wt3_3_1").append( + mouseDownJS.append("obj.setAttribute('down', Wt3_3_2").append( ".widgetCoordinates(obj, event).").append(u).append(");") - .append("Wt3_3_1.cancelEvent(event);"); + .append("Wt3_3_2.cancelEvent(event);"); StringBuilder computeD = new StringBuilder(); computeD.append("var objh = ").append(this.handle_.getJsRef()).append( ",").append("objf = ").append(this.fill_.getJsRef()) @@ -110,7 +110,7 @@ public void updateState() { .append(" - pos;").append("var d = pos - down;"); StringBuilder mouseMovedJS = new StringBuilder(); mouseMovedJS.append("var down = obj.getAttribute('down');").append( - "var WT = Wt3_3_1;") + "var WT = Wt3_3_2;") .append("if (down != null && down != '') {").append( computeD.toString()).append( "d = Math.max(0, Math.min(d, ").append(max).append( @@ -141,7 +141,7 @@ public void updateState() { mouseMovedJS.append("}").append("}"); StringBuilder mouseUpJS = new StringBuilder(); mouseUpJS.append("var down = obj.getAttribute('down');").append( - "var WT = Wt3_3_1;") + "var WT = Wt3_3_2;") .append("if (down != null && down != '') {").append( computeD.toString()).append("d += ").append( this.slider_.getHandleWidth() / 2).append(";").append( diff --git a/src/eu/webtoolkit/jwt/StdGridLayoutImpl2.java b/src/eu/webtoolkit/jwt/StdGridLayoutImpl2.java index 261ce1aa..3a475e92 100644 --- a/src/eu/webtoolkit/jwt/StdGridLayoutImpl2.java +++ b/src/eu/webtoolkit/jwt/StdGridLayoutImpl2.java @@ -105,7 +105,7 @@ public DomElement createDomElement(boolean fitWidth, boolean fitHeight, } StringBuilder js = new StringBuilder(); js.append(app.getJavaScriptClass()).append( - ".layouts2.add(new Wt3_3_1.StdLayout2(").append( + ".layouts2.add(new Wt3_3_2.StdLayout2(").append( app.getJavaScriptClass()).append(",'").append(this.getId()) .append("',"); if (this.getLayout().getParentLayout() != null) { @@ -416,7 +416,7 @@ public void updateDom(final DomElement parent) { } this.addedItems_.clear(); for (int i = 0; i < this.removedItems_.size(); ++i) { - parent.callJavaScript("Wt3_3_1.remove('" + parent.callJavaScript("Wt3_3_2.remove('" + this.removedItems_.get(i) + "');", true); } this.removedItems_.clear(); @@ -714,7 +714,7 @@ static WJavaScriptPreamble wtjs1() { JavaScriptScope.WtClassScope, JavaScriptObjectType.JavaScriptConstructor, "StdLayout2", - "function(G,H,I,O,P,Q,s,F,x,z,y){function B(a,b,c,e){function i(m){return m==\"visible\"||m==\"none\"}var j=u[b],k=b?a.scrollHeight:a.scrollWidth,t,d;if(b==0&&k+g.pxself(a,j.left)>=e.clientWidth){t=a.style[j.left];v(a,j.left,\"-1000000px\");k=b?a.scrollHeight:a.scrollWidth}e=b?a.clientHeight:a.clientWidth;if(g.isGecko&&!a.style[j.size]&&b==0&&i(g.css(a,\"overflow\"))){d=a.style[j.size];v(a,j.size,\"\")}b=b?a.offsetHeight:a.offsetWidth;t&&v(a,j.left,t); d&&v(a,j.size,d);if(e>=1E6)e-=1E6;if(k>=1E6)k-=1E6;if(b>=1E6)b-=1E6;if(k===0){k=g.pxself(a,j.size);if(k!==0&&!g.isOpera&&!g.isGecko)k-=g.px(a,\"border\"+j.Left+\"Width\")+g.px(a,\"border\"+j.Right+\"Width\")}if(g.isIE&&(g.hasTag(a,\"BUTTON\")||g.hasTag(a,\"TEXTAREA\")||g.hasTag(a,\"INPUT\")||g.hasTag(a,\"SELECT\")))k=e;if(k>b)if(g.pxself(a,j.size)==0)k=e;else{var o=false;$(a).find(\".Wt-popup\").each(function(){if(this.style.display!==\"none\")o=true});if(o)k=e}d=g.px(a,\"border\"+j.Left+\"Width\")+g.px(a,\"border\"+j.Right+ \"Width\");t=b-(e+d)!=0;if(c)return[k,scrollBar];g.isOpera||(k+=d);k+=g.px(a,\"margin\"+j.Left)+g.px(a,\"margin\"+j.Right);if(!g.boxSizing(a)&&!g.isIE)k+=g.px(a,\"padding\"+j.Left)+g.px(a,\"padding\"+j.Right);k+=b-(e+d);if(k0)k=Math.min(a,k);return[Math.round(k),t]}function w(a,b){b=u[b];if(a.style.display===\"none\")return 0;else if(a[\"layoutMin\"+b.Size])return a[\"layoutMin\"+b.Size];else{var c=g.px(a,\"min\"+b.Size);g.boxSizing(a)||(c+=g.px(a,\"padding\"+b.Left)+g.px(a,\"padding\"+ b.Right));return c}}function K(a,b){b=u[b];var c=g.px(a,\"margin\"+b.Left)+g.px(a,\"margin\"+b.Right);if(!g.boxSizing(a)&&!(g.isIE&&!g.isIElt9&&g.hasTag(a,\"BUTTON\")))c+=g.px(a,\"border\"+b.Left+\"Width\")+g.px(a,\"border\"+b.Right+\"Width\")+g.px(a,\"padding\"+b.Left)+g.px(a,\"padding\"+b.Right);return c}function J(a,b){b=u[b];return g.px(a,\"padding\"+b.Left)+g.px(a,\"padding\"+b.Right)}function Y(a,b){if(g.boxSizing(a)){b=u[b];return g.px(a,\"border\"+b.Left+\"Width\")+g.px(a,\"border\"+b.Right+\"Width\")+g.px(a,\"padding\"+ b.Left)+g.px(a,\"padding\"+b.Right)}else return 0}function U(a,b){b=u[b];return Math.round(g.px(a,\"border\"+b.Left+\"Width\")+g.px(a,\"border\"+b.Right+\"Width\")+g.px(a,\"margin\"+b.Left)+g.px(a,\"margin\"+b.Right)+g.px(a,\"padding\"+b.Left)+g.px(a,\"padding\"+b.Right))}function R(a,b,c){a.dirty=Math.max(a.dirty,b);L=true;c&&G.layouts2.scheduleAdjust()}function v(a,b,c){if(a.style[b]!==c){a.style[b]=c;return true}else return false}function ea(a,b,c){var e=u[a],i=e.config.length,j=u[a^1].config.length,k=e.measures.slice(); if(k.length==5){k[0]=k[0].slice();k[1]=k[1].slice()}if(L){if(c&&typeof e.minSize==\"undefined\"){e.minSize=g.px(c,\"min\"+e.Size);if(e.minSize>0)e.minSize-=Y(c,a)}var t=[],d=[],o=0,m=0,h,E,r=false;for(h=0;h1){var p=$(\"#\"+f.id),C=p.get(0);if(!C){e.setItem(h,E,null);continue}if(C!=f.w){f.w=C;p.find(\"img\").add(p.filter(\"img\")).bind(\"load\",{item:f},function(fa){R(fa.data.item,1,true)})}}if(!Q&&f.w.style.position!= \"absolute\"){f.w.style.position=\"absolute\";f.w.style.visibility=\"hidden\"}if(!f.ps)f.ps=[];if(!f.sc)f.sc=[];if(!f.ms)f.ms=[];if(!f.size)f.size=[];if(!f.psize)f.psize=[];if(!f.fs)f.fs=[];if(!f.margin)f.margin=[];if($(f.w).hasClass(\"Wt-hidden\"))f.ps[a]=f.ms[a]=0;else{p=!f.set;if(!f.set)f.set=[false,false];if(f.w){if(g.isIE)f.w.style.visibility=\"\";if(f.dirty){var D;if(f.dirty>1){w(f.w,a);f.ms[a]=D}else D=f.ms[a];if(D>q)q=D;if(f.dirty>1)f.margin[a]=K(f.w,a);if(!f.set[a])if(a==0||!p){p=g.pxself(f.w,e.size); f.fs[a]=p?p+f.margin[a]:0}else{p=Math.round(g.px(f.w,e.size));f.fs[a]=p>Math.max(Y(f.w,a),D)?p+f.margin[a]:0}p=f.fs[a];if(f.layout){if(p==0)p=f.ps[a];f.ps[a]=p}else{if(f.wasLayout){f.wasLayout=false;f.set=[false,false];f.ps=[];f.w.wtResize&&f.w.wtResize(f.w,-1,-1,true);v(f.w,u[1].size,\"\")}C=B(f.w,a,false,b);var M=C[0],V=f.set[a];if(V)if(f.psize[a]>8)V=M>=f.psize[a]-4&&M<=f.psize[a]+4;var ga=typeof f.ps[a]!==\"undefined\"&&e.config[h][0]>0&&f.set[a];p=V||ga?Math.max(p,f.ps[a]):Math.max(p,M);f.ps[a]= p;f.sc[a]=C[1]}if(!f.span||f.span[a]==1){if(p>l)l=p}else r=true}else if(!f.span||f.span[a]==1){if(f.ps[a]>l)l=f.ps[a];if(f.ms[a]>q)q=f.ms[a]}else r=true;if(!(f.w.style.display===\"none\"&&!f.w.ed)&&(!f.span||f.span[a]==1))n=false}}}}if(n)q=l=-1;else if(q>l)l=q;t[h]=l;d[h]=q;if(q>-1){o+=l;m+=q}}if(r)for(h=0;h1){b=f.ps[a];for(q=l=r=0;q0)l+=e.config[h+q][0]}}if(b>0)if(r>0){if(l> 0)r=l;for(q=0;q0?e.config[h+q][0]:1;if(n>0){D=Math.round(b/n);b-=D;r-=n;t[h+q]+=D}}}}else t[h]=b}j=0;p=true;E=false;for(h=0;h-1){if(p){j+=e.margins[1];p=false}else{j+=e.margins[0];if(E)j+=4}E=e.config[h][1]!==0}p||(j+=e.margins[2]);o+=j;m+=j;e.measures=[t,d,o,m,j]}if(W||k[2]!=e.measures[2])Z.updateSizeInParent(a);c&&e.minSize==0&&k[3]!=e.measures[3]&&c.parentNode.className!=\"Wt-domRoot\"&&v(c,\"min\"+e.Size,e.measures[3]+\"px\");c&&a==0&&c&&g.hasTag(c, \"TD\")&&v(c,e.size,e.measures[2]+\"px\")}function ha(a,b,c){a=u[a];if(X)c=-c;if(a.config[b][0]>0&&a.config[b+1][0]==0){++b;c=-c}a.fixedSize[b]=a.sizes[b]+c;G.layouts2.scheduleAdjust()}function ia(a,b,c){var e=b.di,i=u[a],j=u[a^1],k,t=g.getElement(H),d;for(d=e-1;d>=0;--d)if(i.sizes[d]>=0){k=-(i.sizes[d]-i.measures[1][d]);break}e=i.sizes[e]-i.measures[1][e];if(X){var o=k;k=-e;e=-o}new g.SizeHandle(g,i.resizeDir,g.pxself(b,i.size),g.pxself(b,j.size),k,e,i.resizerClass,function(m){ha(a,d,m)},b,t,c,0,0)} function ja(a,b){var c=u[a],e=u[a^1],i=c.measures,j=0,k=false,t=false,d=false,o=aa?b.parentNode:null;if(c.maxSize===0)if(o){var m=g.css(o,\"position\");if(m===\"absolute\")j=g.pxself(o,c.size);if(j===0){if(!c.initialized){if(a===0&&(m===\"absolute\"||m===\"fixed\")){o.style.display=\"none\";j=o.clientWidth;o.style.display=\"\"}j=a?o.clientHeight:o.clientWidth;k=true;if(a==0&&j==0&&g.isIElt9){j=o.offsetWidth;k=false}var h;if((g.hasTag(o,\"TD\")||g.hasTag(o,\"TH\"))&&!(g.isIE&&!g.isIElt9)){d=0;h=1}else{d=c.minSize? c.minSize:i[3];h=0}function E(M,V){return Math.abs(M-V)<1}if(g.isIElt9&&E(j,h)||E(j,d+J(o,a)))c.maxSize=999999}if(j===0&&c.maxSize===0){j=a?o.clientHeight:o.clientWidth;k=true}}}else{j=g.pxself(b,c.size);t=true}else if(c.sizeSet){j=g.pxself(o,c.size);t=true}var r=0;if(o&&o.wtGetPS&&a==1)r=o.wtGetPS(o,b,a,0);d=i[2];if(d=i[3]-r){r=j-i[4];h=[];var l=[0,0],q=[0,0],n=0;for(d=0;d-1){m=-1;if(typeof c.fixedSize[d]!==\"undefined\"&&(d+1==o||i[1][d+1]>-1))m=c.fixedSize[d];else if(c.config[d][1]!==0&&c.config[d][1][0]>= 0){m=c.config[d][1][0];if(c.config[d][1][1])m=(j-i[4])*m/100}if(m>=0){h[d]=-1;k[d]=m;r-=k[d]}else{if(c.config[d][0]>0){m=1;h[d]=c.config[d][0];n+=h[d]}else{m=0;h[d]=0}l[m]+=i[1][d];q[m]+=i[0][d];k[d]=i[0][d]}}else{h[d]=-2;k[d]=-1}if(n==0){for(d=0;dq[0]+l[1]){r-=q[0];if(r>q[1]){if(c.fitSize){r-=q[1];r=r/n;for(d=0;d0){k[d]+=Math.round(h[d]*r);c.stretched[d]=true}}}else{m=1;if(r0?(r-l[m])/(q[m]- l[m]):0;for(d=0;d0){l=i[0][d]-i[1][d];k[d]=i[1][d]+Math.round(l*r)}}}else{for(d=0;d0)k[d]=i[1][d];r-=l[1];m=0;if(r0?(r-l[m])/(q[m]-l[m]):0;for(d=0;d-1){var f=l;if(l){h=H+\"-rs\"+a+\"-\"+d;l=g.getElement(h);if(!l){l=document.createElement(\"div\");l.setAttribute(\"id\",h);l.di=d;l.style.position=\"absolute\";l.style[e.left]= e.margins[1]+\"px\";l.style[c.size]=c.margins[0]+\"px\";if(e.cSize)l.style[e.size]=e.cSize-e.margins[2]-e.margins[1]+\"px\";l.className=c.handleClass;b.insertBefore(l,b.firstChild);l.onmousedown=l.ontouchstart=function(M){ia(a,this,M||window.event)}}i+=2;v(l,c.left,i+\"px\");i+=2}l=c.config[d][1]!==0;if(r)r=false;else i+=c.margins[0]}for(q=0;q=k.length)break;if(C)m+=4;C=c.config[d+p][1]!==0;if(k[d+ p-1]>-1&&k[d+p]>-1)m+=c.margins[0];m+=k[d+p]}}var D;v(h,\"visibility\",\"\");C=n.align>>c.alignBits&15;p=n.ps[a];if(m=p&&n.set[a]){v(h,c.size,p+\"px\")&&R(n,1);n.set[a]=false}n.size[a]=p;n.psize[a]=p}else{C=Math.max(0,m-n.margin[a]);D=a==0&&n.sc[a];if(!(h.style.display===\"none\"&&!h.ed)&&(D||m!=p||n.layout)){if(v(h,c.size,C+\"px\")){if(!g.isIE&& (g.hasTag(h,\"TEXTAREA\")||g.hasTag(h,\"INPUT\"))){v(h,\"margin-\"+c.left,n.margin[a]/2+\"px\");v(h,\"margin-\"+e.left,n.margin[!a]/2+\"px\")}R(n,1);n.set[a]=true}}else if(n.fs[a])a==0&&v(h,c.size,n.fs[a]+\"px\");else{v(h,c.size,\"\")&&R(n,1);n.set[a]=false}D=i;n.size[a]=C;n.psize[a]=m}if(Q)if(f){v(h,c.left,\"4px\");m=g.css(h,\"position\");if(m!==\"absolute\")h.style.position=\"relative\"}else v(h,c.left,\"0px\");else v(h,c.left,D+\"px\");if(a==1){if(h.wtResize)h.wtResize(h,n.set[0]?Math.round(n.size[0]):-1,n.set[1]?Math.round(n.size[1]): -1,true);n.dirty=0}}if(k[d]>-1)i+=k[d]}$(b).children(\".\"+e.handleClass).css(c.size,j-c.margins[2]-c.margins[1]+\"px\")}}var g=G.WT;this.descendants=[];var Z=this,A=y,L=true,W=true,aa=false,S=null,N=null,ba=false,ca=false,T=[],da=false,X=$(document.body).hasClass(\"Wt-rtl\"),u=[{initialized:false,config:A.cols,margins:x,maxSize:s,measures:[],sizes:[],stretched:[],fixedSize:[],Left:X?\"Right\":\"Left\",left:X?\"right\":\"left\",Right:X?\"Left\":\"Right\",Size:\"Width\",size:\"width\",alignBits:0,getItem:function(a,b){return A.items[b* u[0].config.length+a]},setItem:function(a,b,c){A.items[b*u[0].config.length+a]=c},handleClass:\"Wt-vrh2\",resizeDir:\"h\",resizerClass:\"Wt-hsh2\",fitSize:O},{initialized:false,config:A.rows,margins:z,maxSize:F,measures:[],sizes:[],stretched:[],fixedSize:[],Left:\"Top\",left:\"top\",Right:\"Bottom\",Size:\"Height\",size:\"height\",alignBits:4,getItem:function(a,b){return A.items[a*u[0].config.length+b]},setItem:function(a,b,c){A.items[a*u[0].config.length+b]=c},handleClass:\"Wt-hrh2\",resizeDir:\"v\",resizerClass:\"Wt-vsh2\", fitSize:P}];jQuery.data(document.getElementById(H),\"layout\",this);this.updateSizeInParent=function(a){if(S)if(ba){var b=u[a],c=b.measures[2];if(b.maxSize>0)c=Math.min(b.maxSize,c);if(da){b=g.getElement(H);if(!b)return;for(var e=b,i=e.parentNode;;){if(i.wtGetPS)c=i.wtGetPS(i,e,a,c);c+=U(i,a);if(i==N)break;if(a==1&&i==b.parentNode&&!i.lh&&i.offsetHeight>c)c=i.offsetHeight;e=i;i=e.parentNode}}else c+=T[a];S.setChildSize(N,a,c)}};this.setConfig=function(a){var b=A;A=a;u[0].config=A.cols;u[1].config=A.rows; u[0].stretched=[];u[1].stretched=[];var c;a=0;for(c=b.items.length;a>i.alignBits& 15||!i.stretched[a]){if(!t.ps)t.ps=[];t.ps[b]=c}t.layout=true;R(t,1);break}}};this.measure=function(a){var b=g.getElement(H);if(b)if(!g.isHidden(b)){if(!ca){ca=true;aa=I==null;ba=true;if(aa){var c=b;c=c.parentNode;for(T=[0,0];c!=document;){T[0]+=U(c,0);T[1]+=U(c,1);if(c.wtGetPS)da=true;var e=jQuery.data(c.parentNode,\"layout\");if(e){S=e;N=c;break}c=c;c=c.parentNode;if(c.childNodes.length!=1&&!c.wtGetPS)ba=false}c=b.parentNode;for(e=0;e<2;++e)u[e].sizeSet=g.pxself(c,u[e].size)!=0}else{S=jQuery.data(document.getElementById(I), \"layout\");N=b;T[0]=U(N,0);T[1]=U(N,1)}}if(L||W){c=aa?b.parentNode:null;ea(a,b,c)}if(a==1)L=W=false}};this.setMaxSize=function(a,b){u[0].maxSize=a;u[1].maxSize=b};this.apply=function(a){var b=g.getElement(H);if(!b)return false;if(g.isHidden(b))return true;ja(a,b);return true};this.contains=function(a){var b=g.getElement(H);a=g.getElement(a.getId());return b&&a?g.contains(b,a):false};this.WT=g}"); + "function(G,H,I,P,Q,S,s,F,x,z,y){function B(a,b,c,e){function i(m){return m==\"visible\"||m==\"none\"}var j=u[b],k=b?a.scrollHeight:a.scrollWidth,t,d;if(b==0&&k+g.pxself(a,j.left)>=e.clientWidth){t=a.style[j.left];v(a,j.left,\"-1000000px\");k=b?a.scrollHeight:a.scrollWidth}e=b?a.clientHeight:a.clientWidth;if(g.isGecko&&!a.style[j.size]&&b==0&&i(g.css(a,\"overflow\"))){d=a.style[j.size];v(a,j.size,\"\")}b=b?a.offsetHeight:a.offsetWidth;t&&v(a,j.left,t); d&&v(a,j.size,d);if(e>=1E6)e-=1E6;if(k>=1E6)k-=1E6;if(b>=1E6)b-=1E6;if(k===0){k=g.pxself(a,j.size);if(k!==0&&!g.isOpera&&!g.isGecko)k-=g.px(a,\"border\"+j.Left+\"Width\")+g.px(a,\"border\"+j.Right+\"Width\")}if(g.isIE&&(g.hasTag(a,\"BUTTON\")||g.hasTag(a,\"TEXTAREA\")||g.hasTag(a,\"INPUT\")||g.hasTag(a,\"SELECT\")))k=e;if(k>b)if(g.pxself(a,j.size)==0)k=e;else{var o=false;$(a).find(\".Wt-popup\").each(function(){if(this.style.display!==\"none\")o=true});if(o)k=e}d=g.px(a,\"border\"+j.Left+\"Width\")+g.px(a,\"border\"+j.Right+ \"Width\");t=b-(e+d)!=0;if(c)return[k,scrollBar];g.isOpera||(k+=d);k+=g.px(a,\"margin\"+j.Left)+g.px(a,\"margin\"+j.Right);if(!g.boxSizing(a)&&!g.isIE)k+=g.px(a,\"padding\"+j.Left)+g.px(a,\"padding\"+j.Right);k+=b-(e+d);if(k0)k=Math.min(a,k);return[Math.round(k),t]}function w(a,b){b=u[b];if(a.style.display===\"none\")return 0;else if(a[\"layoutMin\"+b.Size])return a[\"layoutMin\"+b.Size];else{var c=g.px(a,\"min\"+b.Size);g.boxSizing(a)||(c+=g.px(a,\"padding\"+b.Left)+g.px(a,\"padding\"+ b.Right));return c}}function K(a,b){b=u[b];var c=g.px(a,\"margin\"+b.Left)+g.px(a,\"margin\"+b.Right);if(!g.boxSizing(a)&&!(g.isIE&&!g.isIElt9&&g.hasTag(a,\"BUTTON\")))c+=g.px(a,\"border\"+b.Left+\"Width\")+g.px(a,\"border\"+b.Right+\"Width\")+g.px(a,\"padding\"+b.Left)+g.px(a,\"padding\"+b.Right);return c}function J(a,b){b=u[b];return g.px(a,\"padding\"+b.Left)+g.px(a,\"padding\"+b.Right)}function aa(a,b){if(g.boxSizing(a)){b=u[b];return g.px(a,\"border\"+b.Left+\"Width\")+g.px(a,\"border\"+b.Right+\"Width\")+g.px(a,\"padding\"+ b.Left)+g.px(a,\"padding\"+b.Right)}else return 0}function W(a,b){b=u[b];return Math.round(g.px(a,\"border\"+b.Left+\"Width\")+g.px(a,\"border\"+b.Right+\"Width\")+g.px(a,\"margin\"+b.Left)+g.px(a,\"margin\"+b.Right)+g.px(a,\"padding\"+b.Left)+g.px(a,\"padding\"+b.Right))}function T(a,b,c){a.dirty=Math.max(a.dirty,b);M=true;c&&G.layouts2.scheduleAdjust()}function v(a,b,c){if(a.style[b]!==c){a.style[b]=c;return true}else return false}function ga(a,b,c){var e=u[a],i=e.config.length,j=u[a^1].config.length,k=e.measures.slice(); if(k.length==5){k[0]=k[0].slice();k[1]=k[1].slice()}if(M){if(c&&typeof e.minSize==\"undefined\"){e.minSize=g.px(c,\"min\"+e.Size);if(e.minSize>0)e.minSize-=aa(c,a)}var t=[],d=[],o=0,m=0,h,E,r=false;for(h=0;h1){var p=$(\"#\"+f.id),C=p.get(0);if(!C){e.setItem(h,E,null);continue}if(C!=f.w){f.w=C;p.find(\"img\").add(p.filter(\"img\")).bind(\"load\",{item:f},function(ha){T(ha.data.item,1,true)})}}if(!S&&f.w.style.position!= \"absolute\"){f.w.style.position=\"absolute\";f.w.style.visibility=\"hidden\"}if(!f.ps)f.ps=[];if(!f.sc)f.sc=[];if(!f.ms)f.ms=[];if(!f.size)f.size=[];if(!f.psize)f.psize=[];if(!f.fs)f.fs=[];if(!f.margin)f.margin=[];if($(f.w).hasClass(\"Wt-hidden\"))f.ps[a]=f.ms[a]=0;else{p=!f.set;if(!f.set)f.set=[false,false];if(f.w){if(g.isIE)f.w.style.visibility=\"\";if(f.dirty){var D;if(f.dirty>1){w(f.w,a);f.ms[a]=D}else D=f.ms[a];if(D>q)q=D;if(f.dirty>1)f.margin[a]=K(f.w,a);if(!f.set[a])if(a==0||!p){p=g.pxself(f.w,e.size); f.fs[a]=p?p+f.margin[a]:0}else{p=Math.round(g.px(f.w,e.size));f.fs[a]=p>Math.max(aa(f.w,a),D)?p+f.margin[a]:0}p=f.fs[a];if(f.layout){if(p==0)p=f.ps[a];f.ps[a]=p}else{if(f.wasLayout){f.wasLayout=false;f.set=[false,false];f.ps=[];f.w.wtResize&&f.w.wtResize(f.w,-1,-1,true);v(f.w,u[1].size,\"\")}C=B(f.w,a,false,b);var N=C[0],X=f.set[a];if(X)if(f.psize[a]>8)X=N>=f.psize[a]-4&&N<=f.psize[a]+4;var ia=typeof f.ps[a]!==\"undefined\"&&e.config[h][0]>0&&f.set[a];p=X||ia?Math.max(p,f.ps[a]):Math.max(p,N);f.ps[a]= p;f.sc[a]=C[1]}if(!f.span||f.span[a]==1){if(p>l)l=p}else r=true}else if(!f.span||f.span[a]==1){if(f.ps[a]>l)l=f.ps[a];if(f.ms[a]>q)q=f.ms[a]}else r=true;if(!(f.w.style.display===\"none\"&&!f.w.ed)&&(!f.span||f.span[a]==1))n=false}}}}if(n)q=l=-1;else if(q>l)l=q;t[h]=l;d[h]=q;if(q>-1){o+=l;m+=q}}if(r)for(h=0;h1){b=f.ps[a];for(q=l=r=0;q0)l+=e.config[h+q][0]}}if(b>0)if(r>0){if(l> 0)r=l;for(q=0;q0?e.config[h+q][0]:1;if(n>0){D=Math.round(b/n);b-=D;r-=n;t[h+q]+=D}}}}else t[h]=b}j=0;p=true;E=false;for(h=0;h-1){if(p){j+=e.margins[1];p=false}else{j+=e.margins[0];if(E)j+=4}E=e.config[h][1]!==0}p||(j+=e.margins[2]);o+=j;m+=j;e.measures=[t,d,o,m,j]}if(Y||k[2]!=e.measures[2])ba.updateSizeInParent(a);c&&e.minSize==0&&k[3]!=e.measures[3]&&c.parentNode.className!=\"Wt-domRoot\"&&v(c,\"min\"+e.Size,e.measures[3]+\"px\");c&&a==0&&c&&g.hasTag(c, \"TD\")&&v(c,e.size,e.measures[2]+\"px\")}function ja(a,b,c){a=u[a];if(Z)c=-c;if(a.config[b][0]>0&&a.config[b+1][0]==0){++b;c=-c}a.fixedSize[b]=a.sizes[b]+c;G.layouts2.scheduleAdjust()}function ka(a,b,c){var e=b.di,i=u[a],j=u[a^1],k,t=g.getElement(H),d;for(d=e-1;d>=0;--d)if(i.sizes[d]>=0){k=-(i.sizes[d]-i.measures[1][d]);break}e=i.sizes[e]-i.measures[1][e];if(Z){var o=k;k=-e;e=-o}new g.SizeHandle(g,i.resizeDir,g.pxself(b,i.size),g.pxself(b,j.size),k,e,i.resizerClass,function(m){ja(a,d,m)},b,t,c,0,0)} function la(a,b){var c=u[a],e=u[a^1],i=c.measures,j=0,k=false,t=false,d=false,o=ca?b.parentNode:null;if(c.maxSize===0)if(o){var m=g.css(o,\"position\");if(m===\"absolute\")j=g.pxself(o,c.size);if(j===0){if(!c.initialized){if(a===0&&(m===\"absolute\"||m===\"fixed\")){o.style.display=\"none\";j=o.clientWidth;o.style.display=\"\"}j=a?o.clientHeight:o.clientWidth;k=true;if(a==0&&j==0&&g.isIElt9){j=o.offsetWidth;k=false}var h;if((g.hasTag(o,\"TD\")||g.hasTag(o,\"TH\"))&&!(g.isIE&&!g.isIElt9)){d=0;h=1}else{d=c.minSize? c.minSize:i[3];h=0}function E(N,X){return Math.abs(N-X)<=1}if(g.isIElt9&&E(j,h)||E(j,d+J(o,a)))c.maxSize=999999}if(j===0&&c.maxSize===0){j=a?o.clientHeight:o.clientWidth;k=true}}}else{j=g.pxself(b,c.size);t=true}else if(c.sizeSet){j=g.pxself(o,c.size);t=true}var r=0;if(o&&o.wtGetPS&&a==1)r=o.wtGetPS(o,b,a,0);d=i[2];if(d=i[3]-r){r=j-i[4];h=[];var l=[0,0],q=[0,0],n=0;for(d=0;d-1){m=-1;if(typeof c.fixedSize[d]!==\"undefined\"&&(d+1==o||i[1][d+1]>-1))m=c.fixedSize[d];else if(c.config[d][1]!==0&&c.config[d][1][0]>= 0){m=c.config[d][1][0];if(c.config[d][1][1])m=(j-i[4])*m/100}if(m>=0){h[d]=-1;k[d]=m;r-=k[d]}else{if(c.config[d][0]>0){m=1;h[d]=c.config[d][0];n+=h[d]}else{m=0;h[d]=0}l[m]+=i[1][d];q[m]+=i[0][d];k[d]=i[0][d]}}else{h[d]=-2;k[d]=-1}if(n==0){for(d=0;dq[0]+l[1]){r-=q[0];if(r>q[1]){if(c.fitSize){r-=q[1];r=r/n;for(d=0;d0){k[d]+=Math.round(h[d]*r);c.stretched[d]=true}}}else{m=1;if(r0?(r-l[m])/(q[m]- l[m]):0;for(d=0;d0){l=i[0][d]-i[1][d];k[d]=i[1][d]+Math.round(l*r)}}}else{for(d=0;d0)k[d]=i[1][d];r-=l[1];m=0;if(r0?(r-l[m])/(q[m]-l[m]):0;for(d=0;d-1){var f=l;if(l){h=H+\"-rs\"+a+\"-\"+d;l=g.getElement(h);if(!l){l=document.createElement(\"div\");l.setAttribute(\"id\",h);l.di=d;l.style.position=\"absolute\";l.style[e.left]= e.margins[1]+\"px\";l.style[c.size]=c.margins[0]+\"px\";if(e.cSize)l.style[e.size]=e.cSize-e.margins[2]-e.margins[1]+\"px\";l.className=c.handleClass;b.insertBefore(l,b.firstChild);l.onmousedown=l.ontouchstart=function(N){ka(a,this,N||window.event)}}i+=2;v(l,c.left,i+\"px\");i+=2}l=c.config[d][1]!==0;if(r)r=false;else i+=c.margins[0]}for(q=0;q=k.length)break;if(C)m+=4;C=c.config[d+p][1]!==0;if(k[d+ p-1]>-1&&k[d+p]>-1)m+=c.margins[0];m+=k[d+p]}}var D;v(h,\"visibility\",\"\");C=n.align>>c.alignBits&15;p=n.ps[a];if(m=p&&n.set[a]){v(h,c.size,p+\"px\")&&T(n,1);n.set[a]=false}n.size[a]=p;n.psize[a]=p}else{C=Math.max(0,m-n.margin[a]);D=a==0&&n.sc[a];if(!(h.style.display===\"none\"&&!h.ed)&&(D||m!=p||n.layout)){if(v(h,c.size,C+\"px\")){if(!g.isIE&& (g.hasTag(h,\"TEXTAREA\")||g.hasTag(h,\"INPUT\"))){v(h,\"margin-\"+c.left,n.margin[a]/2+\"px\");v(h,\"margin-\"+e.left,n.margin[!a]/2+\"px\")}T(n,1);n.set[a]=true}}else if(n.fs[a])a==0&&v(h,c.size,n.fs[a]+\"px\");else{v(h,c.size,\"\")&&T(n,1);n.set[a]=false}D=i;n.size[a]=C;n.psize[a]=m}if(S)if(f){v(h,c.left,\"4px\");m=g.css(h,\"position\");if(m!==\"absolute\")h.style.position=\"relative\"}else v(h,c.left,\"0px\");else v(h,c.left,D+\"px\");if(a==1){if(h.wtResize)h.wtResize(h,n.set[0]?Math.round(n.size[0]):-1,n.set[1]?Math.round(n.size[1]): -1,true);n.dirty=0}}if(k[d]>-1)i+=k[d]}$(b).children(\".\"+e.handleClass).css(c.size,j-c.margins[2]-c.margins[1]+\"px\")}}var g=G.WT;this.descendants=[];var ba=this,A=y,M=true,Y=true,ca=false,U=null,O=null,da=false,ea=false,V=[],fa=false,Z=$(document.body).hasClass(\"Wt-rtl\"),u=[{initialized:false,config:A.cols,margins:x,maxSize:s,measures:[],sizes:[],stretched:[],fixedSize:[],Left:Z?\"Right\":\"Left\",left:Z?\"right\":\"left\",Right:Z?\"Left\":\"Right\",Size:\"Width\",size:\"width\",alignBits:0,getItem:function(a,b){return A.items[b* u[0].config.length+a]},setItem:function(a,b,c){A.items[b*u[0].config.length+a]=c},handleClass:\"Wt-vrh2\",resizeDir:\"h\",resizerClass:\"Wt-hsh2\",fitSize:P},{initialized:false,config:A.rows,margins:z,maxSize:F,measures:[],sizes:[],stretched:[],fixedSize:[],Left:\"Top\",left:\"top\",Right:\"Bottom\",Size:\"Height\",size:\"height\",alignBits:4,getItem:function(a,b){return A.items[a*u[0].config.length+b]},setItem:function(a,b,c){A.items[a*u[0].config.length+b]=c},handleClass:\"Wt-hrh2\",resizeDir:\"v\",resizerClass:\"Wt-vsh2\", fitSize:Q}];jQuery.data(document.getElementById(H),\"layout\",this);this.updateSizeInParent=function(a){if(U)if(da){var b=u[a],c=b.measures[2];if(b.maxSize>0)c=Math.min(b.maxSize,c);if(fa){b=g.getElement(H);if(!b)return;for(var e=b,i=e.parentNode;;){if(i.wtGetPS)c=i.wtGetPS(i,e,a,c);c+=W(i,a);if(i==O)break;if(a==1&&i==b.parentNode&&!i.lh&&i.offsetHeight>c)c=i.offsetHeight;e=i;i=e.parentNode}}else c+=V[a];U.setChildSize(O,a,c)}};this.setConfig=function(a){var b=A;A=a;u[0].config=A.cols;u[1].config=A.rows; u[0].stretched=[];u[1].stretched=[];var c;a=0;for(c=b.items.length;a>i.alignBits& 15||!i.stretched[a]){if(!t.ps)t.ps=[];t.ps[b]=c}t.layout=true;T(t,1);break}}};this.measure=function(a){var b=g.getElement(H);if(b)if(!g.isHidden(b)){if(!ea){ea=true;ca=I==null;da=true;if(ca){var c=b;c=c.parentNode;for(V=[0,0];c!=document;){V[0]+=W(c,0);V[1]+=W(c,1);if(c.wtGetPS)fa=true;var e=jQuery.data(c.parentNode,\"layout\");if(e){U=e;O=c;break}c=c;c=c.parentNode;if(c.childNodes.length!=1&&!c.wtGetPS)da=false}c=b.parentNode;for(e=0;e<2;++e)u[e].sizeSet=g.pxself(c,u[e].size)!=0}else{U=jQuery.data(document.getElementById(I), \"layout\");O=b;V[0]=W(O,0);V[1]=W(O,1)}}if(M||Y){c=ca?b.parentNode:null;ga(a,b,c)}if(a==1)M=Y=false}};this.setMaxSize=function(a,b){u[0].maxSize=a;u[1].maxSize=b};this.apply=function(a){var b=g.getElement(H);if(!b)return false;if(g.isHidden(b))return true;la(a,b);return true};this.contains=function(a){var b=g.getElement(H);a=g.getElement(a.getId());return b&&a?g.contains(b,a):false};this.WT=g}"); } static WJavaScriptPreamble wtjs2() { @@ -729,7 +729,7 @@ static WJavaScriptPreamble appjs1() { JavaScriptScope.ApplicationScope, JavaScriptObjectType.JavaScriptObject, "layouts2", - "new (function(){var G=[],H=false,I=this,O=false;this.find=function(s){return jQuery.data(document.getElementById(s),\"layout\")};this.setDirty=function(s){if(s=this.find(s)){s.setDirty();I.scheduleAdjust()}};this.setElementDirty=function(s){var F=s;for(s=s.parentNode;s&&s!=document.body;){var x=jQuery.data(s,\"layout\");x&&x.setElDirty(F);F=s;s=s.parentNode}};this.setChildLayoutsDirty=function(s,F){var x,z;x=0;for(z=s.descendants.length;x headerDoubleClicked() { return this.headerDblClicked_; } + /** + * {@link } when scrolling. + *

+ *

+ * Note: Works only if ajax is available. + *

+ */ + public abstract EventSignal1 scrolled(); + /** * Configures the number of columns that are used as row headers. *

diff --git a/src/eu/webtoolkit/jwt/WAbstractMedia.java b/src/eu/webtoolkit/jwt/WAbstractMedia.java index 0d573ee3..84b74f4a 100644 --- a/src/eu/webtoolkit/jwt/WAbstractMedia.java +++ b/src/eu/webtoolkit/jwt/WAbstractMedia.java @@ -158,7 +158,7 @@ public WAbstractMedia(WContainerWidget parent) { WApplication app = WApplication.getInstance(); app.loadJavaScript("js/WAbstractMedia.js", wtjs1()); this.setJavaScriptMember(" WAbstractMedia", - "new Wt3_3_1.WAbstractMedia(" + app.getJavaScriptClass() + "," + "new Wt3_3_2.WAbstractMedia(" + app.getJavaScriptClass() + "," + this.getJsRef() + ");"); } @@ -426,7 +426,7 @@ public String getJsMediaRef() { if (this.mediaId_.length() == 0) { return "null"; } else { - return "Wt3_3_1.getElement('" + this.mediaId_ + "')"; + return "Wt3_3_2.getElement('" + this.mediaId_ + "')"; } } @@ -437,7 +437,7 @@ void getDomChanges(final List result, WApplication app) { this.updateMediaDom(media, false); if (this.sourcesChanged_) { for (int i = 0; i < this.sourcesRendered_; ++i) { - media.callJavaScript("Wt3_3_1.remove('" + this.mediaId_ + media.callJavaScript("Wt3_3_2.remove('" + this.mediaId_ + "s" + String.valueOf(i) + "');", true); } this.sourcesRendered_ = 0; @@ -536,7 +536,7 @@ void updateMediaDom(final DomElement element, boolean all) { element .setAttribute( "onerror", - "if(event.target.error && event.target.error.code==event.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED){while (this.hasChildNodes())if (Wt3_3_1.hasTag(this.firstChild,'SOURCE')){this.removeChild(this.firstChild);}else{this.parentNode.insertBefore(this.firstChild, this);}this.style.display= 'none';}"); + "if(event.target.error && event.target.error.code==event.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED){while (this.hasChildNodes())if (Wt3_3_2.hasTag(this.firstChild,'SOURCE')){this.removeChild(this.firstChild);}else{this.parentNode.insertBefore(this.firstChild, this);}this.style.display= 'none';}"); } if (all || this.flagsChanged_) { if (!all @@ -670,7 +670,7 @@ private void renderSource(DomElement element, element .setAttribute( "onerror", - "var media = this.parentNode;if(media){while (media && media.children.length)if (Wt3_3_1.hasTag(media.firstChild,'SOURCE')){media.removeChild(media.firstChild);}else{media.parentNode.insertBefore(media.firstChild, media);}media.style.display= 'none';}"); + "var media = this.parentNode;if(media){while (media && media.children.length)if (Wt3_3_2.hasTag(media.firstChild,'SOURCE')){media.removeChild(media.firstChild);}else{media.parentNode.insertBefore(media.firstChild, media);}media.style.display= 'none';}"); } else { element.setAttribute("onerror", ""); } diff --git a/src/eu/webtoolkit/jwt/WAbstractSpinBox.java b/src/eu/webtoolkit/jwt/WAbstractSpinBox.java index 904c4170..7a5bbc9b 100644 --- a/src/eu/webtoolkit/jwt/WAbstractSpinBox.java +++ b/src/eu/webtoolkit/jwt/WAbstractSpinBox.java @@ -243,7 +243,7 @@ protected int boxPadding(Orientation orientation) { private void defineJavaScript() { WApplication app = WApplication.getInstance(); app.loadJavaScript("js/WSpinBox.js", wtjs1()); - String jsObj = "new Wt3_3_1.WSpinBox(" + app.getJavaScriptClass() + "," + String jsObj = "new Wt3_3_2.WSpinBox(" + app.getJavaScriptClass() + "," + this.getJsRef() + "," + String.valueOf(this.getDecimals()) + "," + WString.toWString(this.getPrefix()).getJsStringLiteral() diff --git a/src/eu/webtoolkit/jwt/WApplication.java b/src/eu/webtoolkit/jwt/WApplication.java index 14edd0bb..03c1f70f 100644 --- a/src/eu/webtoolkit/jwt/WApplication.java +++ b/src/eu/webtoolkit/jwt/WApplication.java @@ -2423,9 +2423,9 @@ public void setLoadingIndicator(WLoadingIndicator indicator) { if (this.loadingIndicator_ != null) { this.loadingIndicatorWidget_ = indicator.getWidget(); this.domRoot_.addWidget(this.loadingIndicatorWidget_); - this.showLoadJS.setJavaScript("function(o,e) {Wt3_3_1.inline('" + this.showLoadJS.setJavaScript("function(o,e) {Wt3_3_2.inline('" + this.loadingIndicatorWidget_.getId() + "');}"); - this.hideLoadJS.setJavaScript("function(o,e) {Wt3_3_1.hide('" + this.hideLoadJS.setJavaScript("function(o,e) {Wt3_3_2.hide('" + this.loadingIndicatorWidget_.getId() + "');}"); this.loadingIndicatorWidget_.hide(); } @@ -2836,7 +2836,7 @@ protected void enableAjax() { if (this.domRoot2_ != null) { this.domRoot2_.enableAjax(); } - this.doJavaScript("Wt3_3_1.ajaxInternalPaths(" + this.doJavaScript("Wt3_3_2.ajaxInternalPaths(" + WWebWidget.jsStringLiteral(this.resolveRelativeUrl(this .getBookmarkUrl("/"))) + ");"); } @@ -3133,7 +3133,7 @@ private void streamJavaScriptPreamble(final StringBuilder out, boolean all) { .get(i); String scope = preamble.scope == JavaScriptScope.ApplicationScope ? this .getJavaScriptClass() - : "Wt3_3_1"; + : "Wt3_3_2"; if (preamble.type == JavaScriptObjectType.JavaScriptFunction) { out.append(scope).append('.').append(preamble.name).append( " = function() { return (").append(preamble.src) diff --git a/src/eu/webtoolkit/jwt/WBootstrapTheme.java b/src/eu/webtoolkit/jwt/WBootstrapTheme.java index 8414df70..b57daa86 100644 --- a/src/eu/webtoolkit/jwt/WBootstrapTheme.java +++ b/src/eu/webtoolkit/jwt/WBootstrapTheme.java @@ -368,7 +368,7 @@ public void applyValidationStyle(WWidget widget, app.loadJavaScript("js/BootstrapValidate.js", wtjs2()); if (app.getEnvironment().hasAjax()) { StringBuilder js = new StringBuilder(); - js.append("Wt3_3_1.setValidationState(").append(widget.getJsRef()) + js.append("Wt3_3_2.setValidationState(").append(widget.getJsRef()) .append(",").append( validation.getState() == WValidator.State.Valid ? 1 : 0).append(",").append( @@ -390,7 +390,7 @@ public void applyValidationStyle(WWidget widget, } public boolean canBorderBoxElement(final DomElement element) { - return element.getType() != DomElementType.DomElement_INPUT; + return true; } static WJavaScriptPreamble wtjs1() { diff --git a/src/eu/webtoolkit/jwt/WCanvasPaintDevice.java b/src/eu/webtoolkit/jwt/WCanvasPaintDevice.java index 5d128081..9dc8fabd 100644 --- a/src/eu/webtoolkit/jwt/WCanvasPaintDevice.java +++ b/src/eu/webtoolkit/jwt/WCanvasPaintDevice.java @@ -479,7 +479,7 @@ public boolean isPaintActive() { } void render(final String canvasId, DomElement text) { - String canvasVar = "Wt3_3_1.getElement('" + canvasId + "')"; + String canvasVar = "Wt3_3_2.getElement('" + canvasId + "')"; StringWriter tmp = new StringWriter(); tmp.append("if(").append(canvasVar).append(".getContext){"); if (!this.images_.isEmpty()) { diff --git a/src/eu/webtoolkit/jwt/WClientGLWidget.java b/src/eu/webtoolkit/jwt/WClientGLWidget.java index a71e4b08..7166d0b8 100644 --- a/src/eu/webtoolkit/jwt/WClientGLWidget.java +++ b/src/eu/webtoolkit/jwt/WClientGLWidget.java @@ -2087,7 +2087,7 @@ public WGLWidget.JavaScriptMatrix4x4 getCreateJavaScriptMatrix4() { public void setJavaScriptMatrix4(final WGLWidget.JavaScriptMatrix4x4 jsm, final javax.vecmath.Matrix4f m) { - this.js_.append("Wt3_3_1.glMatrix.mat4.set("); + this.js_.append("Wt3_3_2.glMatrix.mat4.set("); javax.vecmath.Matrix4f t = WebGLUtils.transpose(m); WebGLUtils.renderfv(this.js_, t, JsArrayType.Float32Array); this.js_.append(", ").append(jsm.getJsRef()).append(");"); @@ -2130,7 +2130,7 @@ public void injectJS(final String jsString) { public void render(final String jsRef, EnumSet flags) { if (!EnumUtils.mask(flags, RenderFlag.RenderFull).isEmpty()) { StringWriter tmp = new StringWriter(); - tmp.append("{\nvar o = new Wt3_3_1.WGLWidget(").append( + tmp.append("{\nvar o = new Wt3_3_2.WGLWidget(").append( WApplication.getInstance().getJavaScriptClass()) .append(",").append(jsRef).append( ");\no.discoverContext(function(){").append( diff --git a/src/eu/webtoolkit/jwt/WColor.java b/src/eu/webtoolkit/jwt/WColor.java index ca98be68..903fdc43 100644 --- a/src/eu/webtoolkit/jwt/WColor.java +++ b/src/eu/webtoolkit/jwt/WColor.java @@ -295,17 +295,16 @@ String getCssText(boolean withAlpha) { return this.name_.toString(); } else { StringWriter tmp = new StringWriter(); - String buf; if (this.alpha_ != 255 && withAlpha) { - tmp.append("rgba(").append(buf = String.valueOf(this.red_)); - tmp.append(',').append(buf = String.valueOf(this.green_)); - tmp.append(',').append(buf = String.valueOf(this.blue_)); + tmp.append("rgba(").append(String.valueOf(this.red_)); + tmp.append(',').append(String.valueOf(this.green_)); + tmp.append(',').append(String.valueOf(this.blue_)); tmp.append(',').append( MathUtils.roundCss(this.alpha_ / 255., 2)).append(')'); } else { - tmp.append("rgb(").append(buf = String.valueOf(this.red_)); - tmp.append(',').append(buf = String.valueOf(this.green_)); - tmp.append(',').append(buf = String.valueOf(this.blue_)) + tmp.append("rgb(").append(String.valueOf(this.red_)); + tmp.append(',').append(String.valueOf(this.green_)); + tmp.append(',').append(String.valueOf(this.blue_)) .append(')'); } return tmp.toString(); @@ -313,7 +312,7 @@ String getCssText(boolean withAlpha) { } } - final String getCssText() { + public final String getCssText() { return getCssText(false); } diff --git a/src/eu/webtoolkit/jwt/WCssStyleSheet.java b/src/eu/webtoolkit/jwt/WCssStyleSheet.java index a3bafe75..8bde1a94 100644 --- a/src/eu/webtoolkit/jwt/WCssStyleSheet.java +++ b/src/eu/webtoolkit/jwt/WCssStyleSheet.java @@ -223,7 +223,7 @@ public void javaScriptUpdate(WApplication app, final StringBuilder js, boolean all) { if (!all) { for (int i = 0; i < this.rulesRemoved_.size(); ++i) { - js.append("Wt3_3_1.removeCssRule("); + js.append("Wt3_3_2.removeCssRule("); DomElement.jsStringLiteral(js, this.rulesRemoved_.get(i), '\''); js.append(");"); } @@ -231,7 +231,7 @@ public void javaScriptUpdate(WApplication app, final StringBuilder js, for (Iterator i_it = this.rulesModified_.iterator(); i_it .hasNext();) { WCssRule i = i_it.next(); - js.append("{ var d= Wt3_3_1.getCssRule("); + js.append("{ var d= Wt3_3_2.getCssRule("); DomElement.jsStringLiteral(js, i.getSelector(), '\''); js.append(");if(d){"); DomElement d = DomElement.updateGiven("d", @@ -251,7 +251,7 @@ public void javaScriptUpdate(WApplication app, final StringBuilder js, : this.rulesAdded_; for (int i = 0; i < toProcess.size(); ++i) { WCssRule rule = toProcess.get(i); - js.append("Wt3_3_1.addCss('").append(rule.getSelector()) + js.append("Wt3_3_2.addCss('").append(rule.getSelector()) .append("',"); DomElement.jsStringLiteral(js, rule.getDeclarations(), '\''); js.append(");\n"); @@ -264,7 +264,7 @@ public void javaScriptUpdate(WApplication app, final StringBuilder js, StringBuilder css = new StringBuilder(); this.cssText(css, all); if (!(css.length() == 0)) { - js.append("Wt3_3_1.addCssText("); + js.append("Wt3_3_2.addCssText("); DomElement.jsStringLiteral(js, css.toString(), '\''); js.append(");\n"); } diff --git a/src/eu/webtoolkit/jwt/WCssTheme.java b/src/eu/webtoolkit/jwt/WCssTheme.java index 94d2be5a..fe88cb3e 100644 --- a/src/eu/webtoolkit/jwt/WCssTheme.java +++ b/src/eu/webtoolkit/jwt/WCssTheme.java @@ -658,7 +658,7 @@ public void applyValidationStyle(WWidget widget, app.loadJavaScript("js/CssThemeValidate.js", wtjs2()); if (app.getEnvironment().hasAjax()) { StringBuilder js = new StringBuilder(); - js.append("Wt3_3_1.setValidationState(").append(widget.getJsRef()) + js.append("Wt3_3_2.setValidationState(").append(widget.getJsRef()) .append(",").append( validation.getState() == WValidator.State.Valid ? 1 : 0).append(",").append( diff --git a/src/eu/webtoolkit/jwt/WDateEdit.java b/src/eu/webtoolkit/jwt/WDateEdit.java index 5e33db75..05ebb2eb 100644 --- a/src/eu/webtoolkit/jwt/WDateEdit.java +++ b/src/eu/webtoolkit/jwt/WDateEdit.java @@ -308,7 +308,7 @@ protected void setFromLineEdit() { private void defineJavaScript() { WApplication app = WApplication.getInstance(); app.loadJavaScript("js/WDateEdit.js", wtjs1()); - String jsObj = "new Wt3_3_1.WDateEdit(" + app.getJavaScriptClass() + String jsObj = "new Wt3_3_2.WDateEdit(" + app.getJavaScriptClass() + "," + this.getJsRef() + "," + this.popup_.getJsRef() + ");"; this.setJavaScriptMember(" WDateEdit", jsObj); final AbstractEventSignal b = this.mouseMoved(); diff --git a/src/eu/webtoolkit/jwt/WDatePicker.java b/src/eu/webtoolkit/jwt/WDatePicker.java index 6bed0afe..1be445b2 100644 --- a/src/eu/webtoolkit/jwt/WDatePicker.java +++ b/src/eu/webtoolkit/jwt/WDatePicker.java @@ -139,7 +139,7 @@ public WDatePicker(WInteractWidget displayWidget, WLineEdit forEdit) { */ public void remove() { WApplication.getInstance().doJavaScript( - "Wt3_3_1.remove('" + this.popup_.getId() + "');"); + "Wt3_3_2.remove('" + this.popup_.getId() + "');"); super.remove(); } diff --git a/src/eu/webtoolkit/jwt/WDateValidator.java b/src/eu/webtoolkit/jwt/WDateValidator.java index 5ef7b0f8..05b3aec9 100644 --- a/src/eu/webtoolkit/jwt/WDateValidator.java +++ b/src/eu/webtoolkit/jwt/WDateValidator.java @@ -388,7 +388,7 @@ public WString getInvalidTooLateText() { public String getJavaScriptValidate() { loadJavaScript(WApplication.getInstance()); StringBuilder js = new StringBuilder(); - js.append("new Wt3_3_1.WDateValidator(").append(this.isMandatory()) + js.append("new Wt3_3_2.WDateValidator(").append(this.isMandatory()) .append(",["); for (int i = 0; i < this.formats_.size(); ++i) { WDate.RegExpInfo r = WDate.formatToRegExp(this.formats_.get(i)); diff --git a/src/eu/webtoolkit/jwt/WDialog.java b/src/eu/webtoolkit/jwt/WDialog.java index 3315bd2a..68f2ced0 100644 --- a/src/eu/webtoolkit/jwt/WDialog.java +++ b/src/eu/webtoolkit/jwt/WDialog.java @@ -462,7 +462,7 @@ public void setResizable(boolean resizable) { this .setJavaScriptMember( " Resizable", - "(new Wt3_3_1.Resizable(Wt3_3_1," + "(new Wt3_3_2.Resizable(Wt3_3_2," + this.getJsRef() + ")).onresize(function(w, h) {var obj = $('#" + this.getId() @@ -612,7 +612,7 @@ protected void render(EnumSet flags) { } } } - this.doJavaScript("new Wt3_3_1.WDialog(" + app.getJavaScriptClass() + this.doJavaScript("new Wt3_3_2.WDialog(" + app.getJavaScriptClass() + "," + this.getJsRef() + "," + this.titleBar_.getJsRef() + "," + (centerX ? "1" : "0") + "," + (centerY ? "1" : "0") + ");"); diff --git a/src/eu/webtoolkit/jwt/WDoubleValidator.java b/src/eu/webtoolkit/jwt/WDoubleValidator.java index 32056c8e..dd444366 100644 --- a/src/eu/webtoolkit/jwt/WDoubleValidator.java +++ b/src/eu/webtoolkit/jwt/WDoubleValidator.java @@ -272,7 +272,7 @@ public WString getInvalidTooLargeText() { public String getJavaScriptValidate() { loadJavaScript(WApplication.getInstance()); StringBuilder js = new StringBuilder(); - js.append("new Wt3_3_1.WDoubleValidator(").append(this.isMandatory()) + js.append("new Wt3_3_2.WDoubleValidator(").append(this.isMandatory()) .append(','); if (this.bottom_ != -Double.MAX_VALUE) { js.append(this.bottom_); diff --git a/src/eu/webtoolkit/jwt/WEnvironment.java b/src/eu/webtoolkit/jwt/WEnvironment.java index 50f94b01..c6ec6b7e 100644 --- a/src/eu/webtoolkit/jwt/WEnvironment.java +++ b/src/eu/webtoolkit/jwt/WEnvironment.java @@ -245,7 +245,7 @@ public int getValue() { * Wt's JavaScript scope. */ public static String getJavaScriptWtScope() { - return "Wt3_3_1"; + return "Wt3_3_2"; } /** @@ -652,7 +652,7 @@ public String getDeploymentPath() { * Example: "1.99.2" */ public static String getLibraryVersion() { - return "3.3.1"; + return "3.3.2"; } // public void libraryVersion(final bad java simple ref int series, final diff --git a/src/eu/webtoolkit/jwt/WFlashObject.java b/src/eu/webtoolkit/jwt/WFlashObject.java index e2dca05a..d46b33d7 100644 --- a/src/eu/webtoolkit/jwt/WFlashObject.java +++ b/src/eu/webtoolkit/jwt/WFlashObject.java @@ -151,7 +151,7 @@ public void setFlashVariable(final String name, final CharSequence value) { * installed. */ public String getJsFlashRef() { - return "Wt3_3_1.getElement('" + this.getId() + "_flash')"; + return "Wt3_3_2.getElement('" + this.getId() + "_flash')"; } /** diff --git a/src/eu/webtoolkit/jwt/WFormWidget.java b/src/eu/webtoolkit/jwt/WFormWidget.java index b6a9cc57..618c7f4a 100644 --- a/src/eu/webtoolkit/jwt/WFormWidget.java +++ b/src/eu/webtoolkit/jwt/WFormWidget.java @@ -465,7 +465,7 @@ void validatorChanged() { if (!(this.validateJs_ != null)) { this.validateJs_ = new JSlot(); this.validateJs_ - .setJavaScript("function(o){Wt3_3_1.validate(o)}"); + .setJavaScript("function(o){Wt3_3_2.validate(o)}"); this.keyWentUp().addListener(this.validateJs_); this.changed().addListener(this.validateJs_); if (this.getDomElementType() != DomElementType.DomElement_SELECT) { @@ -483,7 +483,7 @@ void validatorChanged() { this.keyPressed().addListener(this.filterInput_); } StringUtils.replace(inputFilter, '/', "\\/"); - this.filterInput_.setJavaScript("function(o,e){Wt3_3_1.filter(o,e," + this.filterInput_.setJavaScript("function(o,e){Wt3_3_2.filter(o,e," + jsStringLiteral(inputFilter) + ")}"); } else { ; @@ -500,7 +500,7 @@ private void defineJavaScript(boolean force) { } WApplication app = WApplication.getInstance(); app.loadJavaScript("js/WFormWidget.js", wtjs1()); - this.setJavaScriptMember(" WFormWidget", "new Wt3_3_1.WFormWidget(" + this.setJavaScriptMember(" WFormWidget", "new Wt3_3_2.WFormWidget(" + app.getJavaScriptClass() + "," + this.getJsRef() + "," + WString.toWString(this.emptyText_).getJsStringLiteral() + ");"); diff --git a/src/eu/webtoolkit/jwt/WGLWidget.java b/src/eu/webtoolkit/jwt/WGLWidget.java index e4896aa9..3a90901e 100644 --- a/src/eu/webtoolkit/jwt/WGLWidget.java +++ b/src/eu/webtoolkit/jwt/WGLWidget.java @@ -469,8 +469,8 @@ public WGLWidget.JavaScriptMatrix4x4 inverted() { "JavaScriptMatrix4x4: matrix not initialized"); } WGLWidget.JavaScriptMatrix4x4 copy = this.clone(); - copy.jsRef_ = "Wt3_3_1.glMatrix.mat4.inverse(" + this.jsRef_ - + ", Wt3_3_1.glMatrix.mat4.create())"; + copy.jsRef_ = "Wt3_3_2.glMatrix.mat4.inverse(" + this.jsRef_ + + ", Wt3_3_2.glMatrix.mat4.create())"; copy.operations_.add(WGLWidget.JavaScriptMatrix4x4.op.INVERT); return copy; } @@ -481,8 +481,8 @@ public WGLWidget.JavaScriptMatrix4x4 transposed() { "JavaScriptMatrix4x4: matrix not initialized"); } WGLWidget.JavaScriptMatrix4x4 copy = this.clone(); - copy.jsRef_ = "Wt3_3_1.glMatrix.mat4.transpose(" + this.jsRef_ - + ", Wt3_3_1.glMatrix.mat4.create())"; + copy.jsRef_ = "Wt3_3_2.glMatrix.mat4.transpose(" + this.jsRef_ + + ", Wt3_3_2.glMatrix.mat4.create())"; copy.operations_.add(WGLWidget.JavaScriptMatrix4x4.op.TRANSPOSE); return copy; } @@ -495,11 +495,11 @@ public WGLWidget.JavaScriptMatrix4x4 multiply( } WGLWidget.JavaScriptMatrix4x4 copy = this.clone(); StringWriter ss = new StringWriter(); - ss.append("Wt3_3_1.glMatrix.mat4.multiply(").append(this.jsRef_) + ss.append("Wt3_3_2.glMatrix.mat4.multiply(").append(this.jsRef_) .append(","); javax.vecmath.Matrix4f t = WebGLUtils.transpose(m); WebGLUtils.renderfv(ss, t, this.arrayType_); - ss.append(", Wt3_3_1.glMatrix.mat4.create())"); + ss.append(", Wt3_3_2.glMatrix.mat4.create())"); copy.jsRef_ = ss.toString(); copy.operations_.add(WGLWidget.JavaScriptMatrix4x4.op.MULTIPLY); copy.matrices_.add(m); diff --git a/src/eu/webtoolkit/jwt/WIntValidator.java b/src/eu/webtoolkit/jwt/WIntValidator.java index 3753fcc9..4ab5db31 100644 --- a/src/eu/webtoolkit/jwt/WIntValidator.java +++ b/src/eu/webtoolkit/jwt/WIntValidator.java @@ -271,7 +271,7 @@ public WString getInvalidTooLargeText() { public String getJavaScriptValidate() { loadJavaScript(WApplication.getInstance()); StringBuilder js = new StringBuilder(); - js.append("new Wt3_3_1.WIntValidator(").append(this.isMandatory()) + js.append("new Wt3_3_2.WIntValidator(").append(this.isMandatory()) .append(','); if (this.bottom_ != Integer.MIN_VALUE) { js.append(this.bottom_); diff --git a/src/eu/webtoolkit/jwt/WInteractWidget.java b/src/eu/webtoolkit/jwt/WInteractWidget.java index c9410373..c3a384ae 100644 --- a/src/eu/webtoolkit/jwt/WInteractWidget.java +++ b/src/eu/webtoolkit/jwt/WInteractWidget.java @@ -634,7 +634,7 @@ void updateDom(final DomElement element, boolean all) { || updateMouseMove; String CheckDisabled = "if($(o).hasClass('" + app.getTheme().getDisabledClass() - + "')){Wt3_3_1.cancelEvent(e);return;}"; + + "')){Wt3_3_2.cancelEvent(e);return;}"; if (updateMouseDown) { StringBuilder js = new StringBuilder(); js.append(CheckDisabled); @@ -648,11 +648,11 @@ void updateDom(final DomElement element, boolean all) { && mouseDown.isConnected() && (mouseUp != null && mouseUp.isConnected() || mouseMove != null && mouseMove.isConnected())) { - js.append("Wt3_3_1.capture(this);"); + js.append("Wt3_3_2.capture(this);"); } if (mouseMove != null && mouseMove.isConnected() || mouseDrag != null && mouseDrag.isConnected()) { - js.append("Wt3_3_1.mouseDown(e);"); + js.append("Wt3_3_2.mouseDown(e);"); } if (mouseDown != null) { js.append(mouseDown.getJavaScript()); @@ -668,7 +668,7 @@ void updateDom(final DomElement element, boolean all) { js.append(CheckDisabled); if (mouseMove != null && mouseMove.isConnected() || mouseDrag != null && mouseDrag.isConnected()) { - js.append("Wt3_3_1.mouseUp(e);"); + js.append("Wt3_3_2.mouseUp(e);"); } if (mouseUp != null) { js.append(mouseUp.getJavaScript()); @@ -688,7 +688,7 @@ void updateDom(final DomElement element, boolean all) { mouseMove.updateOk(); } if (mouseDrag != null) { - actions.add(new DomElement.EventAction("Wt3_3_1.buttons", + actions.add(new DomElement.EventAction("Wt3_3_2.buttons", mouseDrag.getJavaScript(), mouseDrag.encodeCmd(), mouseDrag.isExposedSignal())); mouseDrag.updateOk(); @@ -709,7 +709,7 @@ void updateDom(final DomElement element, boolean all) { if (mouseClick != null) { if (mouseClick.isDefaultActionPrevented() || mouseClick.isPropagationPrevented()) { - js.append("Wt3_3_1.cancelEvent(e"); + js.append("Wt3_3_2.cancelEvent(e"); if (mouseClick.isDefaultActionPrevented() && mouseClick.isPropagationPrevented()) { js.append(");"); @@ -734,7 +734,7 @@ void updateDom(final DomElement element, boolean all) { } mouseDblClick.updateOk(); js - .append("}else{if (Wt3_3_1.isIElt9 && document.createEventObject) e = document.createEventObject(e);o.wtClickTimeout = setTimeout(function() {o.wtClickTimeout = null;"); + .append("}else{if (Wt3_3_2.isIElt9 && document.createEventObject) e = document.createEventObject(e);o.wtClickTimeout = setTimeout(function() {o.wtClickTimeout = null;"); if (mouseClick != null) { js.append(mouseClick.getJavaScript()); if (mouseClick.isExposedSignal()) { diff --git a/src/eu/webtoolkit/jwt/WItemDelegate.java b/src/eu/webtoolkit/jwt/WItemDelegate.java index 018851c6..c2eb9ae3 100644 --- a/src/eu/webtoolkit/jwt/WItemDelegate.java +++ b/src/eu/webtoolkit/jwt/WItemDelegate.java @@ -169,7 +169,9 @@ public WWidget update(WWidget widget, final WModelIndex index, WString tooltip = StringUtils.asString(index .getData(ItemDataRole.ToolTipRole)); if (!(tooltip.length() == 0) || !isNew) { - widgetRef.w.setToolTip(tooltip); + widgetRef.w.setToolTip(tooltip, !EnumUtils.mask(index.getFlags(), + ItemFlag.ItemIsXHTMLText).isEmpty() ? TextFormat.XHTMLText + : TextFormat.PlainText); } String sc = StringUtils.asString( index.getData(ItemDataRole.StyleClassRole)).toString(); diff --git a/src/eu/webtoolkit/jwt/WLengthValidator.java b/src/eu/webtoolkit/jwt/WLengthValidator.java index 536bd9cd..aa60b1c0 100644 --- a/src/eu/webtoolkit/jwt/WLengthValidator.java +++ b/src/eu/webtoolkit/jwt/WLengthValidator.java @@ -237,7 +237,7 @@ public WString getInvalidTooLongText() { public String getJavaScriptValidate() { loadJavaScript(WApplication.getInstance()); StringBuilder js = new StringBuilder(); - js.append("new Wt3_3_1.WLengthValidator(").append(this.isMandatory()) + js.append("new Wt3_3_2.WLengthValidator(").append(this.isMandatory()) .append(','); if (this.minLength_ != 0) { js.append(this.minLength_); diff --git a/src/eu/webtoolkit/jwt/WMediaPlayer.java b/src/eu/webtoolkit/jwt/WMediaPlayer.java index 9bc7abc4..7ca4c061 100644 --- a/src/eu/webtoolkit/jwt/WMediaPlayer.java +++ b/src/eu/webtoolkit/jwt/WMediaPlayer.java @@ -1034,7 +1034,7 @@ protected void render(EnumSet flags) { first = false; } ss.append('}').append("});"); - ss.append("new Wt3_3_1.WMediaPlayer(").append( + ss.append("new Wt3_3_2.WMediaPlayer(").append( app.getJavaScriptClass()).append(',').append( this.getJsRef()).append(");"); this.doJavaScript(ss.toString()); diff --git a/src/eu/webtoolkit/jwt/WMediaPlayerImpl.java b/src/eu/webtoolkit/jwt/WMediaPlayerImpl.java index ebc355c4..42b01256 100644 --- a/src/eu/webtoolkit/jwt/WMediaPlayerImpl.java +++ b/src/eu/webtoolkit/jwt/WMediaPlayerImpl.java @@ -32,7 +32,7 @@ public WMediaPlayerImpl(WMediaPlayer player, final CharSequence text) { String renderRemoveJs() { if (this.isRendered()) { return this.player_.getJsPlayerRef() - + ".jPlayer('destroy');Wt3_3_1.remove('" + this.getId() + + ".jPlayer('destroy');Wt3_3_2.remove('" + this.getId() + "');"; } else { return super.renderRemoveJs(); diff --git a/src/eu/webtoolkit/jwt/WMenuItem.java b/src/eu/webtoolkit/jwt/WMenuItem.java index a9d96e0b..c669ce3b 100644 --- a/src/eu/webtoolkit/jwt/WMenuItem.java +++ b/src/eu/webtoolkit/jwt/WMenuItem.java @@ -79,6 +79,7 @@ public WMenuItem(final CharSequence text, WWidget contents, super(); this.separator_ = false; this.triggered_ = new Signal1(this); + this.contentsDestroyedConnection_ = new AbstractSignal.Connection(); this.pathComponent_ = ""; this.create("", text, contents, policy); } @@ -110,6 +111,7 @@ public WMenuItem(final String iconPath, final CharSequence text, super(); this.separator_ = false; this.triggered_ = new Signal1(this); + this.contentsDestroyedConnection_ = new AbstractSignal.Connection(); this.pathComponent_ = ""; this.create(iconPath, text, contents, policy); } @@ -604,12 +606,18 @@ public WWidget getContents() { } WWidget getTakeContents() { + if (this.contents_ == null) { + return null; + } WWidget result = this.contents_; if (this.isContentsLoaded()) { if (this.contentsContainer_ != null) { this.contentsContainer_.removeWidget(this.contents_); } } + if (this.contentsDestroyedConnection_.isConnected()) { + this.contentsDestroyedConnection_.disconnect(); + } this.contents_ = null; return result; } @@ -724,6 +732,7 @@ protected void render(EnumSet flags) { super(); this.separator_ = true; this.triggered_ = new Signal1(this); + this.contentsDestroyedConnection_ = new AbstractSignal.Connection(); this.pathComponent_ = ""; this.create("", WString.Empty, (WWidget) null, WMenuItem.LoadPolicy.LazyLoading); @@ -749,6 +758,7 @@ protected void render(EnumSet flags) { private boolean selectable_; private boolean signalsConnected_; private Signal1 triggered_; + private AbstractSignal.Connection contentsDestroyedConnection_; private String pathComponent_; private boolean customPathComponent_; private boolean internalPathEnabled_; @@ -802,6 +812,8 @@ private WAnchor getAnchor() { void purgeContents() { this.contentsContainer_ = null; + if (this.contents_ != null) + this.contents_.remove(); this.contents_ = null; } @@ -833,6 +845,9 @@ private boolean isContentsLoaded() { } void loadContents() { + if (!(this.contents_ != null)) { + return; + } if (!this.isContentsLoaded()) { this.contentsContainer_.addWidget(this.contents_); this.signalsConnected_ = false; @@ -913,4 +928,9 @@ void setItemPadding(boolean padding) { } } } + + private void contentsDestroyed() { + this.contentsContainer_ = null; + this.contents_ = null; + } } diff --git a/src/eu/webtoolkit/jwt/WPanel.java b/src/eu/webtoolkit/jwt/WPanel.java index dbd3cfe6..d654865a 100644 --- a/src/eu/webtoolkit/jwt/WPanel.java +++ b/src/eu/webtoolkit/jwt/WPanel.java @@ -68,7 +68,7 @@ public WPanel(WContainerWidget parent) { this .setJavaScriptMember( WT_RESIZE_JS, - "function(self, w, h, l) {var defined = h >= 0;if (defined) {var mh = Wt3_3_1.px(self, 'maxHeight');if (mh > 0) h = Math.min(h, mh);}if (Wt3_3_1.boxSizing(self)) {h -= Wt3_3_1.px(self, 'borderTopWidth') + Wt3_3_1.px(self, 'borderBottomWidth');}var c = self.lastChild;var t = c.previousSibling;if (t && t.className == 'titlebar')h -= t.offsetHeight;h -= 8;if (defined && h > 0) {c.lh = l;c.style.height = h + 'px';$(c).children().each(function() { var self = $(this), padding = self.outerHeight() - self.height();self.height(h - padding);this.lh = l;});} else {c.lh = false;c.style.height = '';$(c).children().each(function() { this.style.height = '';this.lh = false;});}};"); + "function(self, w, h, l) {var defined = h >= 0;if (defined) {var mh = Wt3_3_2.px(self, 'maxHeight');if (mh > 0) h = Math.min(h, mh);}if (Wt3_3_2.boxSizing(self)) {h -= Wt3_3_2.px(self, 'borderTopWidth') + Wt3_3_2.px(self, 'borderBottomWidth');}var c = self.lastChild;var t = c.previousSibling;if (t && t.className == 'titlebar')h -= t.offsetHeight;h -= 8;if (defined && h > 0) {c.lh = l;c.style.height = h + 'px';$(c).children().each(function() { var self = $(this), padding = self.outerHeight() - self.height();self.height(h - padding);this.lh = l;});} else {c.lh = false;c.style.height = '';$(c).children().each(function() { this.style.height = '';this.lh = false;});}};"); this.setJavaScriptMember(WT_GETPS_JS, StdWidgetItemImpl .getSecondGetPSJS()); } diff --git a/src/eu/webtoolkit/jwt/WPopupMenu.java b/src/eu/webtoolkit/jwt/WPopupMenu.java index f5b5e217..39b39be6 100644 --- a/src/eu/webtoolkit/jwt/WPopupMenu.java +++ b/src/eu/webtoolkit/jwt/WPopupMenu.java @@ -169,7 +169,7 @@ public void popup(final WPoint p) { this.popupImpl(); this.setOffsets(new WLength(42), EnumSet.of(Side.Left, Side.Top)); this.setOffsets(new WLength(-10000), EnumSet.of(Side.Left, Side.Top)); - this.doJavaScript("Wt3_3_1.positionXY('" + this.getId() + "'," + this.doJavaScript("Wt3_3_2.positionXY('" + this.getId() + "'," + String.valueOf(p.getX()) + "," + String.valueOf(p.getY()) + ");"); } @@ -444,7 +444,7 @@ private void prepareRender(WApplication app) { if (!this.cancel_.isConnected()) { app.loadJavaScript("js/WPopupMenu.js", wtjs1()); StringBuilder s = new StringBuilder(); - s.append("new Wt3_3_1.WPopupMenu(") + s.append("new Wt3_3_2.WPopupMenu(") .append(app.getJavaScriptClass()).append(',').append( this.getJsRef()).append(',').append( this.autoHideDelay_).append(");"); diff --git a/src/eu/webtoolkit/jwt/WPopupWidget.java b/src/eu/webtoolkit/jwt/WPopupWidget.java index 8eaba5d1..0abe9550 100644 --- a/src/eu/webtoolkit/jwt/WPopupWidget.java +++ b/src/eu/webtoolkit/jwt/WPopupWidget.java @@ -265,7 +265,7 @@ private void defineJavaScript() { WApplication app = WApplication.getInstance(); app.loadJavaScript("js/WPopupWidget.js", wtjs1()); StringBuilder jsObj = new StringBuilder(); - jsObj.append("new Wt3_3_1.WPopupWidget(").append( + jsObj.append("new Wt3_3_2.WPopupWidget(").append( app.getJavaScriptClass()).append(',').append(this.getJsRef()) .append(',').append(this.transient_).append(',').append( this.autoHideDelay_).append(',').append( diff --git a/src/eu/webtoolkit/jwt/WRectF.java b/src/eu/webtoolkit/jwt/WRectF.java index ccebb466..a30a4cd9 100644 --- a/src/eu/webtoolkit/jwt/WRectF.java +++ b/src/eu/webtoolkit/jwt/WRectF.java @@ -31,7 +31,10 @@ public class WRectF { /** * Default constructor. *

- * Constructs an empty rectangle at point (0, 0). + * Constructs a null rectangle. + *

+ * + * @see WRectF#() */ public WRectF() { this.x_ = 0; diff --git a/src/eu/webtoolkit/jwt/WRegExpValidator.java b/src/eu/webtoolkit/jwt/WRegExpValidator.java index 715ad264..c441448a 100644 --- a/src/eu/webtoolkit/jwt/WRegExpValidator.java +++ b/src/eu/webtoolkit/jwt/WRegExpValidator.java @@ -210,7 +210,7 @@ public WString getInvalidNoMatchText() { public String getJavaScriptValidate() { loadJavaScript(WApplication.getInstance()); StringBuilder js = new StringBuilder(); - js.append("new Wt3_3_1.WRegExpValidator(").append(this.isMandatory()) + js.append("new Wt3_3_2.WRegExpValidator(").append(this.isMandatory()) .append(','); if (this.regexp_ != null) { js.append(WWebWidget.jsStringLiteral(this.regexp_.pattern())) diff --git a/src/eu/webtoolkit/jwt/WScrollBar.java b/src/eu/webtoolkit/jwt/WScrollBar.java index 7ed76e9b..53560a0b 100644 --- a/src/eu/webtoolkit/jwt/WScrollBar.java +++ b/src/eu/webtoolkit/jwt/WScrollBar.java @@ -109,9 +109,9 @@ void updateDom(final DomElement element, boolean all) { if (this.tiesChanged_ || all) { String jsCode = ""; for (int i = 0; i < this.ties_.size(); ++i) { - String tieElement = "Wt3_3_1.getElement('" + String tieElement = "Wt3_3_2.getElement('" + this.ties_.get(i).scrollArea_.getId() + "')"; - String scrollElement = "Wt3_3_1.getElement('" + String scrollElement = "Wt3_3_2.getElement('" + this.scrollArea_.getId() + "')"; String side = this.orientation_ == Orientation.Horizontal ? "Left" : "Top"; diff --git a/src/eu/webtoolkit/jwt/WStackedWidget.java b/src/eu/webtoolkit/jwt/WStackedWidget.java index 864fb328..d1a05915 100644 --- a/src/eu/webtoolkit/jwt/WStackedWidget.java +++ b/src/eu/webtoolkit/jwt/WStackedWidget.java @@ -295,7 +295,7 @@ private void defineJavaScript() { WApplication app = WApplication.getInstance(); app.loadJavaScript("js/WStackedWidget.js", wtjs1()); this.setJavaScriptMember(" WStackedWidget", - "new Wt3_3_1.WStackedWidget(" + app.getJavaScriptClass() + "new Wt3_3_2.WStackedWidget(" + app.getJavaScriptClass() + "," + this.getJsRef() + ");"); this.setJavaScriptMember(WT_RESIZE_JS, "$('#" + this.getId() + "').data('obj').wtResize"); diff --git a/src/eu/webtoolkit/jwt/WStandardItem.java b/src/eu/webtoolkit/jwt/WStandardItem.java index d9861434..bd078363 100644 --- a/src/eu/webtoolkit/jwt/WStandardItem.java +++ b/src/eu/webtoolkit/jwt/WStandardItem.java @@ -540,9 +540,14 @@ public boolean isTristate() { } void setEditable(boolean editable) { - if (!this.isEditable()) { + if (!this.isEditable() && editable) { this.flags_.add(ItemFlag.ItemIsEditable); this.signalModelDataChange(); + } else { + if (this.isEditable() && !editable) { + this.flags_.remove(ItemFlag.ItemIsEditable); + this.signalModelDataChange(); + } } } diff --git a/src/eu/webtoolkit/jwt/WSuggestionPopup.java b/src/eu/webtoolkit/jwt/WSuggestionPopup.java index 95f8eff4..fc3bd001 100644 --- a/src/eu/webtoolkit/jwt/WSuggestionPopup.java +++ b/src/eu/webtoolkit/jwt/WSuggestionPopup.java @@ -912,7 +912,7 @@ private void defineJavaScript() { app.loadJavaScript(THIS_JS, wtjs1()); app.loadJavaScript(THIS_JS, wtjs2()); this.setJavaScriptMember(" WSuggestionPopup", - "new Wt3_3_1.WSuggestionPopup(" + app.getJavaScriptClass() + "new Wt3_3_2.WSuggestionPopup(" + app.getJavaScriptClass() + "," + this.getJsRef() + "," + this.replacerJS_ + "," + this.matcherJS_ + "," + String.valueOf(Math.max(0, this.filterLength_)) + "," @@ -932,7 +932,7 @@ static WJavaScriptPreamble wtjs1() { JavaScriptScope.WtClassScope, JavaScriptObjectType.JavaScriptConstructor, "WSuggestionPopup", - "function(t,e,z,F,r,u,A){function q(a){return $(a).hasClass(\"Wt-suggest-onedit\")||$(a).hasClass(\"Wt-suggest-dropdown\")}function c(){return e.style.display!=\"none\"}function g(a){e.style.display=\"block\";d.positionAtWidget(e.id,a.id,d.Vertical)}function h(a){a=d.target(a||window.event);if(!d.hasTag(a,\"UL\")){for(;a&&!d.hasTag(a,\"LI\");)a=a.parentNode;a&&n(a)}}function n(a){var b=a.firstChild.firstChild,l=d.getElement(f),m=b.innerHTML;b=b.getAttribute(\"sug\"); l.focus();z(l,m,b);t.emit(e,\"select\",a.id,l.id);i();f=null}function i(){e.style.display=\"none\";if(f!=null&&B!=null){d.getElement(f).onkeydown=B;B=null}}function C(a,b){for(a=b?a.nextSibling:a.previousSibling;a;a=b?a.nextSibling:a.previousSibling)if(d.hasTag(a,\"LI\"))if(a.style.display!=\"none\")return a;return null}function v(a){var b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTopa.offsetWidth-16?\"default\":\"\"};this.showAt=function(a){i();f=a.id;w=true;s.refilter()};this.editClick=function(a, b){if(q(a))if(d.widgetCoordinates(a,b).x>a.offsetWidth-16)if(f!=a.id||!c())s.showAt(a);else{i();f=null}};this.editKeyDown=function(a,b){if(!q(a))return true;if(f!=a.id)if($(a).hasClass(\"Wt-suggest-onedit\")){f=a.id;w=false}else if($(a).hasClass(\"Wt-suggest-dropdown\")&&b.keyCode==40){f=a.id;w=true}else{f=null;return true}var l=o?d.getElement(o):null;if(c()&&l)if(b.keyCode==13||b.keyCode==9){n(l);d.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38|| b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()==\"KEYDOWN\"){J=true;d.cancelEvent(b,d.CancelDefaultAction)}if(b.type.toUpperCase()==\"KEYPRESS\"&&J==true){d.cancelEvent(b);return false}var m=l,p=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?e.clientHeight/l.offsetHeight:1;var j;for(j=0;m&&j0||u)if(p.lengthb.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTopa.offsetWidth-16?\"default\":\"\"};this.showAt=function(a){i();f=a.id;w=true;s.refilter()};this.editClick=function(a, b){if(q(a))if(d.widgetCoordinates(a,b).x>a.offsetWidth-16)if(f!=a.id||!c())s.showAt(a);else{i();f=null}};this.editKeyDown=function(a,b){if(!q(a))return true;if(f!=a.id)if($(a).hasClass(\"Wt-suggest-onedit\")){f=a.id;w=false}else if($(a).hasClass(\"Wt-suggest-dropdown\")&&b.keyCode==40){f=a.id;w=true}else{f=null;return true}var l=o?d.getElement(o):null;if(c()&&l)if(b.keyCode==13||b.keyCode==9){n(l);d.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38|| b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()==\"KEYDOWN\"){J=true;d.cancelEvent(b,d.CancelDefaultAction)}if(b.type.toUpperCase()==\"KEYPRESS\"&&J==true){d.cancelEvent(b);return false}var m=l,p=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?e.clientHeight/l.offsetHeight:1;var j;for(j=0;m&&j0||u)if(p.length - *

- * Note: Works only if ajax is available. - *

- */ public EventSignal1 scrolled() { if (WApplication.getInstance().getEnvironment().hasAjax() && this.contentsContainer_ != null) { @@ -1845,7 +1841,7 @@ private int getRenderedColumnsCount() { private void defineJavaScript() { WApplication app = WApplication.getInstance(); app.loadJavaScript("js/WTableView.js", wtjs1()); - this.setJavaScriptMember(" WTableView", "new Wt3_3_1.WTableView(" + this.setJavaScriptMember(" WTableView", "new Wt3_3_2.WTableView(" + app.getJavaScriptClass() + "," + this.getJsRef() + "," + this.contentsContainer_.getJsRef() + "," + this.headerContainer_.getJsRef() + "," @@ -1959,6 +1955,6 @@ static WJavaScriptPreamble wtjs1() { JavaScriptScope.WtClassScope, JavaScriptObjectType.JavaScriptConstructor, "WTableView", - "function(o,g,d,p,q,F){function w(a){var b=-1,c=-1,e=false,k=false,h=null;for(a=f.target(a);a;){var i=$(a);if(i.hasClass(\"Wt-tv-contents\"))break;else if(i.hasClass(\"Wt-tv-c\")){if(a.getAttribute(\"drop\")===\"true\")k=true;if(i.hasClass(F))e=true;h=a;a=a.parentNode;b=a.className.split(\" \")[0].substring(7)*1;c=i.index();break}a=a.parentNode}return{columnId:b,rowIdx:c,selected:e,drop:k,el:h}}function C(){return f.pxself(d.firstChild,\"lineHeight\")} function x(a){var b,c,e=a.parentNode.childNodes;b=0;for(c=e.length;bB||d.scrollLeftz))o.emit(g,\"scrolled\",d.scrollLeft,d.scrollTop,d.clientWidth,d.clientHeight)};d.wtResize=function(a,b,c){if(b-D>(z-y)/2||c-E>(B-A)/2){D=b;E=c;o.emit(g,\"scrolled\",a.scrollLeft,a.scrollTop,a.clientWidth,a.clientHeight==a.firstChild.clientHeight?-1:a.clientHeight)}};this.mouseDown=function(a,b){f.capture(null);a=w(b);g.getAttribute(\"drag\")===\"true\"&&a.selected&&o._p_.dragStart(g,b)};this.resizeHandleMDown=function(a,b){var c= a.parentNode,e=-(f.pxself(c,\"width\")-1),k=1E4;if($(document.body).hasClass(\"Wt-rtl\")){var h=e;e=-k;k=-h}new f.SizeHandle(f,\"h\",a.offsetWidth,g.offsetHeight,e,k,\"Wt-hsh2\",function(i){G(c,i)},a,g,b,-2,-1)};this.scrolled=function(a,b,c,e){y=a;z=b;A=c;B=e};this.resetScroll=function(){p.scrollLeft=v;d.scrollLeft=v;d.scrollTop=u;q.scrollTop=u};this.scrollTo=function(a,b,c){if(b!=-1){a=d.scrollTop;var e=d.clientHeight;if(c==0)if(a+e=0:j=0:l0){setTimeout(function(){n.focus()},0);return}}j=b?h-1:0;i=true}}}else if(b.keyCode>=37&&b.keyCode<=40){i=f.target(b);function m(s){return f.hasTag(s,\"INPUT\")&&s.type==\"text\"|| f.hasTag(s,\"TEXTAREA\")}if(!f.hasTag(i,\"SELECT\")){c=w(b);if(c.el){a=c.el.parentNode;c=x(c.el);e=x(a);k=a.parentNode.childNodes.length;h=a.childNodes.length;switch(b.keyCode){case 39:if(m(i)){j=f.getSelectionRange(i);if(j.start!=i.value.length)return}e++;break;case 38:c--;break;case 37:if(m(i)){j=f.getSelectionRange(i);if(j.start!=0)return}e--;break;case 40:c++;break;default:return}f.cancelEvent(b);if(c>-1&&c-1&&e0&& setTimeout(function(){n.focus()},0)}}}}};this.autoJavaScript=function(){if(g.parentNode==null){g=d=p=null;this.autoJavaScript=function(){}}else if(!f.isHidden(g)){if(!f.isIE&&(u!=d.scrollTop||v!=d.scrollLeft)){p.scrollLeft=d.scrollLeft=v;q.scrollTop=d.scrollTop=u}var a=g.offsetWidth-f.px(g,\"borderLeftWidth\")-f.px(g,\"borderRightWidth\"),b=d.offsetWidth-d.clientWidth;a-=b;a-=q.clientWidth;if(a>200&&a!=d.tw){d.tw=a;d.style.width=a+b+\"px\";p.style.width=a+\"px\";if(!f.isIE)p.style.marginRight=b+\"px\"}a=d.offsetHeight- d.clientHeight;if((b=q.style)&&b.marginBottom!==a+\"px\"){b.marginBottom=a+\"px\";o.layouts2.adjust(g.childNodes[0].id,[[1,0]])}}}}"); + "function(o,g,d,p,q,F){function w(a){var b=-1,c=-1,e=false,k=false,h=null;for(a=f.target(a);a;){var i=$(a);if(i.hasClass(\"Wt-tv-contents\"))break;else if(i.hasClass(\"Wt-tv-c\")){if(a.getAttribute(\"drop\")===\"true\")k=true;if(i.hasClass(F))e=true;h=a;a=a.parentNode;b=a.className.split(\" \")[0].substring(7)*1;c=i.index();break}a=a.parentNode}return{columnId:b,rowIdx:c,selected:e,drop:k,el:h}}function C(){return f.pxself(d.firstChild,\"lineHeight\")} function x(a){var b,c,e=a.parentNode.childNodes;b=0;for(c=e.length;bB||d.scrollLeftz))o.emit(g,\"scrolled\",d.scrollLeft,d.scrollTop,d.clientWidth,d.clientHeight)};d.wtResize=function(a,b,c){if(b-D>(z-y)/2||c-E>(B-A)/2){D=b;E=c;o.emit(g,\"scrolled\",a.scrollLeft,a.scrollTop,a.clientWidth,a.clientHeight==a.firstChild.clientHeight?-1:a.clientHeight)}};this.mouseDown=function(a,b){f.capture(null);a=w(b);g.getAttribute(\"drag\")===\"true\"&&a.selected&&o._p_.dragStart(g,b)};this.resizeHandleMDown= function(a,b){var c=a.parentNode,e=-(f.pxself(c,\"width\")-1),k=1E4;if($(document.body).hasClass(\"Wt-rtl\")){var h=e;e=-k;k=-h}new f.SizeHandle(f,\"h\",a.offsetWidth,g.offsetHeight,e,k,\"Wt-hsh2\",function(i){G(c,i)},a,g,b,-2,-1)};this.scrolled=function(a,b,c,e){y=a;z=b;A=c;B=e};this.resetScroll=function(){p.scrollLeft=v;d.scrollLeft=v;d.scrollTop=u;q.scrollTop=u};this.scrollTo=function(a,b,c){if(b!=-1){a=d.scrollTop;var e=d.clientHeight;if(c==0)if(a+e=0:j=0:l0){setTimeout(function(){n.focus()},0);return}}j=b?h-1:0;i=true}}}else if(b.keyCode>=37&&b.keyCode<=40){i=f.target(b);function m(s){return f.hasTag(s,\"INPUT\")&&s.type== \"text\"||f.hasTag(s,\"TEXTAREA\")}if(!f.hasTag(i,\"SELECT\")){c=w(b);if(c.el){a=c.el.parentNode;c=x(c.el);e=x(a);k=a.parentNode.childNodes.length;h=a.childNodes.length;switch(b.keyCode){case 39:if(m(i)){j=f.getSelectionRange(i);if(j.start!=i.value.length)return}e++;break;case 38:c--;break;case 37:if(m(i)){j=f.getSelectionRange(i);if(j.start!=0)return}e--;break;case 40:c++;break;default:return}f.cancelEvent(b);if(c>-1&&c-1&&e 0&&setTimeout(function(){n.focus()},0)}}}}};this.autoJavaScript=function(){if(g.parentNode==null){g=d=p=null;this.autoJavaScript=function(){}}else if(!f.isHidden(g)){if(!f.isIE&&(u!=d.scrollTop||v!=d.scrollLeft)){p.scrollLeft=d.scrollLeft=v;q.scrollTop=d.scrollTop=u}var a=g.offsetWidth-f.px(g,\"borderLeftWidth\")-f.px(g,\"borderRightWidth\"),b=d.offsetWidth-d.clientWidth;a-=b;a-=q.clientWidth;if(a>200&&a!=d.tw){d.tw=a;d.style.width=a+b+\"px\";p.style.width=a+\"px\";if(!f.isIE)p.style.marginRight=b+\"px\"}a= d.offsetHeight-d.clientHeight;if((b=q.style)&&b.marginBottom!==a+\"px\"){b.marginBottom=a+\"px\";o.layouts2.adjust(g.childNodes[0].id,[[1,0]])}}}}"); } } diff --git a/src/eu/webtoolkit/jwt/WTextEdit.java b/src/eu/webtoolkit/jwt/WTextEdit.java index 3cf1ac11..97460c62 100644 --- a/src/eu/webtoolkit/jwt/WTextEdit.java +++ b/src/eu/webtoolkit/jwt/WTextEdit.java @@ -281,7 +281,7 @@ public void resize(final WLength width, final WLength height) { String renderRemoveJs() { if (this.isRendered()) { - return this.getJsRef() + ".ed.remove();Wt3_3_1.remove('" + return this.getJsRef() + ".ed.remove();Wt3_3_2.remove('" + this.getId() + "');"; } else { return super.renderRemoveJs(); @@ -374,7 +374,7 @@ private void init() { this.setInline(false); initTinyMCE(); this.version_ = getTinyMCEVersion(); - this.setJavaScriptMember(" WTextEdit", "new Wt3_3_1.WTextEdit(" + this.setJavaScriptMember(" WTextEdit", "new Wt3_3_2.WTextEdit(" + app.getJavaScriptClass() + "," + this.getJsRef() + ");"); this.setJavaScriptMember(WT_RESIZE_JS, "function(e, w, h) { var obj = $('#" + this.getId() @@ -454,6 +454,6 @@ static WJavaScriptPreamble wtjs1() { JavaScriptScope.WtClassScope, JavaScriptObjectType.JavaScriptConstructor, "WTextEdit", - "function(p,d){jQuery.data(d,\"obj\",this);var n,o,q=this,b=p.WT,r;if(!tinymce.dom.Event.domLoaded)tinymce.dom.Event.domLoaded=true;tinyMCE.init({mode:\"none\"});this.render=function(a,f,c){r=f;d.ed=new tinymce.Editor(d.id,a,tinymce.EditorManager);d.ed.render();c&&d.ed.onChange.add(function(){p.emit(d,\"change\")})};this.init=function(){var a=b.getElement(d.id+\"_ifr\"),f,c;if(tinymce.EditorManager.majorVersion<4){c=f=a.parentNode.parentNode.parentNode.parentNode; f=f.parentNode}else f=a.parentNode.parentNode.parentNode;if(c){c.style.cssText=\"width:100%;\"+r;d.style.height=c.offsetHeight+\"px\"}f.wtResize=d.wtResize;b.isGecko?setTimeout(function(){q.wtResize(d,n,o)},100):q.wtResize(d,n,o);$((b.isIE?document.frames[a.id].document:a.contentDocument).body).bind(\"paste\",function(k){function e(m){return m.indexOf(\"image/\")==0}var h=k.clipboardData||k.originalEvent.clipboardData,j,l;if(h&&h.types){j=0;for(l=h.types.length;j')};g.readAsDataURL(i);b.cancelEvent(k)}}})};this.wtResize=function(a,f,c){if(!(c<0)){var k=b.getElement(a.id+\"_ifr\");if(k){var e=0;b.px(a,\"marginLeft\");b.px(a,\"marginRight\");e=b.px(a,\"marginTop\")+b.px(a,\"marginBottom\");if(!b.boxSizing(a)){b.px(a,\"borderLeftWidth\");b.px(a,\"borderRightWidth\");b.px(a,\"paddingLeft\");b.px(a,\"paddingRight\");e+=b.px(a,\"borderTopWidth\")+b.px(a,\"borderBottomWidth\")+ b.px(a,\"paddingTop\")+b.px(a,\"paddingBottom\")}a.style.height=c-e+\"px\";var h,j=d.style.position!==\"absolute\";if(tinymce.EditorManager.majorVersion<4){var l=k.parentNode.parentNode,i=l.parentNode.parentNode,g,m;h=i;e=i.parentNode;if(!j&&typeof f!==\"undefined\")e.style.width=f-2+\"px\";g=0;for(m=i.rows.length;g')};g.readAsDataURL(i);b.cancelEvent(k)}}})};this.wtResize=function(a,f,c){if(!(c<0)){var k=b.getElement(a.id+\"_ifr\");if(k){var e=0;b.px(a,\"marginLeft\");b.px(a,\"marginRight\");e=b.px(a,\"marginTop\")+b.px(a,\"marginBottom\");if(!b.boxSizing(a)){b.px(a,\"borderLeftWidth\");b.px(a,\"borderRightWidth\");b.px(a,\"paddingLeft\");b.px(a,\"paddingRight\");e+=b.px(a,\"borderTopWidth\")+b.px(a,\"borderBottomWidth\")+ b.px(a,\"paddingTop\")+b.px(a,\"paddingBottom\")}a.style.height=c-e+\"px\";var h,j=d.style.position!==\"absolute\";if(tinymce.EditorManager.majorVersion<4){var l=k.parentNode.parentNode,i=l.parentNode.parentNode,g,m;h=i;e=i.parentNode;if(!j&&typeof f!==\"undefined\")e.style.width=f-2+\"px\";g=0;for(m=i.rows.length;g flags) { private void defineJavaScript() { WApplication app = WApplication.getInstance(); app.loadJavaScript("js/WTreeTable.js", wtjs1()); - this.setJavaScriptMember(" WTreeTable", "new Wt3_3_1.WTreeTable(" + this.setJavaScriptMember(" WTreeTable", "new Wt3_3_2.WTreeTable(" + app.getJavaScriptClass() + "," + this.getJsRef() + ");"); } diff --git a/src/eu/webtoolkit/jwt/WTreeView.java b/src/eu/webtoolkit/jwt/WTreeView.java index dd8234be..7b91b54d 100644 --- a/src/eu/webtoolkit/jwt/WTreeView.java +++ b/src/eu/webtoolkit/jwt/WTreeView.java @@ -571,7 +571,7 @@ public void setRowHeaderCount(int count) { if (useStyleLeft) { boolean rtl = app.getLayoutDirection() == LayoutDirection.RightToLeft; this.tieRowsScrollJS_ - .setJavaScript("function(obj, event) {Wt3_3_1.getCssRule('#" + .setJavaScript("function(obj, event) {Wt3_3_2.getCssRule('#" + this.getId() + " .Wt-tv-rowc').style.left= -obj.scrollLeft " + (rtl ? "+ (obj.firstChild.offsetWidth - obj.offsetWidth)" @@ -673,6 +673,14 @@ public void scrollTo(final WModelIndex index, } } + public EventSignal1 scrolled() { + if (WApplication.getInstance().getEnvironment().hasAjax() + && this.contentsContainer_ != null) { + return this.contentsContainer_.scrolled(); + } + throw new WException("Scrolled signal existes only with ajax."); + } + protected void render(EnumSet flags) { if (!EnumUtils.mask(flags, RenderFlag.RenderFull).isEmpty()) { this.defineJavaScript(); @@ -774,7 +782,7 @@ private void defineJavaScript() { return; } app.loadJavaScript("js/WTreeView.js", wtjs1()); - this.setJavaScriptMember(" WTreeView", "new Wt3_3_1.WTreeView(" + this.setJavaScriptMember(" WTreeView", "new Wt3_3_2.WTreeView(" + app.getJavaScriptClass() + "," + this.getJsRef() + "," + this.contentsContainer_.getJsRef() + "," + this.headerContainer_.getJsRef() + "," diff --git a/src/eu/webtoolkit/jwt/WVirtualImage.java b/src/eu/webtoolkit/jwt/WVirtualImage.java index 9d31f203..63af70ea 100644 --- a/src/eu/webtoolkit/jwt/WVirtualImage.java +++ b/src/eu/webtoolkit/jwt/WVirtualImage.java @@ -166,11 +166,11 @@ public void enableDragging() { this.impl_ .mouseWentDown() .addListener( - "function(obj, event) { var pc = Wt3_3_1.pageCoordinates(event); obj.setAttribute('dsx', pc.x); obj.setAttribute('dsy', pc.y);}"); + "function(obj, event) { var pc = Wt3_3_2.pageCoordinates(event); obj.setAttribute('dsx', pc.x); obj.setAttribute('dsy', pc.y);}"); this.impl_ .mouseMoved() .addListener( - "function(obj, event) {var WT= Wt3_3_1;var lastx = obj.getAttribute('dsx');var lasty = obj.getAttribute('dsy');if (lastx != null && lastx != '') {var nowxy = WT.pageCoordinates(event);var img = " + "function(obj, event) {var WT= Wt3_3_2;var lastx = obj.getAttribute('dsx');var lasty = obj.getAttribute('dsy');if (lastx != null && lastx != '') {var nowxy = WT.pageCoordinates(event);var img = " + this.contents_.getJsRef() + ";img.style.left = (WT.pxself(img, 'left')+nowxy.x-lastx) + 'px';img.style.top = (WT.pxself(img, 'top')+nowxy.y-lasty) + 'px';obj.setAttribute('dsx', nowxy.x);obj.setAttribute('dsy', nowxy.y);}}"); this.impl_.mouseWentUp().addListener( diff --git a/src/eu/webtoolkit/jwt/WVmlImage.java b/src/eu/webtoolkit/jwt/WVmlImage.java index 69b8f1cd..691ee696 100644 --- a/src/eu/webtoolkit/jwt/WVmlImage.java +++ b/src/eu/webtoolkit/jwt/WVmlImage.java @@ -459,7 +459,7 @@ static class ActivePath { public ActivePath() { this.path = ""; - this.bbox = null; + this.bbox = new WRectF(0, 0, 0, 0); } } diff --git a/src/eu/webtoolkit/jwt/WWebWidget.java b/src/eu/webtoolkit/jwt/WWebWidget.java index 495527cd..313f3128 100644 --- a/src/eu/webtoolkit/jwt/WWebWidget.java +++ b/src/eu/webtoolkit/jwt/WWebWidget.java @@ -1120,7 +1120,7 @@ void updateDom(final DomElement element, boolean all) { app .addAutoJavaScript("{var w = " + this.getJsRef() - + ";if (w && !Wt3_3_1.isHidden(w)) {var i = Wt3_3_1.getElement('" + + ";if (w && !Wt3_3_2.isHidden(w)) {var i = Wt3_3_2.getElement('" + i.getId() + "');i.style.width=w.clientWidth + 'px';i.style.height=w.clientHeight + 'px';}}"); element.addChild(i); @@ -1327,7 +1327,7 @@ void updateDom(final DomElement element, boolean all) { if (this.lookImpl_.toolTipTextFormat_ != TextFormat.PlainText && app.getEnvironment().hasAjax()) { app.loadJavaScript("js/ToolTip.js", wtjs10()); - element.callJavaScript("Wt3_3_1.toolTip(Wt3_3_1," + element.callJavaScript("Wt3_3_2.toolTip(Wt3_3_2," + jsStringLiteral(this.getId()) + "," + WString.toWString(this.lookImpl_.toolTip_) @@ -1375,7 +1375,7 @@ void updateDom(final DomElement element, boolean all) { final String js = this.transientImpl_.childRemoveChanges_ .get(i); if (js.charAt(0) == '_') { - element.callJavaScript("Wt3_3_1.remove('" + element.callJavaScript("Wt3_3_2.remove('" + js.substring(1) + "');", true); } else { element.callJavaScript(js, true); @@ -1569,7 +1569,7 @@ void updateDom(final DomElement element, boolean all) { if (!this.flags_.get(BIT_HIDE_WITH_VISIBILITY)) { StringBuilder ss = new StringBuilder(); ss - .append("Wt3_3_1") + .append("Wt3_3_2") .append(".animateDisplay('") .append(this.getId()) .append("',") @@ -1600,7 +1600,7 @@ void updateDom(final DomElement element, boolean all) { } else { StringBuilder ss = new StringBuilder(); ss - .append("Wt3_3_1") + .append("Wt3_3_2") .append(".animateVisible('") .append(this.getId()) .append("',") @@ -2435,7 +2435,7 @@ static WJavaScriptPreamble wtjs1() { JavaScriptScope.WtClassScope, JavaScriptObjectType.JavaScriptFunction, "animateDisplay", - "function(C,D,E,F,G){var j=this,B=function(v,m,q,o,n){var H=[\"ease\",\"linear\",\"ease-in\",\"ease-out\",\"ease-in-out\"],I=[0,1,3,2,4,5],r=j.vendorPrefix(j.styleAttribute(\"animation\")),s=j.vendorPrefix(j.styleAttribute(\"transition\")),w=j.vendorPrefix(j.styleAttribute(\"transform\")),f=$(\"#\"+v),a=f.get(0),J=r==\"Webkit\"?\"webkitAnimationEnd\":\"animationend\";transitionEventEnd=s==\"Webkit\"?\"webkitTransitionEnd\":\"transitionend\";if(f.css(\"display\")!==n){var p= a.parentNode;if(p.wtAnimateChild)p.wtAnimateChild(j,f.get(0),m,q,o,{display:n});else{function x(){c(a,{animationDuration:o+\"ms\"},h);var d=(l==5?\"pop \":\"\")+(g?\"out\":\"in\");if(m&256)d+=\" fade\";g||t();f.addClass(d);f.one(J,function(){f.removeClass(d);if(g)a.style.display=n;c(a,h)})}function K(){y(\"width\",l==1?\"left\":\"right\",l==1,\"X\")}function L(){y(\"height\",l==4?\"top\":\"bottom\",l==4,\"Y\")}function y(d,i,k,e){g||t();d=j.px(a,d);i=(j.px(a,i)+d)*(k?-1:1);var b;if(g){c(a,{transform:\"translate\"+e+\"(0px)\"},h); b=i}else{c(a,{transform:\"translate\"+e+\"(\"+i+\"px)\"},h);b=0}if(m&256)c(a,{opacity:g?1:0},h);setTimeout(function(){c(a,{transition:\"all \"+o+\"ms \"+u,transform:\"translate\"+e+\"(\"+b+\"px)\"},h);if(m&256)c(a,{opacity:g?0:1});f.one(transitionEventEnd,function(){if(g)a.style.display=n;c(a,h);z()})},0)}function M(){var d,i,k={},e;if(g){i=f.height()+\"px\";c(a,{height:i,overflow:\"hidden\"},h);if(l==4&&a.childNodes.length==1){e=a.firstChild;c(e,{transform:\"translateY(0)\"},k);j.hasTag(e,\"TABLE\")||c(e,{display:\"block\"}, k)}d=\"0px\"}else{var b=$(p),A={};c(p,{height:b.height()+\"px\",overflow:\"hidden\"},A);t();if(f.height()==0)a.style.height=\"auto\";d=f.height()+\"px\";c(a,{height:\"0px\",overflow:\"hidden\"},h);c(p,A);if(l==4){c(a,{WebkitBackfaceVisibility:\"visible\"},h);a.scrollTop=1E3}}if(m&256)c(a,{opacity:g?1:0},h);setTimeout(function(){c(a,{transition:\"all \"+o+\"ms \"+u,height:d},h);if(m&256)c(a,{opacity:g?0:1});e&&c(e,{transition:\"all \"+o+\"ms \"+u,transform:\"translateY(-\"+i+\")\"},k);f.one(transitionEventEnd,function(){if(g)a.style.display= n;c(a,h);if(l==4){a.scrollTop=0;e&&c(e,k)}z()})},0)}function t(){a.style.display=n;a.wtPosition&&a.wtPosition();window.onshow&&window.onshow()}function z(){a.wtAnimatedHidden&&a.wtAnimatedHidden(g);f.removeClass(\"animating\");Wt.layouts2&&Wt.layouts2.setElementDirty(a)}function c(d,i,k){var e;for(e in i){var b=e;if(b==\"animationDuration\"&&r!=\"\")b=r+b.substring(0,1).toUpperCase()+b.substring(1);else if(b==\"transform\"&&w!=\"\")b=w+b.substring(0,1).toUpperCase()+b.substring(1);else if(b==\"transition\"&& s!=\"\")b=s+b.substring(0,1).toUpperCase()+b.substring(1);if(k&&typeof k[b]===\"undefined\")k[b]=d.style[b];d.style[b]=i[e]}}if(f.hasClass(\"animating\"))$(a).one(transitionEventEnd,function(){B(v,m,q,o,n)});else{f.addClass(\"animating\");var l=m&255,g=n===\"none\",u=H[g?I[q]:q],h={};setTimeout(function(){var d=f.css(\"position\");d=d===\"absolute\"||d===\"fixed\";switch(l){case 4:case 3:d?L():M();break;case 1:case 2:d?K():x();break;case 0:case 5:x();break}},0)}}}};B(C,D,E,F,G)}"); + "function(C,D,E,F,G){var j=this,B=function(v,m,q,o,n){var H=[\"ease\",\"linear\",\"ease-in\",\"ease-out\",\"ease-in-out\"],I=[0,1,3,2,4,5],r=j.vendorPrefix(j.styleAttribute(\"animation\")),s=j.vendorPrefix(j.styleAttribute(\"transition\")),w=j.vendorPrefix(j.styleAttribute(\"transform\")),f=$(\"#\"+v),a=f.get(0),J=r==\"Webkit\"?\"webkitAnimationEnd\":\"animationend\";transitionEventEnd=s==\"Webkit\"?\"webkitTransitionEnd\":\"transitionend\";if(f.css(\"display\")!==n){var p= a.parentNode;if(p.wtAnimateChild)p.wtAnimateChild(j,f.get(0),m,q,o,{display:n});else{function x(){c(a,{animationDuration:o+\"ms\"},h);var d=(l==5?\"pop \":\"\")+(g?\"out\":\"in\");if(m&256)d+=\" fade\";g||t();f.addClass(d);f.one(J,function(){f.removeClass(d);if(g)a.style.display=n;c(a,h)})}function K(){y(\"width\",l==1?\"left\":\"right\",l==1,\"X\")}function M(){y(\"height\",l==4?\"top\":\"bottom\",l==4,\"Y\")}function y(d,i,k,e){g||t();d=j.px(a,d);i=(j.px(a,i)+d)*(k?-1:1);var b;if(g){c(a,{transform:\"translate\"+e+\"(0px)\"},h); b=i}else{c(a,{transform:\"translate\"+e+\"(\"+i+\"px)\"},h);b=0}if(m&256)c(a,{opacity:g?1:0},h);setTimeout(function(){c(a,{transition:\"all \"+o+\"ms \"+u,transform:\"translate\"+e+\"(\"+b+\"px)\"},h);if(m&256)c(a,{opacity:g?0:1});f.one(transitionEventEnd,function(){if(g)a.style.display=n;c(a,h);z()})},0)}function N(){var d,i,k={},e;if(g){i=f.height()+\"px\";c(a,{height:i,overflow:\"hidden\"},h);if(l==4&&a.childNodes.length==1){e=a.firstChild;c(e,{transform:\"translateY(0)\"},k);j.hasTag(e,\"TABLE\")||c(e,{display:\"block\"}, k)}d=\"0px\"}else{var b=$(p),A={};c(p,{height:b.height()+\"px\",overflow:\"hidden\"},A);t();if(f.height()==0)a.style.height=\"auto\";d=f.height()+\"px\";c(a,{height:\"0px\",overflow:\"hidden\"},h);c(p,A);if(l==4){c(a,{WebkitBackfaceVisibility:\"visible\"},h);a.scrollTop=1E3}}if(m&256)c(a,{opacity:g?1:0},h);setTimeout(function(){c(a,{transition:\"all \"+o+\"ms \"+u,height:d},h);if(m&256)c(a,{opacity:g?0:1});e&&c(e,{transition:\"all \"+o+\"ms \"+u,transform:\"translateY(-\"+i+\")\"},k);f.one(transitionEventEnd,function(){if(g)a.style.display= n;c(a,h);if(l==4){a.scrollTop=0;e&&c(e,k)}z()})},0)}function t(){a.style.display=n;a.wtPosition&&a.wtPosition();window.onshow&&window.onshow()}function z(){a.wtAnimatedHidden&&a.wtAnimatedHidden(g);f.removeClass(\"animating\");Wt.layouts2&&Wt.layouts2.setElementDirty(a)}function c(d,i,k){var e;for(e in i){var b=e;if(b==\"animationDuration\"&&r!=\"\")b=r+b.substring(0,1).toUpperCase()+b.substring(1);else if(b==\"transform\"&&w!=\"\")b=w+b.substring(0,1).toUpperCase()+b.substring(1);else if(b==\"transition\"&& s!=\"\")b=s+b.substring(0,1).toUpperCase()+b.substring(1);if(k&&typeof k[b]===\"undefined\")k[b]=d.style[b];d.style[b]=i[e]}}if(f.hasClass(\"animating\"))$(a).one(transitionEventEnd,function(){B(v,m,q,o,n)});else{f.addClass(\"animating\");var l=m&255,g=n===\"none\",u=H[g?I[q]:q],h={};setTimeout(function(){var d=f.css(\"position\");d=d===\"absolute\"||d===\"fixed\";switch(l){case 4:case 3:d?M():N();break;case 1:case 2:d?K():x();break;case 0:case 5:x();break}},0)}}}};B(C,D,E,F,G)}"); } static WJavaScriptPreamble wtjs2() { diff --git a/src/eu/webtoolkit/jwt/WWidget.java b/src/eu/webtoolkit/jwt/WWidget.java index 9776ee57..5c9b46fe 100644 --- a/src/eu/webtoolkit/jwt/WWidget.java +++ b/src/eu/webtoolkit/jwt/WWidget.java @@ -458,8 +458,8 @@ public void positionAt(WWidget widget, Orientation orientation) { } String side = orientation == Orientation.Horizontal ? ".Horizontal" : ".Vertical"; - this.doJavaScript("Wt3_3_1.positionAtWidget('" + this.getId() + "','" - + widget.getId() + "',Wt3_3_1" + side + ");"); + this.doJavaScript("Wt3_3_2.positionAtWidget('" + this.getId() + "','" + + widget.getId() + "',Wt3_3_2" + side + ");"); } /** @@ -1006,7 +1006,7 @@ public void refresh() { * @see WWidget#isRendered() */ public String getJsRef() { - return "Wt3_3_1.$('" + this.getId() + "')"; + return "Wt3_3_2.$('" + this.getId() + "')"; } /** diff --git a/src/eu/webtoolkit/jwt/WWidgetVectorPainter.java b/src/eu/webtoolkit/jwt/WWidgetVectorPainter.java index 2a8845bc..9b61fc37 100644 --- a/src/eu/webtoolkit/jwt/WWidgetVectorPainter.java +++ b/src/eu/webtoolkit/jwt/WWidgetVectorPainter.java @@ -54,7 +54,7 @@ public void updateContents(final List result, : null); if (!EnumUtils.mask(this.widget_.repaintFlags_, PaintFlag.PaintUpdate) .isEmpty()) { - DomElement painter = DomElement.updateGiven("Wt3_3_1.getElement('p" + DomElement painter = DomElement.updateGiven("Wt3_3_2.getElement('p" + this.widget_.getId() + "').firstChild", DomElementType.DomElement_DIV); painter.setProperty(Property.PropertyAddedInnerHTML, vectorDevice diff --git a/src/eu/webtoolkit/jwt/WebRenderer.java b/src/eu/webtoolkit/jwt/WebRenderer.java index 41861aa8..765234bc 100644 --- a/src/eu/webtoolkit/jwt/WebRenderer.java +++ b/src/eu/webtoolkit/jwt/WebRenderer.java @@ -485,7 +485,7 @@ private void serveMainscript(final WebResponse response) throws IOException { script.setCondition("UGLY_INTERNAL_PATHS", this.session_ .isUseUglyInternalPaths()); script.setCondition("DYNAMIC_JS", false); - script.setVar("WT_CLASS", "Wt3_3_1"); + script.setVar("WT_CLASS", "Wt3_3_2"); script.setVar("APP_CLASS", app.getJavaScriptClass()); script.setCondition("STRICTLY_SERIALIZED_EVENTS", conf .serializedEvents()); @@ -548,17 +548,17 @@ private void serveMainscript(final WebResponse response) throws IOException { if (app.enableAjax_) { this.collectedJS1_ .append( - "var form = Wt3_3_1.getElement('Wt-form'); if (form) {") + "var form = Wt3_3_2.getElement('Wt-form'); if (form) {") .append(this.beforeLoadJS_.toString()); this.beforeLoadJS_.setLength(0); this.collectedJS1_.append("var domRoot=").append( app.domRoot_.getJsRef()).append(';').append( - "Wt3_3_1.progressed(domRoot);"); + "Wt3_3_2.progressed(domRoot);"); int librariesLoaded = this.loadScriptLibraries( this.collectedJS1_, app); app.streamBeforeLoadJavaScript(this.collectedJS1_, false); this.collectedJS2_.append( - "Wt3_3_1.resolveRelativeAnchors();").append( + "Wt3_3_2.resolveRelativeAnchors();").append( "domRoot.style.visibility = 'visible';").append( app.getJavaScriptClass()).append( "._p_.doAutoJavaScript();"); @@ -847,7 +847,7 @@ private void serveMainAjax(final StringBuilder out) { if (widgetset) { String historyE = app.getEnvironment().getParameter("Wt-history"); if (historyE != null) { - out.append("Wt3_3_1").append(".history.initialize('").append( + out.append("Wt3_3_2").append(".history.initialize('").append( historyE.charAt(0)).append("-field', '").append( historyE.charAt(0)).append("-iframe', '');\n"); } @@ -1037,7 +1037,7 @@ private void collectJavaScriptUpdate(final StringBuilder out) { private void loadStyleSheet(final StringBuilder out, WApplication app, final WCssStyleSheet sheet) { - out.append("Wt3_3_1").append(".addStyleSheet('").append( + out.append("Wt3_3_2").append(".addStyleSheet('").append( sheet.getLink().resolveUrl(app)).append("', '").append( sheet.getMedia()).append("');\n"); } diff --git a/src/eu/webtoolkit/jwt/WebSession.java b/src/eu/webtoolkit/jwt/WebSession.java index dbdb5cec..f689b06a 100644 --- a/src/eu/webtoolkit/jwt/WebSession.java +++ b/src/eu/webtoolkit/jwt/WebSession.java @@ -1898,7 +1898,7 @@ private void notifySignal(final WEvent e) throws IOException { if (hashE != null) { this.changeInternalPath(hashE, handler .getResponse()); - this.app_.doJavaScript("Wt3_3_1.scrollIntoView(" + this.app_.doJavaScript("Wt3_3_2.scrollIntoView(" + WWebWidget.jsStringLiteral(hashE) + ");"); } else { this.changeInternalPath("", handler.getResponse()); diff --git a/src/eu/webtoolkit/jwt/auth/AuthModel.java b/src/eu/webtoolkit/jwt/auth/AuthModel.java index 769bce53..b3bac88b 100644 --- a/src/eu/webtoolkit/jwt/auth/AuthModel.java +++ b/src/eu/webtoolkit/jwt/auth/AuthModel.java @@ -209,7 +209,7 @@ public void configureThrottling(WInteractWidget button) { WApplication app = WApplication.getInstance(); app.loadJavaScript("js/AuthModel.js", wtjs1()); button.setJavaScriptMember(" AuthThrottle", - "new Wt3_3_1.AuthThrottle(Wt3_3_1," + "new Wt3_3_2.AuthThrottle(Wt3_3_2," + button.getJsRef() + "," + WString.toWString( diff --git a/src/eu/webtoolkit/jwt/auth/OAuthProcess.java b/src/eu/webtoolkit/jwt/auth/OAuthProcess.java index 50e3f85d..45049816 100644 --- a/src/eu/webtoolkit/jwt/auth/OAuthProcess.java +++ b/src/eu/webtoolkit/jwt/auth/OAuthProcess.java @@ -130,7 +130,7 @@ public void connectStartAuthenticate(final AbstractEventSignal s) { if (WApplication.getInstance().getEnvironment().hasJavaScript()) { StringBuilder js = new StringBuilder(); js.append("function(object, event) {").append( - "Wt3_3_1.PopupWindow(Wt3_3_1").append(",").append( + "Wt3_3_2.PopupWindow(Wt3_3_2").append(",").append( WWebWidget.jsStringLiteral(this.getAuthorizeUrl())).append( ", ").append(this.service_.getPopupWidth()).append(", ") .append(this.service_.getPopupHeight()).append(");") diff --git a/src/eu/webtoolkit/jwt/auth/RegistrationModel.java b/src/eu/webtoolkit/jwt/auth/RegistrationModel.java index 39883a4e..8c65482c 100644 --- a/src/eu/webtoolkit/jwt/auth/RegistrationModel.java +++ b/src/eu/webtoolkit/jwt/auth/RegistrationModel.java @@ -633,11 +633,11 @@ public static void validatePasswordsMatchJS(WLineEdit password, + info2.getJsRef() + ",o1=" + password.getJsRef() - + ";if (!$(o1).hasClass('Wt-invalid')) {if (o.value == o1.value) {$(o).removeClass('Wt-invalid');Wt3_3_1.setHtml(i," + + ";if (!$(o1).hasClass('Wt-invalid')) {if (o.value == o1.value) {$(o).removeClass('Wt-invalid');Wt3_3_2.setHtml(i," + WString .toWString(WString.tr("Wt.Auth.valid")) .getJsStringLiteral() - + ");} else {$(o).removeClass('Wt-valid');Wt3_3_1.setHtml(i," + + ");} else {$(o).removeClass('Wt-valid');Wt3_3_2.setHtml(i," + WString .toWString( WString diff --git a/src/eu/webtoolkit/jwt/chart/WCartesianChart.java b/src/eu/webtoolkit/jwt/chart/WCartesianChart.java index 9aa15201..dc8f8dd0 100644 --- a/src/eu/webtoolkit/jwt/chart/WCartesianChart.java +++ b/src/eu/webtoolkit/jwt/chart/WCartesianChart.java @@ -578,7 +578,7 @@ public void paint(final WPainter painter, final WRectF rectangle) { "WCartesianChart::paint(): painter is not active."); } WRectF rect = rectangle; - if (rect.isEmpty()) { + if ((rect == null) || rect.isEmpty()) { rect = painter.getWindow(); } this.render(painter, rect); @@ -829,7 +829,7 @@ public final WPointF mapToDevice(final Object xValue, final Object yValue, */ public boolean initLayout(final WRectF rectangle) { WRectF rect = rectangle; - if (rect.isEmpty()) { + if ((rect == null) || rect.isEmpty()) { rect = new WRectF(0.0, 0.0, this.getWidth().toPixels(), this .getHeight().toPixels()); } diff --git a/src/eu/webtoolkit/jwt/chart/WPieChart.java b/src/eu/webtoolkit/jwt/chart/WPieChart.java index 96c0a37e..16dcebfa 100644 --- a/src/eu/webtoolkit/jwt/chart/WPieChart.java +++ b/src/eu/webtoolkit/jwt/chart/WPieChart.java @@ -433,7 +433,7 @@ public void paint(final WPainter painter, final WRectF rectangle) { throw new WException("WPieChart::paint(): painter is not active."); } WRectF rect = rectangle; - if (rect.isEmpty()) { + if ((rect == null) || rect.isEmpty()) { rect = painter.getWindow(); } rect.setX(rect.getX() + this.getPlotAreaPadding(Side.Left)); diff --git a/src/eu/webtoolkit/jwt/render/Css21Lexer.java b/src/eu/webtoolkit/jwt/render/Css21Lexer.java index f9a4ec62..55445e90 100644 --- a/src/eu/webtoolkit/jwt/render/Css21Lexer.java +++ b/src/eu/webtoolkit/jwt/render/Css21Lexer.java @@ -1,4 +1,4 @@ -// $ANTLR 3.5 src/eu/webtoolkit/jwt/render/Css21.g 2013-12-19 10:14:39 +// $ANTLR 3.5 src/eu/webtoolkit/jwt/render/Css21.g 2014-01-27 09:00:17 package eu.webtoolkit.jwt.render; import org.antlr.runtime.*; diff --git a/src/eu/webtoolkit/jwt/render/Css21Parser.java b/src/eu/webtoolkit/jwt/render/Css21Parser.java index 2b4b52b5..629e66dc 100644 --- a/src/eu/webtoolkit/jwt/render/Css21Parser.java +++ b/src/eu/webtoolkit/jwt/render/Css21Parser.java @@ -1,4 +1,4 @@ -// $ANTLR 3.5 src/eu/webtoolkit/jwt/render/Css21.g 2013-12-19 10:14:39 +// $ANTLR 3.5 src/eu/webtoolkit/jwt/render/Css21.g 2014-01-27 09:00:16 package eu.webtoolkit.jwt.render; import org.antlr.runtime.*; diff --git a/src/eu/webtoolkit/jwt/skeletons/Wt.js b/src/eu/webtoolkit/jwt/skeletons/Wt.js index a03db62b..9e64afeb 100644 --- a/src/eu/webtoolkit/jwt/skeletons/Wt.js +++ b/src/eu/webtoolkit/jwt/skeletons/Wt.js @@ -1620,8 +1620,14 @@ if (html5History) { newState = stateMap[w.location.pathname + w.location.search]; if (newState == null) { - saveState(currentState); - return; + var endw = w.location.pathname.lastIndexOf(currentState); + if (endw != -1 && + endw == w.location.pathname.length - currentState.length) { + saveState(currentState); + return; + } else { + newState = w.location.pathname.substr(baseUrl.length); + } } if (newState != currentState) { @@ -2044,8 +2050,9 @@ function dragStart(obj, e) { /* * Ignore drags that start on a scrollbar (#1231) */ - if (t.offsetWidth > t.clientWidth - || t.offsetHeight > t.clientHeight) { + if (WT.css(t, 'display') !== 'inline' && + (t.offsetWidth > t.clientWidth || + t.offsetHeight > t.clientHeight)) { var wc = WT.widgetPageCoordinates(t); var pc = WT.pageCoordinates(e); var x = pc.x - wc.x; @@ -2496,6 +2503,7 @@ function load(fullapp) { document.addEventListener("blur", trackActiveElementLost, true); } + // this could be cancelled leading to havoc? $(document).mousedown(WT.mouseDown).mouseup(WT.mouseUp); WT.history._initialize(); diff --git a/src/eu/webtoolkit/jwt/skeletons/Wt.min.js b/src/eu/webtoolkit/jwt/skeletons/Wt.min.js index a28ad019..5023e956 100644 --- a/src/eu/webtoolkit/jwt/skeletons/Wt.min.js +++ b/src/eu/webtoolkit/jwt/skeletons/Wt.min.js @@ -13,27 +13,27 @@ http://developer.yahoo.net/yui/license.txt version: 2.5.2 */ -_$_$if_DYNAMIC_JS_$_();window.JavaScriptFunction=1;window.JavaScriptConstructor=2;window.JavaScriptObject=3;window.JavaScriptPrototype=4;window.WT_DECLARE_WT_MEMBER=function(M,N,E,J){if(N==JavaScriptPrototype){M=E.indexOf(".prototype");_$_WT_CLASS_$_[E.substr(0,M)].prototype[E.substr(M+11)]=J}else _$_WT_CLASS_$_[E]=N==JavaScriptFunction?function(){return J.apply(_$_WT_CLASS_$_,arguments)}:J}; -window.WT_DECLARE_APP_MEMBER=function(M,N,E,J){var R=window.currentApp;if(N==JavaScriptPrototype){M=E.indexOf(".prototype");R[E.substr(0,M)].prototype[E.substr(M+11)]=J}else R[E]=N==JavaScriptFunction?function(){return J.apply(R,arguments)}:J};_$_$endif_$_(); -if(!window._$_WT_CLASS_$_)window._$_WT_CLASS_$_=new (function(){function M(a){return a.split("/")[2]}function N(a,b,d){if(a=="auto"||a==null)return d;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):d}function E(a,b){return N(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function J(a){if(G==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=G;)b=b.parentNode;return b==G?g.isIElt9?a:null:G}else return G}function R(a){var b=J(a);if(b&&!Z){if(!a)a=window.event;Z=true;if(g.isIElt9){g.firedTarget= -a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return Z=false}else return true}function aa(a){var b=J(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function pa(){if(!ja){ja=true;var a=document.body;if(a.addEventListener){a.addEventListener("mousemove",R,true);a.addEventListener("mouseup", -aa,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&aa(b)},true)}else{a.attachEvent("onmousemove",R);a.attachEvent("onmouseup",aa)}}}function ka(){if(!U){var a,b,d=document.styleSheets;a=0;for(b=d.length;a",j[0];);return b>4?b:a}(),S=navigator.userAgent.toLowerCase();this.isIE=ba!==undefined;this.isIE6=ba===6;this.isIE8=ba===8;this.isIElt9=ba<9;this.isIEMobile=S.indexOf("msie 4")!=-1||S.indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.isAndroid=S.indexOf("safari")!=-1&&S.indexOf("android")!=-1;this.isWebKit=S.indexOf("applewebkit")!=-1;this.isGecko=S.indexOf("gecko")!=-1&&!this.isWebKit;this.updateDelay=this.isIE?10:51;if(this.isAndroid){console.error("init console.error"); -console.info("init console.info");console.log("init console.log");console.warn("init console.warn")}var ca=new Date;this.trace=function(a,b){if(b)ca=new Date;b=new Date;b=(b.getMinutes()-ca.getMinutes())*6E4+(b.getSeconds()-ca.getSeconds())*1E3+(b.getMilliseconds()-ca.getMilliseconds());window.console&&console.log("["+b+"]: "+a)};this.initAjaxComm=function(a,b){function d(h,l){var n=null,p=true;if(window.XMLHttpRequest){n=new XMLHttpRequest;if(j)if("withCredentials"in n){if(l){n.open(h,l,true);n.withCredentials= -"true"}}else if(typeof XDomainRequest!="undefined"){n=new XDomainRequest;if(l){p=false;try{n.open(h,l+"&contentType=x-www-form-urlencoded")}catch(s){n=null}}}else n=null;else l&&n.open(h,l,true)}else if(!j&&window.ActiveXObject){try{n=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{n=new ActiveXObject("Microsoft.XMLHTTP")}catch(v){}}l&&n&&n.open(h,l,true)}n&&l&&p&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded");return n}var j=(a.indexOf("://")!=-1||a.indexOf("//")==0)&&M(a)!= -window.location.host;return d("POST",a)!=null?new (function(){function h(n,p,s,t){function v(q){if(!F){clearTimeout(K);q?b(0,u.responseText,p):b(1,null,p);if(u){u.onreadystatechange=new Function;try{u.onload=u.onreadystatechange}catch(W){}u=null}F=true}}function x(){if(u.readyState==4){var q=u.status==200&&u.getResponseHeader("Content-Type")&&u.getResponseHeader("Content-Type").indexOf("text/javascript")==0;v(q)}}function y(){u.onreadystatechange=new Function;u=null;F=true;b(2,null,p)}var u=d("POST", -l),K=null,F=false;this.abort=function(){if(u!=null){u.onreadystatechange=new Function;F=true;u.abort();u=null}};_$_CLOSE_CONNECTION_$_&&u.setRequestHeader("Connection","close");if(t>0)K=setTimeout(y,t);u.onreadystatechange=x;try{u.onload=function(){v(true)};u.onerror=function(){v(false)}}catch(D){}u.send(n)}var l=a;this.responseReceived=function(){};this.sendUpdate=function(n,p,s,t){return new h(n,p,s,t)};this.setUrl=function(n){l=n}}):new (function(){function h(p,s,t){function v(){b(1,null,s);x.parentNode.removeChild(x)} -this.userData=s;var x=this.script=document.createElement("script");x.id="script"+t;x.setAttribute("src",l+"&"+p);x.onerror=v;document.getElementsByTagName("head")[0].appendChild(x);this.abort=function(){x.parentNode.removeChild(x)}}var l=a,n=null;this.responseReceived=function(){if(n!=null){var p=n;n.script.parentNode.removeChild(n.script);n=null;b(0,"",p.userData)}};this.sendUpdate=function(p,s,t,v){return n=new h(p,s,t,v)};this.setUrl=function(p){l=p}})};this.setHtml=function(a,b,d){function j(l, -n){var p,s,t;switch(l.nodeType){case 1:p=l.namespaceURI===null?document.createElement(l.nodeName):document.createElementNS(l.namespaceURI,l.nodeName);if(l.attributes&&l.attributes.length>0){s=0;for(t=l.attributes.length;s0){s=0;for(t=l.childNodes.length;s",j[0];);return b>4?b:a}(),U=navigator.userAgent.toLowerCase();this.isIE=da!==undefined;this.isIE6=da===6;this.isIE8=da===8;this.isIElt9=da<9;this.isIEMobile=U.indexOf("msie 4")!=-1||U.indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.isAndroid=U.indexOf("safari")!=-1&&U.indexOf("android")!=-1;this.isWebKit=U.indexOf("applewebkit")!=-1;this.isGecko=U.indexOf("gecko")!=-1&&!this.isWebKit;this.updateDelay=this.isIE?10:51;if(this.isAndroid){console.error("init console.error"); +console.info("init console.info");console.log("init console.log");console.warn("init console.warn")}var ea=new Date;this.trace=function(a,b){if(b)ea=new Date;b=new Date;b=(b.getMinutes()-ea.getMinutes())*6E4+(b.getSeconds()-ea.getSeconds())*1E3+(b.getMilliseconds()-ea.getMilliseconds());window.console&&console.log("["+b+"]: "+a)};this.initAjaxComm=function(a,b){function d(h,l){var m=null,p=true;if(window.XMLHttpRequest){m=new XMLHttpRequest;if(j)if("withCredentials"in m){if(l){m.open(h,l,true);m.withCredentials= +"true"}}else if(typeof XDomainRequest!="undefined"){m=new XDomainRequest;if(l){p=false;try{m.open(h,l+"&contentType=x-www-form-urlencoded")}catch(s){m=null}}}else m=null;else l&&m.open(h,l,true)}else if(!j&&window.ActiveXObject){try{m=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{m=new ActiveXObject("Microsoft.XMLHTTP")}catch(v){}}l&&m&&m.open(h,l,true)}m&&l&&p&&m.setRequestHeader("Content-type","application/x-www-form-urlencoded");return m}var j=(a.indexOf("://")!=-1||a.indexOf("//")==0)&&N(a)!= +window.location.host;return d("POST",a)!=null?new (function(){function h(m,p,s,t){function v(q){if(!F){clearTimeout(K);q?b(0,u.responseText,p):b(1,null,p);if(u){u.onreadystatechange=new Function;try{u.onload=u.onreadystatechange}catch(Y){}u=null}F=true}}function x(){if(u.readyState==4){var q=u.status==200&&u.getResponseHeader("Content-Type")&&u.getResponseHeader("Content-Type").indexOf("text/javascript")==0;v(q)}}function y(){u.onreadystatechange=new Function;u=null;F=true;b(2,null,p)}var u=d("POST", +l),K=null,F=false;this.abort=function(){if(u!=null){u.onreadystatechange=new Function;F=true;u.abort();u=null}};_$_CLOSE_CONNECTION_$_&&u.setRequestHeader("Connection","close");if(t>0)K=setTimeout(y,t);u.onreadystatechange=x;try{u.onload=function(){v(true)};u.onerror=function(){v(false)}}catch(D){}u.send(m)}var l=a;this.responseReceived=function(){};this.sendUpdate=function(m,p,s,t){return new h(m,p,s,t)};this.setUrl=function(m){l=m}}):new (function(){function h(p,s,t){function v(){b(1,null,s);x.parentNode.removeChild(x)} +this.userData=s;var x=this.script=document.createElement("script");x.id="script"+t;x.setAttribute("src",l+"&"+p);x.onerror=v;document.getElementsByTagName("head")[0].appendChild(x);this.abort=function(){x.parentNode.removeChild(x)}}var l=a,m=null;this.responseReceived=function(){if(m!=null){var p=m;m.script.parentNode.removeChild(m.script);m=null;b(0,"",p.userData)}};this.sendUpdate=function(p,s,t,v){return m=new h(p,s,t,v)};this.setUrl=function(p){l=p}})};this.setHtml=function(a,b,d){function j(l, +m){var p,s,t;switch(l.nodeType){case 1:p=l.namespaceURI===null?document.createElement(l.nodeName):document.createElementNS(l.namespaceURI,l.nodeName);if(l.attributes&&l.attributes.length>0){s=0;for(t=l.attributes.length;s0){s=0;for(t=l.childNodes.length;s"+b+"","application/xhtml+xml").documentElement;if(h.nodeType!=1)h=h.nextSibling;if(!d)a.innerHTML="";b=0;for(d=h.childNodes.length;b0){var j;b=0;for(j= a.attributes.length;b=8)b.className=a.className.substring(8);var d=a.getAttribute("style");if(d)g.isIE?b.style.setAttribute("cssText",d):b.setAttribute("style",d);a.parentNode.replaceChild(b,a)}};this.navigateInternalPath=function(a,b){a=a||window.event;if(!a.ctrlKey&&!a.metaKey&&g.button(a)<=1){g.history.navigate(b,true);g.cancelEvent(a,g.CancelDefaultAction)}};this.ajaxInternalPaths=function(a){$(".Wt-ip").each(function(){var b= this.getAttribute("href"),d=b.lastIndexOf("?wtd");if(d===-1)d=b.lastIndexOf("&wtd");if(d!==-1)b=b.substr(0,d);var j;if(b.indexOf("://")!=-1){d=document.createElement("div");d.innerHTML='x';j=b.substr(d.firstChild.href.length-1)}else{for(;b.substr(0,3)=="../";)b=b.substr(3);if(b.charAt(0)!="/")b="/"+b;j=b.substr(a.length)}if(j.length==0||j.charAt(0)!="/")j="/"+j;if(j.substr(0,4)=="/?_=")j=j.substr(4);this.setAttribute("href",b);this.setAttribute("href",this.href);this.onclick=function(h){g.navigateInternalPath(h, -j)};$(this).removeClass("Wt-ip")})};this.resolveRelativeAnchors=function(){window.$&&$(".Wt-rr").each(function(){this.href&&this.setAttribute("href",this.href);this.src&&this.setAttribute("src",this.src);$(this).removeClass("Wt-rr")})};var Z=false;this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){if(!Z){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate)if(a.stopPropagation)a.stopPropagation(); +j)};$(this).removeClass("Wt-ip")})};this.resolveRelativeAnchors=function(){window.$&&$(".Wt-rr").each(function(){this.href&&this.setAttribute("href",this.href);this.src&&this.setAttribute("src",this.src);$(this).removeClass("Wt-rr")})};var ba=false;this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){if(!ba){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate)if(a.stopPropagation)a.stopPropagation(); else a.cancelBubble=true}};this.$=this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var d=0;da.parentNode.scrollWidth)d-=a.scrollLeft+a.parentNode.scrollWidth-a.scrollWidth}else d-=a.scrollLeft;j-=a.scrollTop}}while(a!=null&&a!= h)}}return{x:d,y:j}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,d=0;if(a.touches&&a.touches[0])return g.pageCoordinates(a.touches[0]);else if(!g.isIE&&a.changedTouches&&a.changedTouches[0]){b=a.changedTouches[0].pageX;d=a.changedTouches[0].pageY}else if(typeof a.pageX==="number"){b=a.pageX;d=a.pageY}else if(typeof a.clientX==="number"){b=a.clientX+document.body.scrollLeft+ @@ -41,56 +41,56 @@ document.documentElement.scrollLeft;d=a.clientY+document.body.scrollTop+document a.indexOf("#");if(b!=-1)a=a.substr(b+1);var d=document.getElementById(a);if(d){for(b=d.parentNode;b!=document.body;b=b.parentNode)if(b.scrollHeight>b.clientHeight&&g.css(b,"overflow-y")=="auto"){d=g.widgetPageCoordinates(d,b);b.scrollTop+=d.y;return}d.scrollIntoView(true)}},100)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),d=b.duplicate();d.moveToElementText(a);var j=0;if(b.text.length>1){j-=b.text.length;if(j<0)j=0}a= -1+j;for(d.moveStart("character",j);d.inRange(b);){d.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{d=b=-1;if(a=$(a).val()){d=document.selection.createRange().duplicate();d.moveEnd("character",a.length);b=d.text==""?a.length:a.lastIndexOf(d.text);d=document.selection.createRange().duplicate();d.moveStart("character",-a.length);d=d.text.length}return{start:b,end:d}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}: {start:-1,end:-1}};this.setSelectionRange=function(a,b,d){var j=$(a).val();if(typeof b!="number")b=-1;if(typeof d!="number")d=-1;if(b<0)b=0;if(d>j.length)d=j.length;if(dd)b=d;a.focus();if(typeof a.selectionStart!=="undefined"){a.selectionStart=b;a.selectionEnd=d}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",d-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false; -return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var X=null,da=null;this.eventRepeat=function(a,b,d){g.stopRepeat();b=b||500;d=d||50;a();X=setTimeout(function(){X=null;a();da=setInterval(a,d)},b)};this.stopRepeat=function(){if(X){clearTimeout(X);X=null}if(da){clearInterval(da);da=null}};var ma=null,ea=null;this.css=function(a,b){if(a.style[b])return a.style[b]; -else{if(a!==ma){ma=a;ea=window.getComputedStyle?window.getComputedStyle(a,null):a.currentStyle?a.currentStyle:null}return ea?ea[b]:null}};this.parsePx=function(a){return N(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)};this.px=function(a,b){return g.parsePx(g.css(a,b))};this.pxself=function(a,b){return g.parsePx(a.style[b])};this.pctself=function(a,b){return E(a.style[b],0)};this.styleAttribute=function(a){function b(p){for(var s=p.search(/-./);s!=-1;){s=p.charAt(s+1).toUpperCase();p=p.replace(/-./,s);s= -p.search(/-./)}return p}var d=["","-moz-","-webkit-","-o-","-ms-"],j=document.createElement("div"),h,l;h=0;for(l=d.length;h0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=null,fa=null;this.eventRepeat=function(a,b,d){g.stopRepeat();b=b||500;d=d||50;a();Z=setTimeout(function(){Z=null;a();fa=setInterval(a,d)},b)};this.stopRepeat=function(){if(Z){clearTimeout(Z);Z=null}if(fa){clearInterval(fa);fa=null}};var oa=null,ga=null;this.css=function(a,b){if(a.style[b])return a.style[b]; +else{if(a!==oa){oa=a;ga=window.getComputedStyle?window.getComputedStyle(a,null):a.currentStyle?a.currentStyle:null}return ga?ga[b]:null}};this.parsePx=function(a){return O(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)};this.px=function(a,b){return g.parsePx(g.css(a,b))};this.pxself=function(a,b){return g.parsePx(a.style[b])};this.pctself=function(a,b){return E(a.style[b],0)};this.styleAttribute=function(a){function b(p){for(var s=p.search(/-./);s!=-1;){s=p.charAt(s+1).toUpperCase();p=p.replace(/-./,s);s= +p.search(/-./)}return p}var d=["","-moz-","-webkit-","-o-","-ms-"],j=document.createElement("div"),h,l;h=0;for(l=d.length;hd?d+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var G=null;this.firedTarget= -null;this.target=function(a){try{return g.firedTarget||a.target||a.srcElement}catch(b){return null}};var ja=false;this.capture=function(a){pa();if(!(G&&a)){G=a;var b=document.body;document.body.addEventListener||(a!=null?b.setCapture():b.releaseCapture());if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){b&& -G&&a==G&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var d=[],j,h=0,l=b.length;h32768){d=document.createElement("style");b.parentNode.insertBefore(d,b);d.styleSheet.cssText=a}else d.styleSheet.cssText+=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var d=0;d0){b=b[b.length-1];b.parentNode.insertBefore(d,b.nextSibling)}else document.body.appendChild(d)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a, -b,d,j,h){var l=["left","right"],n=["top","bottom"];a.style[l[0]]=a.style[l[1]]="auto";a.style[n[0]]=a.style[n[1]]="auto";var p=a.offsetWidth,s=a.offsetHeight,t=g.windowSize(),v=document.body.scrollLeft+document.documentElement.scrollLeft,x=document.body.scrollTop+document.documentElement.scrollTop;if(!$(a).hasClass("Wt-tooltip")){p=g.px(a,"maxWidth")||p;s=g.px(a,"maxHeight")||s}var y=a.offsetParent;if(y){var u=g.widgetPageCoordinates(y);if(p>t.x){b=v;j=0}else if(b+p>v+t.x){p=y.scrollLeft;if(y==document.body)p= -y.clientWidth-t.x;j=j-u.x+p;b=y.clientWidth-(j+g.px(a,"marginRight"));j=1}else{p=y.scrollLeft;if(y==document.body)p=0;b=b-u.x+p;b-=g.px(a,"marginLeft");j=0}if(s>t.y){d=x;h=0}else if(d+s>x+t.y){if(h>x+t.y)h=x+t.y;s=y.scrollTop;if(y==document.body)s=y.clientHeight-t.y;h=h-u.y+s;d=y.clientHeight-(h+g.px(a,"marginBottom"));h=1}else{s=y.scrollTop;if(y==document.body)s=0;d=d-u.y+s;d-=g.px(a,"marginTop");h=0}a.style[l[j]]=b+"px";a.style[n[h]]=d+"px"}};this.positionXY=function(a,b,d){a=g.getElement(a);if(!g.isHidden(a)){a.style.display= -"block";g.fitToWindow(a,b,d,b,d)}};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,d,j){a=g.getElement(a);var h=g.getElement(b);j||(j=0);if(h&&a){var l=g.widgetPageCoordinates(h),n;a.style.position="absolute";if(g.css(a,"display")=="none")a.style.display="block";if(d===g.Horizontal){d=l.x+h.offsetWidth;b=l.y+j;n=l.x;j=l.y+h.offsetHeight-j}else{d=l.x;b=l.y+h.offsetHeight;n=l.x+h.offsetWidth;j=l.y}if(!a.wtNoReparent&&!$(a).hasClass("wt-no-reparent")){l=h;var p=$(".Wt-domRoot").get(0); -a.parentNode.removeChild(a);for(h=l.parentNode;h!=p;h=h.parentNode){if(h.wtResize){h=l;break}if(g.css(h,"display")!="inline"&&(h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth))break;l=h}l=g.css(h,"position");if(l!="absolute"&&l!="relative")h.style.position="relative";h.appendChild(a);$(a).addClass("wt-reparented")}g.fitToWindow(a,d,b,n,j);a.style.visibility=""}};this.hasFocus=function(a){try{return a===document.activeElement}catch(b){return false}};this.progressed=function(a){var b=document, -d=b.body,j=this.getElement("Wt-form");a.style.display=j.style.display;j.parentNode.replaceChild(a,j);d.removeEventListener?d.removeEventListener("click",delayClick,true):d.detachEvent("click",delayClick);setTimeout(function(){var h,l;h=0;for(l=delayedClicks.length;h=1&&d[d.length-1]=="/"){_$_$if_UGLY_INTERNAL_PATHS_$_();j=true;_$_$endif_$_();_$_$ifnot_UGLY_INTERNAL_PATHS_$_();d=d.substr(0,d.length-1);_$_$endif_$_()}},navigate:function(p,s){g.resolveRelativeAnchors();b=p;var t=la(p),v=d;if(t.length!=0)v+=(j?"?_=":"")+t;if(j){function x(u){if(u.length>1)u=u.substr(1);var K=u.split("&"),F,D; -u="";F=0;for(D=K.length;F1){if(t.length>2&&t[0]=="?"&&t[1]=="&")t=t.substr(1);v+=v.indexOf("?")==-1?"?"+t.substr(1):"&"+t.substr(1)}}else v+=window.location.search;try{window.history.pushState(p?p:"",document.title,v)}catch(y){console.log(y.toString())}g.scrollIntoView(p);s&&h(p)},getCurrentState:function(){return b}}}():g.isIE8?function(){var a=null,b=null,d=window;return{_initialize:function(){}, -_initTimeout:function(){},register:function(j,h){function l(){if(a!=d.location.hash){a=d.location.hash.substring(1);b(a)}}a=j;b=h;d.onhashchange=l},initialize:function(){},navigate:function(j,h){a=j;d.location.hash=j;g.scrollIntoView(j);h&&b(j)},getCurrentState:function(){return a}}}():function(){function a(){var r,w;w=location.href;r=w.indexOf("#");return r>=0?w.substr(r+1):null}function b(){y.value=D+"|"+q}function d(){var r,w;r=0;for(w=W.length;r";try{w=x.contentWindow.document;w.open();w.write(r);w.close();return true}catch(B){return false}}function l(){var r,w,B,L;if(!x.contentWindow||!x.contentWindow.document)setTimeout(l,10);else{r=x.contentWindow.document;B=(w=r.getElementById("state"))?w.innerText:null;L=a();setInterval(function(){var Q,H;r=x.contentWindow.document;Q=(w=r.getElementById("state"))?w.innerText:null;H=a();if(Q!== -B){B=Q;j(B);H=B?B:D;if(location.hash!=H&&location.hash.substring(1)!=H)location.hash=H;L=H;b()}else if(H!==L){L=H;h(H)}},50);u=true;v!=null&&v()}}function n(){if(!s){var r=a(),w=history.length;K&&clearInterval(K);K=setInterval(function(){var B,L;B=a();L=history.length;if(B!==r){r=B;w=L;j(r);b()}},50)}}function p(){var r;r=y.value.split("|");if(r.length>1){D=r[0];q=r[1]}else D=q="";if(r.length>2)F=r[2].split(",");if(s)l();else{n();u=true;v!=null&&v()}}var s=g.isIElt9,t=false,v=null,x=null,y=null,u= -false,K=null,F=[],D,q,W=[];return{_initialize:function(){y!=null&&p()},_initTimeout:function(){n()},register:function(r,w){if(!u)q=D=escape(r);W.push(w)},initialize:function(r,w){if(!u){if((navigator.vendor||"")!=="KDE")if(typeof window.opera!=="undefined")t=true;if(typeof r==="string")r=document.getElementById(r);if(!(!r||r.tagName.toUpperCase()!=="TEXTAREA"&&(r.tagName.toUpperCase()!=="INPUT"||r.type!=="hidden"&&r.type!=="text"))){y=r;if(s){if(typeof w==="string")w=document.getElementById(w);!w|| -w.tagName.toUpperCase()!=="IFRAME"||(x=w)}}}},navigate:function(r,w){r=la(r);if(u){r=r;if(s)h(r);else if(r.length>0)location.hash=r;w&&d()}},getCurrentState:function(){if(!u)return"";return unescape(q)}}}()});if(window._$_APP_CLASS_$_&&window._$_APP_CLASS_$_._p_)try{window._$_APP_CLASS_$_._p_.quit()}catch(e$$28){} -window._$_APP_CLASS_$_=new (function(){function M(c){c=q.pageCoordinates(c);W=c.x;r=c.y}function N(){var c=_$_WT_CLASS_$_.history.getCurrentState();if(!(c!=null&&c.length>0&&c.substr(0,1)!="/"))if(B!=c){B=c;setTimeout(function(){a(null,"hash",null,true)},1)}}function E(c,e){if(!(B==c||!B&&c=="/")){e||(B=c);q.history.navigate(c,e)}}function J(){document.body.ondragstart=function(){return false}}function R(c,e){var f=q.target(e);if(f)if(f.offsetWidth>f.clientWidth||f.offsetHeight>f.clientHeight){var k= -q.widgetPageCoordinates(f),o=q.pageCoordinates(e),m=o.y-k.y;if(o.x-k.x>f.clientWidth||m>f.clientHeight)return true}f=L;f.object=q.getElement(c.getAttribute("dwid"));if(f.object==null)return true;f.sourceId=c.getAttribute("dsid");f.objectPrevStyle={position:f.object.style.position,display:f.object.style.display,left:f.object.style.left,top:f.object.style.top,className:f.object.className};f.object.parentNode.removeChild(f.object);f.object.style.position="absolute";f.object.className="";f.object.style.zIndex= -"1000";document.body.appendChild(f.object);q.capture(null);q.capture(f.object);f.object.onmousemove=aa;f.object.onmouseup=pa;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=c.getAttribute("dmt");f.xy=q.pageCoordinates(e);q.cancelEvent(e,q.CancelPropagate);return false}function aa(c){c=c||window.event;if(L.object!==null){var e=L,f=q.pageCoordinates(c);if(e.object.style.display!==""&&e.xy.x!==f.x&&e.xy.y!==f.y)e.object.style.display="";e.object.style.left=f.x-e.offsetX+"px";e.object.style.top= -f.y-e.offsetY+"px";f=e.dropTarget;var k=q.target(c);if(k==e.object)if(document.elementFromPoint){e.object.style.display="none";k=document.elementFromPoint(c.clientX,c.clientY);e.object.style.display=""}var o="{"+e.mimeType+":",m=null;for(e.dropTarget=null;k;){m=k.getAttribute("amts");if(m!=null&&m.indexOf(o)!=-1){e.dropTarget=k;break}k=k.parentNode;if(!k.tagName||q.hasTag(k,"HTML"))break}if(e.dropTarget!=f){if(e.dropTarget){k=m.indexOf(o)+o.length;var z=m.indexOf("}",k);m=m.substring(k,z);if(m.length!= -0){e.dropTarget.setAttribute("dos",e.dropTarget.className);e.dropTarget.className=e.dropTarget.className+" "+m}}else e.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",e.object,c,"",o);m=f.getAttribute("dos");if(m!=null)f.className=m}}if(e.dropTarget)if(e.dropTarget.handleDragDrop)e.dropTarget.handleDragDrop("drag",e.object,c,"",o);else e.object.className="Wt-valid-drop";else e.object.className="";return false}return true}function pa(c){c=c||window.event;q.capture(null);var e= -L;if(e.object){if(e.dropTarget){var f=e.dropTarget.getAttribute("dos");if(f!=null)e.dropTarget.className=f;e.dropTarget.handleDragDrop?e.dropTarget.handleDragDrop("drop",e.object,c,e.sourceId,e.mimeType):n(e.dropTarget,{name:"_drop",eventObject:e.dropTarget,event:c},e.sourceId,e.mimeType)}e.object.style.position=e.objectPrevStyle.position;e.object.style.display=e.objectPrevStyle.display;e.object.style.left=e.objectPrevStyle.left;e.object.style.top=e.objectPrevStyle.top;e.object.className=e.objectPrevStyle.className; -e.object=null}}function ka(c,e,f){var k,o;o=c+"=";c=0;for(k=e.length;c0?"&e"+e:"&";f=e+"signal="+c.signal;if(c.id){f+=e+"id="+c.id+e+"name="+encodeURIComponent(c.name)+e+"an="+c.args.length;for(var o=0;o0&&q.setHtml(c.get(0),"",false)}function ba(){q.history._initTimeout();oa==0&&a(null,"none",null,false)}function S(c){if(!q.isIEMobile)document.title=c}function ca(c){if(!wa){if(c){if(!window._$_APP_CLASS_$_LoadWidgetTree)return;q.history.initialize("Wt-history-field","Wt-history-iframe",w)}if(!("activeElement"in document)){function e(k){if(k&&k.target)document.activeElement=k.target==document?null:k.target} -function f(){document.activeElement=null}document.addEventListener("focus",e,true);document.addEventListener("blur",f,true)}$(document).mousedown(q.mouseDown).mouseup(q.mouseUp);q.history._initialize();J();wa=true;c&&window._$_APP_CLASS_$_LoadWidgetTree();T||na||(na=setInterval(ba,_$_KEEP_ALIVE_$_000))}}function Z(c){clearTimeout(c);document.body.style.cursor="auto";if(qa!=null){try{qa()}catch(e){}qa=null}}function X(){document.body.style.cursor="wait";qa=hideLoadingIndicator;showLoadingIndicator()} -function da(c){xa=c}function ma(){D._p_.autoJavaScript()}function ea(c){if(c){c="(function() {"+c+"})();";window.execScript?window.execScript(c):window.eval(c)}D==window._$_APP_CLASS_$_&&ma()}function G(c,e,f){if(!T)if(ra)setTimeout(function(){G(c,e,f)},50);else{if(c==0){q.resolveRelativeAnchors();_$_$if_CATCH_ERROR_$_();try{_$_$endif_$_();ea(e);_$_$if_CATCH_ERROR_$_()}catch(k){var o=null;_$_$if_SHOW_STACK_$_();o=k.stack||k.stacktrace;_$_$endif_$_();alert("Wt internal error: "+k+", code: "+k.code+ -", description: "+k.description+(o?", stack:\n"+o:""))}_$_$endif_$_();f&&Z(f)}else I=H.concat(I);H=[];if(Y){clearTimeout(Y);Y=null}P=null;if(c>0)++oa;else oa=0;if(!T)if(xa||I.length>0)if(c==1){o=Math.min(12E4,Math.exp(oa)*500);ga=setTimeout(function(){h()},o)}else h()}}function ja(c){ha=c.indexOf("://")!=-1||c[0]=="/"?c:w+c;sa&&sa.setUrl(c)}function U(){P.abort();Y=P=null;T||h()}function a(c,e,f,k){if(!ta){ta=true;q.checkReleaseCapture(c,f);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!P){_$_$endif_$_(); -var o={},m=I.length;o.object=c;o.signal=e;o.event=window.fakeEvent||f;o.feedback=k;I[m]=la(o,m);b();ea();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_();ta=false}}function b(){if(!T){_$_$if_WEB_SOCKETS_$_();if(A.state!=2)if(typeof window.WebSocket==="undefined"&&typeof window.MozWebSocket==="undefined")A.state=2;else{var c=A.socket;if(c==null||c.readyState>1)if(c!=null&&A.state==0)A.state=2;else{function e(){++A.reconnectTries;var k=Math.min(12E4,Math.exp(A.reconnectTries)*500);setTimeout(function(){b()}, -k)}var f;if(ha.indexOf("://")!=-1)f="ws"+ha.substr(4);else{f=ha.substr(ha.indexOf("?"));f="ws"+location.protocol.substr(4)+"//"+location.host+w+f}f+="&request=ws";A.socket=typeof window.WebSocket!=="undefined"?(c=new WebSocket(f)):(c=new MozWebSocket(f));A.keepAlive&&clearInterval(A.keepAlive);A.keepAlive=null;c.onmessage=function(k){A.reconnectTries=0;A.state=1;G(0,k.data,null)};c.onerror=function(){if(A.reconnectTries==3&&A.state==0)A.state=2;e()};c.onclose=function(){if(A.reconnectTries==3&&A.state== -0)A.state=2;e()};c.onopen=function(){c.send("&signal=ping");A.keepAlive&&clearInterval(A.keepAlive);A.keepAlive=setInterval(function(){if(c.readyState==1)c.send("&signal=ping");else{clearInterval(A.keepAlive);A.keepAlive=null}},_$_SERVER_PUSH_TIMEOUT_$_)}}if(c.readyState==1){h();return}}_$_$endif_$_();if(P!=null&&Y!=null){clearTimeout(Y);P.abort();P=null}if(P==null)if(ga==null){ga=setTimeout(function(){h()},q.updateDelay);ya=(new Date).getTime()}else if(oa){clearTimeout(ga);h()}else if((new Date).getTime()- -ya>q.updateDelay){clearTimeout(ga);h()}}}function d(c,e){ua=e;va=c;sa.responseReceived(c)}function j(c){za=c}function h(){if(D!=window._$_APP_CLASS_$_)V();else if(!P){ga=null;if(T){if(!Aa){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;Aa=true}}else{var c,e,f;if(I.length>0){c=g();e=c.feedback?setTimeout(X,_$_INDICATOR_TIMEOUT_$_):null;f=false}else{c={result:"&signal=poll"};e=null;f=true}c.result+="&ackId="+va+"&pageId="+za;if(ua){var k="",o=$("#"+ -ua).get(0);if(o)for(o=o.parentNode;!q.hasTag(o,"BODY");o=o.parentNode)if(o.id){if(k!="")k+=",";k+=o.id}c.result+="&ackPuzzle="+encodeURIComponent(k)}c.result+="&_$_PARAMS_$_";if(A.socket!=null&&A.socket.readyState==1){P=null;e!=null&&clearTimeout(e);f||A.socket.send(c.result)}else{P=sa.sendUpdate("request=jsupdate"+c.result,e,va,-1);Y=f?setTimeout(U,_$_SERVER_PUSH_TIMEOUT_$_):null}}}}function l(c,e,f){if(e==-1)e=c.offsetWidth;if(f==-1)f=c.offsetHeight;if(typeof c.wtWidth==="undefined"||c.wtWidth!= -e||typeof c.wtHeight==="undefined"||c.wtHeight!=f){c.wtWidth=e;c.wtHeight=f;e>=0&&f>=0&&n(c,"resized",e,f)}}function n(c,e){var f={},k=I.length;f.signal="user";f.id=typeof c==="string"?c:c==D?"app":c.id;if(typeof e==="object"){f.name=e.name;f.object=e.eventObject;f.event=e.event}else{f.name=e;f.object=f.event=null}f.args=[];for(var o=2;o1)v(c,e,fa-1); -else{alert("Fatal error: failed loading "+c);V()}}}function o(){if(!m&&!z){m=true;t(c)}}var m=false,z=false;if(e!="")try{m=!eval("typeof "+e+" === 'undefined'")}catch(C){m=false}if(m)t(c);else{var O=document.createElement("script");O.setAttribute("src",c);O.onload=o;O.onerror=k;O.onreadystatechange=function(){var fa=O.readyState;if(fa=="loaded")q.isOpera||q.isIE?o():k();else fa=="complete"&&o()};document.getElementsByTagName("head")[0].appendChild(O)}}function x(c,e){this.callback=e;this.work=c.length; -this.images=[];if(c.length==0)e(this.images);else for(e=0;et.x){b=v;j=0}else if(b+p>v+t.x){p=y.scrollLeft;if(y==document.body)p= +y.clientWidth-t.x;j=j-u.x+p;b=y.clientWidth-(j+g.px(a,"marginRight"));j=1}else{p=y.scrollLeft;if(y==document.body)p=0;b=b-u.x+p;b-=g.px(a,"marginLeft");j=0}if(s>t.y){d=x;h=0}else if(d+s>x+t.y){if(h>x+t.y)h=x+t.y;s=y.scrollTop;if(y==document.body)s=y.clientHeight-t.y;h=h-u.y+s;d=y.clientHeight-(h+g.px(a,"marginBottom"));h=1}else{s=y.scrollTop;if(y==document.body)s=0;d=d-u.y+s;d-=g.px(a,"marginTop");h=0}a.style[l[j]]=b+"px";a.style[m[h]]=d+"px"}};this.positionXY=function(a,b,d){a=g.getElement(a);if(!g.isHidden(a)){a.style.display= +"block";g.fitToWindow(a,b,d,b,d)}};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,d,j){a=g.getElement(a);var h=g.getElement(b);j||(j=0);if(h&&a){var l=g.widgetPageCoordinates(h),m;a.style.position="absolute";if(g.css(a,"display")=="none")a.style.display="block";if(d===g.Horizontal){d=l.x+h.offsetWidth;b=l.y+j;m=l.x;j=l.y+h.offsetHeight-j}else{d=l.x;b=l.y+h.offsetHeight;m=l.x+h.offsetWidth;j=l.y}if(!a.wtNoReparent&&!$(a).hasClass("wt-no-reparent")){l=h;var p=$(".Wt-domRoot").get(0); +a.parentNode.removeChild(a);for(h=l.parentNode;h!=p;h=h.parentNode){if(h.wtResize){h=l;break}if(g.css(h,"display")!="inline"&&(h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth))break;l=h}l=g.css(h,"position");if(l!="absolute"&&l!="relative")h.style.position="relative";h.appendChild(a);$(a).addClass("wt-reparented")}g.fitToWindow(a,d,b,m,j);a.style.visibility=""}};this.hasFocus=function(a){try{return a===document.activeElement}catch(b){return false}};this.progressed=function(a){var b=document, +d=b.body,j=this.getElement("Wt-form");a.style.display=j.style.display;j.parentNode.replaceChild(a,j);d.removeEventListener?d.removeEventListener("click",delayClick,true):d.detachEvent("click",delayClick);setTimeout(function(){var h,l;h=0;for(l=delayedClicks.length;h=1&&d[d.length-1]=="/"){_$_$if_UGLY_INTERNAL_PATHS_$_();j=true;_$_$endif_$_();_$_$ifnot_UGLY_INTERNAL_PATHS_$_();d=d.substr(0,d.length-1);_$_$endif_$_()}},navigate:function(p,s){g.resolveRelativeAnchors(); +b=p;var t=na(p),v=d;if(t.length!=0)v+=(j?"?_=":"")+t;if(j){function x(u){if(u.length>1)u=u.substr(1);var K=u.split("&"),F,D;u="";F=0;for(D=K.length;F1){if(t.length>2&&t[0]=="?"&&t[1]=="&")t=t.substr(1);v+=v.indexOf("?")==-1?"?"+t.substr(1):"&"+t.substr(1)}}else v+=window.location.search;try{window.history.pushState(p?p:"",document.title,v)}catch(y){console.log(y.toString())}g.scrollIntoView(p); +s&&h(p)},getCurrentState:function(){return b}}}():g.isIE8?function(){var a=null,b=null,d=window;return{_initialize:function(){},_initTimeout:function(){},register:function(j,h){function l(){if(a!=d.location.hash){a=d.location.hash.substring(1);b(a)}}a=j;b=h;d.onhashchange=l},initialize:function(){},navigate:function(j,h){a=j;d.location.hash=j;g.scrollIntoView(j);h&&b(j)},getCurrentState:function(){return a}}}():function(){function a(){var r,w;w=location.href;r=w.indexOf("#");return r>=0?w.substr(r+ +1):null}function b(){y.value=D+"|"+q}function d(){var r,w;r=0;for(w=Y.length;r";try{w=x.contentWindow.document;w.open();w.write(r);w.close();return true}catch(B){return false}}function l(){var r,w,B,M;if(!x.contentWindow||!x.contentWindow.document)setTimeout(l,10);else{r=x.contentWindow.document;B=(w=r.getElementById("state"))?w.innerText: +null;M=a();setInterval(function(){var S,H;r=x.contentWindow.document;S=(w=r.getElementById("state"))?w.innerText:null;H=a();if(S!==B){B=S;j(B);H=B?B:D;if(location.hash!=H&&location.hash.substring(1)!=H)location.hash=H;M=H;b()}else if(H!==M){M=H;h(H)}},50);u=true;v!=null&&v()}}function m(){if(!s){var r=a(),w=history.length;K&&clearInterval(K);K=setInterval(function(){var B,M;B=a();M=history.length;if(B!==r){r=B;w=M;j(r);b()}},50)}}function p(){var r;r=y.value.split("|");if(r.length>1){D=r[0];q=r[1]}else D= +q="";if(r.length>2)F=r[2].split(",");if(s)l();else{m();u=true;v!=null&&v()}}var s=g.isIElt9,t=false,v=null,x=null,y=null,u=false,K=null,F=[],D,q,Y=[];return{_initialize:function(){y!=null&&p()},_initTimeout:function(){m()},register:function(r,w){if(!u)q=D=escape(r);Y.push(w)},initialize:function(r,w){if(!u){if((navigator.vendor||"")!=="KDE")if(typeof window.opera!=="undefined")t=true;if(typeof r==="string")r=document.getElementById(r);if(!(!r||r.tagName.toUpperCase()!=="TEXTAREA"&&(r.tagName.toUpperCase()!== +"INPUT"||r.type!=="hidden"&&r.type!=="text"))){y=r;if(s){if(typeof w==="string")w=document.getElementById(w);!w||w.tagName.toUpperCase()!=="IFRAME"||(x=w)}}}},navigate:function(r,w){r=na(r);if(u){r=r;if(s)h(r);else if(r.length>0)location.hash=r;w&&d()}},getCurrentState:function(){if(!u)return"";return unescape(q)}}}()});if(window._$_APP_CLASS_$_&&window._$_APP_CLASS_$_._p_)try{window._$_APP_CLASS_$_._p_.quit()}catch(e$$28){} +window._$_APP_CLASS_$_=new (function(){function N(c){c=q.pageCoordinates(c);Y=c.x;r=c.y}function O(){var c=_$_WT_CLASS_$_.history.getCurrentState();if(!(c!=null&&c.length>0&&c.substr(0,1)!="/"))if(B!=c){B=c;setTimeout(function(){a(null,"hash",null,true)},1)}}function E(c,e){if(!(B==c||!B&&c=="/")){e||(B=c);q.history.navigate(c,e)}}function J(){document.body.ondragstart=function(){return false}}function T(c,e){var f=q.target(e);if(f)if(q.css(f,"display")!=="inline"&&(f.offsetWidth>f.clientWidth||f.offsetHeight> +f.clientHeight)){var k=q.widgetPageCoordinates(f),o=q.pageCoordinates(e),n=o.y-k.y;if(o.x-k.x>f.clientWidth||n>f.clientHeight)return true}f=M;f.object=q.getElement(c.getAttribute("dwid"));if(f.object==null)return true;f.sourceId=c.getAttribute("dsid");f.objectPrevStyle={position:f.object.style.position,display:f.object.style.display,left:f.object.style.left,top:f.object.style.top,className:f.object.className};f.object.parentNode.removeChild(f.object);f.object.style.position="absolute";f.object.className= +"";f.object.style.zIndex="1000";document.body.appendChild(f.object);q.capture(null);q.capture(f.object);f.object.onmousemove=ca;f.object.onmouseup=ra;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=c.getAttribute("dmt");f.xy=q.pageCoordinates(e);q.cancelEvent(e,q.CancelPropagate);return false}function ca(c){c=c||window.event;if(M.object!==null){var e=M,f=q.pageCoordinates(c);if(e.object.style.display!==""&&e.xy.x!==f.x&&e.xy.y!==f.y)e.object.style.display="";e.object.style.left=f.x-e.offsetX+ +"px";e.object.style.top=f.y-e.offsetY+"px";f=e.dropTarget;var k=q.target(c);if(k==e.object)if(document.elementFromPoint){e.object.style.display="none";k=document.elementFromPoint(c.clientX,c.clientY);e.object.style.display=""}var o="{"+e.mimeType+":",n=null;for(e.dropTarget=null;k;){n=k.getAttribute("amts");if(n!=null&&n.indexOf(o)!=-1){e.dropTarget=k;break}k=k.parentNode;if(!k.tagName||q.hasTag(k,"HTML"))break}if(e.dropTarget!=f){if(e.dropTarget){k=n.indexOf(o)+o.length;var z=n.indexOf("}",k);n= +n.substring(k,z);if(n.length!=0){e.dropTarget.setAttribute("dos",e.dropTarget.className);e.dropTarget.className=e.dropTarget.className+" "+n}}else e.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",e.object,c,"",o);n=f.getAttribute("dos");if(n!=null)f.className=n}}if(e.dropTarget)if(e.dropTarget.handleDragDrop)e.dropTarget.handleDragDrop("drag",e.object,c,"",o);else e.object.className="Wt-valid-drop";else e.object.className="";return false}return true}function ra(c){c=c|| +window.event;q.capture(null);var e=M;if(e.object){if(e.dropTarget){var f=e.dropTarget.getAttribute("dos");if(f!=null)e.dropTarget.className=f;e.dropTarget.handleDragDrop?e.dropTarget.handleDragDrop("drop",e.object,c,e.sourceId,e.mimeType):m(e.dropTarget,{name:"_drop",eventObject:e.dropTarget,event:c},e.sourceId,e.mimeType)}e.object.style.position=e.objectPrevStyle.position;e.object.style.display=e.objectPrevStyle.display;e.object.style.left=e.objectPrevStyle.left;e.object.style.top=e.objectPrevStyle.top; +e.object.className=e.objectPrevStyle.className;e.object=null}}function ma(c,e,f){var k,o;o=c+"=";c=0;for(k=e.length;c0?"&e"+e:"&";f=e+"signal="+c.signal;if(c.id){f+=e+"id="+c.id+e+"name="+encodeURIComponent(c.name)+e+"an="+c.args.length;for(var o=0;o0&&q.setHtml(c.get(0),"",false)}function da(){q.history._initTimeout();qa==0&&a(null,"none",null,false)}function U(c){if(!q.isIEMobile)document.title=c}function ea(c){if(!ya){if(c){if(!window._$_APP_CLASS_$_LoadWidgetTree)return;q.history.initialize("Wt-history-field","Wt-history-iframe",w)}if(!("activeElement"in document)){function e(k){if(k&&k.target)document.activeElement= +k.target==document?null:k.target}function f(){document.activeElement=null}document.addEventListener("focus",e,true);document.addEventListener("blur",f,true)}$(document).mousedown(q.mouseDown).mouseup(q.mouseUp);q.history._initialize();J();ya=true;c&&window._$_APP_CLASS_$_LoadWidgetTree();V||pa||(pa=setInterval(da,_$_KEEP_ALIVE_$_000))}}function ba(c){clearTimeout(c);document.body.style.cursor="auto";if(sa!=null){try{sa()}catch(e){}sa=null}}function Z(){document.body.style.cursor="wait";sa=hideLoadingIndicator; +showLoadingIndicator()}function fa(c){za=c}function oa(){D._p_.autoJavaScript()}function ga(c){if(c){c="(function() {"+c+"})();";window.execScript?window.execScript(c):window.eval(c)}D==window._$_APP_CLASS_$_&&oa()}function G(c,e,f){if(!V)if(ta)setTimeout(function(){G(c,e,f)},50);else{if(c==0){q.resolveRelativeAnchors();_$_$if_CATCH_ERROR_$_();try{_$_$endif_$_();ga(e);_$_$if_CATCH_ERROR_$_()}catch(k){var o=null;_$_$if_SHOW_STACK_$_();o=k.stack||k.stacktrace;_$_$endif_$_();alert("Wt internal error: "+ +k+", code: "+k.code+", description: "+k.description+(o?", stack:\n"+o:""))}_$_$endif_$_();f&&ba(f)}else I=H.concat(I);H=[];if(aa){clearTimeout(aa);aa=null}Q=null;if(c>0)++qa;else qa=0;if(!V)if(za||I.length>0)if(c==1){o=Math.min(12E4,Math.exp(qa)*500);ia=setTimeout(function(){h()},o)}else h()}}function la(c){ja=c.indexOf("://")!=-1||c[0]=="/"?c:w+c;ua&&ua.setUrl(c)}function W(){Q.abort();aa=Q=null;V||h()}function a(c,e,f,k){if(!va){va=true;q.checkReleaseCapture(c,f);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_(); +if(!Q){_$_$endif_$_();var o={},n=I.length;o.object=c;o.signal=e;o.event=window.fakeEvent||f;o.feedback=k;I[n]=na(o,n);b();ga();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_();va=false}}function b(){if(!V){_$_$if_WEB_SOCKETS_$_();if(A.state!=2)if(typeof window.WebSocket==="undefined"&&typeof window.MozWebSocket==="undefined")A.state=2;else{var c=A.socket;if(c==null||c.readyState>1)if(c!=null&&A.state==0)A.state=2;else{function e(){++A.reconnectTries;var k=Math.min(12E4,Math.exp(A.reconnectTries)* +500);setTimeout(function(){b()},k)}var f;if(ja.indexOf("://")!=-1)f="ws"+ja.substr(4);else{f=ja.substr(ja.indexOf("?"));f="ws"+location.protocol.substr(4)+"//"+location.host+w+f}f+="&request=ws";A.socket=typeof window.WebSocket!=="undefined"?(c=new WebSocket(f)):(c=new MozWebSocket(f));A.keepAlive&&clearInterval(A.keepAlive);A.keepAlive=null;c.onmessage=function(k){A.reconnectTries=0;A.state=1;G(0,k.data,null)};c.onerror=function(){if(A.reconnectTries==3&&A.state==0)A.state=2;e()};c.onclose=function(){if(A.reconnectTries== +3&&A.state==0)A.state=2;e()};c.onopen=function(){c.send("&signal=ping");A.keepAlive&&clearInterval(A.keepAlive);A.keepAlive=setInterval(function(){if(c.readyState==1)c.send("&signal=ping");else{clearInterval(A.keepAlive);A.keepAlive=null}},_$_SERVER_PUSH_TIMEOUT_$_)}}if(c.readyState==1){h();return}}_$_$endif_$_();if(Q!=null&&aa!=null){clearTimeout(aa);Q.abort();Q=null}if(Q==null)if(ia==null){ia=setTimeout(function(){h()},q.updateDelay);Aa=(new Date).getTime()}else if(qa){clearTimeout(ia);h()}else if((new Date).getTime()- +Aa>q.updateDelay){clearTimeout(ia);h()}}}function d(c,e){wa=e;xa=c;ua.responseReceived(c)}function j(c){Ba=c}function h(){if(D!=window._$_APP_CLASS_$_)X();else if(!Q){ia=null;if(V){if(!Ca){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;Ca=true}}else{var c,e,f;if(I.length>0){c=g();e=c.feedback?setTimeout(Z,_$_INDICATOR_TIMEOUT_$_):null;f=false}else{c={result:"&signal=poll"};e=null;f=true}c.result+="&ackId="+xa+"&pageId="+Ba;if(wa){var k="",o=$("#"+ +wa).get(0);if(o)for(o=o.parentNode;!q.hasTag(o,"BODY");o=o.parentNode)if(o.id){if(k!="")k+=",";k+=o.id}c.result+="&ackPuzzle="+encodeURIComponent(k)}c.result+="&_$_PARAMS_$_";if(A.socket!=null&&A.socket.readyState==1){Q=null;e!=null&&clearTimeout(e);f||A.socket.send(c.result)}else{Q=ua.sendUpdate("request=jsupdate"+c.result,e,xa,-1);aa=f?setTimeout(W,_$_SERVER_PUSH_TIMEOUT_$_):null}}}}function l(c,e,f){if(e==-1)e=c.offsetWidth;if(f==-1)f=c.offsetHeight;if(typeof c.wtWidth==="undefined"||c.wtWidth!= +e||typeof c.wtHeight==="undefined"||c.wtHeight!=f){c.wtWidth=e;c.wtHeight=f;e>=0&&f>=0&&m(c,"resized",e,f)}}function m(c,e){var f={},k=I.length;f.signal="user";f.id=typeof c==="string"?c:c==D?"app":c.id;if(typeof e==="object"){f.name=e.name;f.object=e.eventObject;f.event=e.event}else{f.name=e;f.object=f.event=null}f.args=[];for(var o=2;o1)v(c,e,ha-1); +else{alert("Fatal error: failed loading "+c);X()}}}function o(){if(!n&&!z){n=true;t(c)}}var n=false,z=false;if(e!="")try{n=!eval("typeof "+e+" === 'undefined'")}catch(C){n=false}if(n)t(c);else{var P=document.createElement("script");P.setAttribute("src",c);P.onload=o;P.onerror=k;P.onreadystatechange=function(){var ha=P.readyState;if(ha=="loaded")q.isOpera||q.isIE?o():k();else ha=="complete"&&o()};document.getElementsByTagName("head")[0].appendChild(P)}}function x(c,e){this.callback=e;this.work=c.length; +this.images=[];if(c.length==0)e(this.images);else for(e=0;e